Re: Pyserial problem

2022-12-22 Thread Barry
> On 22 Dec 2022, at 17:09, Patrick EGLOFF wrote: > > Hi all, > > I use Python 3.10.9 and Pyserial 3.5 on a Win10 machine. > > I'm sending datas via an USB port to a device that accept commands in the > form of : cmd; > The device receives and reacts to

Pyserial problem

2022-12-22 Thread Patrick EGLOFF
Hi all, I use Python 3.10.9 and Pyserial 3.5 on a Win10 machine. I'm sending datas via an USB port to a device that accept commands in the form of : cmd; The device receives and reacts to the commands sent, and it should reply with an ACK of the same kind. But looking with a COM port sn

Pyserial and some half-duplex woes.

2020-09-03 Thread Mark Barton
Hey All, I am using Microchip's Python program to download code to a PIC32 microprocessor via Pyserial. There is also Microchip's bootloader code running on the PIC side. This works very well using the a standard serial hardware directly connected to a USB to serial adapter to

Re: pyserial and end-of-line specification

2017-07-21 Thread FS
Thanks Rob. Yes I ended up with a read(1) and use a field count and a few other checks to make sure I don't get a partial record. Serial is the "best of times and worst of times". Sure beats dealing with USB enumeration, power hungry ethernet processors and a lot of other stuff. I can still "s

Re: pyserial and end-of-line specification

2017-07-19 Thread Rob Gaddi
. A little more searching on the web revealed the following: https://stackoverflow.com/questions/10222788/line-buffered-serial-input It is apparent that pySerial, or at least the documentation is falling short of my needs. It is very unclear what module in the layer is handling the buffering

Re: pyserial and end-of-line specification

2017-07-18 Thread FS
revealed the following: https://stackoverflow.com/questions/10222788/line-buffered-serial-input It is apparent that pySerial, or at least the documentation is falling short of my needs. It is very unclear what module in the layer is handling the buffering and newlines and so forth. Also

Re: pyserial and end-of-line specification

2017-07-15 Thread Andre Müller
Just take a look into the documentation: https://docs.python.org/3/library/io.html#io.TextIOWrapper And in the example of Pyserial: http://pyserial.readthedocs.io/en/latest/shortintro.html#eol I think it shold be: sio = io.TextIOWrapper(io.BufferedRWPair(ser, ser), newline='yourline_e

pyserial and end-of-line specification

2017-07-14 Thread F S
I just started using Python and I am writing code to access my serial port using pyserial. I have no problem with unix based text coming in the stream using a LF (0x0A) record separator. I also am using unblocked IO. However I have some sensor devices that use the windows CRLF (0x0A,0x0D

Best practices interfacing to device with Python's asyncio and pyserial-asyncio

2017-04-03 Thread Malte Forkel
Hello, I have written a Python package to read from and write to a serial device that uses short telegrams to communicate with sensors and actuators. My classes include one to model the transceiver (it establishes the serial connection using serial.aio.create_serial_connection) and one for the tel

Re: pySerial raw data

2016-12-11 Thread MRAB
uld like to use the TI USB serial port to capture the temperature information. The TI USB port registers as a COM port that I can access with pySerial. Now the datasheet from the temperature probe only says that the RF frequency is 433MHz and that it transmits every 39 seconds. Since I don

Re: pySerial raw data

2016-12-11 Thread Paul Rubin
Wanderer writes: > I also have a 433Mhz USB serial port jig from a TI development > tool The TI USB port registers as a COM port that I can access > with pySerial. If the TI jig has 433 mhz (LORA?) at one end and serial at the other, you have to find the port parameters in the doc

Re: pySerial raw data

2016-12-11 Thread Wanderer
ike to use the TI USB serial port to capture the temperature > > information. The TI USB port registers as a COM port that I can access with > > pySerial. Now the datasheet from the temperature probe only says that the > > RF frequency is 433MHz and that it transmits every 39 seconds

Re: pySerial raw data

2016-12-11 Thread MRAB
as a COM port that I can access with pySerial. Now the datasheet from the temperature probe only says that the RF frequency is 433MHz and that it transmits every 39 seconds. Since I don't know what protocol the thermometer uses or baud rate, I want to look at the rawest level of data coll

pySerial raw data

2016-12-11 Thread Wanderer
pySerial. Now the datasheet from the temperature probe only says that the RF frequency is 433MHz and that it transmits every 39 seconds. Since I don't know what protocol the thermometer uses or baud rate, I want to look at the rawest level of data collected with the USB com port and see if

Re: pyserial: wait for execute

2016-10-16 Thread Grant Edwards
On 2016-10-16, Michael Okuntsov wrote: > is there a way, other than time.sleep(), to be sure that the command > sent through a serial port has been fully executed? If the remote device doesn't send a response telling you it's done executing the command, then there is no way to know when that has

Re: pyserial: wait for execute

2016-10-15 Thread paulp
On Saturday, October 15, 2016 at 10:14:18 PM UTC-6, Michael Okuntsov wrote: > Hello, > is there a way, other than time.sleep(), to be sure that the command > sent through a serial port has been fully executed? I'm interested > specifically in SCPI commands in VA-meters such as Keithley and Tektro

pyserial: wait for execute

2016-10-15 Thread Michael Okuntsov
Hello, is there a way, other than time.sleep(), to be sure that the command sent through a serial port has been fully executed? I'm interested specifically in SCPI commands in VA-meters such as Keithley and Tektronix. Thanks. -- https://mail.python.org/mailman/listinfo/python-list

Re: Pyserial and Ubuntu Linux kernel 3.13.0-65-generic

2015-10-07 Thread Dave Farrance
Rob Gaddi wrote: >So, this is odd. I'm running Ubuntu 14.04, and my system did a kernel >upgrade from the repository from 3.13.0-63-generic to 3.13.0-65-generic. >And pyserial (2.7, installed through pip) stopped working. When KDE's "Plasma 5" appeared with Ku

Re: Pyserial and Ubuntu Linux kernel 3.13.0-65-generic

2015-10-06 Thread Laura Creighton
In a message of Tue, 06 Oct 2015 21:31:02 -, Grant Edwards writes: >On 2015-10-03, Laura Creighton wrote: > >> https://bugs.launchpad.net/ubuntu/+source/linux-lts-trusty/+bug/1501345 >> seems to be about a whole lot of serial ports to me, not just FTDI > >We just ran into the OP's problem wh

Re: Pyserial and Ubuntu Linux kernel 3.13.0-65-generic

2015-10-06 Thread Rob Gaddi
ing 4 hours before I figured out what the problem was. I'm not sure if these are Ubuntu specific problems, but I slung some C to test and confirmed that they're not Python specific problems. Pyserial uses select(), and on Linux all of select(), poll(), and epoll() are handled at the

Re: Pyserial and Ubuntu Linux kernel 3.13.0-65-generic

2015-10-06 Thread Grant Edwards
On 2015-10-03, Laura Creighton wrote: > https://bugs.launchpad.net/ubuntu/+source/linux-lts-trusty/+bug/1501345 > seems to be about a whole lot of serial ports to me, not just FTDI We just ran into the OP's problem where I work: Ununtu kernel updated and all serial ports stopped working (it is

Re: Pyserial and Ubuntu Linux kernel 3.13.0-65-generic

2015-10-05 Thread Rob Gaddi
nel >>>upgrade from the repository from 3.13.0-63-generic to >>>3.13.0-65-generic. And pyserial (2.7, installed through pip) stopped >>>working. >>> >>>Specifically, when I make read() calls on a Serial object, I get the >>>error >>> >

Re: Pyserial and Ubuntu Linux kernel 3.13.0-65-generic

2015-10-03 Thread Laura Creighton
In a message of Sat, 03 Oct 2015 08:38:53 -0600, Michael Torrie writes: >On 10/03/2015 03:19 AM, Laura Creighton wrote: >> With better searching, I find this bug. >> https://bugs.launchpad.net/ubuntu/+source/linux-lts-trusty/+bug/1501345 >> >> Looks like that's the real one. > >This ubuntu bug and

Re: Pyserial and Ubuntu Linux kernel 3.13.0-65-generic

2015-10-03 Thread Michael Torrie
On 10/03/2015 03:19 AM, Laura Creighton wrote: > With better searching, I find this bug. > https://bugs.launchpad.net/ubuntu/+source/linux-lts-trusty/+bug/1501345 > > Looks like that's the real one. This ubuntu bug and the other bug you mention seem to be about FTDI devices. Rob said in his origi

Re: Pyserial and Ubuntu Linux kernel 3.13.0-65-generic

2015-10-03 Thread Laura Creighton
With better searching, I find this bug. https://bugs.launchpad.net/ubuntu/+source/linux-lts-trusty/+bug/1501345 Looks like that's the real one. Laura -- https://mail.python.org/mailman/listinfo/python-list

Re: Pyserial and Ubuntu Linux kernel 3.13.0-65-generic

2015-10-03 Thread Laura Creighton
-65-generic. >>And pyserial (2.7, installed through pip) stopped working. >> >>Specifically, when I make read() calls on a Serial object, I get the error >> >>serial.serialutil.SerialException: device reports readiness to read but >>returned no data (device

Re: Pyserial and Ubuntu Linux kernel 3.13.0-65-generic

2015-10-03 Thread Laura Creighton
In a message of Fri, 02 Oct 2015 22:36:23 -, Rob Gaddi writes: >So, this is odd. I'm running Ubuntu 14.04, and my system did a kernel >upgrade from the repository from 3.13.0-63-generic to 3.13.0-65-generic. >And pyserial (2.7, installed through pip) stopped working. > &g

Re: Pyserial and Ubuntu Linux kernel 3.13.0-65-generic

2015-10-02 Thread Grant Edwards
On 2015-10-02, Rob Gaddi wrote: > Also, who do I try to report this one to? I'd try here: https://github.com/pyserial/pyserial/issues -- https://mail.python.org/mailman/listinfo/python-list

Pyserial and Ubuntu Linux kernel 3.13.0-65-generic

2015-10-02 Thread Rob Gaddi
So, this is odd. I'm running Ubuntu 14.04, and my system did a kernel upgrade from the repository from 3.13.0-63-generic to 3.13.0-65-generic. And pyserial (2.7, installed through pip) stopped working. Specifically, when I make read() calls on a Serial object, I get the

Re: pyserial and threads

2015-09-17 Thread Chris Angelico
#x27;ve never worked with serial ports in this way. What you'd want is some form of call that says "write these bytes if you can, but don't if you can't, and just tell me how many you wrote". A quick look at the pyserial docs suggests that you may be able to accomplish this by

Re: pyserial and threads

2015-09-17 Thread pozz
Il 17/09/2015 11:42, Chris Angelico ha scritto: On Thu, Sep 17, 2015 at 7:28 PM, pozz wrote: At startup I open the ports and create and start a thread to manage the receiving. When a byte is received, I call the .write() method for all the other ports. It works, but sometimes it seems to block

Re: pyserial and threads

2015-09-17 Thread pozz
Il 17/09/2015 15:04, Dennis Lee Bieber ha scritto: On Thu, 17 Sep 2015 12:00:08 + (UTC), alister declaimed the following: I can see the data being transmitted snowballing & running away in a +ve feedback loop very easily. Especially if a few of the remote devices are configured

Re: pyserial and threads

2015-09-17 Thread pozz
Il 17/09/2015 14:00, alister ha scritto: I would like to know more about how many serial ports are connected One real serial port and two virtual serial ports, created by com0com (it's a free virtual serial port for Windows). what the equipment they are connected to does and expects. Ra

Re: pyserial and threads

2015-09-17 Thread alister
On Thu, 17 Sep 2015 11:28:04 +0200, pozz wrote: > I'm trying to create a simple program in Python that opens N serial > ports (through pyserial) and forward every byte received on one of those > ports to the other ports. > > At startup I open the ports and create and start a

Re: pyserial and threads

2015-09-17 Thread Chris Angelico
On Thu, Sep 17, 2015 at 7:28 PM, pozz wrote: > At startup I open the ports and create and start a thread to manage the > receiving. When a byte is received, I call the .write() method for all the > other ports. > > It works, but sometimes it seems to block. I think I haven't used correctly > the t

pyserial and threads

2015-09-17 Thread pozz
I'm trying to create a simple program in Python that opens N serial ports (through pyserial) and forward every byte received on one of those ports to the other ports. At startup I open the ports and create and start a thread to manage the receiving. When a byte is received, I call the .

Re: pySerial works in miniterm but not in my app

2014-11-01 Thread Dario
Ehm sorry for the neverending spam, anyway I tried from my raspberry pi and it works there: root@pi:/home/pi# python3 ./test.py b's' b'w' b' ' b'o' b'0' b'1' b' ' b'+' b' ' b'C' b'o' b'm' b'm' b'a' b'n' b'd' b' ' b'O' b'K' b'\r' b'\n' Since I need it to work on the rpi and I was using Mint only

Re: pySerial works in miniterm but not in my app

2014-11-01 Thread Dario
Il giorno sabato 1 novembre 2014 16:04:06 UTC+1, Dario ha scritto: > BUT.. plot twist: in Windows XP, the very same python code and usb adapter > are working just right (python 2.7 and pySerial 2.7). Also with c#, no issues. I compared the behaviour of mono and python (2.7 and 3.3) on th

Re: pySerial works in miniterm but not in my app

2014-11-01 Thread Dario
. BUT.. plot twist: in Windows XP, the very same python code and usb adapter are working just right (python 2.7 and pySerial 2.7). Also with c#, no issues. So one could blame the usb adapter or its drivers, but the fact is that minicom (not miniterm) always works, while miniterm only works

Re: pySerial works in miniterm but not in my app

2014-10-31 Thread Dario
Il giorno giovedì 30 ottobre 2014 23:57:40 UTC+1, Dennis Lee Bieber ha scritto: > >sw o01 + <--- I send this > How do you "send this"... I just type or paste it in miniterm and hit return. Miniterm sends the return as CR, but it also works with CRLF. > >sw o01 + Command OK <--- device does wh

pySerial works in miniterm but not in my app

2014-10-30 Thread Dario
Python 2.7.6 on Mint, pySerial 2.6 I'm trying to write a console app to control a certain device via a usb com port. In miniterm (-p /dev/ttyUSB0 -e -b 19200), I can communicate correctly with this configuration: --- Settings: /dev/ttyUSB0 19200,8,N,1 --- RTS: inactive DTR: inactive

Re: pyserial on freebsd 10.10 i386 [SOLVED]

2014-10-19 Thread Mark Lawrence
On 19/10/2014 16:06, Grant Edwards wrote: On 2014-10-18, Nagy L?szl? Zsolt wrote: Strangely, pyserial will accept the number 0, but then it tries to open a device that exists on Linux only... I'm sure Chris would be happy to accept a patch fixing that problem. Sadly to some peo

Re: pyserial on freebsd 10.10 i386 [SOLVED]

2014-10-19 Thread Grant Edwards
On 2014-10-18, Nagy L?szl? Zsolt wrote: > Strangely, pyserial will accept the number 0, but then it tries to open > a device that exists on Linux only... I'm sure Chris would be happy to accept a patch fixing that problem. -- Grant -- https://mail.python.org/mailman/listinfo/python-list

Re: pyserial on freebsd 10.10 i386 [SOLVED]

2014-10-18 Thread Nagy László Zsolt
The port parameter of serial.Serial should be /dev/ttyu0 instead of COM1, and /dev/ttyu1 instead of COM2. Strangely, pyserial will accept the number 0, but then it tries to open a device that exists on Linux only... Anyway, problem solved. -- https://mail.python.org/mailman/listinfo/python

pyserial on freebsd 10.10 i386

2014-10-18 Thread Nagy László Zsolt
I'm trying to open a serial port with pyserial on a Compaq Deskpro EN machine. Operating system is FreeBSD 10.10 RELEASE, i386. root@merleg:~ # kldload scc root@merleg:~ # python2.7 -m serial.tools.list_ports no ports found root@merleg:~ # whoami root Here are all the devices: root@m

Pyserial for Python3 in OSX?

2014-02-15 Thread eglowstein . h
I need to do some serial I/O on a Mac running OSX Mavericks. I followed the instructions at http://stackoverflow.com/questions/20082935/how-to-install-pip-for-python3-on-mac-os-x to install pyserial. OSX already had Python 2.7 and pyserial seems to work okay in 2.7, but I can't figure ou

Re: Logging data from Arduino using PySerial

2014-02-04 Thread MRAB
On 2014-02-04 04:07, Thomas wrote: I've written a script to log data from my Arduino to a csv file. The script works well enough but it's very, very slow. I'm quite new to Python and I just wanted to put this out there to see if any Python experts could help optimise my code. Here it is: [sn

Re: Logging data from Arduino using PySerial

2014-02-03 Thread Chris Angelico
On Tue, Feb 4, 2014 at 3:57 PM, Thomas wrote: > Wow...Thanks Chris! I really appreciate your suggestions (including the > stylistic ones). I'll definitely be revising my code as soon as I find the > time. As far as profiling goes, I've used timeit in the past but it's quite a > pain going throu

Re: Logging data from Arduino using PySerial

2014-02-03 Thread Thomas
Wow...Thanks Chris! I really appreciate your suggestions (including the stylistic ones). I'll definitely be revising my code as soon as I find the time. As far as profiling goes, I've used timeit in the past but it's quite a pain going through any program block by block. I wish there were a prog

Re: Logging data from Arduino using PySerial

2014-02-03 Thread Chris Angelico
On Tue, Feb 4, 2014 at 3:07 PM, Thomas wrote: > I've written a script to log data from my Arduino to a csv file. The script > works well enough but it's very, very slow. I'm quite new to Python and I > just wanted to put this out there to see if any Python experts could help > optimise my code.

Logging data from Arduino using PySerial

2014-02-03 Thread Thomas
I've written a script to log data from my Arduino to a csv file. The script works well enough but it's very, very slow. I'm quite new to Python and I just wanted to put this out there to see if any Python experts could help optimise my code. Here it is: import serial import re impor

Re: PySerial for Python 2 vs. Python 3

2014-01-01 Thread Terry Reedy
hich seems to imply that the argument needs to be an integer, rather than a string. According to a Stackoverflow issue, .write(n) will write n 0 bytes because it will send bytes(n) == n * bytes(b'\0'). PySerial is written in Python, so you could look at the .write method of the Ser

Re: PySerial for Python 2 vs. Python 3

2013-12-31 Thread Steven D'Aprano
Travis McGee wrote: > I've been working with a simple serial device that attaches to a USB > port. It takes as commands short strings. > > I wanted to use PySerial under Python 3, and, of course had the Devil's > own time getting it installed and working since every

Re: PySerial for Python 2 vs. Python 3

2013-12-31 Thread Chris Angelico
On Wed, Jan 1, 2014 at 5:39 PM, Travis McGee wrote: > Anyway, I finally got it installed, but when I try to use a statement of the > sort ser.write("string") I get an exception which seems to imply that the > argument needs to be an integer, rather than a string. Quoting the full exception would

Re: PySerial for Python 2 vs. Python 3

2013-12-31 Thread Devin Jeanpierre
On Tue, Dec 31, 2013 at 10:39 PM, Travis McGee wrote: > Anyway, I finally got it installed, but when I try to use a statement of the > sort ser.write("string") I get an exception which seems to imply that the > argument needs to be an integer, rather than a string. You will get the most help if y

PySerial for Python 2 vs. Python 3

2013-12-31 Thread Travis McGee
I've been working with a simple serial device that attaches to a USB port. It takes as commands short strings. I wanted to use PySerial under Python 3, and, of course had the Devil's own time getting it installed and working since everything is geared towards Python 2. Anyway, I f

Re: The state of pySerial

2013-05-30 Thread MRAB
On 30/05/2013 02:32, Ma Xiaojun wrote: I've already mailed the author, waiting for reply. For Windows people, downloading a exe get you pySerial 2.5, which list_ports and miniterm feature seems not included. To use 2.6, download the tar.gz and use standard "setup.py install"

Re: The state of pySerial

2013-05-29 Thread Grant Edwards
On 2013-05-29, Terry Jan Reedy wrote: > On 5/29/2013 3:47 PM, Grant Edwards wrote: >> On 2013-05-29, Ma Xiaojun wrote: [...] >>> Unforunately, pySerial project doesn't seem to have a good state. I >>> find pySerial + Python 3.3 broken on my machine (Python 2.7 i

Re: The state of pySerial

2013-05-29 Thread Ma Xiaojun
I've already mailed the author, waiting for reply. For Windows people, downloading a exe get you pySerial 2.5, which list_ports and miniterm feature seems not included. To use 2.6, download the tar.gz and use standard "setup.py install" to install it (assume you have .py associated

Re: The state of pySerial

2013-05-29 Thread MRAB
On 29/05/2013 22:38, Terry Jan Reedy wrote: On 5/29/2013 4:00 PM, William Ray Wing wrote: On May 29, 2013, at 2:23 PM, Ma Xiaojun wrote: Hi, all. pySerial is probably "the solution" for serial port programming. Physical serial port is dead on PC but USB-to-Serial give it a s

Re: The state of pySerial

2013-05-29 Thread Terry Jan Reedy
On 5/29/2013 3:47 PM, Grant Edwards wrote: On 2013-05-29, Ma Xiaojun wrote: pySerial is probably "the solution" for serial port programming. Physical serial port is dead on PC but USB-to-Serial give it a second life. Serial port stuff won't interest end users at all. But it i

Re: The state of pySerial

2013-05-29 Thread Terry Jan Reedy
On 5/29/2013 4:00 PM, William Ray Wing wrote: On May 29, 2013, at 2:23 PM, Ma Xiaojun wrote: Hi, all. pySerial is probably "the solution" for serial port programming. Physical serial port is dead on PC but USB-to-Serial give it a second life. Serial port stuff won't interest e

Re: The state of pySerial

2013-05-29 Thread William Ray Wing
On May 29, 2013, at 2:23 PM, Ma Xiaojun wrote: > Hi, all. > > pySerial is probably "the solution" for serial port programming. > Physical serial port is dead on PC but USB-to-Serial give it a second > life. Serial port stuff won't interest end users at all. Bu

Re: The state of pySerial

2013-05-29 Thread Grant Edwards
On 2013-05-29, Ma Xiaojun wrote: > pySerial is probably "the solution" for serial port programming. > Physical serial port is dead on PC but USB-to-Serial give it a second > life. Serial port stuff won't interest end users at all. But it is > still used in the EE world

The state of pySerial

2013-05-29 Thread Ma Xiaojun
Hi, all. pySerial is probably "the solution" for serial port programming. Physical serial port is dead on PC but USB-to-Serial give it a second life. Serial port stuff won't interest end users at all. But it is still used in the EE world and so on. Arduino uses it to upload progra

Re: How to set 250000 baud rate in pyserial ?

2012-10-26 Thread Michael Torrie
On 10/26/2012 04:01 PM, kura...@gmail.com wrote: > Error is like cannot set special baud rate. But as I said pyserial > set this speed without problem for ttyUSB0 So it seems pyserial uses > diefferent code depending of port type. I tried to simlink ln -s > ttyACM0 ttyUSB0 but it d

Re: How to set 250000 baud rate in pyserial ?

2012-10-26 Thread kurabas
Error is like cannot set special baud rate. But as I said pyserial set this speed without problem for ttyUSB0 So it seems pyserial uses diefferent code depending of port type. I tried to simlink ln -s ttyACM0 ttyUSB0 but it does not work On Thursday, October 25, 2012 9:11:23 PM UTC+3, Dennis

Re: How to set 250000 baud rate in pyserial ?

2012-10-25 Thread Grant Edwards
an be only set at speeds from list (no 25) in >> pyserial. How to set 25 to ttyACM0 port?? Need I patch kernel or >> python? > > You don't say what error you are receiving but looking at the source > (serialposix.py) implies that it accepts nearly anything on Linux,

How to set 250000 baud rate in pyserial ?

2012-10-25 Thread kurabas
I use Arduino 1280 and Arduino 2560 under Fedora 15. 1280 creates ttyUSB0 port and can be set at 250 successfully. 2560 creates ttyACM0 port and can be only set at speeds from list (no 25) in pyserial. How to set 25 to ttyACM0 port?? Need I patch kernel or python? -- http

Re: PySerial could not open port COM4: [Error 5] Access is denied- please help

2012-06-28 Thread Adam
ndows. I'd have to look it back up when I have the time, which I >> don't have at the moment, unfortunately. > > That doesn't have anything to do with Windows, but with how pySerial > works. See the documentation for __init__(): > > "The port is immediat

Re: PySerial could not open port COM4: [Error 5] Access is denied - please help

2012-06-28 Thread Adam
"Grant Edwards" wrote in message news:jshotj$s55$1...@reader1.panix.com... > On 2012-06-28, Adam wrote: > >> Obviously pySerial considers the serial port open > > Because it's already been opened by the Python program. > >> and will not open an a

Re: PySerial could not open port COM4: [Error 5] Access is denied - please help

2012-06-28 Thread Roel Schroeven
ave anything to do with Windows, but with how pySerial works. See the documentation for __init__(): "The port is immediately opened on object creation, when a port is given. It is not opened when port is None and a successive call to open() will be needed." So if your script

Re: PySerial could not open port COM4: [Error 5] Access is denied - please help

2012-06-28 Thread Grant Edwards
On 2012-06-28, Adam wrote: > Obviously pySerial considers the serial port open Because it's already been opened by the Python program. > and will not open an already open serial port. Pyserial will happily try if you call the open() of a port that's already open, but Window

Re: PySerial could not open port COM4: [Error 5] Access is denied - please help

2012-06-27 Thread Adam
he truth, then the program is opening the port more > than once. > > If the port wasn't already open, then calling ser.close() wouldn't do > _anything_. Here's the close() implmentation from pyserial: > >def close(self): >"""Close port&

Re: PySerial could not open port COM4: [Error 5] Access is denied - please help

2012-06-27 Thread Grant Edwards
ming your description of what you're doing is accurate. If you're telling the truth, then the program is opening the port more than once. If the port wasn't already open, then calling ser.close() wouldn't do _anything_. Here's the close() implmentation from p

Re: PySerial could not open port COM4: [Error 5] Access is denied - please help

2012-06-27 Thread Adam
"Temia Eszteri" wrote in message news:ra2nu7h75720i75ijhabg12dngrab75...@4ax.com... > On Wed, 27 Jun 2012 22:18:59 + (UTC), Grant Edwards > wrote: > >>> Can you post a small example showing what you're doing? >> >>The best way to get help is to write as small a program as possible >>that de

Re: PySerial could not open port COM4: [Error 5] Access is denied - please help

2012-06-27 Thread Temia Eszteri
On Wed, 27 Jun 2012 22:18:59 + (UTC), Grant Edwards wrote: >> Can you post a small example showing what you're doing? > >The best way to get help is to write as small a program as possible >that demonstrates the problem, and post it. I'll help you get >started... > >Does this program work? >

Re: PySerial could not open port COM4: [Error 5] Access is denied - please help

2012-06-27 Thread Grant Edwards
On 2012-06-27, Grant Edwards wrote: > On 2012-06-27, Adam wrote: >> "Grant Edwards" wrote: >>> Why do you need to open it a second time? >> >> As far as I can tell, the wireless hardware connected to the >> USB-to-serial converter is receiving data (which may have the serial >> port open?). I

Re: PySerial could not open port COM4: [Error 5] Access is denied - please help

2012-06-27 Thread Grant Edwards
On 2012-06-27, Adam wrote: > "Grant Edwards" wrote: >> On 2012-06-27, Adam wrote: >> >>> The Python script needed a call to ser.close() before ser.open() in >>> order to work. >> >> IOW, the port opened OK, but when you tried to open it a second time >> without closing it first, _that's_ when th

Re: PySerial could not open port COM4: [Error 5] Access is denied - please help

2012-06-27 Thread Adam
"Grant Edwards" wrote in message news:jsftah$bb5$1...@reader1.panix.com... > On 2012-06-27, Adam wrote: > >> The Python script needed a call to ser.close() before ser.open() in >> order to work. > > IOW, the port opened OK, but when you tried to open it a second time > without closing it first,

Re: PySerial could not open port COM4: [Error 5] Access is denied - please help

2012-06-27 Thread Grant Edwards
On 2012-06-27, Adam wrote: > The Python script needed a call to ser.close() before ser.open() in > order to work. IOW, the port opened OK, but when you tried to open it a second time without closing it first, _that's_ when the .open() call failed. That's a restriction built in to Win32. You ca

Re: PySerial could not open port COM4: [Error 5] Access is denied - please help

2012-06-27 Thread Adam
"Paul" wrote in message news:jsfhv2$ta9$1...@dont-email.me... > Adam wrote: > >> >> This is a tough one. > > Try > >handle -a > allhand.txt > > Then open the allhand.txt with Notepad and look for interesting entries. > > *** > > I tested right now, and first opened a session in HyperTerm

Re: PySerial could not open port COM4: [Error 5] Access is denied - please help

2012-06-27 Thread Paul
Adam wrote: This is a tough one. Try handle -a > allhand.txt Then open the allhand.txt with Notepad and look for interesting entries. *** I tested right now, and first opened a session in HyperTerminal with one of my USB to serial adapters. The second serial adapter, is connect to

Re: PySerial could not open port COM4: [Error 5] Access is denied - please help

2012-06-27 Thread Adam
$1cq$1...@dont-email.me... >>>>> On 6/26/2012 9:12 PM, Adam wrote: >>>>>> Host OS:Ubuntu 10.04 LTS >>>>>> Guest OS:Windows XP Pro SP3 >>>>>> >>>>>> >>>>>> I am able to open port COM4 wit

Re: PySerial could not open port COM4: [Error 5] Access is denied - please help

2012-06-27 Thread Paul
open port COM4 with Terminal emulator. So, what can cause PySerial to generate the following error ... C:\Wattcher>python wattcher.py Traceback (most recent call last): File "wattcher.py", line 56, in ser.open() File "C:\Python25\Lib\site-packages\serial\serialwi

Re: PySerial could not open port COM4: [Error 5] Access is denied - please help

2012-06-27 Thread Adam
gt; Guest OS:Windows XP Pro SP3 >>>> >>>> >>>> I am able to open port COM4 with Terminal emulator. >>>> >>>> So, what can cause PySerial to generate the following error ... >>>> >>>> C:\Wattcher>python wattcher.

Re: PySerial could not open port COM4: [Error 5] Access is denied - please help

2012-06-27 Thread Grant Edwards
ndows XP Pro SP3 >>>> >>>> I am able to open port COM4 with Terminal emulator. >>>> >>>> So, what can cause PySerial to generate the following error ... >>>> >>>> C:\Wattcher>python wattcher.py >>>> Traceback (most recen

Re: PySerial could not open port COM4: [Error 5] Access is denied - please help

2012-06-27 Thread David H. Lipman
From: "Adam" "John Nagle" wrote in message news:jse604$1cq$1...@dont-email.me... On 6/26/2012 9:12 PM, Adam wrote: Host OS:Ubuntu 10.04 LTS Guest OS:Windows XP Pro SP3 I am able to open port COM4 with Terminal emulator. So, what can cause PySerial to generate

Re: PySerial could not open port COM4: [Error 5] Access is denied - please help

2012-06-27 Thread Paul
Adam wrote: "John Nagle" wrote in message news:jse604$1cq$1...@dont-email.me... On 6/26/2012 9:12 PM, Adam wrote: Host OS:Ubuntu 10.04 LTS Guest OS:Windows XP Pro SP3 I am able to open port COM4 with Terminal emulator. So, what can cause PySerial to generate the follo

Re: PySerial could not open port COM4: [Error 5] Access is denied - please help

2012-06-27 Thread Adam
"John Nagle" wrote in message news:jse604$1cq$1...@dont-email.me... > On 6/26/2012 9:12 PM, Adam wrote: >> Host OS:Ubuntu 10.04 LTS >> Guest OS:Windows XP Pro SP3 >> >> >> I am able to open port COM4 with Terminal emulator. >> >>

Re: PySerial could not open port COM4: [Error 5] Access is denied - please help

2012-06-26 Thread John Nagle
On 6/26/2012 9:12 PM, Adam wrote: Host OS:Ubuntu 10.04 LTS Guest OS:Windows XP Pro SP3 I am able to open port COM4 with Terminal emulator. So, what can cause PySerial to generate the following error ... C:\Wattcher>python wattcher.py Traceback (most recent call last): F

PySerial could not open port COM4: [Error 5] Access is denied - please help

2012-06-26 Thread Adam
Host OS:Ubuntu 10.04 LTS Guest OS:Windows XP Pro SP3 I am able to open port COM4 with Terminal emulator. So, what can cause PySerial to generate the following error ... C:\Wattcher>python wattcher.py Traceback (most recent call last): File "wattcher.py", line 56, in

pyserial for GPS data

2012-03-15 Thread Arun p das
I have a USB GPS dongle using this for getting position information. I installed gpsd daemon so that any clients can read data from that. It is working fine used xgps, cgps as clients. *gpsd -n -N -D2 /dev/ttyUSB0 * import gps, os, time g = gps.gps(mode=gps.WATCH_NEWSTYLE) while 1: os.system('cl

Re: pySerial question, setting certain serial parameters [newbie]

2012-02-07 Thread Peter
On Feb 4, 11:47 pm, Jean Dupont wrote: > I need to set the following options I found in a Perl-script in Python for > serial communication with a device (a voltmeter): > > $port->handshake("none"); > $port->rts_active(0); > $port->dtr_active(1); > > I have thus far the following  statements but I

Re: pySerial question, setting certain serial parameters [newbie]

2012-02-06 Thread Chris Rebert
On Sat, Feb 4, 2012 at 4:47 AM, Jean Dupont wrote: > I need to set the following options I found in a Perl-script in Python for > serial communication with a device (a voltmeter): > > $port->handshake("none"); > $port->rts_active(0); > $port->dtr_active(1); > > I have thus far the following  stat

pySerial question, setting certain serial parameters [newbie]

2012-02-06 Thread Jean Dupont
I need to set the following options I found in a Perl-script in Python for serial communication with a device (a voltmeter): $port->handshake("none"); $port->rts_active(0); $port->dtr_active(1); I have thus far the following statements but I think it does not set the above parameters correctl

How to use pySerial under Windows 7 without administrator rights

2011-11-16 Thread furoscame
Hello together, currently I try to use pySerial under Windows 7. But it is not possible to open a serial port without running the script under adminstrator rights. Other programs like Terraterm are able to so without adminstrator rights. What is the reason for that and is it possible open a

Re: Chaco for real-time plot of PySerial data

2011-11-03 Thread Robert Kern
ates it with new data: https://github.com/enthought/chaco/tree/master/examples/demo/updating_plot I can't help much with the PySerial part, I'm afraid. Integrating that with the GUI event loop is probably going to be the trickiest bit. -- Robert Kern "I have come to believe that th

Chaco for real-time plot of PySerial data

2011-11-01 Thread Jack Keegan
Hi there, I asked this question on the enthought chaco mailing list some time last by have yet to receive a reply. Thought I'd ask here to see if anyone could shed some light on things for me. I have been considering using chaco / traits for close to a year now and am finally biting the bullet so

Re: Python hangs: Problem with wxPython, threading, pySerial, or events?

2011-10-17 Thread Ethan Swint
n error message at the end which appears in the Windows 'cmd' window, but the message is not reflected in the pylab window. My attached device is transmitting <160><1><2><3><4><80> and is received correctly when I run the sample pyserial script '

  1   2   3   4   5   >