cliechti | 2297814 | 2009-07-21 01:58:11 +0000 | [diff] [blame] | 1 | ========== |
| 2 | pySerial |
| 3 | ========== |
| 4 | |
| 5 | Overview |
| 6 | ======== |
| 7 | This module encapsulates the access for the serial port. It provides backends |
| 8 | for Python running on Windows, Linux, BSD (possibly any POSIX compliant |
| 9 | system), Jython and IronPython (.NET and Mono). The module named "serial" |
| 10 | automatically selects the appropriate backend. |
| 11 | |
cliechti | 5134aab | 2009-07-21 19:47:59 +0000 | [diff] [blame] | 12 | It is released under a free software license, see LICENSE_ for more |
cliechti | 2297814 | 2009-07-21 01:58:11 +0000 | [diff] [blame] | 13 | details. |
| 14 | |
Chris Liechti | 90570b9 | 2015-08-04 03:32:02 +0200 | [diff] [blame^] | 15 | Copyright (C) 2001-2015 Chris Liechti <cliechti(at)gmx.net> |
cliechti | 2297814 | 2009-07-21 01:58:11 +0000 | [diff] [blame] | 16 | |
cliechti | 8e814dc | 2009-07-30 22:19:08 +0000 | [diff] [blame] | 17 | Other pages (online) |
cliechti | 2297814 | 2009-07-21 01:58:11 +0000 | [diff] [blame] | 18 | |
Chris Liechti | 90570b9 | 2015-08-04 03:32:02 +0200 | [diff] [blame^] | 19 | - `project page on GitHub`_ |
cliechti | 4cb9466 | 2013-10-17 03:17:50 +0000 | [diff] [blame] | 20 | - `Download Page`_ with releases (PyPi) |
Chris Liechti | 90570b9 | 2015-08-04 03:32:02 +0200 | [diff] [blame^] | 21 | - This page, when viewed online is at http://pythonhosted.org/pyserial/ . |
cliechti | 2297814 | 2009-07-21 01:58:11 +0000 | [diff] [blame] | 22 | |
cliechti | 5134aab | 2009-07-21 19:47:59 +0000 | [diff] [blame] | 23 | .. _LICENSE: appendix.html#license |
Chris Liechti | 90570b9 | 2015-08-04 03:32:02 +0200 | [diff] [blame^] | 24 | .. _`project page on GitHub`: https://github.com/pyserial/pyserial/ |
cliechti | 4cb9466 | 2013-10-17 03:17:50 +0000 | [diff] [blame] | 25 | .. _`Download Page`: http://pypi.python.org/pypi/pyserial |
cliechti | 2297814 | 2009-07-21 01:58:11 +0000 | [diff] [blame] | 26 | |
| 27 | |
| 28 | Features |
| 29 | ======== |
cliechti | ec4ac1b | 2009-08-02 00:47:21 +0000 | [diff] [blame] | 30 | - Same class based interface on all supported platforms. |
| 31 | - Access to the port settings through Python properties. |
| 32 | - Support for different byte sizes, stop bits, parity and flow control with |
cliechti | 5134aab | 2009-07-21 19:47:59 +0000 | [diff] [blame] | 33 | RTS/CTS and/or Xon/Xoff. |
cliechti | ec4ac1b | 2009-08-02 00:47:21 +0000 | [diff] [blame] | 34 | - Working with or without receive timeout. |
| 35 | - File like API with "read" and "write" ("readline" etc. also supported). |
| 36 | - The files in this package are 100% pure Python. |
| 37 | - The port is set up for binary transmission. No NULL byte stripping, CR-LF |
cliechti | 2297814 | 2009-07-21 01:58:11 +0000 | [diff] [blame] | 38 | translation etc. (which are many times enabled for POSIX.) This makes this |
| 39 | module universally useful. |
Chris Liechti | 90570b9 | 2015-08-04 03:32:02 +0200 | [diff] [blame^] | 40 | - Compatible with :mod:`io` library |
cliechti | a2d8f96 | 2009-08-10 23:59:27 +0000 | [diff] [blame] | 41 | - RFC 2217 client (experimental), server provided in the examples. |
cliechti | 2297814 | 2009-07-21 01:58:11 +0000 | [diff] [blame] | 42 | |
| 43 | |
| 44 | Requirements |
| 45 | ============ |
Chris Liechti | 90570b9 | 2015-08-04 03:32:02 +0200 | [diff] [blame^] | 46 | - Python 2.7 or newer, including Python 3.4 and newer |
cliechti | ec4ac1b | 2009-08-02 00:47:21 +0000 | [diff] [blame] | 47 | - "Java Communications" (JavaComm) or compatible extension for Java/Jython |
cliechti | 2297814 | 2009-07-21 01:58:11 +0000 | [diff] [blame] | 48 | |
cliechti | 5134aab | 2009-07-21 19:47:59 +0000 | [diff] [blame] | 49 | |
cliechti | 2297814 | 2009-07-21 01:58:11 +0000 | [diff] [blame] | 50 | Installation |
| 51 | ============ |
| 52 | |
| 53 | pyserial |
| 54 | -------- |
cliechti | 5134aab | 2009-07-21 19:47:59 +0000 | [diff] [blame] | 55 | This installs a package that can be used from Python (``import serial``). |
cliechti | 2297814 | 2009-07-21 01:58:11 +0000 | [diff] [blame] | 56 | |
cliechti | 4cb9466 | 2013-10-17 03:17:50 +0000 | [diff] [blame] | 57 | To install for all users on the system, administrator rights (root) |
| 58 | may be required. |
| 59 | |
| 60 | From PyPI |
| 61 | ~~~~~~~~~ |
| 62 | pySerial can be installed from PyPI, either manually downloading the |
| 63 | files and installing as described below or using:: |
| 64 | |
| 65 | pip install pyserial |
| 66 | |
| 67 | or:: |
| 68 | |
| 69 | easy_install -U pyserial |
cliechti | 2297814 | 2009-07-21 01:58:11 +0000 | [diff] [blame] | 70 | |
| 71 | From source (tar.gz or checkout) |
| 72 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
cliechti | 5c72e4d | 2010-07-21 14:04:54 +0000 | [diff] [blame] | 73 | Download the archive from http://pypi.python.org/pypi/pyserial. |
cliechti | 2297814 | 2009-07-21 01:58:11 +0000 | [diff] [blame] | 74 | Unpack the archive, enter the ``pyserial-x.y`` directory and run:: |
| 75 | |
| 76 | python setup.py install |
| 77 | |
cliechti | 5c72e4d | 2010-07-21 14:04:54 +0000 | [diff] [blame] | 78 | For Python 3.x:: |
| 79 | |
| 80 | python3 setup.py install |
| 81 | |
cliechti | 2297814 | 2009-07-21 01:58:11 +0000 | [diff] [blame] | 82 | Packages |
| 83 | ~~~~~~~~ |
| 84 | There are also packaged versions for some Linux distributions and Windows: |
| 85 | |
| 86 | Debian/Ubuntu |
cliechti | 5c72e4d | 2010-07-21 14:04:54 +0000 | [diff] [blame] | 87 | A package is available under the name "python-serial". Note that some |
cliechti | 4cb9466 | 2013-10-17 03:17:50 +0000 | [diff] [blame] | 88 | distributions may package an older version of pySerial. |
cliechti | 2297814 | 2009-07-21 01:58:11 +0000 | [diff] [blame] | 89 | |
| 90 | Windows |
| 91 | There is also a Windows installer for end users. It is located in the |
cliechti | 4cb9466 | 2013-10-17 03:17:50 +0000 | [diff] [blame] | 92 | PyPi_. Developers also may be interested to get the source archive, |
| 93 | because it contains examples, tests and the this documentation. |
cliechti | 2297814 | 2009-07-21 01:58:11 +0000 | [diff] [blame] | 94 | |
| 95 | .. _PyPi: http://pypi.python.org/pypi/pyserial |
| 96 | |
| 97 | |
| 98 | References |
| 99 | ========== |
cliechti | 86e8787 | 2009-07-21 13:32:45 +0000 | [diff] [blame] | 100 | * Python: http://www.python.org/ |
cliechti | 86e8787 | 2009-07-21 13:32:45 +0000 | [diff] [blame] | 101 | * Jython: http://www.jython.org/ |
cliechti | 5134aab | 2009-07-21 19:47:59 +0000 | [diff] [blame] | 102 | * Java@IBM: http://www-106.ibm.com/developerworks/java/jdk/ (JavaComm links are |
| 103 | on the download page for the respective platform JDK) |
| 104 | * Java@SUN: http://java.sun.com/products/ |
cliechti | 2297814 | 2009-07-21 01:58:11 +0000 | [diff] [blame] | 105 | * IronPython: http://www.codeplex.com/IronPython |
| 106 | * setuptools: http://peak.telecommunity.com/DevCenter/setuptools |
| 107 | |
| 108 | |
| 109 | Older Versions |
| 110 | ============== |
cliechti | 4cb9466 | 2013-10-17 03:17:50 +0000 | [diff] [blame] | 111 | Older versions are still available in the old download_ page. pySerial 1.21 |
| 112 | is compatible with Python 2.0 on Windows, Linux and several un*x like systems, |
cliechti | 2297814 | 2009-07-21 01:58:11 +0000 | [diff] [blame] | 113 | MacOSX and Jython. |
| 114 | |
cliechti | daf47ba | 2009-07-28 01:28:16 +0000 | [diff] [blame] | 115 | On windows releases older than 2.5 will depend on pywin32_ (previously known as |
| 116 | win32all) |
cliechti | 6066f84 | 2009-07-24 00:05:45 +0000 | [diff] [blame] | 117 | |
Chris Liechti | 90570b9 | 2015-08-04 03:32:02 +0200 | [diff] [blame^] | 118 | .. _download: https://pypi.python.org/pypi/pyserial |
cliechti | 6066f84 | 2009-07-24 00:05:45 +0000 | [diff] [blame] | 119 | .. _pywin32: http://pypi.python.org/pypi/pywin32 |