CC2340R5: The short address output by the coordinator when multiple devices join or leave the network remains unchanged.

Part Number: CC2340R5

      case ZB_ZDO_SIGNAL_DEVICE_ANNCE:
      {
        zb_zdo_signal_device_annce_params_t *dev_annce_params = ZB_ZDO_SIGNAL_GET_PARAMS(sg_p, zb_zdo_signal_device_annce_params_t);
        short_addr = dev_annce_params->device_short_addr;
        // zb_ret_t ret = zb_address_ieee_by_short(short_addr, ieee_addr);
        printf("New device commissioned or rejoined short :0x%04hx\r\n",short_addr);
        // ZB_SCHEDULE_APP_ALARM(schedule_send_active_ep_req, 0, 1 * ZB_TIME_ONE_SECOND);
        break;
      }      
     case ZB_ZDO_SIGNAL_LEAVE_INDICATION:
      {
        zb_zdo_signal_leave_indication_params_t *leave_device_params = ZB_ZDO_SIGNAL_GET_PARAMS(sg_p, zb_zdo_signal_leave_indication_params_t);
        // delete_long_by_short(leave_device_params->short_addr);
        printf("leave device short addr = %d\r\n",leave_device_params->short_addr);
        bdb_start_top_level_commissioning(ZB_BDB_NETWORK_STEERING);
        break;
      }

There are two devices joining and leaving the coordinator. The output short address is the same. Why is that? This kind of situation did not occur in the previous version. The version I am currently using is 9.14.0.41.

  • Hi bin,

    What was the previous version you were using before SDK v9.14?  Have you tried factory programming the device or erasing all flash memory before reprogramming?  Do you have a sniffer or print log to share?  I assume you do not mean that two different devices have the same short address, ratherIf devices Leave with the rejoin bit enabled then they will receive the same short address assignment upon rejoin.  There is not enough information available to determine what is happening in your instance.

    Regards,
    Ryan


  • Cortex_M0P: Unknown signal 47

    Cortex_M0P: Unknown signal 53

    Cortex_M0P: Unknown signal 48

    Cortex_M0P: New device commissioned or rejoined short :0x8119

    Cortex_M0P: Unknown signal 53

    Cortex_M0P: Unknown signal 59

    Cortex_M0P: command id: 0x01

    Cortex_M0P: Unknown signal 47

    Cortex_M0P: Unknown signal 53

    Cortex_M0P: Unknown signal 48

    Cortex_M0P: New device commissioned or rejoined short :0x8119

    Cortex_M0P: Unknown signal 59

    Cortex_M0P: Unknown signal 53

    Cortex_M0P: command id: 0x01
    After the two devices were connected to the network, they both printed the same short address of 0x8119. After re-installing the coordinator device program, except for the first one which was different, the other devices all showed the same short address as that of the first one.

  • I joined three ZEDs to a ZR using the F2 SDK v9.14 and did not observe any overlapping short address assignments.  I have not heard similar reports from other developers as well.  I am concerned that your code is not parsing the application signal correctly to get the proper data.  You would be able to observe using a sniffer whether the short addresses you are reporting are the same as the device address assignments in the network.  Here is an example of usage from my firmware:

    void zboss_signal_handler(zb_uint8_t param)
    {
      zb_zdo_app_signal_hdr_t *sg_p = NULL;
      zb_zdo_app_signal_type_t sig = zb_get_app_signal(param, &sg_p);
      zb_ret_t status = ZB_GET_APP_SIGNAL_STATUS(param);
    
      if (status == RET_OK)
      {
        switch(sig)
        {
          //...
            break;
          }
          case ZB_ZDO_SIGNAL_DEVICE_ANNCE:
          {
            zb_zdo_signal_device_annce_params_t *dev_annce_params = ZB_ZDO_SIGNAL_GET_PARAMS(sg_p, zb_zdo_signal_device_annce_params_t);
            short_addr = dev_annce_params->device_short_addr;
            // zb_ret_t ret = zb_address_ieee_by_short(short_addr, ieee_addr);
            Display_print1(handle, 0, 0, "New device commissioned or rejoined short :0x%04x\r\n",short_addr);
            // ZB_SCHEDULE_APP_ALARM(schedule_send_active_ep_req, 0, 1 * ZB_TIME_ONE_SECOND);
            break;
          }     

    This could be affecting your other E2E thread as well, so please evaluate this closely.

    Regards,
    Ryan

  • In the ZB_ZDO_SIGNAL_DEVICE_ANNCE, use zb_ret_t ret = zb_address_ieee_by_short(short_addr, ieee_addr); I also couldn't obtain the value of ieee_addr. Is this correct? This issue only occurs in the zboss_signal_handler function. In the zb_uint8_t zcl_specific_cluster_cmd_handler(zb_uint8_t param) function, the short address and long address of each connected device can be seen. The zb_address_ieee_by_short(short_addr, ieee_addr) function can also read the corresponding data. The version I'm using is the SimpleLink Low Power F3 SDK 9.14.2.16.

  • Hi bin,

    I'm using F3 SDK v9.14 as well and I'm able to read the ieee_addr when providing the short_addr to zb_address_ieee_by_short during ZB_ZDO_SIGNAL_DEVICE_ANNCE.  This could be related to my earlier message or the way in which you initialize ieee_addr.

    Regards,
    Ryan

  • void zboss_signal_handler(zb_uint8_t param)
    {
      zb_zdo_app_signal_hdr_t *sg_p = NULL;
      zb_zdo_app_signal_type_t sig = zb_get_app_signal(param, NULL);
    
      if (ZB_GET_APP_SIGNAL_STATUS(param) == 0)
      {
        switch(sig)
        {
    #ifndef ZB_MACSPLIT_HOST
          case ZB_ZDO_SIGNAL_SKIP_STARTUP:
    #else
          case ZB_MACSPLIT_DEVICE_BOOT:
    #endif /* ZB_MACSPLIT_HOST */
    
    #ifdef TEST_USE_INSTALLCODE
            zb_secur_ic_str_add(g_ed_addr, g_installcode, NULL);
    #endif
            set_tx_power(DEFAULT_TX_PWR);
            zboss_start_continue();
            break;
    
          case ZB_BDB_SIGNAL_DEVICE_FIRST_START:
          case ZB_BDB_SIGNAL_DEVICE_REBOOT:
          {
            zb_nwk_device_type_t device_type = ZB_NWK_DEVICE_TYPE_NONE;
            device_type = zb_get_device_type();
            ZVUNUSED(device_type);
            Log_printf(LogModule_Zigbee_App, Log_INFO, "Device (%d) STARTED OK", device_type);
            printf("Device (%d) STARTED OK\r\n", device_type);
            if (perform_factory_reset)
            {
              Log_printf(LogModule_Zigbee_App, Log_INFO, "Performing a factory reset.");
              zb_bdb_reset_via_local_action(0);
              perform_factory_reset = ZB_FALSE;
            }
            else if(ZB_BDB_SIGNAL_DEVICE_REBOOT == sig)
            {
              ZB_SCHEDULE_APP_ALARM_CANCEL(off_network_attention, ZB_ALARM_ANY_PARAM);
              zb_osif_led_off(1);
            }
            set_tx_power(DEFAULT_TX_PWR);
            bdb_start_top_level_commissioning(ZB_BDB_NETWORK_STEERING);
    
    #ifdef ZB_USE_BUTTONS
            zb_button_register_handler(0, 0, button_press_handler);
    #endif
            break;
          }
          case ZB_COMMON_SIGNAL_CAN_SLEEP:
          {
    #ifdef ZB_USE_SLEEP
            Log_printf(LogModule_Zigbee_App, Log_INFO, "Sleeping now");
            zb_sleep_now();
    #endif
            break;
          }
          case ZB_ZDO_SIGNAL_DEVICE_ANNCE:
          {
            zb_zdo_signal_device_annce_params_t *dev_annce_params = ZB_ZDO_SIGNAL_GET_PARAMS(sg_p, zb_zdo_signal_device_annce_params_t);
            short_addr = dev_annce_params->device_short_addr;
            Bin_printf("New device commissioned or rejoined short :0x%04hx\r\n",short_addr);
            zb_ret_t ret = zb_address_ieee_by_short(short_addr, ieee_addr);
            printf("long_addr : %02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x\r\n",ieee_addr[0],ieee_addr[1],ieee_addr[2],ieee_addr[3],ieee_addr[4],ieee_addr[5],ieee_addr[6],ieee_addr[7]);
            // ZB_SCHEDULE_APP_ALARM(schedule_send_active_ep_req, 0, 1 * ZB_TIME_ONE_SECOND);
            break;
          }
          case ZB_BDB_SIGNAL_STEERING:
            Log_printf(LogModule_Zigbee_App, Log_INFO, "Successful steering, start f&b target");
            printf("Successful steering, start f&b target\r\n");
            zb_bdb_finding_binding_target(ZB_OUTPUT_ENDPOINT);
            ZB_SCHEDULE_APP_ALARM_CANCEL(off_network_attention, ZB_ALARM_ANY_PARAM);
            zb_af_set_data_indication(data_indication);
            // zb_osif_led_off(1);
            break;
          case ZB_ZDO_SIGNAL_LEAVE_INDICATION:
          {
            zb_zdo_signal_leave_indication_params_t *leave_device_params = ZB_ZDO_SIGNAL_GET_PARAMS(sg_p, zb_zdo_signal_leave_indication_params_t);
            printf("leave device short addr = %d\r\n",leave_device_params->short_addr);
            bdb_start_top_level_commissioning(ZB_BDB_NETWORK_STEERING);
            break;
          }
         case ZB_ZDO_DEVICE_UNAVAILABLE:
          {
            zb_zdo_device_unavailable_params_t *unavailable_params = ZB_ZDO_SIGNAL_GET_PARAMS(sg_p, zb_zdo_device_unavailable_params_t);
            uint16_t unavailable_short_addr = unavailable_params->short_addr;
            printf("unavailable_short_addr = 0x%04hx\r\n",unavailable_short_addr);
            zdo_leave_end_req(param,unavailable_short_addr);
            break;
          }
          case ZB_NLME_STATUS_INDICATION:
          {
            zb_zdo_signal_nlme_status_indication_params_t *nlme_status_ind = ZB_ZDO_SIGNAL_GET_PARAMS(sg_p, zb_zdo_signal_nlme_status_indication_params_t);
            printf("Network operation %02x,nwk_addr = %02x\r\n", nlme_status_ind->nlme_status.status,nlme_status_ind->nlme_status.network_addr);
            break;
          }
          case ZB_BDB_SIGNAL_FINDING_AND_BINDING_TARGET_FINISHED:
          {
            bdb_start_top_level_commissioning(ZB_BDB_NETWORK_STEERING);
            break;
          }
          default:
            Log_printf(LogModule_Zigbee_App, Log_WARNING, "Unknown signal %d", (zb_uint16_t)sig);
        }
      }
      else
      {
        switch(sig)
        {
          case ZB_BDB_SIGNAL_DEVICE_FIRST_START:
            Log_printf(LogModule_Zigbee_App, Log_WARNING, "Device can not find any network on start, so try to perform network steering");
            ZB_SCHEDULE_APP_ALARM(restart_commissioning, 0, 10 * ZB_TIME_ONE_SECOND);
            break; /* ZB_BDB_SIGNAL_DEVICE_FIRST_START */
    
          case ZB_ZDO_SIGNAL_PRODUCTION_CONFIG_READY:
            Log_printf(LogModule_Zigbee_App, Log_INFO, "Production config is not present or invalid");
            break;
    
          case ZB_BDB_SIGNAL_STEERING:
            Log_printf(LogModule_Zigbee_App, Log_WARNING, "Steering failed, retrying again in 10 seconds");
            ZB_SCHEDULE_APP_ALARM(restart_commissioning, 0, 10 * ZB_TIME_ONE_SECOND);
            break; /* ZB_BDB_SIGNAL_STEERING */
    
          default:
            Log_printf(LogModule_Zigbee_App, Log_INFO, "Device started FAILED status %d sig %d", ZB_GET_APP_SIGNAL_STATUS(param), sig);
        }
      }
    
      /* Free the buffer if it is not used */
      if (param)
      {
        zb_buf_free(param);
      }
    }

    I tried to create a new example of onoff_light, but the result was still the same. The printf statement "long_addr : %02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x\r\n", where ieee_addr[0] to ieee_addr[7] are printed, all show 0. And the value of short_addr = dev_annce_params->device_short_addr is also fixed when multiple devices are connected. Only when I tried to use the previously created onoff_light program could it work properly. I observed the void zboss_signal_handler(zb_uint8_t param) part of both programs and found no differences. Even if I modified the SDK version using Properties->Dependencies, it still couldn't change this phenomenon.
    Which program in any location might affect the function "zb_address_ieee_by_short(short_addr, ieee_addr)"; And zb_zdo_signal_device_annce_params_t *dev_annce_params = ZB_ZDO_SIGNAL_GET_PARAMS(sg_p, zb_zdo_signal_device_annce_params_t); Regarding the use of these two, I believe that my modifications to the program should not affect these two return values.

  • zb_get_app_signal should use sg_p as the second parameter since the application uses it for ZB_ZDO_SIGNAL_GET_PARAMS.
    zb_zdo_app_signal_type_t sig = zb_get_app_signal(param, &sg_p);
     
    Here is how I initialize my address variables
    zb_uint16_t short_addr;
    zb_uint8_t ieee_addr[8];
    Regards,
    Ryan