New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed MQTT Connection Error Code 3 #59
Comments
I'm seeing that error intermittently. I'm using the soft watchdog code
to reset the processor when there is some hang and sometimes it will
recover but in some cases I have to remove the battery (or if no battery
the USB cable) to get it to work again. A few days ago I picked up the
pre-release of the MKRNB library and before that it seems that the reset
by the soft watchdog always recovered. Don't know if the problem is
with the update library or something else. It's not uncommon to get this
error as it's caused by a timeout on a write. Setting the timeout in
NBClient write to 240000 helps but still get problems just not as
frequently. Seems after a timeout on a send often the library code
hangs in some loop and my code never gets control again which is the
reason I use the software watchdog. My broker is a Mosquitto broker
running on one of my systems and I can see in the log that the open
socket works as the broker logs a New Connection message. Before
updating the library I could run for days (with many watchdog restarts)
but now I can't. Unfortunately I don't have a solution. At this very
point in time I'm having success send messages to the broker but it quit
earlier today and it took completely removing power from the 1500 to get
it working again.
AT+USOCR=6
+USOCR: 0
OK
AT+USOCO=0,"207.40.144.108",1883
OK
AT+USOWR=0,56,"103600044D51545404C2003C00174D4B52313530302D333532373533303930383630383038000773656E736F72730008747269636B68616D"NCClient
send wait returns: -1
AT+USOCL=0
ERROR
.CONNECT ERROR: 3
+UUSOCL: 0
…On 11/12/20 1:02 AM, Nico Fri wrote:
Hi,
i tried to send data with MKR NB to a MQTT Broker with following
components:
* MKR NB 1500
* 1NCE card with active data plan
and used MKRNB and ArduinoMqttClient Librarys.
When I try to connect the MKR NB to the MQTT broker, I get
ERROR-CODE 3 = Server unavailable. With the MKR 1010 Wifi the
connection to the broker always works. Even with the program
MQTT.fx and the same access data, the connection to the broker
works without problems and data can be sent. The connection with
the MKR NB has already worked and now it gives the error without
changes in the code again. When I run the NBWebClient example
sketch, I get the http request without any problems.
Any help or hints or additional questions?
Thanks
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#59>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABHKVFIVRRMP33CTAIZABFLSPOCB5ANCNFSM4TS4W4SA>.
|
try #84 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
i tried to send data with MKR NB to a MQTT Broker with following components:
and used MKRNB and ArduinoMqttClient Librarys.
When I try to connect the MKR NB to the MQTT broker, I get ERROR-CODE 3 = Server unavailable. With the MKR 1010 Wifi the connection to the broker always works. Even with the program MQTT.fx and the same access data, the connection to the broker works without problems and data can be sent. The connection with the MKR NB has already worked and now it gives the error without changes in the code again. When I run the NBWebClient example sketch, I get the http request without any problems.
Any help or hints or additional questions?
Thanks
The text was updated successfully, but these errors were encountered: