0

I would like to connect one LwM2M client to multiple servers LwM2M by bootstrap server. I'm using Leshan (LwM2M implementation in Java).

So I'm using Lwm2m demo from github.com/Eclipse/Leshan. I run the server demo, the bootstrap server demo, and the client demo. I want to register the client in the server User Interface by using bootstrap server (I entered the client endpoint, the server URI, no security mode).

When I run them both, the client is not registered and I have this message in the terminal matching the client :

[bootstrap=Bootstrap Server [uri=coap://192.168.1.100:5683],
deviceMangements={123=DM Server
[uri=coap://192.168.1.85:8081,lifetime=20, binding=U]}].  
[2016-07-05 12:48:17,684 INFO RegistrationEngine] Trying to register to
coap://192.168.1.85:8081 ...  
[2016-07-05 12:49:39,113 ERROR RegistrationEngine] Registration failed: Timeout.  
[2016-07-05 12:49:39,116 INFO RegistrationEngine] Unable to connect to any server,
next retry in 600s ...

How can I fix this?

Roberto Caboni
  • 7,252
  • 10
  • 25
  • 39
  • What did you try? What problems did you face? As it is your question is very unclear and/or way to broad for SO. – Thomas Jul 04 '16 at 15:48
  • So i'm using Lwm2m demo from (https://github.com/eclipse/leshan). – Hèzouwè AMAOU TALLE Jul 05 '16 at 12:04
  • So i'm using Lwm2m demo from (https://github.com/eclipse/leshan). I run the server demo, the bootstrap server demo, and the client demo. I want to register the client in the server User Interface by using bootstrap server (i entered the client endpoint, the server uri, no security mode). – Hèzouwè AMAOU TALLE Jul 05 '16 at 14:07
  • When i run them both, the client is not registered and i have this message in the terminal matching the client : [bootstrap=Bootstrap Server [uri=coap://192.168.1.100:5683], deviceMangements={123=DM Server [uri=coap://192.168.1.85:8081,lifetime=20, binding=U]}].[2016-07-05 12:48:17,684 INFO RegistrationEngine] Trying to register to coap://192.168.1.85:8081 ...[2016-07-05 12:49:39,113 ERROR RegistrationEngine] Registration failed: Timeout. [2016-07-05 12:49:39,116 INFO RegistrationEngine] Unable to connect to any server, next retry in 600s ... How can I solve it ? – Hèzouwè AMAOU TALLE Jul 05 '16 at 14:09
  • I'm probably not suited to help you here but I'd suggest you add that information to your question instead of scattering in comments. You also have better formatting options there (which is important, since a badly formatted question which is next to unreadable just gets closed faster or at least repells people who might want to try helping). – Thomas Jul 05 '16 at 14:19

2 Answers2

0

coap://192.168.1.85:8081 doesn't sound like a standard CoAP port which is more like 5683 (or 5684 for DTLS)

Julien Vermillard
  • 2,945
  • 1
  • 18
  • 18
0

First you better check your configuration such as IP Address and Port. Client should point to bootstrap server IP and port. Bootstrap server configure client to correct server. According to your terminal message, lifetime is only 20s. You can try to extend the life time to 180s (3mins) in Bootstrap.

[bootstrap=Bootstrap Server [uri=coap://192.168.1.100:5683], deviceMangements={123=DM Server [uri=coap://192.168.1.85:8081,lifetime=20, binding=U]}]. [2016-07-05 12:48:17,684 INFO RegistrationEngine] Trying to register to coap://192.168.1.85:8081 ... [2016-07-05 12:49:39,113 ERROR RegistrationEngine] Registration failed: Timeout. [2016-07-05 12:49:39,116 INFO RegistrationEngine] Unable to connect to any server, next retry in 600s ...

Kaung San
  • 79
  • 1
  • 14