SoC Border Router with Wi-Fi Backhaul#

The Wi-SUN SoC Border router supports backhaul connection, using the two APIs sl_wisun_br_set_ipv6_up_handler() and sl_wisun_br_ipv6_down(). With sl_wisun_br_set_ipv6_up_handler() API, a host can register a callback to handle IPv6 packets from the Wi-SUN Network to forward them to internet. And with the sl_wisun_br_ipv6_down() API, the host can inject IPv6 packets to the Wi-SUN Network.

For the purpose of demonstrating this feature, a standalone project has been added to the list of Wi-SUN applications. The Wi-SUN - SoC Border Router - with SiWx917 Wi-Fi backhaul as its name indicates, relies on the SiWx917 Wi-Fi board to open a backhaul interface on the Wi-SUN SoC Border Router. The LwIP stack is used as the host IP stack of this project because of its integration, ease-of-use, and most importantly, the IPv6 packet forwarding.

The SoC Border Router with backhaul connectivity enables the use of an external DHCPv6 server. So in addition to the support of the internal DHCPv6 server that makes from the SoC Border router an out-of-the-box solution that can be evaluated on the fly, it also becomes possible to scale the border to a production-grade solution that can fit in larger and complex networks, thanks to the external DHCPv6 server feature support.

The demonstration relies on having a Wi-Fi access point with IPv6 support and DHCPv6 server, configured to forward the Wi-SUN packets through the SiWx917 Wi-Fi interface and have the right IPv6 addresses range that will be assigned to the Wi-SUN nodes.

Silicon Labs considers the configuration of the access point out of scope for this demonstration.

SoC BR with backhaul SetupSoC BR with backhaul Setup

Demo Prerequisites#

This demonstration, as shown in the previous figure, relies on four main entities:

Software used in this demonstration:

Setup Preparation#

Wi-SUN Node#

On the Wi-SUN node, flash the Wi-SUN - CLI Example. For details on how to create a project and flash it to your board using Simplicity Studio v5, refer to Creating a Project Based on an Example.

SiWx91x Connectivity Firmware#

The SiWx91x has to be updated with the latest Connectivity Firmware. Refer to Update SiWx91x Connectivity Firmware for detailed steps.

Wi-SUN Border Router#

First start by creating the project Wi-SUN - SoC Border Router - with SiWx917 Wi-Fi backhaul in Studio. The project supports, by default, the internal DHCPv6 server. In case of a setup that relies on the internal DHCPv6 server, you can directly build the project and flash it to the board. If the setup has an external DHCPv6 server, follow the next steps to install the DHCPv6 Relay for Wi-SUN Border Router component.

  1. In the wisun_soc_brcli_wifi.slcp, click [SOFTWARE COMPONENTS].

  2. Type "DHCPv6" in the search bar, and click DHCPv6 Relay for Wi-SUN Border Router.

  3. Click [Install] and, in the prompt window, choose the option to replace the internal DHCPv6 server with the DHCPv6 Relay for Wi-SUN Border Router.

Once the DHCPv6 Relay component is installed, you can build and flash the project.

Demo Configuration and Launch#

After flashing all the binaries to the boards, launch the consoles of the Wi-SUN node board and the SoC Border router. In the Debug Adapters view, right-click the desired board and select Launch Console. To get a prompt on the Console, go to the Serial 1 tab and press Enter.

Wi-Fi Configuration#

On the console of the Wi-SUN Border router, use the following commands to configure the access point SSID and passphrase:

> wisun set wifi.ssid "BRSoCDemo"
wifi.ssid = BRSoCDemo
> wisun set wifi.passphrase "Silabs_BRSoC"
wifi.passphrase = Silabs_BRSoC

After configuring the right ssid and passphrase, connect to the access point using the following command:

> wifi connect
[wifi: connecting to BRSoCDemo]
[wifi: connection successful]

The IPv6 address of the Wi-Fi interface and other details can be checked by the command wisun get wifi:

>wisun get wifi
wifi.ssid = "BRSoCDemo"
wifi.security = WPA2_CCMP (3)
wifi.passphrase = "Silabs_BRSoC"
wifi.wlan_state = connected
wifi.channel_number = 7
wifi.mac_address = ec:f6:4c:a0:43:20:02:08
wifi.ipv6_address = fd00:1234::eef6:4cff:fea0:4320

SoC Border router Configuration#

The Border Router configuration differs depending on whether it is the internal DHCPv6 server that is being used, or if the setup has an external DHCPv6 server.

With the two configurations, it is essential to set the Wi-SUN Network IPv6 prefix that is recommended to be different from the WAN IPv6 prefix to ease the routing configuration on the access point. Use the following command to set the IPv6 prefix:

> wisun set wisun.ipv6_prefix "fdc0:114f:d751:1::/64"
wisun.ipv6_prefix = fdc0:114f:d751:1::/64

Now that the IPv6 prefix of the Wi-SUN Network is known, the access point can be configured to route all the packets destined to the wisun.ipv6_prefix via the wifi.ipv6_address. This configuration is essential to have a working backhaul.

DHCPv6 Relay Configuration#

In case of using the DHCPv6 relay, the address of the DHCPv6 server should be provided to the SoC Border Router. To set the DHCPv6 server address, use the following command:

> wisun set wisun.dhcpv6_server "fd00:1234::1"
wisun.dhcpv6_server = fd00:1234::1

The IPv6 addresses range with the wisun.ipv6_prefix should be configured on the external DHCPv6 server. It is important that the external DHCPv6 Server generates IPv6 addresses for Wi-SUN nodes with the same IPv6 prefix that was configured on the Border Router side. If not, IPv6 routing protocol (RPL) will not work within the Wi-SUN Network.

Start The SoC Border Router#

The SoC Border Router can be started with the default PHY configuration. In case of changing the default PHY configuration, make sure to have the same configuration on the node side. To start the SoC Border Router use the following command:

> wisun start_fan11
[Using built-in trusted CA #0]
[Using built-in device credentials]
[Border router started]

Node Configuration#

If the Node Radio Board is on the same frequency band of the Border Router SoC Radio Board, the node can be started with the default PHY configuration. In case the boards have different frequency bands, check that the node PHY configuration matches the SoC Border Router PHY configuration and make the necessary adjustment in case the configurations are different before starting the node.

> wisun join_fan11
[Using built-in trusted CA #0]
[Using built-in device credentials]
[Connecting to "Wi-SUN Network"]
[Join state 1: Select PAN]
[Join state 2: Authenticate]
[Join state 3: Acquire PAN Config]
[Join state 4: Configure Routing - parent selection]
[Join state 4: Configure Routing - DHCP]
[Join state 4: Configure Routing - address registration]
[Join state 4: Configure Routing - DAO registration]
[Join state 5: Operational]
[Connected: 173 s]
[IPv6 address: fdc0:114f:d751:1::6c9b]

Local Ping Test#

To test that the backhaul functions correctly, try to ping the node from a Smartphone connected to the access point.

On the phone side, PingTools is used to perform the ping. The following screenshot shows a successful ping of the node IP address fdc0:114f:d751:1::6c9b.

Ping from phonePing from phone

From the node, use the following command to ping the phone. Make sure to change the IP address in the example.

> wisun ping fd00:1234::b473:7aff:fe9b:a804
PING fd00:1234::b473:7aff:fe9b:a804: 40 data bytes
40 bytes from fd00:1234::b473:7aff:fe9b:a804: icmp_seq=1 time=350 ms