Tuesday, August 10, 2021

Interoperability test between Silicon Labs and Texas Instrument Wi-SUN Stack

Interoperability is most import in standard protocol implementation and deployment. In this test, I use two Silicon Labs EFR32 BRD4170A radio boards, one acts as Wi-SUN border router and another acts as ping node, and yet anther Texas Instrument CC1312R7 LaunchPad to act as Wi-SUN coap node to join. The following steps show you details interoperability test between Silicon Labs and Texas Instrument Wi-SUN Stack.

1. Setup Wi-SUN SoC Border Router on BRD4170A radio board.

1.1 Start Silicon Labs Simplicity Studio v5 and Install Wi-SUN Stack version 1.1.0.0



1.2 Download Wi-SUN SoC Border Router (running 1b mode) into one of BRD4170A radio board to act as border router.


1.3 Start J-Link RTT Viewer to get output log of  Wi-SUN SoC Border Router.


 1.4 Launch console of BRD4170A in Simplicity Studio v5 and use CLI command "start wisun" to start Wi-SUN network.

 
1.5 Check Start J-Link RTT Viewer output to get Wi-SUN network key, which we need to input this into Texas Instrument Wi-SUN device to join the same network.

2. Create and join Wi-SUN SoC Ping node into border router.

2.1 Create and build Wi-SUN SoC Ping example in Simplicity Studio v5.

2.2 Download Wi-SUN SoC Ping example firmware to second BRD4170A radio board and launch another console to connect to Wi-SUN network.

2.3 After joining success, you can ping border router from console with CLI command "wisun ping fd00:6172:6d00:0:92fd:9fff:fe6d:5e63".


3. Build and run Wi-SUN coap node on Texas Instrument CC1312R7 to join Silicon Labs border router.

3.1 Install Texas Instrument CCS10.4 and SimpleLink SDK simplelink_cc13x2_26x2_sdk_5_20_00_52 to import ns_coap_node example for CC1312R7 LaunchPad.

3.2 Setup Pre-Shared Network Key in sysconf with network key get in step 1.5

3.3 Since we use Wi-SUN 1b mode, the preamble should be 64 bits for Wi-SUN 1b mode. TI Wi-Sun Stack seems put this with incorrect preamble count. You should revise it to 8 bytes otherwise it cannot interoperate with Silicon Labs Wi-SUN Stack.

3.4 Copy the following certificates (can be copied from wisun_custom_certificates.h in Silicon Labs Wi-SUN SoC Ping example) and add related codes into application.c of Texas Instrument ns_coap_node example.

const uint8_t WISUN_ROOT_CERTIFICATE_SL[] = {
    "-----BEGIN CERTIFICATE-----\r\n"
    "-----Copy Wi-Sun Root Certificate from SL wisun_custom_certificates.h\r\n"
    "-----END CERTIFICATE-----"
};

const uint8_t WISUN_CLIENT_CERTIFICATE_SL[] = {
    "-----BEGIN CERTIFICATE-----\r\n"
    "-----Copy Wi-Sun Client Certificate from SL wisun_custom_certificates.h\r\n"
    "-----END CERTIFICATE-----"
};

const uint8_t WISUN_CLIENT_KEY_SL[] = {
    "-----BEGIN PRIVATE KEY-----\r\n"
    "-----Copy Wi-Sun Client Key from SL wisun_custom_certificates.h\r\n"
    "-----END PRIVATE KEY-----"
};
 

#define MBED_CONF_APP_OWN_CERTIFICATE                               WISUN_CLIENT_CERTIFICATE_SL
#define MBED_CONF_APP_OWN_CERTIFICATE_KEY                           WISUN_CLIENT_KEY_SL
#define MBED_CONF_APP_ROOT_CERTIFICATE                              WISUN_ROOT_CERTIFICATE_SL

wisun_tasklet_remove_trusted_certificates();
wisun_tasklet_set_trusted_certificate(MBED_CONF_APP_ROOT_CERTIFICATE,strlen((const char *) MBED_CONF_APP_ROOT_CERTIFICATE) + 1);
wisun_tasklet_remove_own_certificates();
wisun_tasklet_set_own_certificate(MBED_CONF_APP_OWN_CERTIFICATE, strlen((const char *) MBED_CONF_APP_OWN_CERTIFICATE) + 1,
                                      MBED_CONF_APP_OWN_CERTIFICATE_KEY, strlen((const char *) MBED_CONF_APP_OWN_CERTIFICATE_KEY) + 1);


3.5 Build and download ns_coap_node example into CC1312R7 LaunchPad. Start Application UART console of CC1312R7 to make sure it join Silicon Labs Wi-SUN border router network.

4. We can use CLI command "wisun ping fe80:0000:0000:0000:0212:4b00:14f7:d11a" from Silicon Labs Wi-SUN SoC Ping node console to ping Texas Instrument CC1312R coap nod to get response. They interoperate each other now.


No comments:

Post a Comment