How to change baud rate via tcp connection?


I am now able to connect to GPRS network by using wip apis.

I plan to set up serial port, listen to it, if there is data, will be sent through TCP client ->GPRS -> TCP server.
The problem is, there are different serial devices with different baud rate, I want to change baud rate from far end.

What’s the best way to achieve this?

Use Web server? Is there a small embedded web server available?



Not too sure the exact system architecture…
I guess the system maybe something like:
[Serial device]—[Module with OpenAT]—[GPRS]—[TCP server]

Are you going to use OpenUART to control data reading from serial port? or the serial port works in data mode to read data from serial device?

And what you means for “far end”? the server side or client side?



Your understanding of
[Serial device]—[Module with OpenAT]—[GPRS]—[TCP server]

is correct.

From the [TCP server] side, need to be able to change serial baud rate; or load different firmware to handle different serial connections.


Thanks for update.

I assume the TCP server will instruct modem the required baud rate to use, it should present the baud rate thru data packet and depends how you access the UART:

  1. if you use Open UART, please use eUartRate_t in sUartLc_t to configure the baud rate. Please refer to sample uart_access for usage.
  2. if UART works in data mode, please use adl_atCmdCreate() to send +IPR command to configure the baud rate on required UART interface. Please refer to fnInitPort() in osa sample as example.



What’s the difference between Open UART and data mode?Thanks


Data mode for the UART connections makes them no longer receptive to AT commands and simply transmits/receives data in a similar way to UART on any other non AT system.