Applications
Releasing the LEDs to system control
LR54 User Guide
750
NAME
hid
PACKAGE CONTENTS
CLASSES
_ctypes.Structure(_ctypes._CData)
DeviceInfo
builtins.Exception(builtins.BaseException)
HIDException
builtins.object
Device
...
>>>
5. Use
Ctrl-D
to exit the Python session. You can also exit the session using
exit()
or
quit()
.
Use Python to access serial ports
You can use the Python
serial
module to access serial ports on your LR54 device that are configured
to be in Application mode. See
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 LR54 local command line as a
user with shell access.
Depending on your device configuration, you may be presented with an
Access selection
menu
. Type
shell
to access the device shell.
2. Determine the path to the serial port:
# ls /dev/serial/
by-id
by-path
by-usb
port1
#
3. At the shell prompt, use the
python
command with no parameters to enter an interactive
Python session:
# python
Python 3.10.1 (default, May
9 2021, 22:49:59)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
4. Import the
serial
module:
>>> import serial
>>>
5. You can now perform operations on the serial port. For example, to write a message to the
serial port:
Содержание TransPort LR54
Страница 1: ...LR54 User Guide Firmware version 22 8 ...
Страница 506: ...Virtual Private Networks VPN OpenVPN LR54 User Guide 506 5 Click Apply to save the configuration and apply the change ...
Страница 628: ...Services Simple Network Management Protocol SNMP LR54 User Guide 628 The SNMP page is displayed 4 Click Download ...
Страница 1050: ...Command line interface Execute a command from the web interface LR54 User Guide 1050 The Admin CLI prompt appears ...
Страница 1095: ...Command line interface Command line reference LR54 User Guide 1095 reboot Reboot the system Parameters None ...