🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    [M5Stack] BLE Beacon RSSI 0

    Scheduled Pinned Locked Moved SOFTWARE
    1 Posts 1 Posters 4.0k Views
    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.
    • P Offline
      peperone92
      last edited by

      Hi,
      I have a platform.io project in which I'm trying to setup an iBeacon and it seems to work except the RSSI is 0.

      Using different scanner applications I can see the generated iBeacon (right UUID, major, and minor) but like I mentioned the RSSI is always 0.
      I would appreciate any (general) pointers as to what could be the root cause. Also, if anyone has or knows of a working example I could use that.

      Note that I also tried to use the NimBLE library with the same issue.

      The relevant part of the code:

      #include <BLEDevice.h>
      #include <BLEServer.h>
      #include <BLEBeacon.h>
      #include <Ticker.h>
      
      bool is_advertising;
      Ticker switchAdertising;
      BLEAdvertising *pAdvertising;
      
      void setup_beacon()
      {
        BLEDevice::init("BleBrain");
        BLEServer *pServer = BLEDevice::createServer();
      
        BLEBeacon myBeacon = BLEBeacon();
        myBeacon.setManufacturerId(0x4C00);
        myBeacon.setMajor(beacon.major);
        myBeacon.setMinor(beacon.minor);
        BLEUUID bleUUID = BLEUUID(IBEACON_UUID);
        bleUUID = bleUUID.to128();
        myBeacon.setProximityUUID(BLEUUID(bleUUID.getNative()->uuid.uuid128, 16, true));
        myBeacon.setSignalPower(0xc5);
      
        BLEAdvertisementData advertisementData;
        advertisementData.setFlags(0x1A);
        advertisementData.setManufacturerData(myBeacon.getData());
      
        pAdvertising = pServer->getAdvertising();
        pAdvertising->setAdvertisementData(advertisementData);
        pAdvertising->start();
        is_advertising = true;
      };
      
      void advertising_switch()
      {
        if (is_advertising)
        {
          pAdvertising->stop();
        }  else {
          pAdvertising->start();
        }
      };
      
      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
      • First post
        Last post