EasyManuals Logo

Digi IX10 User Manual

Digi IX10
996 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #648 background imageLoading...
Page #648 background image
Applications Use Python to control the color of multi-colored LEDs
IX10 User Guide
648
print(sms)
print(info)
#if sms == "Reboot":
# send_sms(dest, 'Reboot message received, rebooting device...')
# response = cli.execute("reboot")
# print (response)
send_sms(dest, 'Message received (' + sms + '). Performing as CLI
command...')
response = cli.execute(sms)
if not response:
response = 'OK'
send_sms(dest, 'CLI results: ' + response)
print (response)
COND.acquire()
COND.notify()
COND.release()
def send_sms(destination, msg):
print("sending SMS message", msg)
if len(destination) == 10:
destination = "+1" + destination
send(destination, msg)
if __name__ == '__main__':
if len(sys.argv) > 1:
dest = sys.argv[1]
else:
dest = allowed_incoming_phone_number
my_callback = Callback(sms_test_callback, metadata=True)
#send_sms(dest, 'Ready to receive incoming SMS message')
print("Waiting up to 60 seconds for incoming SMS message")
# acquire the semaphore and wait until a callback occurs
COND.acquire()
try:
COND.wait(60.0)
except Exception as err:
print("exception occured while waiting")
print(err)
COND.release()
my_callback.unregister_callback()
os.system('rm -f /var/run/sms/scripts/*') # remove all stored SMS messages,
since we've processed them
print("SMS script finished. Please re-run if you want to check for more
incoming SMS messages")
os._exit(0)
Use Python to access serial ports
You can use the Python serial module to access serial ports on your IX10 device that are configured to
be in Application mode. See Configure Application mode for information about configuring a serial
port in Application mode.
To use Python to access serial ports:
1. Select a device in Remote Manager that is configured to allow shell access to the admin user,
and click Actions > Open Console. Alternatively, log into the IX10 local command line as a user
with shell access.

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Digi IX10 and is the answer not in the manual?

Digi IX10 Specifications

General IconGeneral
BrandDigi
ModelIX10
CategoryNetwork Router
LanguageEnglish

Related product manuals