1. Home
  2. Docs
  3. Python 3.X Documentation
  4. Examples
  5. Obtaining the device name and friendly description given the serial number

Obtaining the device name and friendly description given the serial number

The example below shows how to use the serial_connection to obtain the name and friendly description of a defice given its serial number, without the need to establish a serial port connection.

# Import serial connection class.
from serial_connection import SerialConnection

if __name__ == "__main__":
    # Get device name and friendly description, without the need
    # of a serial port connection, if none is found, an exception is
    # raised.
    name, description = SerialConnection.get_device_info("R246744")

    print(name)
    print(description)