• LOG IN
  • REGISTER
  • ISSUES

Make, Hack, Void

  • home
  • projects
  • news
  • community
Home › Projects › SMS via Ubuntu

Group Projects

  • AVR Starter Schematics
  • Emiglio Refit
  • Emiglio's Head now slightly less firmly attached.
  • MHV AVR Tools - A WinAVR Replacement
  • MHV Space Probe
  • MHVBoard - an Arduino Clone
  • MHVLib - An Efficiency Oriented Runtime Library for AVR Microcontrollers
  • PCB Engraver

Members' Projects

  • ASync-Firefly
  • Ammo Counter for Nerf Gun
  • Arduino Powered Orbit CD Duplicator
  • Arduino controlled robotic hand
  • Battery management module
  • Breadboard Helper
  • Cameras in the space!
  • DDR board for the Dreamcast.
  • GBA upscaled to larger TFT screen
  • HT1632-AVR : A library to interface HT1632 LED Driver ICs and AVR micro controllers
  • Hacking the Foscam FI8903W Linux Based IP Camera
  • Laser Engraver G-CODE conversion
  • Lenz2 Wind Turbine Prototype
  • Level shifting with transistors.
  • PC to PCB in under 30 minutes - Quick 'n Easy PCB Fabrication
  • PCB Modification and SMD Rework
  • PCC4[N]: An Arduino controlled lighting display
  • Pictures of some MattProjects on axio.ms
  • Polymorphachord Keyboard
  • RFID Access For Locker - Journal
  • Robosapien w/ Bluetooth remote control
  • SMD Reflow Oven
  • SMS via Ubuntu
  • Saving Memory on the Arduino using PROGMEM

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'

);

 

 

 

 

=============================================================

  • Member Projects
  • SGH-A411
  • linux
  • perl
  • samsung
  • sms
  • ubuntu
  • Login or register to post comments
  • Printer-friendly version

Search

Recent Comments

Request
5 days 22 hours ago
more

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
  • ››
more