Hello there,
Well, I stuck therefore I ask some help from the community. I have an esp32, what sends to an mqtt server, and after a few (like 5 or 6) publish I receive an error 16, and after that that is the only thing what happening every time when the board wants to publish.
Did some digging, I found here that 16 means "Malformed received MQTT packet . I don't really know what does that mean, or how to prevent it.
Thanks in advance!
mqtt error 16 during publish
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: mqtt error 16 during publish
I suggest you tell us which MicroPython MQTT library you're using. Also what broker software you're running, and on what platform.
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.
Re: mqtt error 16 during publish
I am using mqtt simple.
The server/Broker is emqx v4.
The server/Broker is emqx v4.
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: mqtt error 16 during publish
Any chance of trying mosquitto for your broker to see if this has any effect? It's available in most Linux distros.
As far as I know all testing has been done using this. I've never seen this error.
As far as I know all testing has been done using this. I've never seen this error.
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.
Re: mqtt error 16 during publish
I think I got closer to the issue. It is not mqtt error 16, it is an OSError 16... and coming from the mqtt library from this line:
self.sock = ussl.wrap_socket(self.sock, **self.ssl_params)
self.sock = ussl.wrap_socket(self.sock, **self.ssl_params)