# Fcm

**URL:** <https://forum.sierrawireless.com/t/fcm/5237>\
**Category:** Open AT\
**Created:** [September 13, 2011, 5:09pm UTC](https://forum.sierrawireless.com/t/fcm/5237 "2011-09-13T17:09:17Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![ANNAT](https://avatars.discourse-cdn.com/v4/letter/a/898d66/32.png) [@ANNAT](https://forum.sierrawireless.com/u/ANNAT)\
**Post date:** [September 13, 2011, 5:09pm UTC](https://forum.sierrawireless.com/t/fcm/5237/1 "2011-09-13T17:09:17Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![zafer](https://avatars.discourse-cdn.com/v4/letter/z/439d5e/32.png) [@zafer](https://forum.sierrawireless.com/u/zafer)\
**Post date:** [September 14, 2011, 6:28am UTC](https://forum.sierrawireless.com/t/fcm/5237/2 "2011-09-14T06:28:02Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![awneil](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@awneil](https://forum.sierrawireless.com/u/awneil)\
**Post date:** [September 14, 2011, 7:07am UTC](https://forum.sierrawireless.com/t/fcm/5237/3 "2011-09-14T07:07:51Z")

</div>

> [@zafer](#):
>
> You can read ADL User Guide FCM Service topic. The documantation lists all avaliable functions about UART service.

Indeed.

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

> [@](#):
>
> first you have to subscribe uart, then send some data

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](https://forum.sierrawireless.com/t/simple-uart-echo-program/4739/1)

---

<div class="post-metadata">

**Author:** ![awneil](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@awneil](https://forum.sierrawireless.com/u/awneil)\
**Post date:** [September 14, 2011, 7:10am UTC](https://forum.sierrawireless.com/t/fcm/5237/4 "2011-09-14T07:10:03Z")

</div>

> [@ANNAT](#):
>
> it’s not complining, needs a u8\*

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.

---

<div class="post-metadata">

**Author:** ![ANNAT](https://avatars.discourse-cdn.com/v4/letter/a/898d66/32.png) [@ANNAT](https://forum.sierrawireless.com/u/ANNAT)\
**Post date:** [September 14, 2011, 8:43am UTC](https://forum.sierrawireless.com/t/fcm/5237/5 "2011-09-14T08:43:32Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![ANNAT](https://avatars.discourse-cdn.com/v4/letter/a/898d66/32.png) [@ANNAT](https://forum.sierrawireless.com/u/ANNAT)\
**Post date:** [September 14, 2011, 9:01am UTC](https://forum.sierrawireless.com/t/fcm/5237/6 "2011-09-14T09:01:41Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![zafer](https://avatars.discourse-cdn.com/v4/letter/z/439d5e/32.png) [@zafer](https://forum.sierrawireless.com/u/zafer)\
**Post date:** [September 14, 2011, 9:11am UTC](https://forum.sierrawireless.com/t/fcm/5237/7 "2011-09-14T09:11:47Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![awneil](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@awneil](https://forum.sierrawireless.com/u/awneil)\
**Post date:** [September 14, 2011, 9:14am UTC](https://forum.sierrawireless.com/t/fcm/5237/8 "2011-09-14T09:14:50Z")

</div>

> [@ANNAT](#):
>
> adl\_atSendResponse  
> adl\_fcmSendData
> 
> both send the messatge in UART1, is it?

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.

---

<div class="post-metadata">

**Author:** ![ANNAT](https://avatars.discourse-cdn.com/v4/letter/a/898d66/32.png) [@ANNAT](https://forum.sierrawireless.com/u/ANNAT)\
**Post date:** [September 14, 2011, 12:28pm UTC](https://forum.sierrawireless.com/t/fcm/5237/9 "2011-09-14T12:28:35Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ANNAT](https://avatars.discourse-cdn.com/v4/letter/a/898d66/32.png) [@ANNAT](https://forum.sierrawireless.com/u/ANNAT)\
**Post date:** [September 15, 2011, 3:56pm UTC](https://forum.sierrawireless.com/t/fcm/5237/10 "2011-09-15T15:56:49Z")

</div>

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.
