Python Serial port Access

Python can be used to read from seril port but API is problematic.

Page 1 of 1

1 Replies - 7325 Views - Last Post: 01 July 2009 - 03:07 AM Rate Topic: -----

#1 ninad.a  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 24-June 09

Python Serial port Access

Posted 24 June 2009 - 09:48 PM

Can some one please tell if this is due to Windows XP or code? The python script is an integral part of the application.
port=serial.Serial(4) #installed usb-serial COM port is COM5
throws
SerialException : could not open port:(2,'CreateFile','The system cannot find the file specified')

Is This A Good Question/Topic? 0
  • +

Replies To: Python Serial port Access

#2 ninad.a  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 24-June 09

Re: Python Serial port Access

Posted 01 July 2009 - 03:07 AM

View Postninad.a, on 24 Jun, 2009 - 08:48 PM, said:

Can some one please tell if this is due to Windows XP or code? The python script is an integral part of the application.
port=serial.Serial(4) #installed usb-serial COM port is COM5
throws
SerialException : could not open port:(2,'CreateFile','The system cannot find the file specified')


The smartRFID reader connected through serial port- can save settings from last time i.e COM<1-256->
so when running script I had to first make power connection 1ce on-off, then connect it thru USB-serial and configure it properly
thru device manager and set port in
serial.Serial(<port no.>)
and then run middleware code so that access is available.

Note: all python mdules and USB-serial driver need be installed proprly
port no.=COM<no>-1


View Postninad.a, on 24 Jun, 2009 - 08:48 PM, said:

Can some one please tell if this is due to Windows XP or code? The python script is an integral part of the application.
port=serial.Serial(4) #installed usb-serial COM port is COM5
throws
SerialException : could not open port:(2,'CreateFile','The system cannot find the file specified')


The smartRFID reader connected through serial port- can save settings from last time i.e COM<1-256->
so when running script I had to first make power connection 1ce on-off, then connect it thru USB-serial and configure it properly
thru device manager and set port in
serial.Serial(<port no.>)
and then run middleware code so that access is available.

Note: all python mdules and USB-serial driver need be installed proprly
port no.=COM<no>-1
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1