Quality Guru's – Home of QA/QE SW Testing Workshops

March 3, 2010

Test Status to SMS/MMS: Sending SMS messages using CLI with dedicated GSM modem device

Filed under: Test Status to SMS/MMS — natiku @ 8:01 am


This entry is part of Test Status to SMS/MMS workshop.

Sending SMS messages using CLI with dedicated GSM modem device

Install selected CLI tool “GAMMU” for interacting with GSM modem

Note: Gammu will show sections in help, you need to write gammu –help network to see actual network commands

yum install gammu

Installed:
  gammu.x86_64 0:1.25.0-2.fc12

Dependency Installed:
  dialog.x86_64 0:1.1-9.20080819.fc12 gammu-libs.x86_64 0:1.25.0-2.fc12
  libdbi.x86_64 0:0.8.3-3.fc12 mysql-libs.x86_64 0:5.1.42-7.fc12

Check GSM modem status with Gammu

Check then GSM modem is detected on Linux BOOT

dmesg | grep GSM
USB Serial support registered for GSM modem (1-port)
option 2-3:1.0: GSM modem (1-port) converter detected
usb 2-3: GSM modem (1-port) converter now attached to ttyUSB0
option 2-3:1.1: GSM modem (1-port) converter detected
usb 2-3: GSM modem (1-port) converter now attached to ttyUSB1
option: v0.7.2:USB Driver for GSM modems

Reconfigure Gammu to use right GMS modem device port

Change /dev/mobile to /dev/ttyUSB1 in:

gammu-config

Check then we see modem and we are logged into network

gammu --identify
Manufacturer : huawei
Model : E160 (E160)
Firmware : 11.604.21.05.314
IMEI : 354764033512461
SIM IMSI : 230013200172212

gammu --networkinfo
Network state : home network
Network : 230 01 (T-Mobile CZ, Czech Republic), LAC 4028, CID 66C4DE
Name in phone : "T-Mobile CZ"

Sending simple SMS and listing all received with Gammu using GSM modem

Sending simple SMS

gammu --sendsms text 603111111
Enter message text and press ^D:
Gammu test
If you want break, press Ctrl+C...
Sending SMS 1/1....waiting for network answer..OK, message reference=7

Listing all SMS

gammu --getallsms
Blahoprejeme vam k porizeni predplacene karty Twist. Podrobne informace o nasich sluzbach vam poskytne bezplatna Infolinka T-Mobile na cisle 4603. Vas T-Mobile.

Location 5, folder "Inbox", SIM memory, Inbox folder
SMS message
SMSC number : "+420603052000"
Sent : Fri 26 Feb 2010 04:51:48 PM +0100
Coding : Default GSM alphabet (no compression)
Remote number : "5602"
Status : Read

T-Mobile: Vazeny zakazniku, dobiti Twist karty s telefonnim cislem 605311031 probehlo uspesne. Kredit byl navysen o 300 Kc. Kod transakce je 936215562.

Location 3, folder "Inbox", SIM memory, Inbox folder
SMS message
SMSC number : "+420603052000"
Sent : Fri 26 Feb 2010 05:30:02 PM +0100
Class : 1
Coding : Default GSM alphabet (no compression)
Remote number : "4603"
Status : UnRead

T-Mobile: Vazeny zakazniku, jako odmenu za uskutecnene dobiti ziskavate 100 SMS do site T-Mobile zdarma, ktere muzete vyuzit po dobu 30 dni. www.t-mobile.cz

5 SMS parts in 5 SMS sequences

Next time I will show more advanced topics like UNICODE SMS and so on.

Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: