Group Projects
Members' Projects
SMS via Ubuntu
Owen — Tue, 13/04/2010 - 4:18pm
I have a Samsung SGH-A411 and wondered if I could send a sms from my linux machine. This URL was the basis of the program below.
Using CPAN to install Device::Gsm I notice it also installed Device::Modem. I already had Device::USB installed.
The serial device was discovered via dmesg.
The service centre number is in the phone, but had to be explicitly assigned to get the thing to work. I have left some unnecessary debugging info in the program.
==============================================================
#!/usr/bin/perl
use Device::Gsm;
my $gsm = new Device::Gsm( port => '/dev/ttyACM0', log =>
'file, /home/owen/network.log', loglevel => 'debug'); # Got to be writable.
if( $gsm->connect() ) {
print "connected!\n";
} else {
print "sorry, no connection with gsm phone on serial port!\n";
}
my $imei = $gsm->imei();
print "imie is $imei\n";
my $model = $gsm->model();
print "Model is $model\n";
$srv_cnt = $gsm->service_center();
print "My service center number is: $srv_cnt\n";
# My service center number is: +CSCA: "",
my $ok = $gsm->service_center('+61418706700'); # Telstra's service center number
print "Service center changed!\n" if $ok;
$srv_cnt = $gsm->service_center();
print "My service center number is: $srv_cnt\n";
$gsm->register();
$gsm->send_sms(
recipient => '+614********',
content => 'Here is your Ubuntu talking',
class => 'normal'
);
=============================================================
- Login or register to post comments
- Printer-friendly version
Search
Recent Comments
Member Tweets
MakeHackVoid
12 hours 24 min ago
—
Space is open until 19:30 (estimate)
|
evildeece
1 day 4 hours ago
—
I learnt about C++ templates today, this will clean up some of the nasty macros in MHVLib :) #mhv
|
MakeHackVoid
1 day 9 hours ago
—
Space is closed (was open five hours)
|
MakeHackVoid
1 day 12 hours ago
—
Space staying open until 19:00 (estimate)
|
brendam
1 day 12 hours ago
—
Interesting post by @mwesch "Maker Bots and the Future of Identity" http://t.co/1TbGHwgE ping #mhv
|
MakeHackVoid
1 day 14 hours ago
—
Space is open until 16:45 (estimate)
|
evildeece
1 day 18 hours ago
—
Relief printing with a laser cutter, from NYC Resistor http://t.co/YQ1aqUvG #mhv
|
evildeece
2 days 20 hours ago
—
Thanks to @projectgus, I have some core memory from 1960, now to write an AVR driver http://t.co/0iI7OKH1 #mhv
|
MakeHackVoid
3 days 5 hours ago
—
Space is closed (was open 4 1/2 hours)
|
MakeHackVoid
3 days 7 hours ago
—
Space staying open until 22:00 (estimate)
|
- 1 of 12
- ››



