cliechti | 86844e8 | 2009-08-12 00:05:33 +0000 | [diff] [blame] | 1 | .. _examples: |
| 2 | |
cliechti | 86e8787 | 2009-07-21 13:32:45 +0000 | [diff] [blame] | 3 | ========== |
| 4 | Examples |
| 5 | ========== |
| 6 | |
cliechti | 86844e8 | 2009-08-12 00:05:33 +0000 | [diff] [blame] | 7 | .. _miniterm: |
| 8 | |
cliechti | 86e8787 | 2009-07-21 13:32:45 +0000 | [diff] [blame] | 9 | Miniterm |
| 10 | ======== |
| 11 | This is a console application that provides a small terminal application. |
cliechti | 44eb98f | 2011-03-21 21:41:10 +0000 | [diff] [blame] | 12 | Miniterm itself does not implement any terminal features such as VT102 |
Chris Liechti | c8c5183 | 2015-08-26 23:58:17 +0200 | [diff] [blame] | 13 | compatibility. However it may inherit these features from the terminal it is run. |
cliechti | 86e8787 | 2009-07-21 13:32:45 +0000 | [diff] [blame] | 14 | For example on GNU/Linux running from an xterm it will support the escape |
| 15 | sequences of the xterm. On Windows the typical console window is dumb and does |
| 16 | not support any escapes. When ANSI.sys is loaded it supports some escapes. |
| 17 | |
cliechti | 44eb98f | 2011-03-21 21:41:10 +0000 | [diff] [blame] | 18 | Miniterm:: |
cliechti | 5134aab | 2009-07-21 19:47:59 +0000 | [diff] [blame] | 19 | |
| 20 | --- Miniterm on /dev/ttyS0: 9600,8,N,1 --- |
| 21 | --- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H --- |
| 22 | |
cliechti | 86e8787 | 2009-07-21 13:32:45 +0000 | [diff] [blame] | 23 | Command line options can be given so that binary data including escapes for |
| 24 | terminals are escaped or output as hex. |
| 25 | |
cliechti | 44eb98f | 2011-03-21 21:41:10 +0000 | [diff] [blame] | 26 | Miniterm supports :rfc:`2217` remote serial ports and raw sockets using :ref:`URLs` |
cliechti | 3453f12 | 2009-08-10 22:56:34 +0000 | [diff] [blame] | 27 | such as ``rfc2217:://<host>:<port>`` respectively ``socket://<host>:<port>`` as |
| 28 | *port* argument when invoking. |
| 29 | |
cliechti | 1fa5407 | 2011-03-04 02:28:08 +0000 | [diff] [blame] | 30 | Command line options ``python -m serial.tools.miniterm -h``:: |
cliechti | 5134aab | 2009-07-21 19:47:59 +0000 | [diff] [blame] | 31 | |
Chris Liechti | c8c5183 | 2015-08-26 23:58:17 +0200 | [diff] [blame] | 32 | usage: miniterm.py [-h] [--parity {N,E,O,S,M}] [--rtscts] [--xonxoff] |
| 33 | [--rts RTS] [--dtr DTR] [-e] [--encoding CODEC] [-f NAME] |
| 34 | [--eol {CR,LF,CRLF}] [--raw] [--exit-char NUM] |
| 35 | [--menu-char NUM] [-q] [--develop] |
| 36 | [port] [baudrate] |
cliechti | 5134aab | 2009-07-21 19:47:59 +0000 | [diff] [blame] | 37 | |
| 38 | Miniterm - A simple terminal program for the serial port. |
| 39 | |
Chris Liechti | c8c5183 | 2015-08-26 23:58:17 +0200 | [diff] [blame] | 40 | positional arguments: |
| 41 | port serial port name |
| 42 | baudrate set baud rate, default: 9600 |
| 43 | |
| 44 | optional arguments: |
cliechti | 5134aab | 2009-07-21 19:47:59 +0000 | [diff] [blame] | 45 | -h, --help show this help message and exit |
cliechti | 5370cee | 2013-10-13 03:08:19 +0000 | [diff] [blame] | 46 | |
Chris Liechti | c8c5183 | 2015-08-26 23:58:17 +0200 | [diff] [blame] | 47 | port settings: |
| 48 | --parity {N,E,O,S,M} set parity, one of {N E O S M}, default: N |
| 49 | --rtscts enable RTS/CTS flow control (default off) |
| 50 | --xonxoff enable software flow control (default off) |
| 51 | --rts RTS set initial RTS line state (possible values: 0, 1) |
| 52 | --dtr DTR set initial DTR line state (possible values: 0, 1) |
cliechti | 5370cee | 2013-10-13 03:08:19 +0000 | [diff] [blame] | 53 | |
Chris Liechti | c8c5183 | 2015-08-26 23:58:17 +0200 | [diff] [blame] | 54 | data handling: |
| 55 | -e, --echo enable local echo (default off) |
| 56 | --encoding CODEC set the encoding for the serial port (e.g. hexlify, |
| 57 | Latin1, UTF-8), default: UTF-8 |
| 58 | -f NAME, --filter NAME |
| 59 | add text transformation |
| 60 | --eol {CR,LF,CRLF} end of line mode |
| 61 | --raw Do no apply any encodings/transformations |
cliechti | 5370cee | 2013-10-13 03:08:19 +0000 | [diff] [blame] | 62 | |
Chris Liechti | c8c5183 | 2015-08-26 23:58:17 +0200 | [diff] [blame] | 63 | hotkeys: |
| 64 | --exit-char NUM Unicode of special character that is used to exit the |
| 65 | application, default: 29 |
| 66 | --menu-char NUM Unicode code of special character that is used to |
| 67 | control miniterm (menu), default: 20 |
cliechti | 5134aab | 2009-07-21 19:47:59 +0000 | [diff] [blame] | 68 | |
Chris Liechti | c8c5183 | 2015-08-26 23:58:17 +0200 | [diff] [blame] | 69 | diagnostics: |
| 70 | -q, --quiet suppress non-error messages |
| 71 | --develop show Python traceback on error |
cliechti | 5370cee | 2013-10-13 03:08:19 +0000 | [diff] [blame] | 72 | |
cliechti | 5134aab | 2009-07-21 19:47:59 +0000 | [diff] [blame] | 73 | |
cliechti | 44eb98f | 2011-03-21 21:41:10 +0000 | [diff] [blame] | 74 | Miniterm supports some control functions. Typing :kbd:`Ctrl+T Ctrl+H` when it is |
cliechti | 5134aab | 2009-07-21 19:47:59 +0000 | [diff] [blame] | 75 | running shows the help text:: |
| 76 | |
Chris Liechti | c8c5183 | 2015-08-26 23:58:17 +0200 | [diff] [blame] | 77 | --- pySerial (3.0a) - miniterm - help |
cliechti | 5134aab | 2009-07-21 19:47:59 +0000 | [diff] [blame] | 78 | --- |
| 79 | --- Ctrl+] Exit program |
| 80 | --- Ctrl+T Menu escape key, followed by: |
| 81 | --- Menu keys: |
Chris Liechti | c8c5183 | 2015-08-26 23:58:17 +0200 | [diff] [blame] | 82 | --- Ctrl+T Send the menu character itself to remote |
| 83 | --- Ctrl+] Send the exit character itself to remote |
| 84 | --- Ctrl+I Show info |
| 85 | --- Ctrl+U Upload file (prompt will be shown) |
| 86 | --- Ctrl+A encoding |
| 87 | --- Ctrl+F edit filters |
cliechti | 5134aab | 2009-07-21 19:47:59 +0000 | [diff] [blame] | 88 | --- Toggles: |
Chris Liechti | c8c5183 | 2015-08-26 23:58:17 +0200 | [diff] [blame] | 89 | --- Ctrl+R RTS Ctrl+D DTR Ctrl+B BREAK |
| 90 | --- Ctrl+E echo Ctrl+L EOL |
cliechti | 5134aab | 2009-07-21 19:47:59 +0000 | [diff] [blame] | 91 | --- |
| 92 | --- Port settings (Ctrl+T followed by the following): |
Chris Liechti | c8c5183 | 2015-08-26 23:58:17 +0200 | [diff] [blame] | 93 | --- p change port |
| 94 | --- 7 8 set data bits |
| 95 | --- N E O S M change parity (None, Even, Odd, Space, Mark) |
| 96 | --- 1 2 3 set stop bits (1, 2, 1.5) |
| 97 | --- b change baud rate |
| 98 | --- x X disable/enable software flow control |
| 99 | --- r R disable/enable hardware flow control |
cliechti | 5134aab | 2009-07-21 19:47:59 +0000 | [diff] [blame] | 100 | |
cliechti | 8611bf4 | 2009-08-03 00:34:03 +0000 | [diff] [blame] | 101 | .. versionchanged:: 2.5 |
cliechti | 4a63d6b | 2011-03-19 02:57:51 +0000 | [diff] [blame] | 102 | Added :kbd:`Ctrl+T` menu and added support for opening URLs. |
| 103 | .. versionchanged:: 2.6 |
| 104 | File moved from the examples to :mod:`serial.tools.miniterm`. |
Chris Liechti | c8c5183 | 2015-08-26 23:58:17 +0200 | [diff] [blame] | 105 | .. versionchanged:: 3.0 |
| 106 | Apply encoding on serial port, convert to Unicode for console. |
| 107 | Added new filters, default to stripping terminal control sequences. |
cliechti | 86e8787 | 2009-07-21 13:32:45 +0000 | [diff] [blame] | 108 | |
| 109 | miniterm.py_ |
| 110 | The miniterm program. |
| 111 | |
| 112 | setup-miniterm-py2exe.py_ |
| 113 | This is a py2exe setup script for Windows. It can be used to create a |
| 114 | standalone ``miniterm.exe``. |
| 115 | |
Chris Liechti | 90570b9 | 2015-08-04 03:32:02 +0200 | [diff] [blame] | 116 | .. _miniterm.py: https://github.com/pyserial/pyserial/blob/master/serial/tools/miniterm.py |
| 117 | .. _setup-miniterm-py2exe.py: https://github.com/pyserial/pyserial/blob/master/examples/setup-miniterm-py2exe.py |
cliechti | 86e8787 | 2009-07-21 13:32:45 +0000 | [diff] [blame] | 118 | |
| 119 | |
| 120 | TCP/IP - serial bridge |
| 121 | ====================== |
| 122 | This program opens a TCP/IP port. When a connection is made to that port (e.g. |
| 123 | with telnet) it forwards all data to the serial port and vice versa. |
| 124 | |
cliechti | 3453f12 | 2009-08-10 22:56:34 +0000 | [diff] [blame] | 125 | This example only exports a raw socket connection. The next example |
| 126 | below gives the client much more control over the remote serial port. |
cliechti | dec243b | 2009-08-04 02:24:03 +0000 | [diff] [blame] | 127 | |
| 128 | - The serial port settings are set on the command line when starting the |
| 129 | program. |
| 130 | - There is no possibility to change settings from remote. |
| 131 | - All data is passed through as-is. |
| 132 | |
cliechti | 5134aab | 2009-07-21 19:47:59 +0000 | [diff] [blame] | 133 | :: |
| 134 | |
| 135 | Usage: tcp_serial_redirect.py [options] [port [baudrate]] |
| 136 | |
| 137 | Simple Serial to Network (TCP/IP) redirector. |
| 138 | |
| 139 | Options: |
| 140 | -h, --help show this help message and exit |
| 141 | -q, --quiet suppress non error messages |
| 142 | --spy peek at the communication and print all data to the |
| 143 | console |
| 144 | |
| 145 | Serial Port: |
| 146 | Serial port settings |
| 147 | |
| 148 | -p PORT, --port=PORT |
| 149 | port, a number (default 0) or a device name |
| 150 | -b BAUDRATE, --baud=BAUDRATE |
| 151 | set baud rate, default: 9600 |
| 152 | --parity=PARITY set parity, one of [N, E, O], default=N |
| 153 | --rtscts enable RTS/CTS flow control (default off) |
| 154 | --xonxoff enable software flow control (default off) |
| 155 | --rts=RTS_STATE set initial RTS line state (possible values: 0, 1) |
| 156 | --dtr=DTR_STATE set initial DTR line state (possible values: 0, 1) |
| 157 | |
| 158 | Network settings: |
| 159 | Network configuration. |
| 160 | |
| 161 | -P LOCAL_PORT, --localport=LOCAL_PORT |
| 162 | local TCP port |
cliechti | dec243b | 2009-08-04 02:24:03 +0000 | [diff] [blame] | 163 | --rfc2217 allow control commands with Telnet extension RFC-2217 |
cliechti | 5134aab | 2009-07-21 19:47:59 +0000 | [diff] [blame] | 164 | |
| 165 | Newline Settings: |
| 166 | Convert newlines between network and serial port. Conversion is |
| 167 | normally disabled and can be enabled by --convert. |
| 168 | |
| 169 | -c, --convert enable newline conversion (default off) |
| 170 | --net-nl=NET_NEWLINE |
| 171 | type of newlines that are expected on the network |
| 172 | (default: LF) |
| 173 | --ser-nl=SER_NEWLINE |
| 174 | type of newlines that are expected on the serial port |
| 175 | (default: CR+LF) |
| 176 | |
| 177 | NOTE: no security measures are implemented. Anyone can remotely connect to |
| 178 | this service over the network. Only one connection at once is supported. When |
| 179 | the connection is terminated it waits for the next connect. |
| 180 | |
cliechti | 86e8787 | 2009-07-21 13:32:45 +0000 | [diff] [blame] | 181 | |
| 182 | tcp_serial_redirect.py_ |
| 183 | Main program. |
| 184 | |
Chris Liechti | 90570b9 | 2015-08-04 03:32:02 +0200 | [diff] [blame] | 185 | .. _tcp_serial_redirect.py: https://github.com/pyserial/pyserial/blob/master/examples/tcp_serial_redirect.py |
cliechti | 4cb9466 | 2013-10-17 03:17:50 +0000 | [diff] [blame] | 186 | |
cliechti | 86e8787 | 2009-07-21 13:32:45 +0000 | [diff] [blame] | 187 | |
cliechti | a2d8f96 | 2009-08-10 23:59:27 +0000 | [diff] [blame] | 188 | Single-port TCP/IP - serial bridge (RFC 2217) |
cliechti | 3453f12 | 2009-08-10 22:56:34 +0000 | [diff] [blame] | 189 | ============================================= |
| 190 | Simple cross platform :rfc:`2217` serial port server. It uses threads and is |
| 191 | portable (runs on POSIX, Windows, etc). |
cliechti | 86e8787 | 2009-07-21 13:32:45 +0000 | [diff] [blame] | 192 | |
cliechti | a2d8f96 | 2009-08-10 23:59:27 +0000 | [diff] [blame] | 193 | - The port settings and control lines (RTS/DTR) can be changed at any time |
| 194 | using :rfc:`2217` requests. The status lines (DSR/CTS/RI/CD) are polled every |
cliechti | 3453f12 | 2009-08-10 22:56:34 +0000 | [diff] [blame] | 195 | second and notifications are sent to the client. |
| 196 | - Telnet character IAC (0xff) needs to be doubled in data stream. IAC followed |
| 197 | by an other value is interpreted as Telnet command sequence. |
| 198 | - Telnet negotiation commands are sent when connecting to the server. |
| 199 | - RTS/DTR are activated on client connect and deactivated on disconnect. |
| 200 | - Default port settings are set again when client disconnects. |
cliechti | a2d8f96 | 2009-08-10 23:59:27 +0000 | [diff] [blame] | 201 | |
cliechti | 3453f12 | 2009-08-10 22:56:34 +0000 | [diff] [blame] | 202 | :: |
| 203 | |
| 204 | Usage: rfc2217_server.py [options] port |
| 205 | |
| 206 | RFC 2217 Serial to Network (TCP/IP) redirector. |
| 207 | |
| 208 | Options: |
| 209 | -h, --help show this help message and exit |
| 210 | -p LOCAL_PORT, --localport=LOCAL_PORT |
| 211 | local TCP port |
| 212 | |
| 213 | NOTE: no security measures are implemented. Anyone can remotely connect to |
| 214 | this service over the network. Only one connection at once is supported. When |
| 215 | the connection is terminated it waits for the next connect. |
| 216 | |
| 217 | .. versionadded:: 2.5 |
| 218 | |
| 219 | rfc2217_server.py_ |
| 220 | Main program. |
| 221 | |
| 222 | setup-rfc2217_server-py2exe.py_ |
| 223 | This is a py2exe setup script for Windows. It can be used to create a |
| 224 | standalone ``rfc2217_server.exe``. |
| 225 | |
Chris Liechti | 90570b9 | 2015-08-04 03:32:02 +0200 | [diff] [blame] | 226 | .. _rfc2217_server.py: https://github.com/pyserial/pyserial/blob/master/examples/rfc2217_server.py |
| 227 | .. _setup-rfc2217_server-py2exe.py: https://github.com/pyserial/pyserial/blob/master/examples/setup-rfc2217_server-py2exe.py |
cliechti | 3453f12 | 2009-08-10 22:56:34 +0000 | [diff] [blame] | 228 | |
| 229 | |
| 230 | Multi-port TCP/IP - serial bridge (RFC 2217) |
| 231 | ============================================ |
cliechti | bb5c3c5 | 2009-07-23 02:29:27 +0000 | [diff] [blame] | 232 | This example implements a TCP/IP to serial port service that works with |
cliechti | 3453f12 | 2009-08-10 22:56:34 +0000 | [diff] [blame] | 233 | multiple ports at once. It uses select, no threads, for the serial ports and |
| 234 | the network sockets and therefore runs on POSIX systems only. |
cliechti | bb5c3c5 | 2009-07-23 02:29:27 +0000 | [diff] [blame] | 235 | |
cliechti | 7aed833 | 2009-08-05 14:19:31 +0000 | [diff] [blame] | 236 | - Full control over the serial port with :rfc:`2217`. |
cliechti | 3453f12 | 2009-08-10 22:56:34 +0000 | [diff] [blame] | 237 | - Check existence of ``/tty/USB0...8``. This is done every 5 seconds using |
cliechti | 7aed833 | 2009-08-05 14:19:31 +0000 | [diff] [blame] | 238 | ``os.path.exists``. |
| 239 | - Send zeroconf announcements when port appears or disappears (uses |
| 240 | python-avahi and dbus). Service name: ``_serial_port._tcp``. |
| 241 | - Each serial port becomes available as one TCP/IP server. e.g. |
| 242 | ``/dev/ttyUSB0`` is reachable at ``<host>:7000``. |
| 243 | - Single process for all ports and sockets (not per port). |
| 244 | - The script can be started as daemon. |
| 245 | - Logging to stdout or when run as daemon to syslog. |
cliechti | 3453f12 | 2009-08-10 22:56:34 +0000 | [diff] [blame] | 246 | - Default port settings are set again when client disconnects. |
cliechti | 7cb78e8 | 2009-08-05 15:47:57 +0000 | [diff] [blame] | 247 | - modem status lines (CTS/DSR/RI/CD) are not polled periodically and the server |
| 248 | therefore does not send NOTIFY_MODEMSTATE on its own. However it responds to |
| 249 | request from the client (i.e. use the ``poll_modem`` option in the URL when |
| 250 | using a pySerial client.) |
cliechti | bb5c3c5 | 2009-07-23 02:29:27 +0000 | [diff] [blame] | 251 | |
cliechti | 7aed833 | 2009-08-05 14:19:31 +0000 | [diff] [blame] | 252 | Requirements: |
| 253 | |
| 254 | - Python (>= 2.4) |
cliechti | bb5c3c5 | 2009-07-23 02:29:27 +0000 | [diff] [blame] | 255 | - python-avahi |
| 256 | - python-dbus |
cliechti | 7aed833 | 2009-08-05 14:19:31 +0000 | [diff] [blame] | 257 | - python-serial (>= 2.5) |
cliechti | bb5c3c5 | 2009-07-23 02:29:27 +0000 | [diff] [blame] | 258 | |
cliechti | 7aed833 | 2009-08-05 14:19:31 +0000 | [diff] [blame] | 259 | Installation as daemon: |
| 260 | |
cliechti | bb5c3c5 | 2009-07-23 02:29:27 +0000 | [diff] [blame] | 261 | - Copy the script ``port_publisher.py`` to ``/usr/local/bin``. |
| 262 | - Copy the script ``port_publisher.sh`` to ``/etc/init.d``. |
| 263 | - Add links to the runlevels using ``update-rc.d port_publisher.sh defaults 99`` |
| 264 | - Thats it :-) the service will be started on next reboot. Alternatively run |
| 265 | ``invoke-rc.d port_publisher.sh start`` as root. |
| 266 | |
cliechti | 7aed833 | 2009-08-05 14:19:31 +0000 | [diff] [blame] | 267 | .. versionadded:: 2.5 new example |
cliechti | bb5c3c5 | 2009-07-23 02:29:27 +0000 | [diff] [blame] | 268 | |
| 269 | port_publisher.py_ |
cliechti | 7aed833 | 2009-08-05 14:19:31 +0000 | [diff] [blame] | 270 | Multi-port TCP/IP-serial converter (RFC 2217) for POSIX environments. |
cliechti | bb5c3c5 | 2009-07-23 02:29:27 +0000 | [diff] [blame] | 271 | |
| 272 | port_publisher.sh_ |
| 273 | Example init.d script. |
| 274 | |
Chris Liechti | 90570b9 | 2015-08-04 03:32:02 +0200 | [diff] [blame] | 275 | .. _port_publisher.py: https://github.com/pyserial/pyserial/blob/master/examples/port_publisher.py |
| 276 | .. _port_publisher.sh: https://github.com/pyserial/pyserial/blob/master/examples/http://sourceforge.net/p/pyserial/code/HEAD/tree/trunk/pyserial/examples/port_publisher.sh |
cliechti | bb5c3c5 | 2009-07-23 02:29:27 +0000 | [diff] [blame] | 277 | |
| 278 | |
cliechti | 86e8787 | 2009-07-21 13:32:45 +0000 | [diff] [blame] | 279 | wxPython examples |
| 280 | ================= |
| 281 | A simple terminal application for wxPython and a flexible serial port |
| 282 | configuration dialog are shown here. |
| 283 | |
| 284 | wxTerminal.py_ |
| 285 | A simple terminal application. Note that the length of the buffer is |
| 286 | limited by wx and it may suddenly stop displaying new input. |
| 287 | |
| 288 | wxTerminal.wxg_ |
| 289 | A wxGlade design file for the terminal application. |
| 290 | |
| 291 | wxSerialConfigDialog.py_ |
| 292 | A flexible serial port configuration dialog. |
| 293 | |
| 294 | wxSerialConfigDialog.wxg_ |
| 295 | The wxGlade design file for the configuration dialog. |
| 296 | |
cliechti | 3453f12 | 2009-08-10 22:56:34 +0000 | [diff] [blame] | 297 | setup-wxTerminal-py2exe.py_ |
cliechti | 86e8787 | 2009-07-21 13:32:45 +0000 | [diff] [blame] | 298 | A py2exe setup script to package the terminal application. |
| 299 | |
Chris Liechti | 90570b9 | 2015-08-04 03:32:02 +0200 | [diff] [blame] | 300 | .. _wxTerminal.py: https://github.com/pyserial/pyserial/blob/master/examples/wxTerminal.py |
| 301 | .. _wxTerminal.wxg: https://github.com/pyserial/pyserial/blob/master/examples/wxTerminal.wxg |
| 302 | .. _wxSerialConfigDialog.py: https://github.com/pyserial/pyserial/blob/master/examples/wxSerialConfigDialog.py |
| 303 | .. _wxSerialConfigDialog.wxg: https://github.com/pyserial/pyserial/blob/master/examples/wxSerialConfigDialog.wxg |
| 304 | .. _setup-wxTerminal-py2exe.py: https://github.com/pyserial/pyserial/blob/master/examples/setup-wxTerminal-py2exe.py |
cliechti | 86e8787 | 2009-07-21 13:32:45 +0000 | [diff] [blame] | 305 | |
| 306 | |
cliechti | 86e8787 | 2009-07-21 13:32:45 +0000 | [diff] [blame] | 307 | |
cliechti | 86e8787 | 2009-07-21 13:32:45 +0000 | [diff] [blame] | 308 | Unit tests |
| 309 | ========== |
| 310 | The project uses a number of unit test to verify the functionality. They all |
cliechti | 88c4684 | 2009-08-10 22:29:54 +0000 | [diff] [blame] | 311 | need a loop back connector. The scripts itself contain more information. All |
| 312 | test scripts are contained in the directory ``test``. |
cliechti | 86e8787 | 2009-07-21 13:32:45 +0000 | [diff] [blame] | 313 | |
cliechti | 8611bf4 | 2009-08-03 00:34:03 +0000 | [diff] [blame] | 314 | The unit tests are performed on port ``0`` unless a different device name or |
cliechti | 88c4684 | 2009-08-10 22:29:54 +0000 | [diff] [blame] | 315 | ``rfc2217://`` URL is given on the command line (argv[1]). |
| 316 | |
| 317 | run_all_tests.py_ |
| 318 | Collect all tests from all ``test*`` files and run them. By default, the |
| 319 | ``loop://`` device is used. |
cliechti | 8611bf4 | 2009-08-03 00:34:03 +0000 | [diff] [blame] | 320 | |
cliechti | 86e8787 | 2009-07-21 13:32:45 +0000 | [diff] [blame] | 321 | test.py_ |
cliechti | 88c4684 | 2009-08-10 22:29:54 +0000 | [diff] [blame] | 322 | Basic tests (binary capabilities, timeout, control lines). |
cliechti | 86e8787 | 2009-07-21 13:32:45 +0000 | [diff] [blame] | 323 | |
cliechti | 86e8787 | 2009-07-21 13:32:45 +0000 | [diff] [blame] | 324 | test_advanced.py_ |
cliechti | 88c4684 | 2009-08-10 22:29:54 +0000 | [diff] [blame] | 325 | Test more advanced features (properties). |
cliechti | 86e8787 | 2009-07-21 13:32:45 +0000 | [diff] [blame] | 326 | |
cliechti | bb5c3c5 | 2009-07-23 02:29:27 +0000 | [diff] [blame] | 327 | test_high_load.py_ |
| 328 | Tests involving sending a lot of data. |
| 329 | |
cliechti | 25375b5 | 2010-07-21 23:27:13 +0000 | [diff] [blame] | 330 | test_readline.py_ |
| 331 | Tests involving readline. |
| 332 | |
cliechti | daf47ba | 2009-07-28 01:28:16 +0000 | [diff] [blame] | 333 | test_iolib.py_ |
| 334 | Tests involving the :mod:`io` library. Only available for Python 2.6 and |
| 335 | newer. |
| 336 | |
cliechti | 4a63d6b | 2011-03-19 02:57:51 +0000 | [diff] [blame] | 337 | test_url.py_ |
| 338 | Tests involving the :ref:`URL <URLs>` feature. |
| 339 | |
Chris Liechti | 90570b9 | 2015-08-04 03:32:02 +0200 | [diff] [blame] | 340 | .. _run_all_tests.py: https://github.com/pyserial/pyserial/blob/master/test/run_all_tests.py |
| 341 | .. _test.py: https://github.com/pyserial/pyserial/blob/master/test/test.py |
| 342 | .. _test_advanced.py: https://github.com/pyserial/pyserial/blob/master/test/test_advanced.py |
| 343 | .. _test_high_load.py: https://github.com/pyserial/pyserial/blob/master/test/test_high_load.py |
| 344 | .. _test_readline.py: https://github.com/pyserial/pyserial/blob/master/test/test_readline.py |
| 345 | .. _test_iolib.py: https://github.com/pyserial/pyserial/blob/master/test/test_iolib.py |
| 346 | .. _test_url.py: https://github.com/pyserial/pyserial/blob/master/test/test_url.py |