Porting 6lowpan on mbed OS for Xbee S1 pro module

We have written PHY driver code for XBEE Pro S1 module similiar to the atmel-rf-driver. Using mbed-mesh-api 6lowpan ND test example. We are trying to enable 6LoWPAN stack so that we can communicate with other XBEE device connected to XCTU on another PC.
The mesh init api is successful with (rf_device_id and rf_network_id = 0). However while making the interface up we get the following log

[DBG ][m6LND]: app_parse_network_event() 3 [DBG ][m6LND]: Link Layer Scan Fail: No Beacons [DBG ][m6LND]: Restart bootstrap calling nwk interface up

Do we have to send ND command when the driver rf_interface_state_control function is called (For 6LoWPAN bootstrap process)?

In the code to set channel we have the parameters as:
const phy_rf_channel_configuration_s phy_2_4ghz = {2405000000, 5000000, 250000, 16, M_OQPSK};
const phy_device_channel_page_s phy_channel_pages[] = { {CHANNEL_PAGE_0, &phy_24ghz}, {CHANNEL_PAGE_0, NULL} };
Are these settings correct?

Further elaboration of the above scenario is as follows:

The hardware setup is as follows:

  1. FRDM-K64 board having a Xigbee module connected to it (Mbed client)
    Configured as end device with Channel ID, Pan ID dest/source address set into XCTU.
    End Device association is set to Auto Association mode.

  2. Xigbee Pro module connected to XCTU on other Laptop machine.
    Configured as Co-Ordinator.
    Co-ordinator assocation set to auto-association mode.

Software background:

  1. We are using the mbed-6lowpan-client example available on git.
    And have written a radio driver for xbee device.
    The Xbee Pro module has been tested on our platform and we are using the same driver in mbed

  2. We observe that createInterface and init api’s do pass (non-thread mode)
    We are passing
    NET_INTERFACE_RF_6LOWPAN to arm_nwk_interface_init

  3. The connect API fails with a message “Link Layer Scan Fail: No Beacons”
    We are passing:
    In nd_tasklet_connect
    tasklet_data_ptr->mode = NET_6LOWPAN_HOST
    In nd_tasklet_configure_and_connect_to_network
    NET_6LOWPAN_ZIGBEE_IP as mode extension to arm_nwk_interface_configure_6lowpan_bootstrap_set API.

  4. On PHY_UP we are initializing the device properly, and setting the A1 parameters properly so that it will send
    the Beacon broadcast request to other Xbee device connected to Laptop over USB. We do see LED indicators for the same.

  5. We could also see a ND (network discovery command being received on co-ordinator Xbee device.

With further debugging and analysis, we feel that:

  1. Co-ordinator xbee device is sending beacon reply to edge device.
  2. How do we notify the upper stack that beacon has been received, so that it won’t fail the 802.15.4 Beacon scan process, to avoid ARM_NWK_NWK_SCAN_FAIL failure.
  3. Currently we have hacked the failure and directly called the nd_tasklet_network_state_changed(MESH_CONNECTED) function with which our application call back gets called.
  4. On one of the blogs it was mentioned that Xbee Pro module cannot work with 6lowpan. We would like to know if there is some kind of limitations by 6lowpan stack?

Thanks & BR,
Sagar Kadam

Hi Sagar,

Link layer scan can fail because of many reasons, including:

i) Wrong channel asignment
ii) Wrong link layer Security settings
iii) Wrong bootstrap mode
iv) Wrong Boostrap extension

NOTE: NET_6LOWPAN_ZIGBEE_IP was a bootstrap extension for industry ZIGBEE IP conformance testing purpose only. The true bootstrap extension you are looking for here is NET_6LOWPAN_ND_WITH_MLE.

Hello Sagar,

Is your PHYdriver open source?

Thank you,