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.

CC2652P: BLE observer from Simple_central example

Part Number: CC2652P
Other Parts Discussed in Thread: SYSCONFIG

Hello,

We are developing a BLE observer for beacons. For this, we based our CC2652P firmware on the simple_central example and we are using LAUNCHXL-CC1352P-2 development kit. I need this observer to scan continuously and without restrictions of amount of devices.

In order to have this working, I had to made a few changes to the project and I would like you to validate them:

  1. Set DEFAULT_MAX_SCAN_RES to 0.
  2. GAP device init with GAP_PROFILE_OBSERVER.
  3. Set Scan Type to Passive; Scan Interval to 150ms, Scan Window to 150ms and Scan Duration to 5000ms.
  4. I start discover using SimpleCentral_doDiscoverDevices(0) in two places: when GAP_DEVICE_INIT_DONE_EVENT and after SC_EVT_SCAN_DISABLED.
  5. I print beacon's data in SimpleCentral_processAppMsg.

However, I still have some problems:

    1. In https://dev.ti.com/tirex/explore/node?node=AKvX4BPHvI6W3ea9a0OTxA__pTTHBmu__LATEST&r=krol.2c__3.10.00.15 it says that I should set DEFAULT_SCAN_DURATION to 0. However, as you can see in this picture, I cannot. Does this affect my "continuously scanning"?
     

  1. If I use UUID filter, should I do something with numScanRes? I don't fully understand what is the scanned device list used for.

And finally, my biggest problem is with the display/UART. I need the CC2652 to send beacon's data to another MCU that will process it. I am having issues disabling the display in order to use a simple UART just to send data bytes. How should I do this? I have already disabled Menu and Two button menu and I thought that display_printf would just write the dat over the UART but it does write other characters related to display management too. I have seen https://dev.ti.com/tirex/content/simplelink_academy_cc13x0sdk_2_10_02_10/modules/debug/debugging_output/debugging_output.html but I cannot understand how to implement it in this case.

Thanks!

  • Hi Tomas,

    What version are you using? (This looks like a known issue that we fixed in SimpleLink CC13x2/CC26x2 SDK 3.40.)

    Regarding the UART, it sounds like the display driver is still configured to use uart. Please open the Display view in Sysconfig and double-check this. 

  • Hi Marie,

    I am using SimpleLink CC13x2 26x2 SDK (4.10.00.78). How can I be sure that my device will continuously be scanning?

    Regarding the UART, I managed to remove Display and I am using now UART_write, is that ok?

    EDIT: UART PROBLEM

    I have this code in order to send beacon data through UART:

                       uint8 beacon_len = 6 + 1 + pAdvRpt->dataLen;
                       uint8 txbuf[beacon_len];
                       txbuf[6] = pAdvRpt->rssi;
                       memcpy(txbuf, pAdvRpt->addr, 6);
                       memcpy(&txbuf[7], pAdvRpt->pData, pAdvRpt->dataLen);
                       UART_write(handle, txbuf, beacon_len);

    txbuf is in 0x200062DC as seen in the picture:

    and beacon_len is 25 so I would expect to receive A8 70 FE 0D D5 E2 DA 02 01 06 03 03 DE DE 07 FF DE DE 00 72 A2 FD 02 0A 08 

    However, I am receiving A8 70 FE 0D D5 E2 DA 02 01 06 03 03 DE DE 07 FF DE DE 00 72 A2 FD 02 0A 0D 08 

    I don't understand where is that 0D coming from and why is UART_write printing more bytes than the amount that is told to...

    Solved: (it was a carriage return)

      UART_init();
      UART_Params_init(&params);
      params.writeDataMode = UART_DATA_BINARY;
      handle = UART_open(CONFIG_UART_0, &params);

    Thanks!

  • Hi Marie,

    Is there any solution to my continuously scanning problem? Everything else is working OK, I just need to make sure that I am being a Beacon Observer 100% of the time.

    Thanks!