The FCM flow which you subscribe can be used to echo the received data. There should not be any problem in doing this. Please verify that your Open-AT applicaiton is following the steps outlined below:
- Subscribe to FCM flow on the UART on which you want to echo the data.
- Switch the FCM flow to data mode (using adl_fcmSwitchV24State ()) when ADL_FCM_EVENT_FLOW_OPENNED event is recevied.
- Now, whatever data is typed in the data window of TE (or in hyperterminal window) will be received in the data handler (which you provided to adl_fcmSubscribe () API).
- To send the received data back to the external applicaiton, you can use adl_fcmSendData () API. Note that the handle parameter for this API should be the one that you provided while subscribing to FCM flow. The data parameter should be the pointer to the data which you want to send. Ensure that you have provided the correct pointer and the correct datalength parameter.
The API adl_fcmGetStatus () provides you with the status of FCM recieve and transmit buffer. Basically, when your applicaiton is receiving data from the external applicaiton, you can use ADL_FCM_WAY_TO_EMBEDDED parameter in this API to determine whether the receive buffer is full or empty. THis is indicated by the return value of this API (ADL_FCM_RET_BUFFER_EMPTY or ADL_FCM_RET_BUFFER_NOT_EMPTY).
If you want to find the status of transmit buffer, you should use ADL_FCM_WAY_FROM_EMBEDDED. This will indicate you whether your transmit buffer is empty or full (same as above).
As the FCM subscription controls the flow for which it is subscribed, it governs both the sending and receiving of data on that flow. It is up to you how you use the subscribed FCM flow (either as one directional or as bidirectional). The FCM flow provides you with both the functionalities of sending and receiving.
Hence, it suffices to say that you will be receiving data on the subscribed FCM flow whenever data arrives on that flow (assuming that the OAT application do not eat up all the receive credits). However, sending data on the flow will be determined by the usage of adl_fcmSendData () API which depends on the application logic.