I need to access my ZTE Modem to access the SIM ToolKit. I've searched a lot. Nothing is working for me. I need to execute following AT commands from PHP:
AT+CUSD=1,'*111#',15.
Success response from terminal
I've tried from command prompt and it works. just could not execute that command from PHP. That should be simple.
require "php_serial.class.php";
$serial = new phpSerial;
$serial->deviceSet("COM6");
$serial->confBaudRate(115200);
// Then we need to open it
$serial->deviceOpen();
// To write into
$serial->sendMessage("AT+CMGF=1\n\r");
$serial->sendMessage("AT+cmgs=\"+92234444444\"\n\r");
$serial->sendMessage("sms text\n\r");
$serial->sendMessage(chr(26));
//wait for modem to send message
sleep(7);
$read=$serial->readPort();
$serial->deviceClose();
I don't know why but I couldn't find a solution though I've installed DIO, PHP_Serial and many more tools from GitHub.
If couldn't explain my problem correctly, please check the following link. This guy had same problem. but that solution is not working for me.
Similar Problem , the solution works for others, not for me!!