EasyManuals Logo
Home>Digi>Server>Connect IT 16

Digi Connect IT 16 User Manual

Digi Connect IT 16
756 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 #478 background imageLoading...
Page #478 background image
Applications Use Python to access serial ports
Digi Connect IT® 16/48 User Guide
478
# python
Python 3.6.12 (default, Jan 11 2021, 10:25:21)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
3. Import the hid module:
>>> import hid
>>>
4. Use the help command with hid:
>>> help(hid)
Help on package hid:
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 Connect IT 16/48 device that are
configured to be in Application mode. For example, you can configure USB ports to function serial
ports and interact programmatically with those ports. See Configure the serial port for information
about configuring a serial port in Application mode, and see Add a USB console port for information
about configuring USB ports on the device to function as serial ports.
To use Python to access serial ports:
1. Log into the Connect IT 16/48 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 USB_port1 USB_port2
#

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Digi Connect IT 16 and is the answer not in the manual?

Digi Connect IT 16 Specifications

General IconGeneral
BrandDigi
ModelConnect IT 16
CategoryServer
LanguageEnglish

Related product manuals