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-CC2640R2: Reading advertising data of a non-connectable broadcaster

Part Number: LAUNCHXL-CC2640R2

I am using Simple_observer example for listening the advertisement and using modified simple broadcaster example to advertise data. i am updating advertising packet every 10 sec in my simple broadcaster. i want to read that data on my simple_observer side. what changes do i need to make in my simple observer code. also i want to add a filter to read only advertising data of specific ble adresses(4 devices) instead of reading data from all, how can i achieve this?

  • Hi Ankit,

    You will be able to read the data in the fucntion SimpleObserver_processRoleEvent within the 

    GAP_DEVICE_INFO_EVENT:

    Here you can extract the information from the Obsever Event struct.

    when adding: 

    Display_print1(dispHandle, detectedDevice, 0, "Counter %i", pEvent->deviceInfo.rssi);

    You will be able to see the RSSI of the detected device in your UART consol.

    Please mind that just the last detected device will be shown here.

    within BLE stack you can implement a whitelist as explained here therefore you will have to bond to a device 

    (+) Selective bonding with device using Whitelist [CC2541] - Bluetooth forum - Bluetooth®︎ - TI E2E support forums

    You will find the parameter that are required in simple_observer.c. 

    Regards,

    Alex

  • Hello Alex,

    Thanx for the reply. (+) Selective bonding with device using Whitelist [CC2541] - Bluetooth forum - Bluetooth®︎ - TI E2E support forums this shows whitelisting of only 1 device, can we whitelist multiple device for e.g. 4 ,and how is it possible? Also i wanted to know that if i disable the scan response data in Simple broadcaster, will the simple observer be able to detect that BLE device or does the simple observer needs scan response data in order to detect the non-connectable device

  • Hi Ankit,

    We have a Simplelink academy example  to show how bonding works and white listing works.

    Can you give me a short description on what your overall aim is for the observer to receive advertisement messages from a limited amount of devices. 

    Regards Alex

  • Actually my application is Tire Pressure Monitoring system, where there will be 4 TPMS sensors advertising data in broadcast mode and will be non-connectable. the observer would be like an aggregator which will collect the data from all the 4 TPMS sensors and send it to ECU of the vehicle on CAN.

    the problem which i am facing currently is i am not able to detect my devices on simple_observer example. so i was thinking if this was due to the disabling of scan rsp data on sensors side . And after solving this issue i would like to whitelist the mac -id's of all the 4 sensors in order to avoid receiving data from unwanted devices.

  • Hi Ankit,

    there should be a way to do this. The only solution I know for this is doing it on the application layer by reading the address whenever an advertisement event happens. However, I will forward this one to our automotive experts.

    Regards,

    Alex