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.

Used CC2650 and Contiki RF API to Receive Frame

Other Parts Discussed in Thread: CC2650, Z-STACK, CC2520, TIMAC

Hello everyone,

I want to use CC2650 in SOC mode to send and receive Zigbee frames.

I want to use github.com/.../api

I want to use this API not to include Z-STACK which will leave me less avaliable memory for my application

I managed to send a frame using
RFCDoorbellSendTo ((uint32_t) cmd);
Where cmd is pointer to rfc_CMD_IEEE_TX_t
And gtbluc_Frame is my Frame
{
    .commandNo = CMD_IEEE_TX, / * Create frame with command Tx * /
    .status = 0x0000, / * status * /
    .pNextOp = 0x00000000, / * pNextOp * /
    .startTime = 0x00000000, / * startTime * /
    .startTrigger.bEnaCmd = 0, / * startTrigger * /
    .startTrigger.triggerType = TRIG_NOW,
    .startTrigger.triggerNo = 0,
    .startTrigger.pastTrig = 0,
    .condition.rule = COND_NEVER, / * condition * /
    .condition.nSkip = 0,
    .txOpt.bIncludePhyHdr = 0, / * Phy address auto * /
    .txOpt.bIncludeCrc = 0, / * CRC computed auto * /
    .payloadLen = 0x0D, / * Number of bytes in the payload * /
    .pPayload = & gtbluc_Frame [0], / * Pointer to payload buffer of size (payloadLen) * /
    .timeStamp = 0x00000000 / * Time stamp of transmitted frame * /
};

but I do not know how :
  Put the component into reception mode
  Know that a frame is received
Able to read the contents of the frame

Can you help me please

  • That API is provided by Contiki OS and cannot be called in Z-Stack.
  • Yes i don't want used Z-Stack
    I want used API
  • to complete my example:

    I have adapt the TX command with RX structure

    uint16_t val_return = 0u;
    uint32_t val = RFCDoorbellSendTo((uint32_t)cmd);
    /* Return errors immediately */
    if (val > 1u) {
    /* Return error code */
    val_return = (uint16_t)val;
    }
    else {
    /* Wait for command to complete */
    while (((rfc_CMD_NOP_t*)cmd)->status <= ACTIVE) {
    ; /* Nothing to do */
    }
    /* Return command status */
    val_return = (uint16_t)((rfc_CMD_NOP_t*)cmd)->status;
    }

    but i don't go out while because (rfc_CMD_NOP_t*)cmd)->status is always 0x0002

    Can you help me please

  • Hi,

    There is nor response. Since I will add explication.

    I want made the same action that with Device Control Panel

    I have made these 3 actions

    CMD_RADIO_SETUP :

    RFCDoorbellSendTo((uint32_t)cmd);  with cmd  = &radioSetupCopy

    CMD_FS : RFCDoorbellSendTo((uint32_t)cmd);  with cmd  = &freqSynthCopy

    and finish CMD_IEEE_RX : RFCDoorbellSendTo((uint32_t)cmd);  with cmd  = &ieee_frame_rxCopy

    I see that my command return status = Active (0x02) since in Device Control Panel

    But I don't know how see if an frame is received and I don't know how check frame

    Please can you help me 

  • Hi Nicolas, 

    Can you please describe what application/product are you trying to develop. 

    Regards 

  • I want used CC2650 in SOC mode :

    1 - used 1 CC2650 to transmitting data to others CC2650 and received response

    2- If it's possible i want used API contiki with tirtos_cc13xx_cc26xx_2_21_00_06 to realize this these function because This API leaves me more memory available.

    I have already succeeded in sending data with this API but I can not receive them

    Received step as i want

    1- Know if a frame has received

    2- Have a buffer with the data received or know how store this data

    thanks in advance 

  • Hi Nicolas,

    First of all sorry for the delayed response.

    I understand that you want to use the IEEE API without any stack, no Z-stack no TI-MAC is that correct? Please confirm.

    As been pointed out in this thread Open Source Contiki is using the IEEE API without any stack, so you can look at that implementation and make this work in your case as well.

    Here is the implementation of the IEEE radio driver in Contiki: 

    Circling back to your high level options, you can also use the TI-MAC stack, which is a IEEE802.15.4 implementation (standards compliant) that you find here: 

    Jonas

  • I want to use the simplest software to use, without having to manage OS, as sequentially as possible.

    Ideally have a transmission buffer to be filled, and a command to send this buffer.

    And a reception buffer which automatically fills with commands to know if a frame has arrived and a command to read the buffer.
    Ideally, the same type of interface that we had on the SPI of the CC2520

    What solution would you suggest I take (IEEE API, Z-Stack, TIMAC)?

  • Is it a requirement to use IEEE802.15.4 or can you use a proprietary FSK protocol?
  • I want to used IEEE802.15.4 to make my own frame. very short frame.

    with IEEE API to send frame I Made : 

    CREATION FRAME

    /* MAC HDR - FC */
    gtbluc_Frame[0] = cus_MAC_HDR_FC & 0x00FFu;
    gtbluc_Frame[1] = (cus_MAC_HDR_FC & 0xFF00u) >> 8u;
    /* MAC HDR - Seq (random value generated by TRNG) */
    gtbluc_Frame[2] = TRNGrandom();
    /* MAC HDR - Dest PAN ID */
    gtbluc_Frame[3] = cus_MAC_HDR_DEST_PAN_ID & 0x00FFu;
    gtbluc_Frame[4] = (cus_MAC_HDR_DEST_PAN_ID & 0xFF00u) >> 8u;
    /* MAC HDR - Dest addr */
    gtbluc_Frame[5] = cus_MAC_HDR_DEST_ADDR & 0x00FFu;
    gtbluc_Frame[6] = (cus_MAC_HDR_DEST_ADDR & 0xFF00u) >> 8u;
    /* NWK HDR - FC */
    gtbluc_Frame[7] = cuc_NWK_HDR_FC;
    gtbluc_Frame[8] = (uint8_t)value_1;

    gtbluc_Frame[9] = (uint8_t)(value_2);
    gtbluc_Frame[10] = (uint8_t)(value_3));
    gtbluc_Frame[11] = (uint8_t)(value_4);
    gtbluc_Frame[12] = 0x22;

    SEND FRAME : 

    /* Send frame IEEE ZGP */
    if(RF_send_ieee_frame() != IEEE_DONE_OK)
    {
    MANAGE_error();
    }

  • Ok it seems complicated to get help to use the IEEE API.
    Does anyone have a way to have a transmitter receiver that uses CC2650 in SOC mode?
    thank you in advance