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.

CC2640R2F: In the OBSERVER section, message is delivered by UART communication of RSSI value to MCU.

Part Number: CC2640R2F
Hello, as the title suggests, I am curious as to whether it is possible to process messages on the MCU 
side by measuring the RSSI value in the OBSERVER part of the CC2640R2F chip. Currently, it is possible to observe up to the namespace,
but I do not know if it is possible to implement the RSSI value as well.
static void SimpleBLEPeripheralObserver_StateChangeCB(gapPeriObsRoleEvent_t *pEvent)
{
switch(pEvent->gap.opcode)
{
case GAP_DEVICE_INFO_EVENT:
{

if(observer_mode==1){

memcpy(rsp_data, pEvent->deviceInfo.pEvtData, pEvent->deviceInfo.dataLen);
if((rsp_data[10]=='S')&&(rsp_data[11]=='a')&&(rsp_data[12]=='m')&&(rsp_data[13]=='s')&&(rsp_data[14]=='u')&&(rsp_data[15]=='n')&&(rsp_data[16]=='g')&&(rsp_data[17]=='E')&&
(rsp_data[18]=='d')&&(rsp_data[19]=='d')){ // NameSpace

uart_printf("BUZON \r\n");

}

}

break;
}
This is the part that observes the current namespace.
  • Part Number: CC2640R2F

    Hello, I have a question about periperal observer. I am curious if it is possible to observe RSSI in the observer section and send a message to the MCU.
    The current configuration is designed to send a UART message to the MCU when a specific namespace is observed. The designed code looks like this.
    uint8 rsp_data[50];
    static void SimpleBLEPeripheralObserver_StateChangeCB(gapPeriObsRoleEvent_t *pEvent)
    {
    switch(pEvent->gap.opcode)
    {
    case GAP_DEVICE_INFO_EVENT:
    {

    if(observer_mode==1){
    memcpy(rsp_data, pEvent->deviceInfo.pEvtData, pEvent->deviceInfo.dataLen);
    if((rsp_data[10]=='S')&&(rsp_data[11]=='a')&&(rsp_data[12]=='m')&&(rsp_data[13]=='s')&&(rsp_data[14]=='u')&&(rsp_data[15]=='n')&&(rsp_data[16]=='g')&&(rsp_data[17]=='E')&&
    (rsp_data[18]=='d')&&(rsp_data[19]=='d')){ // NameSpace


    uart_printf("BUZON \r\n");
    }

    }

    Timer_check=0;

    break;
    }



    gapDeviceInfoEvent_t; I would like to ask if it is possible to observe RSSI using the structure.
    typedef struct
    {
    osal_event_hdr_t hdr; //!< @ref GAP_MSG_EVENT and status
    uint8 opcode; //!< @ref GAP_DEVICE_INFO_EVENT
    uint8 eventType; //!< Advertisement Type: @ref GAP_Adv_Report_Types
    uint8 addrType; //!< address type: @ref GAP_Addr_Types
    uint8 addr[B_ADDR_LEN]; //!< Address of the advertisement or SCAN_RSP
    int8 rssi; //!< Advertisement or SCAN_RSP RSSI
    uint8 dataLen; //!< Length (in bytes) of the data field (evtData)
    uint8 *pEvtData; //!< Data field of advertisement or SCAN_RSP
    } gapDeviceInfoEvent_t;

  • Hi,

    Thank you for reaching out. Can you specify the SDK version you are using for your development?

    Best Regards,

    Jan

  • The sdk version used is 2.40.0.32
  • Hi,

    The RSSI of the advertisers and data are passed to the application with the GAP_DEVICE_INFO_EVENT  event. When receiving such event, a gapDeviceInfoEvent_t structure is passed to the application.

    Best regards,

  • thank you We will reply after checking operation.