How to send SMS from Mac terminal via GSM modem? -
i have mio a701 communicator use gsm modem sending sms mac.
what i've found far 1 can send @ commands directly terminal special ports /dev/ttyusb0 if modem connected via usb port or /dev/rfcomm0 if connection handled via bluetooth. problem when try issue command "permission denied" response:
"at+cmgs=test\r" > /dev/ttyusb0 -bash: /dev/ttyusb0: permission denied   also "ls /dev" shows neither ttyusb0 nor rfcomm0 files present there can't update permissions on these files.
any appreciated, in advance.
update: problem solved.
 first of mio a701 appears wrong choice since not support @ commands sending sms.  
this php code works fine nokia 3310c connected via bluetooth:
$number="<phone number in international format + sign>"; $message="hello world\ntest"; // far i've tested \n turns line break in sms on mio, nokia , alcatel phones $port="/dev/tty.phone"; // path set in "mac preferences" -> bluetooth -> "configure ports" selected device   if($fd = fopen($port, 'a')) {     fwrite($fd, "at+cmgf=1\r"); // text mode sms     sleep(2);     fwrite($fd, "at+cmgs=\"$number\"\r");     sleep(2);     fwrite($fd, "$message\032");     sleep(2);     $fh = null; } else     echo "phone unreachable";      
best way send sms , ussd messages install smstools3 (not smstools) , build on sample scripts.
Comments
Post a Comment