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.

CCS/LAUNCHXL-CC1352R1: How can I print the joined devices list in Collector example?

Part Number: LAUNCHXL-CC1352R1


Tool/software: Code Composer Studio

Hi,

I am using the TI15.4 Collector and Sensor example for a project. I need to print the addresses of sensors connected to the PAN. Can anyone guide me?

I didn't see a pre-written function to print the list, but there is one to print the count.

  • I suppose you can do this in cllcDeviceJoiningCB to print short address in pDevInfo.

  • I concur with Yikai,

    you can use the the joining CB to print the list of devices currently connected and add the joining device to the list.

    Regards,

    AB

  • Thank you and .

    I went on 's footsteps and wrote this to print the joined devices at any given time. And this works!

    Thank you !

    For anyone looking for such, here is a snippet.

    void Csf_printSensorList(void)
    {
        display = Display_open(Display_Type_HOST, NULL);
        Display_printf(display,0,0,"\n>>>> List of Sensors <<<<");
    
        int x;
        Llc_deviceListItem_t item;
        ApiMac_sAddr_t devAddr;
        devAddr.addrMode = ApiMac_addrType_short;
    
        for(x = 0; x < CONFIG_MAX_DEVICES; x++)
        {
            if((Cllc_associatedDevList[x].shortAddr != CSF_INVALID_SHORT_ADDR) && (Cllc_associatedDevList[x].status & CLLC_ASSOC_STATUS_ALIVE))
            {
                devAddr.addr.shortAddr = Cllc_associatedDevList[x].shortAddr;
                if(Csf_getDevice(&devAddr, &item))
                {
                       Display_printf(display1, 0, 0, "Short address: %d", devAddr.addr.shortAddr);
                }
            }
        }
            Display_printf(display1, 0, 0, "Number of online devices: %d\r\n", getNumActiveDevices());
    }

  • Typo, rename display1 ---> display  in Display_printf(display.....)