ASCII $20 is a space.
Is this "CL/RF" you refer to perhaps correctly known as CR/LF?
Carriage Return plus Line Feed. ASCII characters $0D and $0A ?
Here's an ASCII table in case you need one.
http://www.cs.utk.edu/~pham/ascii_table.jpgYes it is, I mean CR/LF (sorry for typo because I was sleepy). Also about codes, you are right it is $0D $0A
BTW I will find PHP solution which I made few years ago for using to communicate with Benq GSM/GPRS module via RS232.
I discovered similar problems about end lines, so I will find code today.
Posted on: April 05, 2010, 01:36:39 13:36 - AutomergedPosted on: April 05, 2010, 02:13:29 14:13 - Automerged
]Ok, I find it. In my situation I communicate with device via telnet.
<?php
require_once "PHPBenq.php";
//ob_implicit_flush();
$comm = new PHPBenq();
$result = $comm->Connect();
if ($result == 0) {
$comm->DoCommand('module1\n',$result);
// NOTE: $result may contain newlines
echo $result;
//sleep(5);
$comm->DoCommand('ATE0'.chr(0x13),$result); // NOTE 1
echo $result;
//$test = array();
$comm->DoCommand1('AT+CMGL=4'.chr(0x13),$result); // NOTE 1
$ress = explode("\n",$result);
print_r($ress);
echo $result;
sleep(3);
$comm->DoCommand('07917373499910F101000B917373096000F800100B7378985D0699D9E1391A'.chr(0x1A).chr(0x1B),$result); // NOTE 2
sleep(10);
echo $result;
$comm->DoCommand('^X', $result);
echo $result;
sleep(3);
$comm->DoCommand('logout', $result);
echo $result;
// say Disconnect(0); to break the connection without explicitly logging out
$comm->Disconnect();
}
?>
Explain notes from code:
NOTE 1 - for ENTER I am sending $13 to device
NOTE 2 - in some cases when device expecting DATA it need to receive SUBSTITUTE ESCAPE ($1A $1B) as end of data. In my case after AT commands which says to device that next data will be SMS message, then device need to know when you are finished with SMS message.
So you can try to send $13 (ENTER) at the end of line, or CR/LF (mentioned before) or escape sequence ($1A $1B).
Let me know in what case it works

Regards.