Can't connect device via LwM2M to Thingsboard live demo server

181 Views Asked by At

I was following the instructions provided at Thingsboard LwM2M-API. When trying to connect a Wakaama example client, I get a Connection creation failed. log message:

$ ./lwm2mclient -h lwm2m.thingsboard.cloud -n NuttX -p 5685 -c
Trying to bind LWM2M Client to port 56830
LWM2M Client "NuttX" started on port 56830
> New Battery Level: 67
value changed!
Opening connection to server at lwm2m.thingsboard.cloud:5685
Connection creation failed.
 -> State: STATE_REGISTERING
Opening connection to server at lwm2m.thingsboard.cloud:5685
Connection creation failed.
 -> State: STATE_REGISTERING
1

There are 1 best solutions below

0
Michael Jung On

Turns out the Wakaama lwm2mclient defaults to using IPv6, but lwm2m.thingsboard.cloud only supports IPv4. Solution is to add the -4 option when calling lwm2mclient