Я пытаюсь запустить ussd AT Command / dev / ttyUSB, используя php serial class php. но я не смог получить точный ответ. я также пытаюсь использовать команду gsm-ussd, команда не может найти последовательный порт или не отвечает. моя настоящая проблема, я не могу найти правильный последовательный порт. мой модем 8 модем
вот результат, когда я запускаю dmesg | grep tty
[76457.370819] ftdi_sio ttyUSB2: FTDI USB Serial Device converter now disconnected from ttyUSB2
[76457.372393] ftdi_sio ttyUSB3: FTDI USB Serial Device converter now disconnected from ttyUSB3
[76457.376506] ftdi_sio ttyUSB4: FTDI USB Serial Device converter now disconnected from ttyUSB4
[76457.376777] ftdi_sio ttyUSB5: FTDI USB Serial Device converter now disconnected from ttyUSB5
[76457.377852] ftdi_sio ttyUSB6: FTDI USB Serial Device converter now disconnected from ttyUSB6
[76457.378124] ftdi_sio ttyUSB7: FTDI USB Serial Device converter now disconnected from ttyUSB7
[76578.022453] usb 2-3.1: FTDI USB Serial Device converter now attached to ttyUSB0
[76578.023336] usb 2-3.1: FTDI USB Serial Device converter now attached to ttyUSB1
[76578.024222] usb 2-3.1: FTDI USB Serial Device converter now attached to ttyUSB2
[76578.025570] usb 2-3.1: FTDI USB Serial Device converter now attached to ttyUSB3
[76578.217939] usb 2-3.2: FTDI USB Serial Device converter now attached to ttyUSB4
[76578.218812] usb 2-3.2: FTDI USB Serial Device converter now attached to ttyUSB5
[76578.219668] usb 2-3.2: FTDI USB Serial Device converter now attached to ttyUSB6
[76578.220681] usb 2-3.2: FTDI USB Serial Device converter now attached to ttyUSB7
[77176.773114] ftdi_sio ttyUSB0: FTDI USB Serial Device converter now disconnected from ttyUSB0
[77176.774200] ftdi_sio ttyUSB1: FTDI USB Serial Device converter now disconnected from ttyUSB1
[77176.775010] ftdi_sio ttyUSB2: FTDI USB Serial Device converter now disconnected from ttyUSB2
[77176.777951] ftdi_sio ttyUSB3: FTDI USB Serial Device converter now disconnected from ttyUSB3
[77176.778581] ftdi_sio ttyUSB4: FTDI USB Serial Device converter now disconnected from ttyUSB4
[77176.778931] ftdi_sio ttyUSB5: FTDI USB Serial Device converter now disconnected from ttyUSB5
[77176.779285] ftdi_sio ttyUSB6: FTDI USB Serial Device converter now disconnected from ttyUSB6
[77176.779626] ftdi_sio ttyUSB7: FTDI USB Serial Device converter now disconnected from ttyUSB7
[77177.605795] usb 2-3.1: FTDI USB Serial Device converter now attached to ttyUSB0
[77177.606284] usb 2-3.1: FTDI USB Serial Device converter now attached to ttyUSB1
[77177.606773] usb 2-3.1: FTDI USB Serial Device converter now attached to ttyUSB2
[77177.607270] usb 2-3.1: FTDI USB Serial Device converter now attached to ttyUSB3
[77177.944691] ftdi_sio ttyUSB0: FTDI USB Serial Device converter now disconnected from ttyUSB0
[77177.945209] ftdi_sio ttyUSB1: FTDI USB Serial Device converter now disconnected from ttyUSB1
[77177.945696] ftdi_sio ttyUSB2: FTDI USB Serial Device converter now disconnected from ttyUSB2
[77177.946170] ftdi_sio ttyUSB3: FTDI USB Serial Device converter now disconnected from ttyUSB3
[77178.778047] usb 2-3.1: FTDI USB Serial Device converter now attached to ttyUSB0
[77178.778887] usb 2-3.1: FTDI USB Serial Device converter now attached to ttyUSB1
[77178.779749] usb 2-3.1: FTDI USB Serial Device converter now attached to ttyUSB2
[77178.781139] usb 2-3.1: FTDI USB Serial Device converter now attached to ttyUSB3
[77178.974015] usb 2-3.2: FTDI USB Serial Device converter now attached to ttyUSB4
[77178.974893] usb 2-3.2: FTDI USB Serial Device converter now attached to ttyUSB5
[77178.975748] usb 2-3.2: FTDI USB Serial Device converter now attached to ttyUSB6
[77178.976632] usb 2-3.2: FTDI USB Serial Device converter now attached to ttyUSB7
вот мой php код
<?php
include 'PhpSerial.php';
$serial = new PhpSerial;
$serial->deviceSet("/dev/ttyUSB2");
$serial->deviceOpen();
stream_set_timeout($serial->_dHandle, 10);
$serial->confBaudRate(9600);
$serial->sendMessage("AT+CSCS=GSM");
$serial>sendMessage('AT+CUSD=1,"*555#"',15);
echo $serial->readPort();
$serial->deviceClose();
Когда я запускаю этот файл в браузере, он становится пустым
Как мне получить правильный порт модема и отправить команду, используя php