-
-
Notifications
You must be signed in to change notification settings - Fork 161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BLE UART Tx and Rx not working #813
Comments
When your phone clears its cache or you use another phone the name won't show. It only works now because phones save the information about each device in it's cache. Your callback function signatures are out of date and need to up updated for 2.x, please see the 1.x to 2.x migration guide NimBLE-Arduino/src/NimBLECharacteristic.h Line 246 in 462f918
|
In the end the changes were simple but for an old fashioned C-programmer. pfft. In NimBLE version 2.x.x these functions needed extra parameters in this sketch:
Below a working sketch
|
Glad you got it working. The required changes are quite minimal, also good to see you are using the |
I can not get this code working with on my Arduino Nano ESP32 with Arduino core 2.0.18 arduino 5 with NimBLE V2.1.1
It works fine with NimBLE V1.4.3
I tried using NimBLEDevice instead of BLEDevice but later discovered this is changed automatically with a #define
The call to pAdvertising->setName(BLEbroadcastName); as suggested in #772 seems not necessary because I see the name broadcasted in my app and I can connect to it. The BLEDevice::init(Mem.BLEbroadcastName); seems enough.
The terminal window of my Serial terminal app opens after connection and commands can be sent from my phone do not arrive in the Nano ESP32. Strings sent from the Nano ESP32 are not received by my phone.
With the source below a connection with a BLE serial terminal app on a IOS or Android device can be made
Commands can be sent to the ESP32 with the BLE serial terminal app and/or the serial terminal of the Arduino IDE. The commands and results are displayed on both terminals.
An UART example in the examples would be fine in a next release.
The text was updated successfully, but these errors were encountered: