Applications
Digidevice module
TX54 User Guide
715
Command line
1. Log into the TX54 command line as a user with full Admin access rights.
Depending on your device configuration, you may be presented with an
Access selection
menu
. Type
admin
to access the Admin CLI.
2. At the command line, type
config
to enter configuration mode:
> config
(config)>
3. At the config prompt, type:
(config)> system schedule sms_script_handling true
(config)>
4. Save the configuration and apply the change:
(config)> save
Configuration saved.
>
5. Type
exit
to exit the Admin CLI.
Depending on your device configuration, you may be presented with an
Access selection
menu
. Type
quit
to disconnect from the device.
See
Configure scripts to run automatically
for more information about scheduling scripts.
Example digidevice.sms code
The following example code receives an SMS message and sends a response:
#!/usr/bin/python3.6
import os
import threading
import sys
from digidevice.sms import Callback, send
COND = threading.Condition()
def sms_test_callback(sms, info):
print(f"SMS message from {info['content.number']} received")
print(sms)
print(info)
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:
Содержание TX54
Страница 1: ...TX54 User Guide Firmware version 22 2 ...
Страница 190: ...Interfaces Bridging TX54 User Guide 190 ...
Страница 293: ...Hotspot Hotspot configuration TX54 User Guide 293 ...
Страница 332: ...Hotspot Show hotspot status and statistics TX54 User Guide 332 ...
Страница 584: ...Services Simple Network Management Protocol SNMP TX54 User Guide 584 4 Click Download ...
Страница 1069: ...Command line interface Command line reference TX54 User Guide 1069 reboot Reboot the system Parameters None ...