Android Question BLE (Bluetooth) and Baud rate

MarkusR

Well-Known Member
Licensed User
Longtime User
i wonder how i can change the baud rate if me using this ble library.

9600 works but i will use 115200 baud.
 

emexes

Expert
Licensed User
BLE itself has no baud rate interface, just packets. Unless you're using one of those HM10/HC08 BLE-to-serial adapter things, which would ferry bytes to/from the UART from/to your Android device in blocks of up-to-20 bytes. But note the bytes-per-second limits table in the datasheet, it was quite (s)low (relative to 115200 baud).
 
Upvote 0

MarkusR

Well-Known Member
Licensed User
Longtime User
i am using "DSD TECH HM-10 Bluetooth 4.0 BLE iBeacon UART Modul mit 4 PIN Base Board für Arduino UNO R3 Mega 2560 Nano"
i will see what happens if me change the baud rate in the arduino ide Serial.begin(115200)
 
Upvote 0

techknight

Well-Known Member
Licensed User
Longtime User
If its based off of the Nordic nRF Chip, you can download the UART example project, and purchase a SEGGER kit, then modify the firmware to increase the maximum transfer width. I have mine at the maximum theoretical size of 128 bytes per transfer.
 
Upvote 0

MarkusR

Well-Known Member
Licensed User
Longtime User
ahh, it is not just Serial.begin(...)
i need to set the new baud rate with at commands in this HT-10 Modul.
AT+BAUD4 =115200

Test with AT+BAUD?
should return OK+Get:0 (0 to 8) in case of 115200 a 4

from web
  • Default baud rate pre firmware V700 is 9600
  • Default baud rate firmware V700 and up is 115200
 
Last edited:
Upvote 0

MarkusR

Well-Known Member
Licensed User
Longtime User
i just change the baud at arduino and it works. data came to my b4a app with 115200 :)
i changed also to softwareserial so that i can use also the usb connection at uno board to pc.
 
Upvote 0

MarkusR

Well-Known Member
Licensed User
Longtime User
omg
arduino via bluetooth to phone is a game of pure chance.
... software serial need a lower baud rate. 38400 seems ok.
best choice is the hardware serial but uno have only one that used the usb to pc too.
 
Last edited:
Upvote 0
Top