Я пытался из Raspberry Pi3 использовать команду minicom, и она работает.
SIM-модуль — SIM7600CE.
Просто не смог выполнить эту команду из PHP.
<?php
include '../src/PhpSerial.php';
$serial = new PhpSerial;
$serial->deviceSet("/dev/ttyUSB2");
$serial->confBaudRate(115200);
$serial->confParity("none");
$serial->confCharacterLength(8);
$serial->confStopBits(1);
$serial->confFlowControl("none");
$serial->deviceOpen();
$serial->sendMessage('AT+CMGF=1');
$serial->sendMessage(chr(13));
$serial->sendMessage('AT+CMGS="09xxxxxxxx"');
$serial->sendMessage(chr(13));
$serial->sendMessage("THIS IS TEST");
$serial->sendMessage(chr(26));
sleep(6);
$read = $serial->readPort();
echo $read;
$serial->deviceClose();
Код вернет очень странные слова
AT+CMGF=1AT+CAT+CAT+CAT+CAT+CAT+CAT+CAT+CAT+CAT+CAT+CAT+CAT+CAT+CAT+CAT+CAT+CAT+
CAT+CAT+CAT+CAT+CAT+CAT+CAT+CAT+CAT+CAT+CAT+CAT+CAT+CAT+CAT+CAT+CAT+CAT+CAT+CAT+CAT+CAT+CAT+CAT+CAT+CAT+CAT+CAT+CAT+CAT+CAT+CAT+CAT+CAT+CAT+CAT+CAT+CAT+CAT+CAT+
CAT+CAT+CAT+CAT+CAT+CAT+CAT+CAT+CAT+CAT+CAT+CAT+CAT+CAT+CAT+CAT+CAT+CAT ERROR AT+CMGS="09xxxxxxxx"AT+CMGS="09AT+CMGS="09AT+CMGS="09AT+CMGS="09AT+CMGS="09 AT+CMGS="09AT+CMGS="09AT+CMGS="09AT+CMGS="09AT+CMGS="09AT+CMGS="09AT+CMGS="09
AT+CMGS="09AT+CMGS="09AT+CMGS="09AT+CMGS="09AT+CMGS="09AT+CMGS="09AT+CMGS="09
AT+CMGS="09AT+CMGS="09AT+CMGS="09AT+CMGS="09AT+CMGS="09AT+CMGS="09AT+CMGS="09
AT+CMGS="09AT+CMGS="09AT+CMGS="09AT+CMGS="09AT+CMGS="09AT+CMGS="09AT+CMGS="09AT
+CMGS"09AT+CMGS"09AT+CMGS"09AT+CMGS"09AT+CMGS"09AT+CMGS"09AT+CMGS"09AT+CMGS"09AT
+CMGS"09AT+CMGS09AT+CMGS09AT+CMGS09AT+CMGS09 ERROR AT+CMGS09 ERROR AT+09
ERROR
если я отправлю
$serial->sendMessage("AT+CPSI?" . chr(13));
результат получит некоторую информацию, и все же получил очень странные слова
AT OK AT OK AT OK AT OK AT OK AT OK AT OK AT OK AT OK AT OK AT OK AT OK AT OK
AT OK AT OK AT OK AT OK AT OK AT OK AT OK AT OK AT OK AT OK AT OK AT OK AT
OK AT OK AT OK AT OK AT OK AT OK AT OK AT OK AT OK AT OK AT OK AT OK AT OK
AT OK AT OK AT OK AT OK AT OK AT OK AT OK AT OK AT OK AT OK AT OK AT OK AT OK
AT OK AT OK AT OK AT OK AT OK AT OK AT OK AT OK AT OK AT+CPSI? +CPSI:
LTE,Online,466-01,0xC185,130679308,485,EUTRAN-
BAND3,1550,5,5,-77,-1035,-759,13 OK AT OK AT+CPSI? +CPSI: LTE,Online,466-
01,0xC185,130679308,485,EUTRAN-BAND3,1550,5,5,-77,-1035,-759,13 OK AT+CPSI?
+CPSI: LTE,Online,466-01,0xC185,130679308,485,EUTRAN-
BAND3,1550,5,5,-77,-1035,-759,13 OK AT+CPSI? +CPSI: LTE,Online,466-
01,0xC185,130679308,485,EUTRAN-BAND3,1550,5,5,-77,-1035,-759,13 OK
Кто может мне помочь?
Я пробовал это в течение 1 месяца.
Задача ещё не решена.
Других решений пока нет …