Unable to receive request on CoAP server running on Border Router.

Hi Nordic,

I am working on a raspberry pi based gateway which has Thread Border Router and edge node functionality. I have setup the OTBR on the gateway and I have manage to ping and send messages the thread nodes from the gateway.

Now I am trying to run a CoAP server on my gateway so that thread nodes can send messages to gateway. I have tried running a simple CoAP server on the gateway but its not able to receive any message whenever nodes sends request on the path.

I have attached the CoAP server code below. Please let me know if I am doing anything wrong.

libcoap-minimal.zip

Parents
  • Hi Mohinish,

    Are you able to send messages to the CoAP server using the CoAP client running on the Raspberry Pi?

    From you server.cc file, it looks like your server is hosted on the "localhost" port. Localhost is a loopback address, and can not be reached from external devices, such as your thread nodes.

    To reach the Thread server from your nodes, you need to set the server up on an IP address belonging to the Raspberry Pi.

    Did this fix your issue?

    Regards,
    Sigurd Hellesvik

Reply
  • Hi Mohinish,

    Are you able to send messages to the CoAP server using the CoAP client running on the Raspberry Pi?

    From you server.cc file, it looks like your server is hosted on the "localhost" port. Localhost is a loopback address, and can not be reached from external devices, such as your thread nodes.

    To reach the Thread server from your nodes, you need to set the server up on an IP address belonging to the Raspberry Pi.

    Did this fix your issue?

    Regards,
    Sigurd Hellesvik

Children
Related