-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtestsms.py
29 lines (21 loc) · 1019 Bytes
/
testsms.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
############################################################
# #
# Test script for SMS fuctionality of modem #
# #
# Author: Stefan Wismer #
# wismerst@student.ethz.ch #
# #
############################################################
# small script to test the functionality of the iridium-module
import iridium
modem = iridium.IridiumModem(3)
# bla = modem.compile_sms("Hello World!")
# print "Complete PDU-String is %s" % bla
modem.serial_open("/dev/ttyUSB0",2400)
modem.reset()
print "there are %d sms of which %d are new." % (modem.get_num_sms(),
modem.get_num_new_sms())
print "hightest count is %d" % modem.get_newest_sms_count()
print "testsms got \"%s\"" % modem.read_sms(4)
# print chr(n)
# print "Testsms: Modem message count is %d" % bla