tserialport

Artifact [68cfcf260b]
Login

Artifact 68cfcf260b5a7accc9dc0881f8168a455baaa75c1e51c328bf61b7193bf7da3b:

Wiki page [examples] by alex 2018-07-19 13:08:57.
D 2018-07-19T13:08:57.985
L examples
U alex
W 1654
<h3>Example</h3>

<p><code>tserialport::getports ?open?</code></p>

<p>Command open will try to open the port in read mode and get the default settings.</p>
<p>Returns a list of all serial ports at your system including the device name and usb or bluetooth information as a dict.</p>

<verbatim>
package require tserialport

set mydict [tserialport::getports open]
</verbatim>

<p>Result example Mac OS X:</p>
<verbatim>
0 {
    device /dev/cu.Bluetooth-Incoming-Port
    description Bluetooth-Incoming-Port
    open true
    transport native
    baudrate 9600 bits 8 parity invalid stopbits 1
    cts ignore dsr ignore dtr on rts on xon_xoff disabled
}
1 {
    device /dev/cu.usbserial-FT0882PI
    description UC232R manufacturer
    FTDI product UC232R
    serial FT0882PI
    vendor_id 0x403 product_id 0x6001
    open true
    transport usb
    baudrate 9600 bits 8 parity invalid stopbits 1
    cts {flow control} dsr ignore dtr on rts {flow control} xon_xoff disabled
}
</verbatim>

<p>Result example Windows:</p>
<verbatim>
0 {
    device COM1
    description {Kommunikationsanschluss (COM1)}
    open true
    transport native
    baudrate 1200 bits 7 parity none stopbits 1
    cts ignore dsr ignore dtr on rts on xon_xoff disabled
}
1 {
    device COM11
    description {USB Serial Port (COM11)}
    manufacturer FTDI
    product TTL232RG-VSW5V0
    serial FTTFRFB4
    vendor_id 0x403 product_id 0x6001 usb_bus 0x2 usb_address 0x5
    open true
    transport usb
    baudrate 1200 bits 7 parity none stopbits 1
    cts ignore dsr ignore dtr on rts on xon_xoff disabled
}
</verbatim>

Z 8270aa6f6d701ece37ef6dafe530c9a9