OpenWRT and RIOT network configuration

Hello,

I just compiled OpenWRT with 6LoWPAN_bluetooth and configured it. (https://imgur.com/a/8ctUHG9 & https://imgur.com/a/frYKx7N) The interface gets an /60 prefix delegated (2a02:8aaa:baaa:b700::1/60), which is great. So now I want to configure RIOT OS to work with it.

I am able to ping the router from my node. But the configuration of the interface doesn’t work. As I understand it, I should now be able to add it with ifconfig 9 add 2a02:8aaa:baaa:b700::1/64 But this doesn’t return anything. There is also the 6ctx I am not familiar with. I am supposed to use this as well? I am on commit c310bfbf75928339b308f310dce682412e4ca9a9. I also thought about bridging the 6LoWPAN interface to the connected BLE node. Can somebody point me to the correct configuration? I don’t understand why ifconfig isn’t returning anything. Is that a bug?

I just compiled OpenWRT with 6LoWPAN_bluetooth and configured it.

    > (Imgur: The magic of the Internet & https://imgur.com/a/frYKx7N)     > The interface gets an /60 prefix delegated (2a02:8aaa:baaa:b700::1/60),     > which is great.

I assume that this is on the openwrt side of things. I'm surprised it gives a /60 and not a /64, but I guess that is an openwrt setting. What is your RIOT-OS device? Which openwrt router is it that you have BT on? (Just curious)

    > So now I want to configure RIOT OS to work with it.

I would think you need to do the L2 Bluetooth pairing first, but:

    > I am able to ping the router from my node.

that would seem to suggest that this already works. You get replies? Maybe you can explain exactly what you did that works.

    > But the configuration of the interface doesn't work.

    > As I understand it, I should now be able to add it with     > ifconfig 9 add 2a02:8aaa:baaa:b700::1/64

Do you mean ::2? I assume you are running this on the RIOT-OS side?

    > But this doesn't return anything. There is also the 6ctx I am not     > familiar with.

It provides an context for a compression mechanism in 6lo.

    > I am supposed to use this as well?     > I am on commit c310bfbf75928339b308f310dce682412e4ca9a9.     > I also thought about bridging the 6LoWPAN interface to the connected BLE     > node.

You can't bridge, because the L2 headers are very different. You can route, using RPL, though, which is the recommended mechanism in IPv6. Going first hop to 6lowman as being BT has some interesting use cases, I think.

    > Can somebody point me to the correct configuration?     > I don't understand why ifconfig isn't returning anything. Is that a bug?

I don't have experience with this.

I just compiled OpenWRT with 6LoWPAN_bluetooth and configured it. (https://imgur.com/a/8ctUHG9 & https://imgur.com/a/frYKx7N) The interface gets an /60 prefix delegated (2a02:8aaa:baaa:b700::1/60), which is great.

I assume that this is on the openwrt side of things. I’m surprised it gives a /60 and not a /64, but I guess that is an openwrt setting.

Yes, I configured it that way to request a /60 PD. Because Linux doesn’t have a proper support for RPL, I don’t want to have the /64 on the BT interface. I can also connect more than one device to this interface. Also a good reason to have /60 and not /64.

What is your RIOT-OS device?

The gnrc_networking example on the nrf52.

Which openwrt router is it that you have BT on? (Just curious)

Archer C7 v2 with a Fritzbox Cable in front of it in bridge mode (Modem). I added a BLE USB stick to it and compiled the necessary drivers and 6lowpan_bluetooth kernel modules for it.

So now I want to configure RIOT OS to work with it.

I would think you need to do the L2 Bluetooth pairing first, but:

I am able to ping the router from my node.

that would seem to suggest that this already works. You get replies? Maybe you can explain exactly what you did that works.

But the configuration of the interface doesn’t work.

Yes, L2 BLE connection is there. I am able to ping the link local address of the bt0 interface (OpenWRT router). So the connection is there and they are able to reach each other. Now its (just) a question about the correct network setup. PD to the bt0 interface looks also fine.

2020-02-04 12:15:13,389 # ble info 2020-02-04 12:15:13,395 # Own Address: CC:C6:52:01:8E:8C -> [FE80::CCC6:52FF:FE01:8E8C] 2020-02-04 12:15:13,396 # Free slots: 2/3 2020-02-04 12:15:13,397 # Advertising: no 2020-02-04 12:15:13,399 # Connections: 1 2020-02-04 12:15:13,404 # [ 0] 00:1A:7D:DA:71:13 (S) -> [FE80::001A:7DFF:FEDA:7113] 2020-02-04 12:15:13,405 # Contexts: 2020-02-04 12:15:13,409 # [ 0] state: 0x0022 - GAP-slave L2CAP-server 2020-02-04 12:15:13,411 # [ 1] state: 0x8000 - unused 2020-02-04 12:15:13,414 # [ 2] state: 0x8000 - unused > ping6 fe80::1a:7dff:feda:7113 2020-02-04 12:27:11,497 # ping6 fe80::1a:7dff:feda:7113 2020-02-04 12:27:11,591 # 12 bytes from fe80::1a:7dff:feda:7113: icmp_seq=0 ttl=64 time=89.223 ms 2020-02-04 12:27:12,591 # 12 bytes from fe80::1a:7dff:feda:7113: icmp_seq=1 ttl=64 time=91.610 ms 2020-02-04 12:27:13,591 # 12 bytes from fe80::1a:7dff:feda:7113: icmp_seq=2 ttl=64 time=94.083 ms 2020-02-04 12:27:13,592 # 2020-02-04 12:27:13,595 # --- fe80::1a:7dff:feda:7113 PING statistics --- 2020-02-04 12:27:13,600 # 3 packets transmitted, 3 packets received, 0% packet loss 2020-02-04 12:27:13,605 # round-trip min/avg/max = 89.223/91.638/94.083 ms

``> As I understand it, I should now be able to add it with

ifconfig 9 add 2a02:8aaa:baaa:b700::1/64

Do you mean ::2? I assume you are running this on the RIOT-OS side?

Yes, this is the RIOT side. Yes, ::2.

> ifconfig 9 add 2aaa:8aaa:baaa:b700::2/64

Which results in no response at all and the interface didn’t change. It only has the link local address.

But this doesn’t return anything. There is also the 6ctx I am not familiar with.

It provides an context for a compression mechanism in 6lo.

Okay, this is not important at the moment, I guess.

You can’t bridge, because the L2 headers are very different. You can route, using RPL, though, which is the recommended mechanism in IPv6. Going first hop to 6lowman as being BT has some interesting use cases, I think.

Yes, I thought it should be similar to the SLIP configuration, but with Bluetooth as interface. You should also be able to connect more than one node to the bt0 interface. So that you create a star topology at the router to many 6LoWPAN trees.

2020-02-04 12:27:11,497 # ping6 fe80::1a:7dff:feda:7113

being paranoid, can you ping the link local from Openwrt?

    > Yes, this is the RIOT side. Yes, ::2.

    >> ifconfig 9 add 2aaa:8aaa:baaa:b700::2/64

    > Which results in no response at all and the interface didn't change. It     > only has the link local address.

I don't know why it didn't change.

I know that if we could run RPL across the link, that it is better to just have the LL. I ported unstrung (RPL daemon for Linux) to openwrt, and we did interoperate once back in 2015 or something, but I don't have a package for you today.

Can you assign a /128 to the loopback, and put a route to it on openwrt via the LL address?

    >> You can't bridge, because the L2 headers are very different.     >> You can route, using RPL, though, which is the recommended mechanism in IPv6.     >> Going first hop to 6lowman as being BT has some interesting use cases, I think.

    > Yes, I thought it should be similar to the SLIP configuration, but with     > Bluetooth as interface. You should also be able to connect more than one     > node to the bt0 interface. So that you create a star topology at the     > router to many 6LoWPAN trees.

While BT can emulate serial connections, and you could run PPP over it, that's not the IP over BT works. Even if it were SLIP, you still couldn't bridge, because SLIP has *no* L2 headers :slight_smile:

WiFi/Ethernet bridging only works because WiFi look close enough that they can be easily rewriten to be ethernet headers.