Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    Detecting rssi of multiple BLE beacons

    Scheduled Pinned Locked Moved LoPy
    blebluetoothestimotebeaconrssi
    1 Posts 1 Posters 986 Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • sorenS Offline
      soren
      last edited by

      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:

      1. 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.
      2. 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]) 
      
      1 Reply Last reply Reply Quote 0

      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
      • 1 / 1
      • First post
        Last post

      Pycom on Twitter

      Pycom