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.

Compiler/LAUNCHXL-CC2650: Communication between End device (CC2650) and coordinator (cc2530)

Part Number: LAUNCHXL-CC2650
Other Parts Discussed in Thread: CC2530, CC2650

Tool/software: TI C/C++ Compiler

Hi,

I'm using CC2650 launchxl as end device and cc2530 as coordinator. 

I am trying to start the communication and data sent between coordinator and end device. I am not using EZmode for data transmission so no finding and binding process will be there. I've disabled the ZCL_EZMODE in compiler preprecessor. I have only Zsack_manual_start to start the discovery process. 

I am able to form a network at the coordinator end. and when I am start downloading and debugging the code at end device side, on the packet sniffer, I am seeing the association request successful and polling data request to the coordinator. Please see the PSD file NwkCommunication_8.psd for validity. Does it mean the end device has joined to the coordinator and is ready to send the data? 

When I am debugging the code, I am seeing the params.state as ZSTART_STATE_HOLD. From the code, I am seeing if this is the state then the device will be initialized again and will do the process again but the device doesn't do anything after hold.

Please help. 

  • According to your sniffer log, I see your device joins Coordinator and it is ready to send data.
  • Thank you for your prompt response. I am also seeing this info at the packet sniffer side. But when I am debugging the code, I am seeing the params.state as Zstart_HOLD_state. 

    This is the piece of code, where I am printing the state and params.state:

    zstart_params *Zstart_processStateChange(zstack_DevState state)
    {
        System_printf("%x %x\n", state, params.state);
        if( (state == zstack_DevState_DEV_ROUTER)
            || (state == zstack_DevState_DEV_END_DEVICE) )
        {
            if(params.state == ZSTART_STATE_JOINED_PREAUTH)
            {
                params.state = ZSTART_STATE_JOINED;
            }
            else if(params.state == ZSTART_STATE_REJOINING)
            {
                params.state = ZSTART_STATE_REJOINED;
            }
            else
            {
                // Unknown state
                params.state = ZSTART_STATE_HOLD;
            }
    
            // Save off default channel list used, for rejoining later
            zstart_writeParameters(ZNWK_DEFAULT_CHANLIST);
    
            // Free the allocated memory
            params.chosenNetwork = 0;
            params.chosenRouter = 0;
            zstart_deleteNwkList();
            zstart_freeBlackList();
    
            // Stop clock
            if( Util_isClockActive(&zstartClkStruct) )
            {
                Util_stopClock(&zstartClkStruct);
            }
        }
        else if(state == zstack_DevState_NWK_ORPHAN)
        {
            params.state = ZSTART_STATE_REJOINING;
        }
        else
        {
            // Unknown state
            params.state = ZSTART_STATE_HOLD;
        }
        return(&params);
    }
    

    The values which are printed as state = 6 (it means zstack_DevState_DEV_END_DEVICE) and params.state = 9 (ZSTART_STATE_HOLD). How it can be possible? Can the issue be if system_printf takes delay to print things and things already get executed over the air? Please correct me. 

  • Hi Hitesh,

    I do see that the devices have joined successfully and the ZED is able to poll the ZC to check if there is any pending data, meaning they have successfully joined. When you're debugging, are you seeing that this is the state already after the ZED has joined into the network and is polling?

    Best,
    Sean
  • Hi Sean,

    Thank you for your response.

    Yes, This is the state showing on console when ZED is polling data request from ZC. Please see:

  • Where do you see that the device will be initialized again and will do the process again?

    Inside the Switch_processZStackMsgs, there is simply an if/else for ZSTART_STATE_HOLD, with nothing to do inside ZSTART_STATE_HOLD. We can see that the req.state is zstack_DevState_DEV_END_DEVICE like you mentioned, meaning that the ZED is successfully joined in the network and authenticated. As you can see from the sniffer logs, the device is also able to poll its parent for any pending data successfully.

    Best,
    Sean