Hello everyone,
I started programming Wavecom Modem with Open AT this morning.
I would send via serial link a string containing a null character.
I have done a very litte modification on “hello world sample modification” in order to send my string.
This is the code:
void HelloWorld_TimerHandler ( u8 ID )
{
// Hello World
TRACE (( 1, “Embedded : Hello World” ));
//adl_atSendResponse ( ADL_AT_UNS, “\r\nHello World \r\n” );
As you can see my string contains the null character. The modem is connected witha a PC and I use Hyper terminal for stamp the string sent bye modem. The application, finding the null character, cut my string.
I would ask you if there some other function for send string and if it is possible to specify the length of the string to be sent.
No - a ‘C’ string cannot possibly contain a NUL character, can it?
This has nothing to do with Wavecom or Open-AT - it is a fundamental part of the way that the ‘C’ programming language works: think about it - the ‘C’ programming language uses the NUL character to mark the end of a string, doesn’t it?!
Anyhow, why do you want to do this as an AT Response?
You’ve posted this in the FCM forum, so look at the FCM ‘Send Data’ functions - these allow you to specify a buffer & length of data to send, and most certainly do support sending binary data (including NULs).
Thank you very much and excuse me for the basic question.
It is not necessary use a AT Response function but any function that allows me to send a string (including null character) via Rs232 to a PC.
So if you have any suggestion about doing this, please tell me.