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

    Having trouble with Bluetooth LE on Cardputer

    SOFTWARE
    1
    1
    240
    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.
    • S
      sanchez8096
      last edited by

      I'm developing my software, but noticed one issue I couldn't get rid of. I'm developing in Arduino IDE and using BLE libraries provided by M5Stack package. Even the simplest examples also have this issue.
      Program comes down to this:

      1. Initialise and start BLE server with onConnect() and onDisconnect() callbacks.
      2. Start advertising BLE device.

      Expected behaviour is: I launch Cardputer, it advertises itself as BLE device, I connect to it.
      Actual behaviour: I launch Cardputer, BLE server automatically fires onConnect(), then onDisconnect() (it does it constantly if I advertise when disconnected). But I still can connect to it.

      I can even get mac address of a supposedly connected device. But my Bluetooth scanner doesn't show this mac, also this mac isn't from Cardputer.

      I tried changing a lot of parameters, but discovered that not advertising (removing BLEDevice::startAdvertising();) removes this issue. But that means I can't connect to it now.

      I tried loading the same program on M5StickC Plus2 and it actually works as expected. onConnect() and onDisconnect() don't fire automatically.

      How do I solve this issue? My Cardputer is basically new.

      1 Reply Last reply Reply Quote 0
      • First post
        Last post