Setting up UART 2 baud rate

Hello all,

I do realise that this question may have been asked before but I have not found that information yet.

I am setting up the use of the UART 2 port for a data connection using the adl_fcmSubscribe and adl_fcmSwitchV24State functions. At present I am using the default baud rate for this port (115200) but I wish to set the port for 9600 baud. I know that there is the at+ipr=9600 command to do this but at what point do i use this command and how do i relate the command to UART 2. I have tried it at various points in the setup for the UART (using adl_atCmdSend( “at+ipr=9600”, PortRateHandler, “*”, NULL)) but I always receive a +CME ERROR: 3 response.

The OS of the Q2686 device is 7.46.

Regards,
Barry

Hiya,

I did the following to setup UART2 to connect to the OPUS GPS chip in the Fastrack Supreme (based on a Q2686):

/* Open UART2 */
	adl_atCmdSend("AT+WMFM=0,1,2", NULL, NULL );

	/* Configure UART 2 to connect to GPS - next stage of init done in AT handler*/
	adl_atCmdCreate("AT+IPR=57600;+ICF=2,0;+IFC=0,0",
			ADL_AT_PORT_TYPE(gps_gpsUART, FALSE), (adl_atRspHandler_t) gps_AtCmdHandler, "*", NULL);

I’m pretty sure that this came from the OPUS CGPS example.

First, you open the port using +WMFM, then you send the the port configuration commands to the appropriate UART. The trick here is in the construction of the adl_atCmdCreate() function - note that the second parameter is a macro defining which port to send the command to.

Hope this helps.

ciao, Dave

A little observation (bug). If i set UART baud with adl_atCmdCreate(), this baud is not saved by at&w, reverting back after mdem restart. Only baud, setted through direct connection (or after receiving some data on new baud) can be saved correctly by at&w.