You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a strange problem with ... actually I am not sure. I use PubSub library to access MQTT broker with RF24Ethernet bellow. From time to time publish() returns false, but actually data is published. I went through PubSub implementation and i noticed that on "failed" cases ethernet client write() returns different size than size of data prepared to transfer over that client (line 462 of PubSubClient.cpp): rc = _client->write(buf+(4-llen),length+1+llen);
I printed out the returned values and the size of buffer to write and it looks like in error cases rc is equal to size of currently sending buffer + size of previously sent buffer. An example:
As a next step I did a TCP dump from tun interface where my Arduino is connected to (I use RF24Gateway) and there is a correlation between failed publish() and TCP ACK for MQTT PING RESPONSE sent from broker:
10.10.3.30 is my Arduino. TCP Zero Window means "give me a break" so for some reason Arduino is overloaded. From wireshark wiki:
This means that a client is not able to receive further information at the moment, and the TCP transmission is halted until it can process the information in its receive buffer.
Similar situation happens when broker sends Publish to my Arduino:
Ok, I understand that some retransmissions may occur due to a sleep/delay in my code. But when frame 75 is ACK in frame 84 again it seems that Arduino TCP window == 0.
Any idea what's going on here and what can be the reason? How to debug it further?
Hi,
I have a strange problem with ... actually I am not sure. I use PubSub library to access MQTT broker with RF24Ethernet bellow. From time to time publish() returns false, but actually data is published. I went through PubSub implementation and i noticed that on "failed" cases ethernet client write() returns different size than size of data prepared to transfer over that client (line 462 of PubSubClient.cpp):
rc = _client->write(buf+(4-llen),length+1+llen);
I printed out the returned values and the size of buffer to write and it looks like in error cases
rc
is equal to size of currently sending buffer + size of previously sent buffer. An example:As a next step I did a TCP dump from tun interface where my Arduino is connected to (I use RF24Gateway) and there is a correlation between failed publish() and TCP ACK for MQTT PING RESPONSE sent from broker:
10.10.3.30 is my Arduino. TCP Zero Window means "give me a break" so for some reason Arduino is overloaded. From wireshark wiki:
Similar situation happens when broker sends Publish to my Arduino:
Ok, I understand that some retransmissions may occur due to a sleep/delay in my code. But when frame 75 is ACK in frame 84 again it seems that Arduino TCP window == 0.
Any idea what's going on here and what can be the reason? How to debug it further?
Here is a link to the implementation:
https://bitbucket.org/elvisPA/radiosensornet/raw/9a888cb7845406e0efd82b561870cebe471ca9ff/arduinoSensorFirmware/client.ino
The text was updated successfully, but these errors were encountered: