blob: 939882ad4e72c8177da6ca14197ff6de060c472c [file] [log] [blame]
cliechti22978142009-07-21 01:58:11 +00001==========
2 pySerial
3==========
4
5Overview
6========
Chris Liechti418262d2015-10-01 23:25:17 +02007
cliechti22978142009-07-21 01:58:11 +00008This module encapsulates the access for the serial port. It provides backends
Chris Liechti418262d2015-10-01 23:25:17 +02009for Python_ running on Windows, OSX, Linux, BSD (possibly any POSIX compliant
10system) and IronPython. The module named "serial" automatically selects the
11appropriate backend.
cliechti22978142009-07-21 01:58:11 +000012
cliechti5134aab2009-07-21 19:47:59 +000013It is released under a free software license, see LICENSE_ for more
cliechti22978142009-07-21 01:58:11 +000014details.
15
Chris Liechti19688bf2016-05-06 23:48:36 +020016Copyright (C) 2001-2016 Chris Liechti <cliechti(at)gmx.net>
cliechti22978142009-07-21 01:58:11 +000017
cliechti8e814dc2009-07-30 22:19:08 +000018Other pages (online)
cliechti22978142009-07-21 01:58:11 +000019
Chris Liechti90570b92015-08-04 03:32:02 +020020- `project page on GitHub`_
cliechti4cb94662013-10-17 03:17:50 +000021- `Download Page`_ with releases (PyPi)
Chris Liechti2c278a82016-05-02 23:51:59 +020022- This page, when viewed online is at https://pyserial.readthedocs.io/en/latest/ or
Chris Liechti418262d2015-10-01 23:25:17 +020023 http://pythonhosted.org/pyserial/ .
cliechti22978142009-07-21 01:58:11 +000024
Chris Liechti418262d2015-10-01 23:25:17 +020025.. _Python: http://python.org/
cliechti5134aab2009-07-21 19:47:59 +000026.. _LICENSE: appendix.html#license
Chris Liechti90570b92015-08-04 03:32:02 +020027.. _`project page on GitHub`: https://github.com/pyserial/pyserial/
cliechti4cb94662013-10-17 03:17:50 +000028.. _`Download Page`: http://pypi.python.org/pypi/pyserial
cliechti22978142009-07-21 01:58:11 +000029
30
31Features
32========
cliechtiec4ac1b2009-08-02 00:47:21 +000033- Same class based interface on all supported platforms.
34- Access to the port settings through Python properties.
35- Support for different byte sizes, stop bits, parity and flow control with
cliechti5134aab2009-07-21 19:47:59 +000036 RTS/CTS and/or Xon/Xoff.
cliechtiec4ac1b2009-08-02 00:47:21 +000037- Working with or without receive timeout.
38- File like API with "read" and "write" ("readline" etc. also supported).
39- The files in this package are 100% pure Python.
40- The port is set up for binary transmission. No NULL byte stripping, CR-LF
cliechti22978142009-07-21 01:58:11 +000041 translation etc. (which are many times enabled for POSIX.) This makes this
42 module universally useful.
Chris Liechti90570b92015-08-04 03:32:02 +020043- Compatible with :mod:`io` library
cliechtia2d8f962009-08-10 23:59:27 +000044- RFC 2217 client (experimental), server provided in the examples.
cliechti22978142009-07-21 01:58:11 +000045
46
47Requirements
48============
Chris Liechti90570b92015-08-04 03:32:02 +020049- Python 2.7 or newer, including Python 3.4 and newer
cliechtiec4ac1b2009-08-02 00:47:21 +000050- "Java Communications" (JavaComm) or compatible extension for Java/Jython
cliechti22978142009-07-21 01:58:11 +000051
cliechti5134aab2009-07-21 19:47:59 +000052
cliechti22978142009-07-21 01:58:11 +000053Installation
54============
55
Chris Liechtid389f8a2016-07-11 23:32:21 +020056pySerial
cliechti22978142009-07-21 01:58:11 +000057--------
cliechti5134aab2009-07-21 19:47:59 +000058This installs a package that can be used from Python (``import serial``).
cliechti22978142009-07-21 01:58:11 +000059
cliechti4cb94662013-10-17 03:17:50 +000060To install for all users on the system, administrator rights (root)
61may be required.
62
63From PyPI
64~~~~~~~~~
Chris Liechtid389f8a2016-07-11 23:32:21 +020065pySerial can be installed from PyPI::
cliechti4cb94662013-10-17 03:17:50 +000066
Chris Liechtid389f8a2016-07-11 23:32:21 +020067 python -m pip install pyserial
cliechti4cb94662013-10-17 03:17:50 +000068
Chris Liechtid389f8a2016-07-11 23:32:21 +020069Using the `python`/`python3` executable of the desired version (2.x/3.x).
cliechti22978142009-07-21 01:58:11 +000070
71From source (tar.gz or checkout)
72~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Chris Liechtid389f8a2016-07-11 23:32:21 +020073Download the archive from http://pypi.python.org/pypi/pyserial or
74https://github.com/pyserial/pyserial/releases.
cliechti22978142009-07-21 01:58:11 +000075Unpack the archive, enter the ``pyserial-x.y`` directory and run::
76
77 python setup.py install
78
Chris Liechtid389f8a2016-07-11 23:32:21 +020079Using the `python`/`python3` executable of the desired version (2.x/3.x).
cliechti5c72e4d2010-07-21 14:04:54 +000080
cliechti22978142009-07-21 01:58:11 +000081Packages
82~~~~~~~~
83There are also packaged versions for some Linux distributions and Windows:
84
85Debian/Ubuntu
Chris Liechtid389f8a2016-07-11 23:32:21 +020086 A package is available under the name "python-serial" or similar. Note
87 that some distributions may package an older version of pySerial.
cliechti22978142009-07-21 01:58:11 +000088
89Windows
Chris Liechtid389f8a2016-07-11 23:32:21 +020090 There is a "wheel" file for end users. It is located in the PyPi_.
91 Developers also may be interested to get the source archive,
cliechti4cb94662013-10-17 03:17:50 +000092 because it contains examples, tests and the this documentation.
cliechti22978142009-07-21 01:58:11 +000093
94.. _PyPi: http://pypi.python.org/pypi/pyserial
95
96
97References
98==========
cliechti86e87872009-07-21 13:32:45 +000099* Python: http://www.python.org/
cliechti86e87872009-07-21 13:32:45 +0000100* Jython: http://www.jython.org/
cliechti5134aab2009-07-21 19:47:59 +0000101* Java@IBM: http://www-106.ibm.com/developerworks/java/jdk/ (JavaComm links are
102 on the download page for the respective platform JDK)
103* Java@SUN: http://java.sun.com/products/
cliechti22978142009-07-21 01:58:11 +0000104* IronPython: http://www.codeplex.com/IronPython
105* setuptools: http://peak.telecommunity.com/DevCenter/setuptools
106
107
108Older Versions
109==============
cliechti4cb94662013-10-17 03:17:50 +0000110Older versions are still available in the old download_ page. pySerial 1.21
111is compatible with Python 2.0 on Windows, Linux and several un*x like systems,
cliechti22978142009-07-21 01:58:11 +0000112MacOSX and Jython.
113
Chris Liechtid389f8a2016-07-11 23:32:21 +0200114On Windows, releases older than 2.5 will depend on pywin32_ (previously known as
cliechtidaf47ba2009-07-28 01:28:16 +0000115win32all)
cliechti6066f842009-07-24 00:05:45 +0000116
Chris Liechti90570b92015-08-04 03:32:02 +0200117.. _download: https://pypi.python.org/pypi/pyserial
cliechti6066f842009-07-24 00:05:45 +0000118.. _pywin32: http://pypi.python.org/pypi/pywin32