Detecting rssi of multiple BLE beacons
-
Hello,
I have a setup where 3 LoPy's are supposed to see the RSSI value of 4 Estimote BLE beacons in a distance of 0 - 4 meters. I have 2 concerns:
- My RSSI levels are extremely fluctuating, and in general performance is much worse than other platforms I have used for the same purpose. So I'm wondering if I'm doing anything wrong.
- In my main loop, when scanning for bluetooth devices, I'm unsure if my approach might "miss" some of the further-away beacons because it's looking at the first thing that pops up. Maybe this is the reason for the low performance? My code looks like this:
while True: adv = bluetooth.get_adv() if adv != None: macRaw = adv[0] # binary mac address macReal = binascii.hexlify(macRaw) # convert to hexadecimal if macReal == b'f3bc0b6feb4c': print('beacon A rssi: ', adv[3]) # adv[3] is rssi sendToSocket(beaconID = 1, rssi = adv[3]) elif macReal == b'edbed48d0b87': print('beacon B rssi: ', adv[3]) sendToSocket(beaconID = 2, rssi = adv[3]) elif macReal == b'c7c383eeaaa4': print('beacon C rssi: ', adv[3]) sendToSocket(beaconID = 3, rssi = adv[3]) elif macReal == b'cd87e6a38dc2': print('beacon D rssi: ', adv[3]) sendToSocket(beaconID = 4, rssi = adv[3])
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login