Data Mode and serial line config


Hi all,

I´m having this problem when I am in DATA State: when I try to change the current Baudrate, Character Framing or Flow Control with adl_atCmdCreate the module seems to close the embedded application, Does anybody know what am I doing wrong?.

Pd. I can notice this because I am filtering all at commands with adl_atCmdSubscribe(“at”, CmdHandler, ADL_CMD_TYPE_ROOT); but when I change Baudrate, Character Framing or Flow Control, the module starts to answer at commands.

Thanks in advance,



Hi Camilo
You can not change the settings durring DATA mode.
You must first go to AT mode and then you can change the settings and then you can go back into DATA mode (or maybe you have to unsubscribe from fcm, change the settings and then subsribe again?)
I am not sure now but I think the fist answer should work
Best regards


Thank you very much, that was the problem.

I would like to ask something else: Why and how can I determine the exact time the process of switching from DATA to AT State takes, because I have notice it does not occur immediatly, as well as, +++ sequence. For instance if I do the following one by one at the same time:


it seems that the module closes the app as if it needed more time to process the requested. Can you explain me this behaviour.

Thanks in advance,


Hi Camilo
As far as my understanding you can not determine the exact time it will take to be active in data mode but
I know that it will finish the routines that you used to change to data mode and only then it will change to data mode
I use a global flag to check if I am in data mode
and if i am not in data mode then I use a retry timer and if that fails then I try to change it again to data mode(as a fail safe methode)
So if you have a routine that it very long then it will take long to change to data mode

bool V24M_Ctrl_Handler(u8 event)
	//	ascii prompt[32];
	//	s8 result;
	switch (event)
		TRACE((LVL_SERIAL, "SERIAL: V24 link opened - change to data mode"));
		TRACE((LVL_SERIAL, "SERIAL: V24 link closed"));
		SerialCmdMode = TRUE;
		TRACE((LVL_SERIAL, "SERIAL: V24 link changed to data mode"));
		SerialCmdMode = FALSE;
		TRACE((LVL_SERIAL, "SERIAL: V24 link changed to data mode ext"));
		TRACE((LVL_SERIAL, "SERIAL: V24 link received +++ in data mode"));
		SerialCmdMode = TRUE;
		TRACE((LVL_SERIAL, "SERIAL: V24 link received ATO in command mode"));
		SerialCmdMode = FALSE;
		TRACE((LVL_SERIAL, "SERIAL: V24 link event resume"));
		TRACE((LVL_SERIAL, "SERIAL: V24 link memory release"));
		TRACE((LVL_SERIAL, "SERIAL: V24 link received other events"));

You are doing yhis to quick

it will not be in AT mode yet
rather put the command create in a timer callback and when you get the OK then only put it back to data mode

I do not think the “+++” will work (it does not work for me)
I think you have to capture the “+++” in your V24M_Data_Handler
and then manually change to AT mode and then capture the ATO in AT mode to go back to DATA mode.
I am not 100% sure about the “+++” comment, can somebody please conferm this has is using the “+++” currently

Best regards


Thank you very much, your answers have been very useful to me, I’ve done what you said and it seems to work fine, but also I have to stop my application and switch to AT mode, create a timer and the change the baudrate.


Thank you very much. It was very useful.




Hi again,

I have another doubt because I´ve seem a strange behaviour when I am changing character framing from my embbeded app.

I am in Data State and then I need to change baudrate or character framing or flow control, so I switch to AT mode and gave enough time to my app to process the adl_CmdCreate(), and everything seems to work fine, but when I send adl_CmdCreate(“at+icf=5,x”,Hand, _ROOT) and then switch back again to Data State it seems it changes in AT mode but this change did not seem reflected in Data State and that does not happen with any other combination.

Does anybody Know why happens this if the pdf says it is supported.

P.D I using OAT 3.02 O.S 6.51


Hi Camilo
I have never tried to switch character framing in openAT application
but i think that you can not change this while you are subscribed to FCM
you must first unscubscribe then change it and then subscribe again.
or you can change it before you subscribe to FCM

but im not 100% sure.
Let me know if you get a fix for this problem.
It would be very interesting to know the answer.
Best regards


As you said it’s not possible to change V.24 Serial Parameters while in DATA Mode, so it’s neccesary to switch to offline mode, change the parameters, give a bit of time to the module and then switch back to online mode.