Changing UART2 Baudrate, Etc



Does anyone know the correct command order and/or commands to change the baudrate, character framing, and flow control on UART2? I have been using the following sequence, but with no success.

AT+WMFM=0,2,2 // To check the UART2 status
IF (UART2 is Open)
Send AT+WMFM=0,0,2 // Close Port

AT+IPR? // Responds with +IPR: 0
AT+WMFM=0,1,2 // Open Port

Unfortunately, both the baudrate and flow control fail after this sequence of commands. I have even tried opening the port prior to changing the parameters, using the UART2 status to determine if the open command was needed. Thank you for any help you can provide.

R71_00gg.WMP100 2090888 041808 13:46


You don’t have to close the uart port to setup it.
I think you don’t use the ADL_AT_PORT_TYPE macro so when you send “AT+IPR?” you get the serial speed of the OAT Virtual Serial port, which is irrelevant.

Anyway i think the nicest solution should look like this:

  1. Check the UART parameters with AT commands like AT+IPR? on UART2 and so on…( use the ADL_AT_PORT_TYPE(ADL_AT_UARTX,FALSE) macro)
  2. If something has to be changed, change it with setup commansd
  3. If something has been changed save it with AT&W command, so you don’t have to issue the setup parameters after a reboot
  4. After you finished with the AT settings, handlers received OK , you can start with adl_fcmSubscribe()…
  5. After control handler received ADL_FCM_EVENT_FLOW_OPENNED, you can change to data mode with “adl_fcmSwitchV24State” function
  6. After control handler received “ADL_FCM_EVENT_V24_DATA_MODE” you can start sending data “adl_fcmSendData” function

And one more thing, don’t use the adl_fcmUnSubscribe() function on OS R71/OASIS 2.01.



I found that there is different resault for the 2nd parameter of the function adl_atCmdCreate, ADL_AT_PORT_TYPE ( ADL_PORT_UART1, FALSE ) will change the baud rate of uart2 into 115200.
which is my question that my uart2 use as 9600 bps.
Anyway, appreciate Tom’s instruction.


Thanks Tom,

That did the trick. UART2 is now at the correct baudrate for my application.

R71_00gg.WMP100 2090888 041808 13:46