Socket issues

ESP_igrr
Posts: 2072
Joined: Tue Dec 01, 2015 8:37 am

Re: Socket issues

Postby ESP_igrr » Thu Aug 24, 2017 2:57 am

permal: No luck so far. Please check attached PDF and advise if possible.
Attachments
reproduce issue in docker.pdf
(221.44 KiB) Downloaded 510 times

permal
Posts: 384
Joined: Sun May 14, 2017 5:36 pm

Re: Socket issues

Postby permal » Thu Aug 24, 2017 5:28 pm

ESP_Iggr: Looks like a standard setup of a default mosquitto docker image, same as I have used.

I tried it again now, using the updated version of tcp_perf, commit fc85cb683d4a5e4c2a5b4cb7d607a3790b0cfb96. At first it looked to be working, but then the same thing happens again. Eventually it fails creating sockets, but I guess that is a programming error in the tool. See attached images (they are in reverse order, but I labeled them and you can see the time stamps).

Update:
I'm still getting this behavior consistently. Simply resetting the device allows it to successfully connect again, but it starts failing again after one or two disconnects. Also, I do not need to start/stop the mosquitto broker to provoke the problem; that was likely an observation-error on my part.

Update two:
If it matters, the network path is as follows: ESP32 -> Unifi AP-AC Pro -> Switch -> Broker.
Attachments
software abort3.PNG
Image 3: More failures.
software abort3.PNG (136.98 KiB) Viewed 6963 times
software abort2.PNG
Image 2: Continues to fail
software abort2.PNG (134.24 KiB) Viewed 6963 times
software abort.PNG
Image 1: As you can see, it has succeeded in connecting but fails to send since the MQTT broker quickly realizes that it is sending something else than MQTT packets.
software abort.PNG (159.79 KiB) Viewed 6963 times

zhangyanjiao
Posts: 34
Joined: Mon Aug 28, 2017 3:27 am

Re: Socket issues

Postby zhangyanjiao » Mon Aug 28, 2017 3:35 am

permal: Please show us your capture information when tcp packet transmit from ESP32 to Unifi AP-AC Pro in detail by WireShark or Ominipeek. Thanks !

permal
Posts: 384
Joined: Sun May 14, 2017 5:36 pm

Re: Socket issues

Postby permal » Mon Aug 28, 2017 4:48 am

Packets between ESP32 and Unifi AP? I'm sorry, but I do not have any such listening devices that lets be sniff the wireless communication. Can a second ESP32 be used for such a thing, if so, how?

If you actually mean the packets at the receiving end (mosquitto container) then that is what I've shown in earlier posts.

permal
Posts: 384
Joined: Sun May 14, 2017 5:36 pm

Re: Socket issues

Postby permal » Sat Nov 04, 2017 10:15 pm

Status update. I think I've finally found the cause of the problem discussed in this thread - it has turned out to be a bug in the MQTT broker. After updating to mosquitto 1.4.14 (from 1.4.8) it is finally running stable.

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 78 guests