0

Feather BLE broadcast to raspberry pi
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Feather BLE broadcast to raspberry pi

by mossyoak1101 on Thu Jan 21, 2021 1:33 am

I need some help before I loose my mind!
I have a Feather nRF52840 Express with an i2c temperature sensor connected. I am trying to broadcast the data from the sensor to a Raspberry Pi 3A+.
The code on the Feather is this
Code: Select all | TOGGLE FULL SIZE
import time
import board
import busio
import adafruit_mcp9808
import adafruit_ble_broadcastnet

i2c_bus = busio.I2C(board.SCL, board.SDA)
mcp = adafruit_mcp9808.MCP9808(i2c_bus)

print("This is BroadcastNet Feather sensor:", adafruit_ble_broadcastnet.device_address)
 
while True:
    measurement = adafruit_ble_broadcastnet.AdafruitSensorMeasurement()
 
    measurement.temperature = mcp.temperature
 
    print(measurement)
    adafruit_ble_broadcastnet.broadcast(measurement)
    time.sleep(60)

I am using the ble_broadcastnet_blinka_bridge.py example from github on the raspberry pi. I followed this tutorial line for line.
https://learn.adafruit.com/bluetooth-le ... LMQAvD_BwE
When I run the code on the Feather, It prints out the measurement data as expected to the console window.
Code: Select all | TOGGLE FULL SIZE
This is BroadcastNet Feather sensor: f681590b3b1d
<AdafruitSensorMeasurement temperature=22.3125 >
<AdafruitSensorMeasurement temperature=22.3125 >

When I run the code on the raspberry pi it acts like it is scanning but I get nothing.
Code: Select all | TOGGLE FULL SIZE
This is BroadcastNet bridge: b827eb97b11e

Fetching existing feeds.
{}
scanning

I can't seem to figure out what I am doing wrong. Any help or suggestions would be greatly appreciated.
Last edited by mossyoak1101 on Thu Jan 21, 2021 1:58 am, edited 1 time in total.

mossyoak1101
 
Posts: 15
Joined: Fri Nov 30, 2018 5:43 pm

Re: Feather BLE broadcast to raspberry pi

by mossyoak1101 on Thu Jan 21, 2021 1:50 am

If it helps at all I was able to see the raw data using a Bluetooth scanner app.

Screenshot_20210120-234330.png
Screenshot_20210120-234330.png (126.32 KiB) Viewed 128 times

mossyoak1101
 
Posts: 15
Joined: Fri Nov 30, 2018 5:43 pm

Re: Feather BLE broadcast to raspberry pi

by mossyoak1101 on Thu Jan 21, 2021 10:06 pm

In trying to do some more testing, I was able to get this tutorial to work.
https://learn.adafruit.com/circuitpytho ... rt-example
Communication seems to work fine between the feather and the pi. It seems only when I am trying to use the broadcastnet to broadcast the sensor data from the feather to the pi that I can't see the data.

mossyoak1101
 
Posts: 15
Joined: Fri Nov 30, 2018 5:43 pm

Re: Feather BLE broadcast to raspberry pi

by mossyoak1101 on Fri Jan 22, 2021 1:43 am

Still trying to do more trouble shooting. I attempted the same tutorial for the broadcastnet, but this time broadcasting to a pi zero w.
Still same results. I can see the feather is sending the data but nothing is seen by the raspberry pi.

I must be missing something. I even tried another time and had my wife help make sure I was doing everything line for line, and still the same result. I really want this to work but I'm running out of ideas...

mossyoak1101
 
Posts: 15
Joined: Fri Nov 30, 2018 5:43 pm

Please be positive and constructive with your questions and comments.