3.7.0 3.6.0 3.5.0 3.4.0 3.3.0 3.2.2 3.2.1 3.2.0 Korean English Chinese Czech Dutch French German Hungarian Italian Japanese Polish Portuguese Spanish
3.7.0 3.6.0 3.5.0 3.4.0 3.3.0 3.2.2 3.2.1 3.2.0 Korean English Chinese Czech Dutch French German Hungarian Italian Japanese Polish Portuguese Spanish

serial_get_info()

Definition

serial_get_info(id)

Features

This function reads the port information and device name of the connected USB to Serial.

Parameters

Parameter Name

Data Type

Default Value

Description

id

int

1

ID of "USB to Serial" to read (1-10)

Return

Value (port_info, device_name)

Description

port_info

Port information (NULL means no device is connected)

device_name

Device name (NULL means no device is connected)

Exception

Exception

Description

DR_Error (DR_ERROR_TYPE)

Parameter data error occurred

DR_Error (DR_ERROR_VALUE)

Parameter value is invalid

Example

Python
port_info, device_name = serial_get_info(1) #1 connected device information 
#port_info = "COM_USB"
ser = serial_open(port=port_info, baudrate=115200, bytesize=DR_EIGHTBITS, 
          parity=DR_PARITY_NONE, stopbits=DR_STOPBITS_ONE)

Keyword

serial / serial_ / serial_get / get_info / info