tepomagico / php-serial

Automatically exported from code.google.com/p/php-serial
0 stars 0 forks source link

sms newline on Linux #19

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
On linux the \n\r will not execute the command on my modem. It is expecting to 
receive a carriage return that is not given in this way. Haven't tested it on 
Windows yet. Instead I replaced the \n\r with a chr(13) and that made it work.

\n\r result:

hans@debian:~/phpserial/trunk# php sms-example.php 
string(2) "AT"
string(25) "AT+CMGF=1

NO CARRIER

chr(13) result:

hans@debian:~/phpserial/trunk# php sms-example.php 
string(9) "AT
OK
"
string(16) "AT+CMGF=1
OK

Original issue reported on code.google.com by Blokker.1999@gmail.com on 26 Jan 2014 at 11:19

GoogleCodeExporter commented 9 years ago
Tried with Windows and it did not work. Code sent for \r is x8d should be x0d

Original comment by Larry.Sp...@gmail.com on 27 Feb 2014 at 6:50