This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

BR-LE-4.0-S3A Changing UART speed over BLE GATT



Hi all,

I was wondering whether anyone knew if it was possible to change the UART speed of the BlueRadios' low energy chip (S2A or S3A) over the air? I've hooked up mine to a microcontroller, and I think the micro's serial lines might be a little wonky. I'm getting framing errors at 115200 (software-emulated serial connection currently), but 57600 or lower works fine... However, the default UART setting for the BR chips is 115200...

I have a few apps which will connect to the chip, but I can't seem to figure out if it would be possible to change the UART speed over the air. Suggestions?

Thanks!
-SJ

P.S. I will be moving away from a software serial connection, to a hardware one after some re-work on the board I'm using. I would like to ramp down the UART speed just to ensure everything else works correctly. 

  • Hi SJ,

    Yes you can change the UART baud rate over the air using remote command mode.  If you have another BlueRadios module use it to connect to the module you want to change using the following command: ATDMLE,<Addr>,2.  After connecting you'll receive the BRSP,0,2 event letting you know you're in remote command mode.  Then change the UART rate to 57600 using ATSUART,6,0,0,1.  Then disconnect using ATDH and reset the module and it's UART will be at 57600.

    John

  • Hi John, thanks for the quick reply!

    I don't have a second BT module prepped at the moment. I have an iPad app (BLEXplorer), as well as a BT USB dongle which comes with proprietary software. With both of these devices, I can connect to the BR, look up characteristics and all in the GATT, as well as write commands to the GATT...

    Is there any way to send the equivalent command like this? Or must I have another BR chip talking to it?

    Thanks!
    -SJ 

  • Hi SJ,

    If you have an iPad, download the nBlueTerm application and use it to connect to your module.  Once connected press the button in the lower right hand corner labeled "Data" to switch from data mode to remote command mode - the button will change to "Command."  Then enter ATSUART,6,0,0,1 in the textbox and hit return to send the command. 

    John

  • John, you're a legend! 

    Worked like a charm, and saved me quite a hassle. I popped in that command, throttled down to 57600 and now can communicate via my micro! 

    Thanks! 
    -SJ

    P.S. Just an aside... Does the BR ever accidentally reset to factory default? I noticed that I had to try it twice to get the command to 'stick' across a power down and power up... Alternatively, I remember reading somewhere that there is a certain amount of time that should be observed between changing a setting and expecting it to work.

  • Hi SJ,

    No problem, glad to hear you got it working!  

    The module should never accidentally reset to factory default.  When changing settings over the air though you need to make sure and disconnect first, then reset the module.  The module waits until a disconnect to store configuration changes in flash so as not to interfere with the LE connection timing, so if you were to reset the module before disconnecting the changes wouldn't be stored.  

    All commands should take effect immediately - except for ATSUART, which requires a reset to take effect.

    John

  • Ah, again, super helpful! 

    I think that was my exact problem. I reset before disconnection... Silly me.