Fcm

Hello,
I don’t understant how use FCM commands, I want to comunicate the Q2686 with a windows ce application, and I need to send data by RS232, I think I need to use FCM commands, but how can I send a text like:
adl_fcmSendData (FCM_Handle, “Hello”,4); it’s not complining, needs a u8*.
anybody have an exemple about this?

Thank you!

Anna.

You can read ADL User Guide FCM Service topic. The documantation lists all avaliable functions about UART service.

As adl user guide says; first you have to subscribe uart, then send some data. Of course you have to know communication baudrate and set it before you send data.

Indeed.

And note that they are functions - not “commands”.

Before sending data, you must switch to Data mode.

But the error mentioned is a compiler error; ie, nothing to do with the run-time operation.

There are examples included with the Developer Studio.
There is an example in the Code Sharing Area of the forum, here: Simple UART Echo Program

You need to show the exact source code that you used, and the exact error message that you got.

Do not manually type them into the forum (you will introduce errors) - use copy & paste.

hello,
I took the one exemple:

wm_sprintf ( RspStr,"\n\hola\n\r");
adl_fcmSendData(fcmHandler,RspStr,(u16)(strlen(RspStr)));

and the error is:

initializing argument 2 of ‘s8 adl_fcmSendData(u8, u8*, u16)’

Is FCM the best way to send and recive messatge from a microcontroler?

Hello,
and I want to know if it is possible witch is the diferents between:

adl_atSendResponse
adl_fcmSendData

both send the messatge in UART1, is it?

i think, with fcm you can send data in also data mode. With adl_atSendResponse you can send only in AT mode. I think you should send&receive data in data mode when you communicate with a microcontroller.
So in your open AT application, you should subscribe uart, switch to DATA mode, then send data:

  1. adl_fcmSubscribe
  2. adl_fcmSwitchV24State(uart1Handle, ADL_FCM_V24_STATE_DATA);
  3. adl_fcmSendData( uart1Handle, Data, DataLen );

you should read documantation for details.

Not necessarily UART1 - they both allow you to specify the port.

adl_atSendResponse - as the name suggests - sends in the form of an AT Command’s Response.

So, if you just need to send stuff that is (or looks like) AT Commands and/or Responses, then the adl_at… APIs may be appropriate.

FCM allows you to send unrestricted, arbitrary data.

the problem is that I can’t compiling the application.

Hello,

Now I think I understand better the funcions about FCM, but there one part that I don’t understand. For exemple I subscribe to fcm in uart 1 which it is comunicates with my main board, and my embedded aplication send me some messatge for UART1 how can I process it.

FCM_Handle = adl_fcmSubscribe(ADL_FCM_FLOW_V24_UART1 | ADL_FCM_FLOW_V24_MASTER, fcmCtrlHandler, fcmDataHandler);

bool fcmDataHandler (u16 DataLen, u8 * Data)
{
TRACE((1, “DataHandler”));
TRACE((1,(ascii *) Data));

}

The Data can be a AT command defined previously for my like AT+START, if I recived it i’ll send
adl_atCmdSubscribe ( (ascii*)START_APP, Init_Application, ADL_CMD_TYPE_ACT );

how can I massage it??

Thank you,

Anna.