Sunday, March 10, 2013

As you may know from our earlier post we have completely shifted our developments to Linux. This post is to describe the process of installing the pyserial package into Linux.
You can visit the pyserial page for locating the documentation:

Here is the step by step process to perform the installation:
[1] Getting the Files
You need to download the pyserial:
If this download link is not valid then go to:
You might observe that the version that we are downloading is the Python 2.6 supported but do not worry - we have tested this and it works for Python 2.7.

[2] Check if you have python installation in Linux
We are using Ubuntu 12.04 version of Linux so our package updater is 'apt-get'.
In Ubuntu we have python 2.7 available by default. However for some other Linux distros that might not be the case, so try to check for online help regarding installation of python v2.7/v2.6 into your specific Linux distribution.
To test if python is present or not type python in the terminal window. you would get a prompt like this:
Python 2.7.3 (default, Aug  1 2012, 05:16:07)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
Next type - exit() - this would exit python interpreter and bring you back to the shell prompt
[3] Extract and install the pyserial package
The pyserial package is a tar.gz type archive so you need first go to the directory where it has been downloaded in the terminal.
Next give the following set of commands:
  1. Extract the Archive
    tar -zxvf pyserial-2.6.tar.gz
  2. Go the pyserial directory
    cd pyserial-2.6
  3. Build the package
    python build
  4. Install the package
    sudo python install
Now the package is ready to use and installed.

[4] Testing the installation

The pyserial package comes with the scripted python program. We would use this to test pyserial installation. We have connected a USB to Serial Pl2303 based converter at /dev/ttyUSB0
We can use this miniterm tool to connect to the serial terminal at 9600 baud rate.
Give the following command on the terminal prompt: -p /dev/ttyUSB0
You would get the following prompt:
--- Miniterm on /dev/ttyUSB0: 9600,8,N,1 ---
--- Quit: Ctrl+]  |  Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---

This means that the pyserial is successfully installed and ready for use. Hope this article has been helpful. Let us know your suggestions and feedback.

{ 1 Discuss... read them below or add one }

  1. Thanks for providing this informative information you may also refer.


Welcome to Boseji's Blog

Popular Post

Blogger templates


Creation by Electronics Hobbyists from Bharat(India) to encourage & help people. This blog hosts the numerous innovations, discoveries and projects we provide.
Our Research Wing Adhar Labs
Contact Form | Email Address
We Support Open Source Hardware Definition v1.0
Creative Commons License
All works on this blog are licensed under a
Creative Commons Attribution-ShareAlike 3.0 Unported License.
Based on a work at and

Permissions beyond the scope of this license may be available at
Thank you for all your support.

© A.D.H.A.R Labs Research 2008-2013 . Powered by Blogger.

Follow by Email


PCB Unit Converter


- Copyright © Electronics for Bharat -Robotic Notes- Powered by Blogger - Designed by Johanes Djogan -