473,473 Members | 1,977 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Beginner Pyserial Question

Hi Guys,

I have a project where I'd like to save GPS data that is streamed to a
Sony Vaio over bluetooth. I can monitor the data stream over Hyper
Terminal, but I'd like to use python to capture it as well. I've
installed Python 2.5, pyserial 2.2 and the appropriate pywin program
(pywin32-210.win32-py2.5.exe).

My problem comes when I try to open a serial port. After importing
"serial", I issue the following statement:
>>GPS = serial.Serial(0)
Traceback (most recent call last):
File "<pyshell#3>", line 1, in <module>
GPS = serial.Serial(0)
File "C:\Python25\lib\site-packages\serial\serialutil.py", line 156,
in __init__
self.open()
File "C:\Python25\lib\site-packages\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.')

I'm not sure where the source of the problem is. I was wondering if
someone could recognize what might be be. the Vaio is running XP
SP2. Thanks!
Jan 24 '08 #1
1 1699
I've solved the problem- Thanks for steering me in the right
direction.

The problem is that your traditional "COM1" does not exist on this
computer (Thanks Grant). A trip to the Device manager listed all the
COM ports on the computer. After successfully connecting to COM7 (port
= serial.Serial(6)), I realized the reason I couldn't connect to COM40
was because it was tied up with hyper terminal. after closing
everything, I was able to issue a readline and collect data. Thanks
for the help!

jimmy
Jan 24 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Kelia Nichols | last post by:
Hello, I am using Pyserial to work with a RS232 device. My question is, how do I write hex to the device or cannot write hex to it pyserial? Kelia Nichols...
13
by: Bob Greschke | last post by:
We have some equipment that communicates at 57600 baud RS232. The path from the PC is USB to a Phillips USB hub, then off of that a TUSB3410 USB/Serial converter. The driver for the 3410 chip...
16
by: dario | last post by:
Hi, Im new on phyton programming. On my GPRS modem with embedded Phyton 1.5.2+ version, I have to receive a string from serial port and after send this one enclosed in an e-mail. All OK if the...
4
by: Zarathustra | last post by:
Hi, where I can find the pyserial handbook?? THanks
3
by: Ron Jackson | last post by:
I am using Python 2.5 on Windows XP. I have installed Pyserial and win32all extensions. When I try to run the example program scan.py (included below), or any other program using pyserial, as...
0
by: pauland80 | last post by:
<snip> <snip> Late thanks for your both answers! (Please excuse me for that) The problem was a bug in the device firmware. But before finding this, I dugg lightly in the pyserial source...
0
by: [david] | last post by:
http://pyserial.sourceforge.net/ "port numbering starts at zero, no need to know the port name in the user program" But the implementation in SerialWin32 is just (Portnum +1)
1
by: turtleRider | last post by:
Hi, I am new to Python and non-web programming. I am using pySerial in OSX 10.5.2 (Python 2.5) to access a bluetooth module that is mapped to a device file. I can access the device with screen...
6
by: Joe G \(Home\) | last post by:
Hi All, Background =================== I have installed Python for windows today from the python web site .I also installed pySerial using the Windows installer from the sourceforge web...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.