This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Problem with CoAP Examples based on LWIP stack (no suitable source address was found)

Dear Nordic Team,

I use a custom dev board with the nRF52832 SoC and the nRF5 SDK v16.0.0.

I need CoAP functionality for my project. I managed to get the CoAP Examples based on Nordics IPV6 Stack up and running.

But the CoAP Examples, which are based on the LWIP stack, do not work well in my environment.

The incoming CoAP (GET)requests are processed successfully by the nRF52832.

But the outgoing CoAP request from the nRF52832 to the CoAP server (runing on a Raspberry PI) runs into an error: CoAP message skipped, error code = 0x00000003.

The error is thrown in the class udp.c in line 619 (see screenshot).

The corresponding line of code is commented with "No suitable source address was found."

So it seems that the local ip address of the nRF cannot be determined.

As I said, the IPv6 based CoAP Examples are working fine, but the LWIP based CoAP Examples did not.

I'am using the softdevice s132_nrf52_7.0.1_softdevice.hex

My Bluetooth network interface in the Raspberry Pi looks like this:
root @ raspberrypi: / home / pi # ifconfig
bt0: flags = 4161 <UP, RUNNING, MULTICAST> mtu 1280
        inet6 fd00: a :: prefixlen 64 scopeid 0x0 <global>
        inet6 fe80 :: b827: ebff: fe80: def4 prefixlen 64 scopeid 0x20 <link>
        unspec B8-27-EB-80-DE-F4-98-CA-00-00-00-00-00-00-00-00 txqueuelen 1000 (UNSPEC)
        RX packets 5 bytes 157 (157.0 B)
        RX errors 0 dropped 2 overruns 0 frame 0
        TX packets 21 bytes 1763 (1.7 KiB)
        TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

Please can you give me an indication of the problem cause.

Thanks and Regards
Michael

Parents
  • Hi, most likely the lwIP stack does not get a global prefix. Have you set up radvd correctly and added the global prefix to the bt0 interface? From the output of ifconfig it seems like it's missing the global prefix. It has to be added to the bt0 interface each time you reconnect.

    f.ex:

    ifconfig -a bt0 add 2001:db8::1/64

    Also wireshark logs help a lot in debugging this. It's a great tool, I would recommend using that for debugging.

Reply
  • Hi, most likely the lwIP stack does not get a global prefix. Have you set up radvd correctly and added the global prefix to the bt0 interface? From the output of ifconfig it seems like it's missing the global prefix. It has to be added to the bt0 interface each time you reconnect.

    f.ex:

    ifconfig -a bt0 add 2001:db8::1/64

    Also wireshark logs help a lot in debugging this. It's a great tool, I would recommend using that for debugging.

Children
Related