Answer the question
In order to leave comments, you need to log in
How to deflorate the COM port of a GPS navigator in Windows using regular PHP tools?
My modem in Windows hangs on COM8.
I connect to it via PHP-CLI something like this:
<?php
$com=8;
$mdm="\\\\.\\COM$com";
[email protected]($mdm,"a+b");
//tty_setraw($con);
fwrite($con,"AT\r");
while (1)
echo fread($con,1);
tty.setraw(fd)
function tty_setraw($con)
{
//some magic
}
Answer the question
In order to leave comments, you need to log in
you need to send the “at” command several times so that the modem determines the speed at which it is going to communicate with it
in Python, this function works as an intermediary to tcsetattr, look towards php.net/manual/en/function.dio-tcsetattr.php
try to play around with the mode console command , if something works out, then inside tty_setraw there will be an exec with the resulting command.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question