This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Switch the router to the end device in the router smaple project

Other Parts Discussed in Thread: CC1352P, SYSCONFIG, Z-STACK

Hi,

I want to switch device roles like ZNP in Sample DEMO.

I made the following changes in the zr_sw_CC1352P_2_LAUNCHXL_tirtos7_ticlang project:

1. Added Compile Options BUILD_ALL_DEVICES and
#define ZSTACK_DEVICE_BUILD (DEVICE_BUILD_ROUTER | DEVICE_BUILD_ENDDEVICE)

2. Temporarily set the logical type to end device to verify that it is working correctly or not
uint8_t zgDeviceLogicalType = ZG_DEVICETYPE_ENDDEVICE;

3. Modify the commissioning capability to support the nwk steer only.

After making the above modifications, the device tries to join the network as an RFD device, but it fails to join the network because it cannot receive the transport key message.

I'm missing some necessary configuration?

Thanks.

  • Hi Howjie,

    Z-Stack examples were not meant to be evaluated or altered in this manner.  ZG_BUILD_RTR_TYPE is important as a ZED should not be able to route packets.  Among other things, the zr_sw example is going to set RFD_RX_ALWAYS_ON_CAPABLE and RFD_RX_ALWAYS_ON to TRUE which will turn off the poll rates necessary for ZED sleepy devices joining and communicating in the network.  This is configured inside the SysConfig Z-Stack module, however ZR configurations are missing the Power Management settings since they are always-on devices by necessity for routing packets.  You should be comparing between the differences of zr_sw and zed_sw in regards to these definitions, or simply using both project builds separately for your application.  TI does not provide additional resources or assistance for this mode of operation.

    Regards,
    Ryan

  • Hi Ryan,

    Sorry, I should not describe my usage scenario clearly, I want to set logical device type(Router and non-Sleep End device) at run time instead of two firmware.

    In fact, I only need to switch the router to non-sleep end device, so they are all RX_ALWAYS_ON types of devices, and it doesn't have to take into account the differences in the power management.

    The ZNP projects natively support this function, and in theory ZR projects can achieve the same effect, but it seems to be not going well now.

    Also, the similar modifications were made to the CC253x project before, and it worked the way I expected.

    Best Regards,

    Howjie

  • Hi Ryan,

    The problem I face now is a configuration problem, that is, how to configure ZR to approach ZNP? 

    Best Regards,

    Howjie

  • Your use case is understood.  Also note the addition of "-DMAC_CFG_APP_PENDING_QUEUE=TRUE" to the f8wrouter.opts file, and the different libZStack_nwk_* libraries inside of <sdk_directory>\source\ti\zstack\lib which are referenced by SysConfig ti_utils_build_linker.cmd.genlibs.  ZED projects can be made non-sleepy through the SysConfig Z-Stack -> Power Management -> Power Mode settings.  In the same context, you can further compare project file differences between ZR and ZNP for your development purposes.

    Regards,
    Ryan