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
Original issue reported on code.google.com by
Blokker.1999@gmail.com
on 26 Jan 2014 at 11:19