How to use at_setupCmdUartDef

jerry

How to use at_setupCmdUartDef

Postby jerry » Sat May 30, 2015 10:23 am

Hi,
I can execute AT+UART_DEF=19200,8,1,0,3 in at mode.
However, I failed to set baud rate in user_init() by following line
at_setupCmdUartDef(0,"=19200,8,1,0,0");
It just response ERROR
Does any one know how to setup default baud rate in user_init()?
Note: I'm using esp_iot_sdk_v1.1.0_15_05_22
thanks

User avatar
rudi
Posts: 197
Joined: Fri Oct 24, 2014 7:55 pm

Re: How to use at_setupCmdUartDef

Postby rudi » Sun May 31, 2015 5:00 am

jerry wrote:
...
at_setupCmdUartDef(0,"=19200,8,1,0,0");
...



i am not sure, but have a try,
perhabs you can try this in c

Code: Select all


at_setupCmdUartDef(0,"\"=19200,8,1,0,0\"");




btw, which doku you have read about api at_setupCmdUARTDef then parameter stands in this how it must be call.

or perhabs this ..

Code: Select all


at_setupCmdUartDef("0,=19200,8,1,0,0");


-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪

BarryP
Posts: 5
Joined: Tue Dec 23, 2014 6:53 pm

Re: How to use at_setupCmdUartDef

Postby BarryP » Sun May 31, 2015 6:25 am

Hi,
This works for me

Code: Select all

uart_div_modify(0, UART_CLK_FREQ / 115200);

// or in your case
uart_div_modify(0, UART_CLK_FREQ / 19200);


Barry

Who is online

Users browsing this forum: No registered users and 26 guests