First steps with cumulocity

I also got the FORBIDDEN message in my LWM2M client and I solved it by making the name/id/endpoint id the same in the csv file I uploaded to register the tenant.

I was then able to start my LWM2M device with

java -jar device.jar -u lwm2m.eu-latest.cumulocity.com:5783 -n DevKit2

…and with a correct device protocol I could then receive measurements from it.

DevKit2 is the name I uses for name/id/endpoint id.

Hi @Robert_Neale !

thank you for your contact.

I tried some time, using your suggestions and playing with the URIs. I did these tests because I noticed that the URI that you used on the .csv file you sent to me is different than the URI used on the command line simulator.

I got the following results:

client and device: coap://lwm2m.eu-latest.cumulocity.com:5683

INFO [anjay] [C:/sources/studies/lwm2m/Anjay-freertos-client/Middlewares/Third_Party/Anjay/src/core/servers/anjay_reload.c:176]: servers reloaded
INFO [anjay] [C:/sources/studies/lwm2m/Anjay-freertos-client/Middlewares/Third_Party/Anjay/src/core/servers/anjay_connections.c:385]: server /0/0: transport change: (none) -> U (uri: coap://lwm2m.eu-latest.cumulocity.com:5683)
INFO [anjay] [C:/sources/studies/lwm2m/Anjay-freertos-client/Middlewares/Third_Party/Anjay/src/core/servers/anjay_connections.c:163]: reconnected
INFO [anjay] [C:/sources/studies/lwm2m/Anjay-freertos-client/Middlewares/Third_Party/Anjay/src/core/servers/anjay_register.c:720]: Attempting to register with LwM2M version 1.0
INFO [anjay] [C:/sources/studies/lwm2m/Anjay-freertos-client/Middlewares/Third_Party/Anjay/src/core/servers/anjay_register.c:689]: Register sent
WARNING [anjay] [C:/sources/studies/lwm2m/Anjay-freertos-client/Middlewares/Third_Party/Anjay/src/core/servers/anjay_register.c:516]: server responded with 4.04 Not Found (expected 2.01 Created)
WARNING [anjay] [C:/sources/studies/lwm2m/Anjay-freertos-client/Middlewares/Third_Party/Anjay/src/core/servers/anjay_register.c:551]: could not register to server 1

client and device: coap://lwm2m.cumulocity.com:5683

INFO [anjay] [C:/sources/studies/lwm2m/Anjay-freertos-client/Middlewares/Third_Party/Anjay/src/core/servers/anjay_reload.c:176]: servers reloaded
INFO [anjay] [C:/sources/studies/lwm2m/Anjay-freertos-client/Middlewares/Third_Party/Anjay/src/core/servers/anjay_connections.c:385]: server /0/0: transport change: (none) -> U (uri: coap://lwm2m.cumulocity.com:5683)
INFO [anjay] [C:/sources/studies/lwm2m/Anjay-freertos-client/Middlewares/Third_Party/Anjay/src/core/servers/anjay_connections.c:163]: reconnected
INFO [anjay] [C:/sources/studies/lwm2m/Anjay-freertos-client/Middlewares/Third_Party/Anjay/src/core/servers/anjay_register.c:720]: Attempting to register with LwM2M version 1.0
INFO [anjay] [C:/sources/studies/lwm2m/Anjay-freertos-client/Middlewares/Third_Party/Anjay/src/core/servers/anjay_register.c:689]: Register sent
WARNING [anjay] [C:/sources/studies/lwm2m/Anjay-freertos-client/Middlewares/Third_Party/Anjay/src/core/servers/anjay_register.c:516]: server responded with 4.04 Not Found (expected 2.01 Created)
WARNING [anjay] [C:/sources/studies/lwm2m/Anjay-freertos-client/Middlewares/Third_Party/Anjay/src/core/servers/anjay_register.c:551]: could not register to server 1
AUTOM TASK:  MODEM_DATA_READY_STATE - POLLING_TIMER_EVENT

client: coap://lwm2m.eu-latest.cumulocity.com:5783
device: coap://lwm2m.cumulocity.com:5683

INFO [anjay] [C:/sources/studies/lwm2m/Anjay-freertos-client/Middlewares/Third_Party/Anjay/src/core/servers/anjay_reload.c:176]: servers reloaded
INFO [anjay] [C:/sources/studies/lwm2m/Anjay-freertos-client/Middlewares/Third_Party/Anjay/src/core/servers/anjay_connections.c:385]: server /0/0: transport change: (none) -> U (uri: coap://lwm2m.eu-latest.cumulocity.com:5783)
INFO [anjay] [C:/sources/studies/lwm2m/Anjay-freertos-client/Middlewares/Third_Party/Anjay/src/core/servers/anjay_connections.c:163]: reconnected
INFO [anjay] [C:/sources/studies/lwm2m/Anjay-freertos-client/Middlewares/Third_Party/Anjay/src/core/servers/anjay_register.c:720]: Attempting to register with LwM2M version 1.0
INFO [anjay] [C:/sources/studies/lwm2m/Anjay-freertos-client/Middlewares/Third_Party/Anjay/src/core/servers/anjay_register.c:689]: Register sent
AUTOM TASK:  MODEM_DATA_READY_STATE - POLLING_TIMER_EVENT
WARNING [anjay] [C:/sources/studies/lwm2m/Anjay-freertos-client/Middlewares/Third_Party/Anjay/src/core/servers/anjay_register.c:516]: server responded with 4.03 Forbidden (expected 2.01 Created)
WARNING [anjay] [C:/sources/studies/lwm2m/Anjay-freertos-client/Middlewares/Third_Party/Anjay/src/core/servers/anjay_register.c:551]: could not register to server 1
AUTOM TASK:  MODEM_DATA_READY_STATE - POLLING_TIMER_EVENT

So, in all cases: no connection. But on the last case, the error message is different. Progress? I don’t know. I think that I’ll agree with @Stefan_Witschel and it should be a client problem.

Do you have some recommendations about clients that I can use? I was thinking about use my BG95 modem implementation, but after reading the documentation I guess that the BG95 lwm2m implementation doesn’t work with Cumulocity.

Can we do an online Teams session. What is your email?

Hi!
we can schedule a team session for tomorrow after the lunch. My email is rafael.diasmenezes@sloc.one

Hi!
as some of the suspect component at my implementation is the Anjay library and by technical motivations, I’m looking for other LwM2M client library to add to our code base.

I think that before I conclude this task with satisfactory success, I can’t do any integration test using Cumulocity.

one note: currently lwm2m-agent supports LWM2M version 1.0 and not 1.1. We are planning to support 1.1 in the future, it is in development phase

This anjay is 1.0.

anjay is too big for our solution.

I’m thinking about integrate the wakaama at our solution.