Modem

Using a GSM modem for sending SMS

Testing a modem

Should work with PuTTY, HyperTerminal or any modem software under Linux/BSD/etc as well.

Modem type: Wavecom WMOD2 (P/N WM12219) Dual Band Modem 900-1800MHz

The AC adapter was set to 9V AC, but this modem can operate at different voltages as well.

Connect the modem to the serial port of the PC (or a USB - serial adapter)

Start PuTTY or HyperTerminal

Set the appropriate serial port (usually COM1)

Baud rate (speed) = 9600

Data bits = 8

Stop bits = 1

Parity = N

Testing online status

Entering the 'AT' command ( +Enter) displays 'OK'

Test message

Lowercase is also OK. Closing the message line with Ctrl z.

AT
OK
AT+CMGS="+36202233000"
> szevasz<Ctrl-z>
+CMGS: 60
OK

Modem reset

Shield Pin 14 while the device is powered on.

The pins are numbered. If you hold the Wavecom modem upwards, pin 14 is the second in the bottom row.

The red LED goes off for a while.

AIX settings

Fizikai portok es device-ok

Here is the default layout of an IBM pSeries 610 (7028-6C1). Device names and locations may change (see below - rmdev, etc)!

TTY Serial device Numbering on the chassis

tty0 sa0 1

tty1 sa1 2

tty2 sa2 3

To determine which tty belongs to each physical port:

# lsdev -Sa | egrep "^sa[0-9]|^tty"
sa0        Available 01-S1         Standard I/O Serial Port
sa1        Available 01-S2         Standard I/O Serial Port
sa2        Available 01-S3         Standard I/O Serial Port
tty0       Available 01-S1-00-00   Asynchronous Terminal
tty1       Available 01-S3-00-00   Asynchronous Terminal
tty2       Available 01-S2-00-00   Asynchronous Terminal

Notice that in the above example, tty2 and sa1 are on the same physical location.

The file /dev/uucp/Devices should include a line for each port to be used:

Direct tty2 - 9600 direct
Direct tty1 - 9600 direct

If the tty devices were removed, you can recreate them as follows:

# mkdev -c tty  -t 'tty' -s 'rs232' -p 'sa1' -w '0' -a speed='9600'
# mkdev -c tty  -t 'tty' -s 'rs232' -p 'sa2' -w '0' -a speed='9600'

Sending SMS

Port ready/Modem online

 # cu -ml /dev/tty2
Connected

Modem ready

at
OK

GSM network available

at+creg?
+CREG: 0,1
OK

Signal strength (max = 32)

at+csq
+CSQ: 6,6
OK

Setting message format to SMS (optional)

at+cmgf=1
OK

Setting sender phone number (optional)

at+csca="+36202300000"
OK

Sending message (terminate message with Ctrl-z)

at+cmgs="+36202233999"
> hello
+CMGS: 62
OK

Close connection (~.)

The PS1 prompt appears between the characters.

~[hostname].
The connection is ended.
 #

Script for sending SMS with 'expect'

TODO

AIX Additional information

Normally, you don't have to change these parameters.

# lsattr -El tty2 -Fattribute=value
autoconfig=available
bpc=8
csmap=sbcs
discard=^o
dsusp=^y
eof=^d
eol=^@
eol2=^?
erase=^h
flow_disp=xon
imap=none
intr=^c
kill=^u
lnext=^v
logger=
login=disable
logmodes=hupcl,cread,echoe,cs8
modules=ldterm
omap=none
open_disp=dtropen
owner=
parity=none
protection=
quit=^\
reboot_enable=no
reboot_string=#@reb@#
reprint=^r
rtrig=3
runmodes=hupcl,cread,brkint,icrnl,opost,tab3,onlcr,isig,icanon,echo,echoe,echok,echoctl,echoke,imaxbel,iexten
speed=9600
start=^q
stop=^s
stops=1
susp=^z
tbc16=16
term=dumb
timeout=0
werase=^w