$filename = "/dev/ttyUSB4";
if (!$handle = fopen($filename, 'r+'))
{
echo "The device isn't detected";
exit;
}
else
{
if (fwrite($handle,"AT+CMGF=1\r"))
{
fwrite($handle,"AT+CMGS=\"+9465656\"".chr(26)."\r"."hiii");
fwrite($handle,chr(26)."\r"); //i think here we need some seconds to see modem respond OK , how to wait for it here ?
}
else
echo "Not called";
}
fclose($handle);
1-但每次发送短信时,页面需要刷新一次才能再次发送短信。
2-它在 SMS 文本中发送数字而不是“hiii”。
你会指导解决这两个问题吗?
问候