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

Setting up LwM2M server with nrf IOT SDK

Hi,

I have a nordic chip (nrf2832) and I am trying to use it as a LWM2M client and register it to a LWM2M Server. I want to achieve this: developer.nordicsemi.com/.../LWM2M_client.svg

I have already done the steps described in developer.nordicsemi.com/.../a00089.html

root@raspberrypi:/home/pi# ping6 -I bt0 ff02::1 PING ff02::1(ff02::1) from fe80::ba27:ebff:fed7:2a95 bt0: 56 data bytes 64 bytes from fe80::ba27:ebff:fed7:2a95: icmp_seq=1 ttl=64 time=0.162 ms 64 bytes from fe80::206:99ff:feea:bb16: icmp_seq=1 ttl=64 time=186 ms (DUP!)

I am now stuck in the steps described in developer.nordicsemi.com/.../a00082.html

According to the steps, I should give these commands:

ifconfig bt0 add 2001:db8::1/64 ifconfig bt0 add 2001:db8::2/64

It also says that the commands assume that the bt0 interface is already up running.

My understanding is that 2001:db8::1/64 is the IPV6 address of bootstrap server and 2001:db8::2 is the IPv& address of management server, right? However, bt0 interface is on the raspberry pi and NOT the server running Leshan server, right?

So where exactly do I run 'ifconfig bt0 add 2001:db8::1/64' and 'ifconfig bt0 add 2001:db8::2/64'? Raspberry Pi or ubuntu machine?

Parents
  • EDIT 2016:08:03: Changed the radvd config and the address in the interfaces added on the server side according to comments from this date.

    The example is using a linux machine with a Bluetooth dongle running the servers.

    If you want a raspberry pi to do the BLE routing and another machine running the servers, it gets a bit more complicated. I suggest that you try the example on one machine first, before trying to do it with raspberry pi as the router.

    2001:db8::1 is the address of the bootstrap server and 2001:db8::2 is the address of the Leshan server.

    If you want to do it on two machines this is what you have to do:

    • Create two addresses for the two servers on Ethernet interface (on the device hosting the servers): ifconfig eth0 add 2001:db81::1/64 ifconfig eth0 add 2001:db81::2/64

    • Configure radvd to distribute a prefix on the Ethernet interface (and change bt0 to avoid conflict):

    See here.

    interface eth0
    {
        AdvSendAdvert on;
        prefix 2001:db81::/64
        {
            AdvOnLink on;
            AdvAutonomous on;
            AdvRouterAddr on;
        };
    
        route ::/0
        {
        };
    };
    
    interface bt0
    {
        AdvSendAdvert on;
        prefix 2001:db82::/64
        {
            AdvOnLink off;
            AdvAutonomous on;
            AdvRouterAddr on;
        };
    };
    
    • When adding an interface to bt0 you have to choose something other than 2001:db8::1/64 or 2001:db8::2/64.
  • Hi, We've spent an entire day on this and we haven't get this to work :(

    I added interfaces on the RasPi sudo ifconfig eth0 add 2001:db81::1 sudo ifconfig bt0 add 2001:db82::1

    Strangely enough I can ping 2001:db82::1 from my laptop but not 2001:db81::1 which is the actual router address. From the RasPi I can ping other PCs connected to the LAN which is great. On the RasPi I run tcpdump and I can actually see the bootstrap request coming and directed to the right address, but they are not forwarded apparently. I feel like it's a routing problem... so maybe this helps? sudo ip route add 2001:db81::/64 dev eth0.. but it didn't

Reply
  • Hi, We've spent an entire day on this and we haven't get this to work :(

    I added interfaces on the RasPi sudo ifconfig eth0 add 2001:db81::1 sudo ifconfig bt0 add 2001:db82::1

    Strangely enough I can ping 2001:db82::1 from my laptop but not 2001:db81::1 which is the actual router address. From the RasPi I can ping other PCs connected to the LAN which is great. On the RasPi I run tcpdump and I can actually see the bootstrap request coming and directed to the right address, but they are not forwarded apparently. I feel like it's a routing problem... so maybe this helps? sudo ip route add 2001:db81::/64 dev eth0.. but it didn't

Children
No Data
Related