blob: bedef793f936de8d7b836121cdef3e243ea330f3 [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
cliechti4cb94662013-10-17 03:17:50 +000015Copyright (C) 2001-2013 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
cliechti8e814dc2009-07-30 22:19:08 +000019- `project page on SourceForge`_
20- `SVN repository`_
cliechti4cb94662013-10-17 03:17:50 +000021- `Download Page`_ with releases (PyPi)
cliechti8e814dc2009-07-30 22:19:08 +000022- This page, when viewed online is at http://pyserial.sf.net.
cliechti22978142009-07-21 01:58:11 +000023
cliechti5134aab2009-07-21 19:47:59 +000024.. _LICENSE: appendix.html#license
cliechti22978142009-07-21 01:58:11 +000025.. _`project page on SourceForge`: http://sourceforge.net/projects/pyserial/
cliechti4cb94662013-10-17 03:17:50 +000026.. _`SVN repository`: http://svn.code.sf.net/p/pyserial/code/trunk
27.. _`Download Page`: http://pypi.python.org/pypi/pyserial
cliechti22978142009-07-21 01:58:11 +000028
29
30Features
31========
cliechtiec4ac1b2009-08-02 00:47:21 +000032- Same class based interface on all supported platforms.
33- Access to the port settings through Python properties.
34- Support for different byte sizes, stop bits, parity and flow control with
cliechti5134aab2009-07-21 19:47:59 +000035 RTS/CTS and/or Xon/Xoff.
cliechtiec4ac1b2009-08-02 00:47:21 +000036- Working with or without receive timeout.
37- File like API with "read" and "write" ("readline" etc. also supported).
38- The files in this package are 100% pure Python.
39- The port is set up for binary transmission. No NULL byte stripping, CR-LF
cliechti22978142009-07-21 01:58:11 +000040 translation etc. (which are many times enabled for POSIX.) This makes this
41 module universally useful.
cliechtiec4ac1b2009-08-02 00:47:21 +000042- Compatible with :mod:`io` library (Python 2.6+)
cliechtia2d8f962009-08-10 23:59:27 +000043- RFC 2217 client (experimental), server provided in the examples.
cliechti22978142009-07-21 01:58:11 +000044
45
46Requirements
47============
cliechtiec4ac1b2009-08-02 00:47:21 +000048- Python 2.3 or newer, including Python 3.x
cliechti4cb94662013-10-17 03:17:50 +000049- ctypes extension on Windows (is in standard library since Python 2.5+)
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
56pyserial
57--------
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~~~~~~~~~
65pySerial can be installed from PyPI, either manually downloading the
66files and installing as described below or using::
67
68 pip install pyserial
69
70or::
71
72 easy_install -U pyserial
cliechti22978142009-07-21 01:58:11 +000073
74From source (tar.gz or checkout)
75~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cliechti5c72e4d2010-07-21 14:04:54 +000076Download the archive from http://pypi.python.org/pypi/pyserial.
cliechti22978142009-07-21 01:58:11 +000077Unpack the archive, enter the ``pyserial-x.y`` directory and run::
78
79 python setup.py install
80
cliechti5c72e4d2010-07-21 14:04:54 +000081For Python 3.x::
82
83 python3 setup.py install
84
cliechti22978142009-07-21 01:58:11 +000085Packages
86~~~~~~~~
87There are also packaged versions for some Linux distributions and Windows:
88
89Debian/Ubuntu
cliechti5c72e4d2010-07-21 14:04:54 +000090 A package is available under the name "python-serial". Note that some
cliechti4cb94662013-10-17 03:17:50 +000091 distributions may package an older version of pySerial.
cliechti22978142009-07-21 01:58:11 +000092
93Windows
94 There is also a Windows installer for end users. It is located in the
cliechti4cb94662013-10-17 03:17:50 +000095 PyPi_. Developers also may be interested to get the source archive,
96 because it contains examples, tests and the this documentation.
cliechti22978142009-07-21 01:58:11 +000097
98.. _PyPi: http://pypi.python.org/pypi/pyserial
99
100
101References
102==========
cliechti86e87872009-07-21 13:32:45 +0000103* Python: http://www.python.org/
cliechti86e87872009-07-21 13:32:45 +0000104* Jython: http://www.jython.org/
cliechti5134aab2009-07-21 19:47:59 +0000105* Java@IBM: http://www-106.ibm.com/developerworks/java/jdk/ (JavaComm links are
106 on the download page for the respective platform JDK)
107* Java@SUN: http://java.sun.com/products/
cliechti22978142009-07-21 01:58:11 +0000108* IronPython: http://www.codeplex.com/IronPython
109* setuptools: http://peak.telecommunity.com/DevCenter/setuptools
110
111
112Older Versions
113==============
cliechti4cb94662013-10-17 03:17:50 +0000114Older versions are still available in the old download_ page. pySerial 1.21
115is compatible with Python 2.0 on Windows, Linux and several un*x like systems,
cliechti22978142009-07-21 01:58:11 +0000116MacOSX and Jython.
117
cliechtidaf47ba2009-07-28 01:28:16 +0000118On windows releases older than 2.5 will depend on pywin32_ (previously known as
119win32all)
cliechti6066f842009-07-24 00:05:45 +0000120
cliechti4cb94662013-10-17 03:17:50 +0000121.. _download: http://sourceforge.net/projects/pyserial/files/pyserial/
cliechti6066f842009-07-24 00:05:45 +0000122.. _pywin32: http://pypi.python.org/pypi/pywin32