thingsboard: [Question] LwM2M bootstrap / register errors
Component
- Generic
Description Hello, I’m testing the new 3.3 feature LwM2M with a Telit dev board to check how it works and I’m finding problems connecting it with/without bootstrap server.
At the moment I’m trying with PSK with ‘coaps://’ address because Telit doesn’t allow ‘coap://’ address type.
On thingsboard side I’ve setup a device profile with more or less default setups and set security mode as Pre-Shared key on both Bootstrap and LwM2M server. I’ve created a device that uses this profile and set their credentials as following: Endpoint Client Name: [Module IMEI] Security Config Mode: Pre-Shared Key Client identity: [Module IMEI] Client key: 12312312312312312312312312312312 (just random numbers for testing till 32 required characters)
In bootstrap client side (Bootstrap Server) I’ve set Pre-Shared key with: Client public key: [Module IMEI] Client Secret Key: 12312312312312312312312312312312
As soon as I activate the Telit module LwM2M client I’ve got the following in console:
2021-08-18 18:01:41,008 [DTLS-Worker-0.0.0.0/0.0.0.0:5688#10] INFO o.e.c.scandium.dtls.DTLSFlight - Prepare flight 4, using max. datagram size 1436, max. fragment size 16384 [mhm=false, mr=true]
2021-08-18 18:01:41,009 [DTLS-Worker-0.0.0.0/0.0.0.0:5688#10] INFO o.e.c.scandium.dtls.DTLSFlight - Effective max. datagram size 1436
2021-08-18 18:01:42,011 [DTLS-Worker-0.0.0.0/0.0.0.0:5688#3] INFO o.e.c.scandium.dtls.DTLSFlight - Prepare flight 4, using max. datagram size 1436, max. fragment size 16384 [mhm=false, mr=true]
2021-08-18 18:01:42,011 [DTLS-Worker-0.0.0.0/0.0.0.0:5688#3] INFO o.e.c.scandium.dtls.DTLSFlight - Effective max. datagram size 1436
2021-08-18 18:01:44,012 [DTLS-Worker-0.0.0.0/0.0.0.0:5688#6] INFO o.e.c.scandium.dtls.DTLSFlight - Prepare flight 4, using max. datagram size 1436, max. fragment size 16384 [mhm=false, mr=true]
2021-08-18 18:01:44,013 [DTLS-Worker-0.0.0.0/0.0.0.0:5688#6] INFO o.e.c.scandium.dtls.DTLSFlight - Effective max. datagram size 1436
2021-08-18 18:01:44,377 [DTLS-Worker-0.0.0.0/0.0.0.0:5688#9] WARN o.e.c.scandium.dtls.ServerHandshaker - Cannot process handshake message from peer [/195.226.133.55:6002] due to [null]
org.thingsboard.server.transport.lwm2m.server.client.LwM2MAuthException: null
at org.thingsboard.server.transport.lwm2m.secure.LwM2mCredentialsSecurityInfoValidator.getEndpointSecurityInfoByCredentialsId(LwM2mCredentialsSecurityInfoValidator.java:92)
at org.thingsboard.server.transport.lwm2m.bootstrap.secure.LwM2MBootstrapSecurityStore.getByIdentity(LwM2MBootstrapSecurityStore.java:95)
at org.eclipse.californium.scandium.DTLSConnector.processHandshakeRecord(DTLSConnector.java:1811)
at org.eclipse.californium.scandium.DTLSConnector.processRecord(DTLSConnector.java:1509)
at org.eclipse.californium.scandium.DTLSConnector$12.run(DTLSConnector.java:1365)
Under transportLog key, I have the following message: info: getParametersBootstrap: [Module IMEI] Access connect client with bootstrap server.
If I avoid the bootstrap process and set the keys manually on the device, the console throws me this error:
2021-08-18 18:34:59,281 [CoapServer(main)#1] ERROR o.e.l.core.response.SendableResponse - Exception while calling the reponse sent callback
I will edit this issue or add more information while I keep testing why it fails.
Environment
- OS: Debian 10 / openjdk 11.0.12 2021-07-20
- ThingsBoard: 3.3.0
- Browser: Chrome 92
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 16 (8 by maintainers)
Hi @JavierNR , this is a known issue. We are working on a newer version of the Bootstrap server implementation. So far it looks to LwM2M v1.0 while now we are using LwM2M v1.1 specification. Although the update is under development, your testing can help us to make a bugless release
Update of Bootstrap in this branch — https://github.com/thingsboard/thingsboard/tree/develop/3.3.3