question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Leshan LwM2M client - server connection issue

See original GitHub issue

Hi Team,

I am running one issue with the Leshan server. Please help.

I have downloaded the zephyr project from the below link to explore the LwM2M client-server scenario: https://github.com/zephyrproject-rtos/zephyr

Summary: I have compiled and run the lwm2m client sample for ‘x86’ and I was able to connect the Leshan demo server running locally in the same Linux host machine. But as soon as I add the URI of the Leshan LwM2M server in the client code which is running remotely, I am unable to connect it.

Working setup locally:

  • Run the lwm2m client for x86 on a Linux machine.
  • Run the Lwm2m server locally using "leshan-server-demo.jar and I can see the client connected locally at http://localhost:8080/

A problem in connection of remote server:

  • In the client app, the URI of the lwm2m server “coap://leshan.eclipseprojects.io:5683” is added to connect.
  • Compiled the app for x86 and tried to run.
  • But I am unable to connect to the server, I am getting the below error: net_lwm2m_rd_client: Cannot init LWM2M engine (-22)

Also, I have tried other links too like the following but no success:

  • coap://leshan.eclipse.org:5783
  • coap://leshan.iot-lab.info
  • coap://5.39.83.206

Can you please help me with what I am missing here? I am attaching the whole error log for more information. Lwm2m_server_connection_error.txt

Thanks, Hardik

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
Hard1kPrajapat1commented, Nov 19, 2020

Yeah that I know. The port 5783 for non-secure and 5784 for secure communication. I thought the IPv4 also would be different. Okay, thanks for all your help Simon, you can close this ticket.

0reactions
sbernard31commented, Nov 19, 2020

same machine but different coap port. (look at README to know the port 😉)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to connect Leshan LwM2M server using x86 ... - GitHub
Hi Team, I am running one issue with the Leshan server. ... Unable to connect Leshan LwM2M server using x86 based LwM2M client...
Read more >
LESHAN PLATFORM LWM2M SERVER CONNECTION ...
The LwM2M Client has registered to Leshan Server successfully,And the leshan's OBS is triggered manually and the modem responds to Observe, or “AUTO_ACK” ......
Read more >
Eclipse Leshan LwM2M Build Failure - Stack Overflow
I am currently getting myself into the LwM2M topic and I tried the leshan project from eclipse. I followed the README.md on ...
Read more >
LWM2M client using bootstrap on Leshan demo server not ...
I'm trying to test LWM2M bootstrapping using https://leshan.eclipseprojects.io/ but my board is failing to connect to the LWM2M server after ...
Read more >
LWM2M Client in nrf9160 Feather Failed to connect with ...
Second time i use working i-Basis sim which comes with nrf9160-DK board and successfully tested with Leshan server but with nrf9160 Feather i...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found