summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcliechti <cliechti@f19166aa-fa4f-0410-85c2-fa1106f25c8a>2003-08-28 21:46:28 +0000
committercliechti <cliechti@f19166aa-fa4f-0410-85c2-fa1106f25c8a>2003-08-28 21:46:28 +0000
commitd69c27ce68f6b952d99d96bbe5603b6fc72b4234 (patch)
treeae90b9e5b7a3c8a1e50d82169ebb32f0af3fe701
parent7664b78b1f2b60fceb7768d50a476d2bd50f35e9 (diff)
downloadpyserial-git-d69c27ce68f6b952d99d96bbe5603b6fc72b4234.tar.gz
updated USB comment (tnx Nathan Hurst)
tips & tricks section link to Roger Binns page (comscan)
-rw-r--r--pyserial/README.txt34
1 files changed, 25 insertions, 9 deletions
diff --git a/pyserial/README.txt b/pyserial/README.txt
index 698ad33..88aef37 100644
--- a/pyserial/README.txt
+++ b/pyserial/README.txt
@@ -47,16 +47,24 @@ The files get installed in the "Lib/site-packages" directory in newer
Python versions.
Serial to USB adapters
+----------------------
Such adapters are reported to work under Mac OSX and Windows. They are
-mapped to a normal COM port under Windows, but on Mac OSX they have
-special device names like "/dev/cu.USA19QW11P1.1" (built after this scheme:
-/dev/[cu|tty].USA<adaptername><USB-part>P<serial-port>.1) either use these
-names for the serial ports or create a link to the common device names
-like "ln -s /dev/cu.USA19QW11P1.1 /dev/cuaa0" "ln -s /dev/cu.USA19QW21P1.1
-/dev/cuaa1" etc.
-But be aware that the device file disappears as soon as you unplug the USB
-adapter.
+mapped to a normal COM port under Windows, but on Mac OSX and other platforms
+they have special device names.
+
+Mac OSX: "/dev/[cu|tty].USA<adaptername><USB-part>P<serial-port>.1"
+ e.g. "/dev/cu.USA19QW11P1.1"
+
+Linux: "/dev/usb/ttyUSB[n]" or "/dev/ttyUSB[n]"
+ first for for RedHat, second form for Debian.
+ e.g. "/dev/usb/ttyUSB0"
+Either use these names for the serial ports or create a link to the common device
+names like "ln -s /dev/cu.USA19QW11P1.1 /dev/cuaa0" or "ln -s /dev/usb/ttyUSB0
+/dev/ttyS4" etc.
+
+But be aware that the (USB) device file disappears as soon as you unplug the USB
+adapter.
Short introduction
@@ -100,7 +108,7 @@ ser = serial.Serial(
bytesize=EIGHTBITS, #number of databits
parity=PARITY_NONE, #enable parity checking
stopbits=STOPBITS_ONE, #number of stopbits
- timeout=None, #set a timeout value, None for waiting forever
+ timeout=None, #set a timeout value, None to wait forever
xonxoff=0, #enable software flow control
rtscts=0, #enable RTS/CTS flow control
)
@@ -143,6 +151,14 @@ bytesize:
serial.SEVENBITS
serial.EIGHTBITS
+Tips & Tricks
+-------------
+- Some protocols need CR LF ("\r\n") as line terminator, not just LF ("\n").
+ Modems are an example of this behaviour.
+
+- Scanning for available serial ports is possible with more or less sucess on
+ some platforms. Look at the tools from Roger Binns:
+ http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/bitpim/comscan/
References
----------