Problems with WIP and FCM


I have a M1306B modem with firmware 6.57c, wip 2.00.31, and OpenAT OS 3.13.2

I have an embedded application which opens the GPRS bearer and a communication socket to a remote host. Over the socket I’m sending small amounts of data, and as long as the AT command mode is enabled, this is working quite well.

But, when I set the UART in V24 (terminal/data) state, the problems occur.

What I see is this:

  1. If I try to connect the GPRS bearer after V24 mode is enabled using the adl_fcmSwitchV24State(fcmHandle, ADL_FCM_V24_STATE_DATA); the GPRS connection fails.

  2. If I first connect the GPRS bearer, and then the socket (using the WIP API in the application) and then enables V24 mode (data mode) I’m unable to send data over the socket. I write the actual data to the socket, but the data are not written to the remote host.

If I then enables AT mode again, (ADL_FCM_V24_STATE_AT) then all the date I’ve written to the socket are sent to the remote host. So, in case 2, all data written to the socket in data mode is buffered and released / sendt when data mode is disabled. I need to send the data I get, without buffering in data mode. How can I disable the buffering that FCM does in data mode when I’m writing to the socket?


Me too!

I set the UART into Data mode, and have no problem thereafter establishing a GPRS session.

However, problems have been noted when the GSM Data Flow has been used: … +data+call


Ah - actually, my Open-AT is version 3.12



I set the UART into Data mode, and have no problem thereafter
establishing a GPRS session.

This is exactly what I try to achieve, but it the connection fails.

First just a little bit about the application.

The modem is connected to a logger which does not support OpenAT and with extreamly limited programming capabilities. AT the same time this equipment is placed in the field running on batteries, and any more hw than absolutely necessary are highly undesired. Therefor we try to use a programmable modem to communicate with the logger. Normally you would use a PLC or similar between the logger and the modem.

To communicate to the logger I need to use FCM mode in order to control the serial line. The logger only accepts a few commands and does not support OpenAT at all. With FCM I can take full controll over the serial line and control the logger. This works well, and I’m able to set the logger up correctly and read the data from the logger.

The data read from the logger must be sent over GPRS, and this is the problem. If I switch to DATA mode before I connect the GPRS bearer the connection fails. If I connect the GPRS bearer and the socket after FCM is enabled, the data are not sent over the TCP/IP connection (but for some reason buffered). If I then switches back to AT mode, all the buffered data are written over the TCP/IP socket at once.

Since I need to listen on the stream from the serial line and respond to requests from the logger, I manually must parse the input and send all data from the logger over the socket (TCP/IP). To achieve this, I want to use the FCM DATA mode on the serial interface, without any interfering from FCM on the GPRS / Socket connection. Is it possible to configure the FCM not to tamper with the GPRS / Socket connection, and just controll the serial line?

Or is there any other way to gain full control over the serial line without using FCM?


Yes, your application sounds almost identical to mine - except that mine works! 8)

Are you sure it’s not just a faulty modem?
Have you tried another one?

At startup, my application subscribes to FCM and switches the UART to Data mode.

It can then request data from the external device, using a simple serial protocol.

When the data has been retrieved, it opens a GPRS session and sends the data.

How do you send your data over the GPRS link?

Are you seeing all the correct events - BEV_IP_CONNECTED, CEV_OPEN, CEV_WRITE,…?

Are you checking all the return results from your WIP calls?
Are there any errors?


What kind of GPRS service are you using?

Did you resolve the issue regarding (lack of) public IP address: … php?p=5954


You were previously using EDLIB: … php?p=5350

Now that you’re using WIP, are you sure that there’s nothing EDLIB-dependent left in your code…?