Now, you can switch to Data Mode in the fcmCtrlH handler function when the flow is opened. In this case the handler function is called with event “ADL_FCM_EVENT_FLOW_OPENNED” and you would call “adl_fcmSwitchV24State(Handle, ADL_FCM_V24_STATE_DATA);” to switch… After mode has switched, your handler function will be called with event “ADL_FCM_EVENT_V24_DATA_MODE”.
You can now use the port in raw mode, using
adl_fcmSendData(Handle,buffer,length);
to send data. And in case you receive data, the fcmDataH handler function will be called with the data length and a pointer to the data.
Are you sending any AT commands with adl_atCmdCreate(), using the ADL_AT_PORT_TYPE macro to select UART1 after you have switched the mode to data? I noticed when I did that on UART2 that the mode was switched back to data mode…
Hi Jiten9,
Are you using Terminal Emulator to send AT commands? In this case, your AT commands will execute even if you are in data mode. This is because, Terminal Emulator provides separate Windows for sending AT commands and Data. Terminal emulator also inserts special control characters to indicate whether the send data is an AT command or data. So, when an AT command is exeucted from Terminal Emulator, it would respond even if you are in data mode.
To solve the problem, please make sure that ADL_FCM_EVENT_DATA_MODE is received in the FCM control handler. Now type something in the data window of Terminal Emulator. You will receive the typed character in the FCM data handler.
Alternatively, you can execute the applicaiton in target mode and then use hyperterminal to execute the applicaiton. In this case, when your application switchtes the module’s V24 link to data mode, you will receive whatever you type in hyperterminal in your data handler.
I think this should solve your problem,
Regards,
Open AT Fan.