Continuous data transmission


#1

I realise that I am probably asking this in the wrong forum but have no clue where the right place would be.

I have managed to set up two radios to connect to each other. I would like that once they are connected any incoming data received is transmitted. However I dont want the incoming data to have a command like at+senddata=“hello” inf front, I want to be able send as soon as the hello is typed in.
Is this possible, if so please can someone tell me how

Many thanks


#2

Hello,

After you’ve succeeded with your connection you need to change the application from “AT-command mode” to “DATA-mode”.
In DATA mode, you can receive/transmit whatever characters you want.

Take a look at the Flow control API (FCM Service)…
In ADL:

adl_fcmSubscribe(...)
adl_fcmSwitchV24State(...)
adl_fcmSendData(...)

/Snoooze


#3

Thanks for the help
I have managed to set up those commands and they work.
It appears that the data is being sent but is not being received on the other side. How do I know if I have received this data?

Reading through the manual it says that AT+WMFM must be initialised first. Is this so? And if so how do I go about it? I am only using UART1.

What is UART2 used for and is it the same as UART1. I have set my application for UART 1

Thanks
Delene


#4

Hi delene,

What is connected to the other side?

Maybe you can send somthing back to acknowlegde the received data? I assume you are not connected to Target Monitor to display Debug Traces, so you probably need to send an SMS with the acknowledge data.

UART 1 is enabled by default. So, if you did not disable it before, you will not need to enable it before using the flow functions.

Best Regards,
Jan


#5

I have got two wavecom modems.
I have connected them to the same apn server and have set one of them to be host. This works if I make a command like at+senddata=“hello”, this data is transmitted.
I know want the data to be sent continuously without having to use the command at+sendata= “”.
The data that I am asking it to send shows up on the modem that sent it.

I am using the trace mode thruough with the target monitor but it shows that it never receives the data. What am I doing wrong?


#6

I thought it would be best if showed what I had done in my code

have connected to one modem and opened the socket in listening mode. I have then changed to data mode using the commands

UartHandle = adl_fcmSubscribe(ADL_FCM_FLOW_V24_UART1, MyCtrlHandler, MyDataHandler) // to subscribe
When I receive the event ADL_FCM_EVENT_FLOW_OPENNED
adl_fcmSwitchV24State(UartHandle, ADL_FCM_V24_STATE_DATA) // to receive continuous data

The other modem I have opened the socket and enabled it to connect to the first modem (AT+OTCP). I have changed from AT mode to data mode using the following commands

UartHandle = adl_fcmSubscribe(ADL_FCM_FLOW, V24_UART1, MyCtrlHandler, MyDataHandler) // to subscribe
When I receive the event ADL_FCM_EVENT_FLOW_OPENNED
adl_fcmSwitchV24State(UartHandle, ADL_FCM_V24_STATE_DATA) // to receive continuous data
When I received the event ADL_FCM_EVENT_v24_DATA_MODE
I send the command adl_fcmSendData(UartHandle, “hello”, 5);
The event ASL_FCM_EVENT_MEM_RELEASE is triggered

If I program the two modems, the modem that sends out hello then displays hello and not the other modem. It is as if it never receives a call to the MyDataHandler.
MyDataHandler is set up as follows
bool MyDataHandler(u16 DataLen, u8 * Data)


#7

Hi delene,

now I am confused…

on the modem you do “adl_fcmSendData(UartHandle, “hello”, 5);” this will be displayed since you send it out to UART1 of this module instead of over the TCP/IP link.

Unfortunately, I don’t know the “AT+OTCP” and “at+senddata” commands. I guess they are from an example provided with OpenAT. But to send through a socket, you would need to use the ed_SendDataExt() command.

If you would like to transmit from the UART from one module to the UART to the other module, you probably would need to receive the Data in the fcm data handler first, then send it over TCP/IP with ed_SendDataExt(). The other module will receive it over the listening socket in the ed_DataHandler function. You then would output that data to the UART with the adl_fcmSendData function.

Best Regards,
Jan


#8

Dont I feel like an idiot!!!

Thanks very much Jan
That makes much more sense…
Dont you rather want to write the user manual. Your explanations are much easier to follow.