0

I am trying to receive the temperature and humidity that is sent out in the manufacturer data field as part of the BLE advertising packet from a ThermoBeacon device. There is code to do this using a Raspberry Pi available from GitHub https://github.com/rnlgreen/thermobeacon/blob/main/thermobeacon.py. This code works correctly but I can't get a CircuitPython version to work on an Adafruit ItsyBitsy nRF52840 Express https://www.adafruit.com/product/4481

Running the sample ble_detailed_scan.py code from https://docs.circuitpython.org/projects/ble/en/latest/examples.html allows me to see the advertising packets sent by the ThermoBeacon:

<Address 62:1e:00:00:0a:07> <Advertisement tx_power=0 complete_name=ThermoBeacon >

but there does not appear to be any manufacturer data included.

Thinking that the Adafruit BLE library doesn't include manufacturer data by default, I started with the sample code for Rock, Paper, Scissors provided by Adafruit https://learn.adafruit.com/rock-paper-scissors-circuitpython/simple-game and modified ble_detailed_scan.py by passing start_scan() a custom advertising class that includes a ManufacturerData field. That caused the advertising packets from some of the many BLE devices that live in my house to include manufacturer data, but not the ThermoBeacon.

Here is a packet from a BLE advertisement from a random non-ThermoBeacon device in my house:

<Address 60:34:43:c9:12:66> <RpsAdvertisement manufacturer_data=<ManufacturerData company_id=0000 data=02 00 04 07 19 01 0f 20 01 66 8f 04 75 ed ae 4f 0b 2d 1c 5a f7 24 06 ac dc 02 ec 99 > >

And from a ThermoBeacon:

<Address 62:1e:00:00:0a:07> <RpsAdvertisement manufacturer_data=<ManufacturerData company_id=0000 data= > >

marcosw
  • 11
  • 2
  • Try doing a scan with a generic Bluetooth Low Energy scanning and exploration tool (e.g. [nRF Connect](https://www.nordicsemi.com/Products/Development-tools/nrf-connect-for-mobile)) to see if there are any additional differences between the advertisements. You could also try setting `extended` in the `start_scan` parameters https://docs.circuitpython.org/projects/ble/en/latest/api.html#adafruit_ble.BLERadio.start_scan – ukBaz Nov 26 '22 at 06:46

0 Answers0