Android Question BLE (Bluetooth) and Baud rate

Discussion in 'Android Questions' started by MarkusR, Apr 10, 2019.

Tags:
  1. MarkusR

    MarkusR Well-Known Member Licensed User

    i wonder how i can change the baud rate if me using this ble library.

    9600 works but i will use 115200 baud.
     
  2. emexes

    emexes Active Member 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).
     
    MarkusR likes this.
  3. MarkusR

    MarkusR Well-Known Member Licensed 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)
     
  4. techknight

    techknight Well-Known Member Licensed 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.
     
    MarkusR likes this.
  5. emexes

    emexes Active Member Licensed User

    Super! The HM-10 was the original one, with factory support; the HC-08 et al are clones, with the usual level of pirated-firmware support.

    This blog posting was helpful: http://www.martyncurrey.com/hm-10-bluetooth-4ble-modules/

    I have been looking for the table of maximum bytes-per-second throughput, but can't find it. I thought it was in one of the datasheets.
     
    Last edited: Apr 10, 2019
    MarkusR likes this.
  6. MarkusR

    MarkusR Well-Known Member Licensed 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
     
    Last edited: Apr 10, 2019
  7. MarkusR

    MarkusR Well-Known Member Licensed 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.
     
  8. MarkusR

    MarkusR Well-Known Member Licensed 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: Apr 11, 2019
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice