# Changing UART2 Baudrate, Etc

**URL:** <https://forum.sierrawireless.com/t/changing-uart2-baudrate-etc/2141>\
**Category:** Legacy AirPrime modules\
**Created:** [May 2, 2008, 4:10pm UTC](https://forum.sierrawireless.com/t/changing-uart2-baudrate-etc/2141 "2008-05-02T16:10:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![gcoakley](https://avatars.discourse-cdn.com/v4/letter/g/d9b06d/32.png) [@gcoakley](https://forum.sierrawireless.com/u/gcoakley)\
**Post date:** [May 2, 2008, 4:10pm UTC](https://forum.sierrawireless.com/t/changing-uart2-baudrate-etc/2141/1 "2008-05-02T16:10:29Z")

</div>

Hello,

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=9600  
AT+IPR? // Responds with +IPR: 0  
AT+ICF=3,4  
AT+IFC=0,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.

-gcoakley  
R71\_00gg.WMP100 2090888 041808 13:46

---

<div class="post-metadata">

**Author:** ![tomalex](https://avatars.discourse-cdn.com/v4/letter/t/71e660/32.png) [@tomalex](https://forum.sierrawireless.com/u/tomalex)\
**Post date:** [May 4, 2008, 4:02pm UTC](https://forum.sierrawireless.com/t/changing-uart2-baudrate-etc/2141/2 "2008-05-04T16:02:06Z")

</div>

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.

Cheers,  
tom

---

<div class="post-metadata">

**Author:** ![milkyway](https://avatars.discourse-cdn.com/v4/letter/m/9fc348/32.png) [@milkyway](https://forum.sierrawireless.com/u/milkyway)\
**Post date:** [May 5, 2008, 8:35am UTC](https://forum.sierrawireless.com/t/changing-uart2-baudrate-etc/2141/3 "2008-05-05T08:35:29Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![gcoakley](https://avatars.discourse-cdn.com/v4/letter/g/d9b06d/32.png) [@gcoakley](https://forum.sierrawireless.com/u/gcoakley)\
**Post date:** [May 12, 2008, 6:35pm UTC](https://forum.sierrawireless.com/t/changing-uart2-baudrate-etc/2141/4 "2008-05-12T18:35:15Z")

</div>

Thanks Tom,

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

-gcoakley  
R71\_00gg.WMP100 2090888 041808 13:46
