Prakhar Gethe - 2014-12-09 10:01:55
code executed but no msg received please help me out .
i dont know what is wrong
<?php
require("php_serial.class.php");
$serial = new phpSerial;
// First we must specify the device. This works on both linux and windows (if
// your linux serial device is /dev/ttyS0 for COM1, etc)
$serial->deviceSet("COM16");
// We can change the baud rate, parity, length, stop bits, flow control
$serial->confBaudRate(9600);
$serial->confParity("none");
$serial->confCharacterLength(8);
$serial->confStopBits(1);
$serial->confFlowControl("none");
// Then we need to open it
$serial->deviceOpen();
// To write into
$serial->sendMessage("AT+CMGF=1\n\r");
$serial->sendMessage("AT+cmgs=\"+918960040174\"\r");
$serial->sendMessage("Hi, This is the sms that I sent to you using PHP script with serial Port communication with my phone as serial device!! GN - VKSALIAN ");
$serial->sendMessage(chr(26));
//wait for modem to send message
sleep(7);
// Or to read from
//$read = $serial->readPort();
//echo $read;
echo "message sent";
// If you want to change the configuration, the device must be closed
$serial->deviceClose();
?>