This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

coap server connection to border router

Hi,

I am trying to utilise the available thread examples to build comms from CoAP server to external website through Border Router. 

I have configured Border Router as per the docs and I can issue ping commands from CLI example through border router.

As the next step, I have loaded the CoAP Server example and expected the `ot ping` command to work as the CLI example, but for some reason I am getting 100% packet loss.

I can see that the Border Router has node type of "router" and CoAP server is "leader".

PANID, XPANID, Channel are the same between both devices.

Any advice would be greatly appreciated.

Thank you

Parents Reply Children
  • Hi

    The issue is that your device does not have a Global address using the On-Mesh Prefix, as you see explained in OpenThread: Join the network.

    Would it be an alternative for you to use the official OTBR instead, as it is more up to date than our old version?
    See Thread Border Router for our tutorial on how to set it up.

    Regards,
    Sigurd Hellesvik

  • Hi,

    It took me a few attempts to get the OTBR + nRF52840 Dongle working but I got there in the end.

    I got the Thread network setup.

    The CoAP Server (Router) is linked to the BR (Leader)

    I have executed the command line from the link you provided: Ping the external Network on the BR.

    I have re-compiled my CoAP Server with 

    # Enable OpenThread CoAP support API
    CONFIG_OPENTHREAD_COAP=y
    CONFIG_OPENTHREAD_JOINER=y

    In the image below you can see the BR and CoAP Server side by side. As you can see CoAP Server still does not acquire the On-Mesh address and if I try to execute the ot joiner start <pskc> it tells me the arguments are wrong.

    edit: Sigurd, I wonder if this is the cause to my issue. I'll try it out.

  • Hi Sigurd, 

    I have found the issue. There is/was a bug in more recent builds of zephyr. Github link.

    After I've updated by config as per the bug fix my CoAP Server can acquire On-Mesh prefix IP and i can ping 64:ff9b::808:808 from it.

    The solution is to add

    CONFIG_OPENTHREAD_SLAAC=y

    to prj.conf file.

    So this issue is fixed, however, it is still not clear why ot joiner start <pskc> is giving me an InvalidArgs error.

  • Good that you solved it, thank you for sharing your solution!

    robtic said:
    So this issue is fixed, however, it is still not clear why ot joiner start <pskc> is giving me an InvalidArgs error.

    I guess your passkey is too short. Try to use a longer one.
    If you continue to face problems with the joiner, create a new ticket on DevZone explaining your problem, and we will help.

    Good luck onwards,
    Sigurd Hellesvik

Related