This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to read accelerometer data from BLE beacon

Hello,

I have one custom board which have Nordic's nrf52840 chip. I'm using this chip to scan the surrounding beacons.

For beacon scanning i have integrated Bluez stack on my custom board (From yocto build) and using following APIs/structures of Bluez stack for scanning.

1) print_advertising_devices

2) evt_le_meta_event

3) le_advertising_info

On nrf52840, i'm using zephyr based hci_uart application. So after creating hci interface i'm using above APIs for the beacon scanning and parsing bdaddress, name and rssi.

Now, I have one BLE beacon which is advertising accelerometer data x,y and z co-ordinates (Verified using nrfConnect application).

Q : Is there any APIs/structures available in Bluez stack which can help me to get/parse the accelerometer data broadcasted by beacons.

Thanks,

Mayank

Parents
  • For someone who is exploring bluez and using nordic devices

    I found the answer and it's "le_advertising_info" API of buez gives the raw data packets in bytes which is broadcasted by BLE beacons.

    You can find data[] variable which contains raw data in hex values.

    Parsing this raw data is a different thing altogether, but still i can get the raw bytes for which i have to write a data parser.

    Thanks,

    Mayank

Reply
  • For someone who is exploring bluez and using nordic devices

    I found the answer and it's "le_advertising_info" API of buez gives the raw data packets in bytes which is broadcasted by BLE beacons.

    You can find data[] variable which contains raw data in hex values.

    Parsing this raw data is a different thing altogether, but still i can get the raw bytes for which i have to write a data parser.

    Thanks,

    Mayank

Children
No Data
Related