Switch to desktop version  
MQTT Client problem after firmware update to 14.0s01 - Printable Version

+- Ewon Technical Forum (https://techforum.ewon.biz)
+-- Forum: Development (https://techforum.ewon.biz/forum-50.html)
+--- Forum: Java (https://techforum.ewon.biz/forum-53.html)
+--- Thread: MQTT Client problem after firmware update to 14.0s01 (/thread-1133.html)



MQTT Client problem after firmware update to 14.0s01 - vmi - 20-12-2019

Hi,

I have a Java code that uses the MQTT Java client to send the tag values to a Mosquitto server.

Two days a go I updated the firmware from 13 to 14 on the eWon Flexy 203, so I can utilize the newly added MqttClient.getStatus() function but my code stop immediately functioning properly. 

After digging a bit into what is the cause, I discovered that the problem lies in the MqttClient.connect function. That is as soon as the Mqtt client connect the eWon Flexy becomes non responsive.

You can see below the log from my mosquitto server:
1576793767: New connection from xx.xx.xx.xx on port 8883.
1576793768: New client connected from xx.xx.xx.xx as Flexy (c1, k60, u'Flexy').
1576793768: Sending CONNACK to Flexy (0, 0)
1576793768: Received PUBLISH from Flexy (d0, q1, r1, m1, 's/someTopic', ... (1228 bytes))
1576793768: Sending PUBACK to Flexy (Mid: 1)
1576793768: Socket error on client Flexy, disconnecting.


As you can see, the mqtt client does manage to connect properly and send the data only once (the data is recieved on the server). Immediately after that the client is disconnected due to a socket error. At the same time my e-catcher shows the eWon Flexy going offline.

I am not sure what was modified in the updated Java ETK library 1.4.4 and the new firmware but the same code was working flawlessly on Java ETK 1.4.2 and firmware 13.0.

Could you please advice me what to do. I am kind of lost here :/ Thank you in advance


RE: MQTT Client problem after firmware update to 14.0s01 - simon - 20-12-2019

Hi,

I think you are facing the same problem as described here : https://techforum.ewon.biz/thread-586-post-3694.html#pid3694

Simin


RE: MQTT Client problem after firmware update to 14.0s01 - vmi - 20-12-2019

(20-12-2019, 05:54 PM)simon Wrote: Hi,

I think you are facing the same problem as described here : https://techforum.ewon.biz/thread-586-post-3694.html#pid3694

Simon
Thanks a lot Simon. I will try the workaround and keep you posted.


RE: MQTT Client problem after firmware update to 14.0s01 - vmi - 23-12-2019

(20-12-2019, 06:04 PM)vmi Wrote:
(20-12-2019, 05:54 PM)simon Wrote: Hi,

I think you are facing the same problem as described here : https://techforum.ewon.biz/thread-586-post-3694.html#pid3694

Simon
Thanks a lot Simon. I will try the workaround and keep you posted.

It worked. That was it. Thank you once more Simon. You saved the day


RE: MQTT Client problem after firmware update to 14.0s01 - simon - 23-12-2019

You are welcome. :-)

Wish you an happy new year!