blob: 7e925d16dee11d2ddc39f15c9261aa7b8737775d [file] [log] [blame]
cliechti22978142009-07-21 01:58:11 +00001==========
2 pySerial
3==========
4
5Overview
6========
7This module encapsulates the access for the serial port. It provides backends
8for Python running on Windows, Linux, BSD (possibly any POSIX compliant
9system), Jython and IronPython (.NET and Mono). The module named "serial"
10automatically selects the appropriate backend.
11
cliechti5134aab2009-07-21 19:47:59 +000012It is released under a free software license, see LICENSE_ for more
cliechti22978142009-07-21 01:58:11 +000013details.
14
Chris Liechti90570b92015-08-04 03:32:02 +020015Copyright (C) 2001-2015 Chris Liechti <cliechti(at)gmx.net>
cliechti22978142009-07-21 01:58:11 +000016
cliechti8e814dc2009-07-30 22:19:08 +000017Other pages (online)
cliechti22978142009-07-21 01:58:11 +000018
Chris Liechti90570b92015-08-04 03:32:02 +020019- `project page on GitHub`_
cliechti4cb94662013-10-17 03:17:50 +000020- `Download Page`_ with releases (PyPi)
Chris Liechti90570b92015-08-04 03:32:02 +020021- This page, when viewed online is at http://pythonhosted.org/pyserial/ .
cliechti22978142009-07-21 01:58:11 +000022
cliechti5134aab2009-07-21 19:47:59 +000023.. _LICENSE: appendix.html#license
Chris Liechti90570b92015-08-04 03:32:02 +020024.. _`project page on GitHub`: https://github.com/pyserial/pyserial/
cliechti4cb94662013-10-17 03:17:50 +000025.. _`Download Page`: http://pypi.python.org/pypi/pyserial
cliechti22978142009-07-21 01:58:11 +000026
27
28Features
29========
cliechtiec4ac1b2009-08-02 00:47:21 +000030- 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
cliechti5134aab2009-07-21 19:47:59 +000033 RTS/CTS and/or Xon/Xoff.
cliechtiec4ac1b2009-08-02 00:47:21 +000034- 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
cliechti22978142009-07-21 01:58:11 +000038 translation etc. (which are many times enabled for POSIX.) This makes this
39 module universally useful.
Chris Liechti90570b92015-08-04 03:32:02 +020040- Compatible with :mod:`io` library
cliechtia2d8f962009-08-10 23:59:27 +000041- RFC 2217 client (experimental), server provided in the examples.
cliechti22978142009-07-21 01:58:11 +000042
43
44Requirements
45============
Chris Liechti90570b92015-08-04 03:32:02 +020046- Python 2.7 or newer, including Python 3.4 and newer
cliechtiec4ac1b2009-08-02 00:47:21 +000047- "Java Communications" (JavaComm) or compatible extension for Java/Jython
cliechti22978142009-07-21 01:58:11 +000048
cliechti5134aab2009-07-21 19:47:59 +000049
cliechti22978142009-07-21 01:58:11 +000050Installation
51============
52
53pyserial
54--------
cliechti5134aab2009-07-21 19:47:59 +000055This installs a package that can be used from Python (``import serial``).
cliechti22978142009-07-21 01:58:11 +000056
cliechti4cb94662013-10-17 03:17:50 +000057To install for all users on the system, administrator rights (root)
58may be required.
59
60From PyPI
61~~~~~~~~~
62pySerial can be installed from PyPI, either manually downloading the
63files and installing as described below or using::
64
65 pip install pyserial
66
67or::
68
69 easy_install -U pyserial
cliechti22978142009-07-21 01:58:11 +000070
71From source (tar.gz or checkout)
72~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cliechti5c72e4d2010-07-21 14:04:54 +000073Download the archive from http://pypi.python.org/pypi/pyserial.
cliechti22978142009-07-21 01:58:11 +000074Unpack the archive, enter the ``pyserial-x.y`` directory and run::
75
76 python setup.py install
77
cliechti5c72e4d2010-07-21 14:04:54 +000078For Python 3.x::
79
80 python3 setup.py install
81
cliechti22978142009-07-21 01:58:11 +000082Packages
83~~~~~~~~
84There are also packaged versions for some Linux distributions and Windows:
85
86Debian/Ubuntu
cliechti5c72e4d2010-07-21 14:04:54 +000087 A package is available under the name "python-serial". Note that some
cliechti4cb94662013-10-17 03:17:50 +000088 distributions may package an older version of pySerial.
cliechti22978142009-07-21 01:58:11 +000089
90Windows
91 There is also a Windows installer for end users. It is located in the
cliechti4cb94662013-10-17 03:17:50 +000092 PyPi_. Developers also may be interested to get the source archive,
93 because it contains examples, tests and the this documentation.
cliechti22978142009-07-21 01:58:11 +000094
95.. _PyPi: http://pypi.python.org/pypi/pyserial
96
97
98References
99==========
cliechti86e87872009-07-21 13:32:45 +0000100* Python: http://www.python.org/
cliechti86e87872009-07-21 13:32:45 +0000101* Jython: http://www.jython.org/
cliechti5134aab2009-07-21 19:47:59 +0000102* 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/
cliechti22978142009-07-21 01:58:11 +0000105* IronPython: http://www.codeplex.com/IronPython
106* setuptools: http://peak.telecommunity.com/DevCenter/setuptools
107
108
109Older Versions
110==============
cliechti4cb94662013-10-17 03:17:50 +0000111Older versions are still available in the old download_ page. pySerial 1.21
112is compatible with Python 2.0 on Windows, Linux and several un*x like systems,
cliechti22978142009-07-21 01:58:11 +0000113MacOSX and Jython.
114
cliechtidaf47ba2009-07-28 01:28:16 +0000115On windows releases older than 2.5 will depend on pywin32_ (previously known as
116win32all)
cliechti6066f842009-07-24 00:05:45 +0000117
Chris Liechti90570b92015-08-04 03:32:02 +0200118.. _download: https://pypi.python.org/pypi/pyserial
cliechti6066f842009-07-24 00:05:45 +0000119.. _pywin32: http://pypi.python.org/pypi/pywin32