-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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
Payload used as string, thus "prints" adds garbage #7637
Comments
Are you sure that HC-06 can be used as BLE?! |
The S3 can only connect using BLE with another BLE device. |
well, I swear to you I'm using my HC06 with the app you pointed me (ble client ino) May be the bug is line 32 if we say that the 'bluetooth' transports an array of byte and a size for that array. What I call HC-06 is the small thing from aliexpress . apparently, original one was bt2.0 |
Considering that your HC06 works with BLE, I can tell you that BLE doesn't understand NULL terminated strings. The sender will send a payload with a defined length. If you want to |
it happens it is your app in need of this zero ;) |
I'll add that to the example. Thanks. |
Board
ESP32-S3
Device Description
homemade
Hardware Configuration
homemade
Version
latest master (checkout manually)
IDE Name
ARduino IDE
Operating System
linux
Flash frequency
40
PSRAM enabled
no
Upload speed
115200
Description
Hello
v2.0.6
this is the output of the demo program using BLE_client
https://github.com/espressif/arduino-esp32/blob/master/libraries/BLE/examples/BLE_client/BLE_client.ino
The data length is correct, I recognize just an 'AT' command from the HC06.
Line 32 of the demo program uses the payload directly as a string (serial.print) .
Maybe just add a warning for readers: this is a payload interpreted wrongly as a string for simplicity of the demo.
arduino-esp32/libraries/BLE/examples/BLE_client/BLE_client.ino
Line 32 in b63f947
Sketch
Debug Message
Other Steps to Reproduce
No response
I have checked existing issues, online documentation and the Troubleshooting Guide
The text was updated successfully, but these errors were encountered: