Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #44088

Re: Serial Port Issue

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder7.xlned.com!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <phil@petrasoft.net>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.033
X-Spam-Evidence '*H*': 0.93; '*S*': 0.00; '%s"': 0.09; '22,': 0.09; 'kumar': 0.09; 'python': 0.11; 'windows': 0.15; '(2,': 0.16; '55,': 0.16; 'msg)': 0.16; 'numbering': 0.16; 'port:': 0.16; 'xppython': 0.16; 'zero.': 0.16; 'wrote:': 0.18; 'trying': 0.19; 'advance.': 0.19; 'passing': 0.19; 'subject:Issue': 0.19; 'starts': 0.20; 'import': 0.22; 'shell': 0.22; 'error': 0.23; 'cc:2**0': 0.24; 'skip:" 40': 0.26; 'header:In-Reply-To:1': 0.27; 'tried': 0.27; 'am,': 0.29; 'raise': 0.29; "i'm": 0.30; 'url:mailman': 0.30; 'code': 0.31; "skip:' 10": 0.31; 'noted': 0.31; 'file': 0.32; 'open': 0.33; 'says': 0.33; 'url:python': 0.33; 'device': 0.34; 'could': 0.34; "can't": 0.35; 'test': 0.35; 'url:listinfo': 0.36; 'thanks': 0.36; 'hi,': 0.36; 'url:org': 0.36; 'wrong': 0.37; 'operating': 0.37; 'list.': 0.37; 'received:10': 0.37; 'manager': 0.38; 'to:addr:python-list': 0.38; 'anything': 0.39; 'to:addr:python.org': 0.39; 'url:mail': 0.40; 'even': 0.60; 'commands': 0.60; 'new': 0.61; 'you.': 0.62; 'header :Message-Id:1': 0.63; 'serial': 0.72; 'phil': 0.84; 'received:10.100': 0.84; '2013,': 0.91; 'subject:Port': 0.91; 'subject:Serial': 0.91; 'system:': 0.91
X-Virus-Scanned Debian amavisd-new at petrasoft.net
Subject Re: Serial Port Issue
Mime-Version 1.0 (Apple Message framework v1283)
Content-Type multipart/alternative; boundary="Apple-Mail=_5199FDAF-3F06-49DE-80B4-C1405AB737F4"
From Phil Birkelbach <phil@petrasoft.net>
In-Reply-To <1366623248.70365.YahooMailClassic@web190503.mail.sg3.yahoo.com>
Date Mon, 22 Apr 2013 10:13:44 -0500
References <1366623248.70365.YahooMailClassic@web190503.mail.sg3.yahoo.com>
To python-list@python.org
X-Mailer Apple Mail (2.1283)
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.926.1366644089.3114.python-list@python.org> (permalink)
Lines 107
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1366644089 news.xs4all.nl 2265 [2001:888:2000:d::a6]:52256
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:44088

Show key headers only | View raw


[Multipart message — attachments visible in raw view] - view raw

Have you tried 'port=20'?

The documentation says that the port numbering starts at zero.  I don't use Windows so I can't test it for you.

You could also try port="COM21"

Phil

On Apr 22, 2013, at 4:34 AM, chandan kumar wrote:

> Hi,
> 
> I'm new to python and trying to learn serial communication using python.In this process i'm facing serial port issues.Please find the attached COMPorttest.py file ,correct me if anything wrong in the code.With my code it's always goes in to exception.I noted down the the COM port number  from windows device manager list. 
> 
> Operating system: XP
> Python Ver: 2.5
> Pyserial: 2.5
> 
> Even i tried from python shell passing below commands
> 
> import serial
> ser=ser=serial.Serial(port=21,baudrate=9600)
> 
> I observe below error on python shell
> 
> File "C:\Python25\lib\serial\serialwin32.py", line 55, in open
>     raise SerialException("could not open port: %s" % msg)
> SerialException: could not open port: (2, 'CreateFile', 'The system cannot find the file specified.')
> 
> Thanks in advance.
> 
> Best Regards,
> Chandan.
> 
> 
> 
> <COMPortTest.py><DeviceManager.PNG>-- 
> http://mail.python.org/mailman/listinfo/python-list

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Serial Port Issue Phil Birkelbach <phil@petrasoft.net> - 2013-04-22 10:13 -0500

csiph-web