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.

RTOS/LAUNCHXL-CC1310: Easylink Modulation with EasyLink_Phy_5kbpsSlLr

Part Number: LAUNCHXL-CC1310
Other Parts Discussed in Thread: CC1310, CC1350

Tool/software: TI-RTOS

Hello Support Team,

I want to get a bigger range with my CC1310 and so I tried to change the RADIO_EASYLINK_MODULATION  for EasyLink_Phy_Custom to EasyLink_Phy_5kbpsSlLr.

Now I only get EasyLink_Status_Rx_Error when I send something.

I am using the Node and Concentrator example and I have a Revision B CC1310.(V2.1)

  • Hello Sinisa,

    I tried to reproduce the issue. But it seems to work fine for me. Below are the steps I followed

    1. Import rfWsnNode_CC1310_LAUNCHXL_tirtos_ccs and rfWsnConcentrator_CC1310_LAUNCHXL_tirtos_ccs into a new workspace.
    2. Build and run both projects on 2 different CC1350 launchpads. Connect serial terminals to both the boards. Messages indicating node and ADC and other data displayed and updated periodically on both terminals.
    3. Now, I changed to #define RADIO_EASYLINK_MODULATION EasyLink_Phy_5kbpsSlLr in both the projects like you did and did a clean build and run.
    4. Same result as before gets displayed on the Serial terminal.

    I also tried this using rfEasyLinkTx and rfEasyLinkRx with EasyLink_Phy_5kbpsSlLr and it worked fine.

    Did you make any other code changes?

    Regards,
    Prashanth

  • Hello,

    I tried it also with the 2 Programms from the ressource explorer and it worked!

    But I don't know, whats the problem in my application.

    Here is the Code of my Concentrator:

    txPacket.dstAddr[0] = 1;
    txPacket.dstAddr[1] = 2;
    txPacket.dstAddr[2] = 3;
    txPacket.dstAddr[3] = 4;
    txPacket.dstAddr[4] = 5;
    txPacket.dstAddr[5] = 6;
    txPacket.dstAddr[6] = 7;
    txPacket.dstAddr[7] = 8;

    txPacket.payload[50] = (BSMCAddress & 0xFF00000000000000) >> 56;
    txPacket.payload[51] = (BSMCAddress & 0x00FF000000000000) >> 48;
    txPacket.payload[52] = (BSMCAddress & 0x0000FF0000000000) >> 40;
    txPacket.payload[53] = (BSMCAddress & 0x000000FF00000000) >> 32;
    txPacket.payload[54] = (BSMCAddress & 0x00000000FF000000) >> 24;
    txPacket.payload[55] = (BSMCAddress & 0x0000000000FF0000) >> 16;
    txPacket.payload[56] = (BSMCAddress & 0x000000000000FF00) >> 8;
    txPacket.payload[57] = (BSMCAddress & 0x00000000000000FF);

    txPacket.len = 127;

    TimeoutCounter = 0;

    if(hwiInterrupMode == HWI_Interrupt_FirstSetup_Mode)
    {
    hwiSecuritybit = 0;

    txPacket.payload[80] = BSSleepTime;

    TimeoutLimit = 25;

    EasyLink_setCtrl(EasyLink_Ctrl_AsyncRx_TimeOut, EasyLink_ms_To_RadioTime(200));

    if (EasyLink_transmit(&txPacket) != EasyLink_Status_Success)
    System_abort("EasyLink_transmit failed");

    if(EasyLink_receiveAsync(rxDoneCallback, 0) != EasyLink_Status_Success)
    System_abort("EasyLink_receiveAsync failed");

    }

    And here is the Code of my Node:

    while (1)
    {

    events = Event_pend(radioOperationEventHandle, 0, RADIO_EVENT_SEND_ADC_DATA, BIOS_WAIT_FOREVER);
    PIN_setOutputValue(ledPinHandle, NODE_ACTIVITY_LED,1);
    /* Enter RX */
    if (EasyLink_receiveAsync(rxDoneCallback, 0) != EasyLink_Status_Success)
    System_abort("EasyLink_receiveAsync failed");

    events = Event_pend(radioOperationEventHandle, 0, RADIO_EVENT_ALL , 300000000/Clock_tickPeriod);


    It's a bit different to the basic program. In my application the Concentrator sends a Request to the Node, and the Node answer.
    If i have defined in the Concentrator and Node: "#defineRADIO_EASYLINK_MODULATION EasyLink_Phy_Custom", everthing works fine.
    If i change it to "#define RADIO_EASYLINK_MODULATION EasyLink_Phy_5kbpsSlLr ", i geht in the rxDoneCallback of the Node a
    "EasyLink_Status_Rx_Error" as Status.

    What can be the problem?

    Maybe because i have a fixed leangth of 127 of tx data?
    But with 5kBps there should not be any problems or?

    Thank you very much for your help
  • Hello Prashanth,

    I made my Code a little bit more efficient, and now I am sending only with a txPacket.len = 10 and from the Node with 40.

    Now it works much better, but sometimes I get again a EasyLink_Status_Rx_Error.

    If I set the txPacket.len to 100, I get that EasyLink_Status_Rx_Error more often or also continuous.
    But why? I can send with 5kBps?

    I also figured out, which Easylink_Status_Rx_Error i receive.

    static void rxDoneCallback(RF_Handle h, RF_CmdHandle ch, RF_EventMask e)
    {
    EasyLink_Status status = EasyLink_Status_Rx_Error;
    //create rxPacket as a static so that the large payload buffer it is not
    //allocated from the stack
    static EasyLink_RxPacket rxPacket;
    rfc_dataEntryGeneral_t *pDataEntry;
    pDataEntry = (rfc_dataEntryGeneral_t*) rxBuffer;

    //Release now so user callback can call EasyLink API's
    Semaphore_post(busyMutex);
    asyncCmdHndl = EASYLINK_RF_CMD_HANDLE_INVALID;

    if (e & RF_EventLastCmdDone)
    {
    //Check command status
    if (EasyLink_cmdPropRxAdv.status == PROP_DONE_OK)
    {
    //Check that data entry status indicates it is finished with
    if (pDataEntry->status != DATA_ENTRY_FINISHED)
    {
    status = EasyLink_Status_Rx_Error;
    }
    else if ( (rxStatistics.nRxOk == 1) ||
    //or filer disabled and ignore due to addr mistmatch
    ((EasyLink_cmdPropRxAdv.pktConf.filterOp == 1) &&
    (rxStatistics.nRxIgnored == 1)) )
    {
    //copy length from pDataEntry
    rxPacket.len = *(uint8_t*)(&pDataEntry->data) - addrSize;
    //copy address from packet payload (as it is not in hdr)
    memcpy(&rxPacket.dstAddr, (&pDataEntry->data + 1), addrSize);
    //copy payload
    memcpy(&rxPacket.payload, (&pDataEntry->data + 1 + addrSize), rxPacket.len);
    rxPacket.rssi = rxStatistics.lastRssi;
    rxPacket.absTime = rxStatistics.timeStamp;

    status = EasyLink_Status_Success;
    }
    else if ( rxStatistics.nRxBufFull == 1)
    {
    status = EasyLink_Status_Rx_Buffer_Error;
    }
    else if ( rxStatistics.nRxStopped == 1)
    {
    status = EasyLink_Status_Aborted;
    }
    else
    {
    status = EasyLink_Status_Rx_Error;
    }
    }
    else if ( EasyLink_cmdPropRxAdv.status == PROP_DONE_RXTIMEOUT)
    {
    status = EasyLink_Status_Rx_Timeout;
    }
    else
    {
    status = EasyLink_Status_Rx_Error; <-------------------------------------------------- its this one
    }
    }
    else if ( (e == RF_EventCmdAborted) || e == RF_EventCmdStopped )
    {
    status = EasyLink_Status_Aborted;
    }

    if (rxCb != NULL)
    {
    rxCb(&rxPacket, status);
    }
    }

    So i hope you can help me, too understand whats my problem and how i can make a
    secure communication.

    Thank you very much!

    Best Regards
    Sinisa
  • Hello Sinisa,

    It is difficult to see what may be happening from code snippets. Can you check if the packet times are not getting too long in the low data rate mode that are causing the issues that you are seeing. Try to check the air time of the Tx packets and make sure the node's Rx time can fit in or try to increase the packet intervals.

    Regards,
    Prashanth
  • Hello,

    If the packet times are getting to low, wouldn't i receive a Easylink_Rx_timeout error instead of  the Rx Error?

    "Try to check the air time of the Tx packets and make sure the node's Rx time can fit "

    Do you mean, that i should extend the receive time of my asyncreceive call? I tried it with a 200ms and a 1000ms timeout Time, but it didn't changed anything.

    Best regards

    Sinisa

  • Hello Prashanth,

    I did the whole day some Tests and my issue is definitely the length of my txPacket.

    Here is my Structure of the txPacket i am sending:

    typedef struct
    {
    uint8_t dstAddr[8]; //!< Destination address
    uint32_t absTime; //!< Absolute time to Tx packet (0 for immediate)
    //!< Layer will use last SeqNum used + 1

    uint8_t len; //!< Payload Length
    uint8_t payload[EASYLINK_MAX_DATA_LENGTH]; //!< Payload
    } EasyLink_TxPacket;

    I am sending to the MACAdress of the Concentrator, so i need "uint8_t dstAddr[8]" in the Structure.

    if I send with a Payload length 30, everything works fine, but if i send with 40 and higher, i get everytime a Status_Rx_Error( i figured out, that the Error is a CRC  Error).


    I don't know, why it only work with a payload size of maximum 30Bytes. If i change to the 50kbps kommunikation, i can send the whole 128Bytes of the Payload.

    I also tried to send over smartrf studio with the 5kbps kommunikation. there i can send Packet Data with a length of 90 without errors.

    Can you help me out?

    Thank you very much

    Best Regards
    Sinisa

  • Hello Sinisa,

    When you increased the NORERADIO_ACK_TIMEOUT_TIME_MS, did you change that on both the Concentrator and the node?

    Regards,
    Prashanth
  • Hello Prashanth,

    no, i just changed it in the Node, but it is not used in the Concentrator example, or am I wrong?
    It's defined, but not used.

    I tried to increased it in the Node example up too 10 000ms, but after a short time, i get the Status_Rx_error in the RxCallback.

    Best Regards
    Sinisa

  • Hello Prashanth,

    I change it on both, and it has no effect at all. 

    I also tried it, with the basic Node and Concentrator Examples from the Resource explorer. I changed the payload length form sizeof(struct DualModeSensorPacket) to 30(or 20 also), and i received a Status_RX_Error at the Concentrator. Only with a Payload length of 18 and below, it's possible without a Status_Rx_Error.

    That means, that definitely the Payload length is the reason for my problem.

    I have to stay in Longe Rang Mode(5kps), but i need more then the 5kbps, or i need to know whats the maximum payload length i can send without problems.

    I tried also to edit the symbolrate in the smart RF studio. So I selected the 5kbps, and changed the 19.99969 kBaud Symbol rate to 29.40063. If i test it with Smart RF studio, i can send about 20 byte more then with 19.99969 kBaud. So i exported the Code and imported it in the CCS Node and Concentrator example. I changed also to  #define RADIO_EASYLINK_MODULATION EasyLink_Phy_Custom.

    I tried it again, but the highest possible payload length was still 18.


    Is there a other Solution i can try?

    Is it a secure transmission, if I stay with my payload length under 18, or will there happen often RX_Errors?

    Another problem could be also, that i am testing it with a range of 1 meter between the node and the concentrator. If there is 1km or more between them, will i also be able to send with a payload length of 18 or will i have to decrease the length Payload with my range between the both. 

    Thank you very much for your help

    Best regards
    Sinisa

  • Instead of code snippets, is it possible to post a small CCS project that show the issue? Then it's easier for us to reproduce.
  • Hello,

    here are my Node and my Concentrator applications.

    But this are the basic applications, imported from the Resource Explorer(rfWsnConcentrator_CC1310_LAUNCHXL_tirtos_ccs and rfWsnNode_CC1310_LAUNCHXL_tirtos_ccs).
    I just changed to 5bps in the RadioProtocol.h and increased the payload length to 30.

    Best Regards
    SinisarfWsnConcentrator_CC1310_LAUNCHXL_tirtos_ccs.zip7282.rfWsnNode_CC1310_LAUNCHXL_tirtos_ccs.zip

  • Due to Easter I haven't been able to look into this. Have you found a solution to this question in the meantime?
  • Hello,

    I found a solution for myself, but i don't know why it isn't working with 5kbps.

    I can send a payload length off 127Byte with 50kbps without any RX_Status_Error(CRC).
    With 5kbps i can send only about 30Byte without getting the error( also with the basic node and concentrator Applications from the ressource Explorer)
    With 0.625kbps i can send again 127Byte without any problems.

    So only with 5kbps i get the error.

    For me it doesn't matter anymore, because I can use the 0.625kbps.

    Best regards
    Sinisa