I think I may have found a problem in /arduino/libraries/bg96/Ethernet/src/txMqtt.h at line 85.
The actual code is:
sin4->sin_port = _htons(port);
I am not exactly sure why _htons is used here. I tried the publish_subscribe example and was not able to connect to the eclipse mosquito server. When I print the value of sin4->sin_port after the call of server() I have a strange value in it. I saw that both variables were already uint16_t types so I tried to simply write:
sin4->sin_port = port;
I retried with this line and was able to connect to the eclipse mosquito server. Is this a bug or am I missing something?
Hi,
I think I may have found a problem in /arduino/libraries/bg96/Ethernet/src/txMqtt.h at line 85.
The actual code is: sin4->sin_port = _htons(port);
I am not exactly sure why _htons is used here. I tried the publish_subscribe example and was not able to connect to the eclipse mosquito server. When I print the value of sin4->sin_port after the call of server() I have a strange value in it. I saw that both variables were already uint16_t types so I tried to simply write:
sin4->sin_port = port;
I retried with this line and was able to connect to the eclipse mosquito server. Is this a bug or am I missing something?
Thank you!