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.

LAUNCHXL-CC26X2R1: Beacon Receiver

Part Number: LAUNCHXL-CC26X2R1

Hi All,

we are using LAUNCHXL-CC26X2R1 to setup a beacon receiver that can read any beacon information like iBeacon, Eddystone etc and print the payload with UUID via UART.

We are starting with ble5_simple_central_cc26x2r1lp app and following these instructions from the below mentioned link for the scanning part.

  1. Please let us know if this is the right code base to modify it to read the beacon packets and print that via UART? Is there any better example that we can start with?
  2. We couldn't found the exact functions in the "SimpleLink CC26X2 SDK - simple central code" for doing "Scanning Task 2 - Print scanning results" section. Please let us know where we need to add those sections?

Thanks

Rahul

  • Hi Rahul,
    1. That's an excellent example, and the one you should use
    2. Do you mean the SimpleBLECentral_processRoleEvent function?
  • You can print scan results inside "case SC_EVT_SCAN_DISABLED:..." in SimpleCentral_processAppMsg
  • Hi Rahul,
    It seems like the SLA was originally written for CC2640R2 SDK, and the API has changed slightly. The recommendation from YK should work. I'll file a ticket to get the SLA updated.
  • Hi,

    Thank you guys for your valuable and quick responses.

    We tried with YK Chen recommendation and it is working well. Since we are planning for continuous scan mode we are moving that section in case SC_EVT_ADV_REPORT: and it is working as expected.


    Thanks
    Rahul

  • Hi ,

    Now we end up in 1 issue.

    We are able to do continuous discovery for our MAC filtered devices (only working with HCI_RANDOM_DEVICE_ADDRESS while adding in white list) and print out the address and data in the switch case SC_EVT_ADV_REPORT:.

    But when we restart any of our filtered beacon device while running the discovery mode in CC26x2 Launchpad, the code hangs(not able to come out of this with any button press except resetting the board) and if we pause and check in the CCS V9 we are seeing
    "Break at address "0x1002de0e" with no debug information available, or outside of program code." and Disassembly shows,
    "1002de0e: 2800 cmp r0, #0"

    We tried removing all filters and in that case also if any of our beacon device restarts this issue is happening.

    If we are restarting any of our other beacon device which is not added in our filter then it is working fine.

    Please let us know why we are getting this issue and how can we recover from this state.

    Thanks
    Rahul
  • Hi ,

    Here is the updates,

    We tried to narrow down the issue and we found that along with printing of discovered device address and its data in display port, we are actually sending the data in UART1 as well using "UART_write" function and it seems like this is creating the issue.

    When we comment this write function it is working fine and when we changed the UART write to "UART_writePolling" then also it is working fine. We are still unclear about how this can create the issue when beacon device restarts even though "UART_write" is interrupt and "UART_writePolling" is polling.

    Please let me know your thoughts.

    Thanks
    Rahul
  • I suppose you might do too many UART write and make system hang. If you just use UART write to output debug messages, I suggest you to decrease UART write numbers.
  • Hi ,

    Yes, we are sending in fast rate. But we didn't understood why display function is working in the same rate and only UART_write function is having issues and why it is having issues only when we restart the beacon device?

    Also UART_writePolling is not sending any data thats why it is not hanging, then when i checked it is not implemented in the simplelink_cc13x2_26x2_sdk_3_10_00_53 stack.

    We tried with UART_MODE_BLOCKING mode also but still it is hanging.

    Please let me know your comments.

    Thanks

    Rahul

  • What do you mean display function is working in the same rate?
  • Hi

    Cheers...

    We are glad to inform you that the issue is resolved.

    We analyzed the packets when the beacon is restarting and it is sending only 3 bytes ie. Advertising Data: 02:01:06 which was supposed to have all our sensor readings and our code was expecting that many bytes to push via UART which was messing up our system.

    Now we are able to push all the data in the same rate via UART1 using UART_write API along with printing using Display_print apis in UART0.


    Thanks
    Rahul TT