I have a Mio A701 communicator that I would like to use as a GSM modem to send SMS from my Mac.
What I have found so far is that you can simply send AT commands directly from the terminal to special ports, for example, / dev / ttyUSB 0 if the modem is connected via the USB port or / dev / rfcomm 0 if the connection is through bluetooth. My problem is that when I try to issue a command, I get a "refused answer" response:
"AT+CMGS=test\r" > /dev/ttyUSB0
-bash: /dev/ttyUSB0: Permission denied
Also, "ls / dev" indicates that there are no ttyUSB0 or rfcomm0 files there, so I cannot update permissions for these files.
Any help would be greatly appreciated, thanks in advance.
Update: the problem is resolved.
First of all, the Mio A701 seems to be the wrong choice as it does not support AT commands to send SMS.
This PHP code works fine with the Nokia 3310c connected via bluetooth:
$number="<phone number in international format with + sign>";
$message="Hello World\ntest";
$port="/dev/tty.phone";
if($fd = fopen($port, 'a')) {
fwrite($fd, "AT+CMGF=1\r");
sleep(2);
fwrite($fd, "AT+CMGS=\"$number\"\r");
sleep(2);
fwrite($fd, "$message\032");
sleep(2);
$fh = null;
} else
echo "Phone unreachable";
source
share