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.

CC1310: Changing the Address Length with EasyLink

Part Number: CC1310
Other Parts Discussed in Thread: SIMPLICITI,

I've been playing with the rfWsn examples, and decided I would need a longer address for my application.

I came across an API function and used it to expand the size of the address:

EasyLink_setCtrl(EasyLink_Ctrl_AddSize, 4);

As well as this, I also made changes to some other parts of the project in order to accommodate the longer address. I followed this as a rough guide of what needed changed: 

I discovered soon after, however, that the sent/received packet arrays also need changes to make room for the longer addresses. I did this in both the Node and concentrator applications.

            /* Save packet */
            latestRxPacket.header.sourceAddress =   (rxPacket->payload[0] << 24) |    // Changed to make room for longer address
                                                    (rxPacket->payload[1] << 16) |
                                                    (rxPacket->payload[2] << 8) |
                                                     rxPacket->payload[3];
            latestRxPacket.header.packetType = rxPacket->payload[4];
            latestRxPacket.dmSensorPacket.adcValue = (rxPacket->payload[5] << 8) |
                                                      rxPacket->payload[6];
            latestRxPacket.dmSensorPacket.batt = (rxPacket->payload[7] << 8) |
                                                  rxPacket->payload[8];
            latestRxPacket.dmSensorPacket.time100MiliSec = (rxPacket->payload[9] << 24) |
                                                           (rxPacket->payload[10] << 16) |
                                                           (rxPacket->payload[11] << 8) |
                                                            rxPacket->payload[12];
            latestRxPacket.dmSensorPacket.button = rxPacket->payload[13];

            /* Signal packet received */
            Event_post(radioOperationEventHandle, RADIO_EVENT_VALID_PACKET_RECEIVED);

After implementing this I'm observing the Concentrator toggling it's "RADIO_EVENT_VALID_PACKET_RECEIVED" indication LED every 3 times the Node sends 1 packet. This has caused it to crash a few times too but I don't know why or what made this happen. Why Might this be happening?

I've attached the project files which should help. I've been running it on two CC1310 launchpads. I would really appreciate if someone could test this and offer me a little guidance here.

rfWsnExamples_4ByteAddr.zip

Edit: To test the examples you'll need to comment out the EasyLink Address filtering on the collector side, since right now it's set up for my specific LaunchPads (Address is generated from the IEEE address).

  • I figured it out. I might have been a little premature in submitting this for help, but since there aren't many resources on how to expand the address length I'm going to leave this up.

    The issue was that I had the destination address going into the ACK packet array in the wrong order in the sendAck() function. I guess I got turned around while dealing with the addresses. Because of this the Node was trying to resend the data when it didn't receive the acknowledgement, which looked like new packets to the Concentrator device. Why this caused the occasional crash I still don't know, however.

    So if anyone takes the project files above as an example, replace the part of the sendAck function that sets the destination address with this:

        /* Set destinationAdress, but use EasyLink layers destination address capability */
        txPacket.dstAddr[0]  = (latestSourceAddress & 0xFF000000) >> 24;
        txPacket.dstAddr[1] |= (latestSourceAddress & 0xFF0000) >> 16;
        txPacket.dstAddr[2] |= (latestSourceAddress & 0xFF00) >> 8;
        txPacket.dstAddr[3] |= (latestSourceAddress & 0xFF);