Re: Serial port failure

2006-12-17 Thread Nick Craig-Wood
Rob <[EMAIL PROTECTED]> wrote: > Craig, > > In the embedded firmware, the each box re-transmits after it finishes > reading the packet. This is a very rudimentary system, and uses no > flow control. The topology is that each embedded box has a master and > a slave port. The master is used

Re: Serial port failure

2006-12-15 Thread Leo Kislov
Rob wrote: > try: > response = p.readline() > except SerialException: > print ">Timed out<" > try: > port.writelines(msg) > except OSError: > print "Serial port failure. Power cycle units" > port.close()

Re: Serial port failure

2006-12-15 Thread Rob
Leo, I like your tuple idea. I will implement it. The ack and nak both have the same format, namely: "Id Ack" or "Id Nak" rob On Dec 15, 4:34 pm, "Leo Kislov" <[EMAIL PROTECTED]> wrote: > Rob wrote: > > Hi all, > > > I am fairly new to python, but not programming and embedded. I am > > having

Re: Serial port failure

2006-12-15 Thread Leo Kislov
Rob wrote: > Hi all, > > I am fairly new to python, but not programming and embedded. I am > having an issue which I believe is related to the hardware, triggered > by the software read I am doing in pySerial. I am sending a short > message to a group of embedded boxes daisy chained via the seri

Re: Serial port failure

2006-12-15 Thread Rob
I have been modifying the code today, tracing through it and trying to make it more robust and implement data hiding. That way as someone reads through my main they will see intuitively what I am doing. For that reason I went back and added a filename parameter to OpenPort. The reason I am clos

Re: Serial port failure

2006-12-15 Thread Grant Edwards
On 2006-12-15, hg <[EMAIL PROTECTED]> wrote: >> Here is OpenPort >> >> >> OpenPort procedure >> >> def OpenPort(name): >> BRate = 19200 >> Tout =

Re: Serial port failure

2006-12-15 Thread Rob
Craig, In the embedded firmware, the each box re-transmits after it finishes reading the packet. This is a very rudimentary system, and uses no flow control. The topology is that each embedded box has a master and a slave port. The master is used to receive data from the upstream box, and send

Re: Serial port failure

2006-12-15 Thread hg
Rob wrote: > Here is OpenPort > > > OpenPort procedure > > def OpenPort(name): > BRate = 19200 > Tout = 3 > > try: > # Initialize th

Re: Serial port failure

2006-12-15 Thread Rob
Here is OpenPort OpenPort procedure def OpenPort(name): BRate = 19200 Tout = 3 try: # Initialize the port p = serial.Serial(n

Re: Serial port failure

2006-12-15 Thread hg
Rob wrote: > Hi all, > > I am fairly new to python, but not programming and embedded. I am > having an issue which I believe is related to the hardware, triggered > by the software read I am doing in pySerial. I am sending a short > message to a group of embedded boxes daisy chained via the ser

Re: Serial port failure

2006-12-15 Thread drake
[EMAIL PROTECTED] wrote: ..snip> > In the second iteration of your loop, you appear to be opening a port > that is already open: > > for i in range(3): > port = OpenPort() > > thus the error message: "the serial port is unavailable". > > --Drake Smith Skip that -- I didn't not

Re: Serial port failure

2006-12-15 Thread drake
Rob wrote: > Hi all, > > I am fairly new to python, but not programming and embedded. I am > having an issue which I believe is related to the hardware, triggered > by the software read I am doing in pySerial. I am sending a short > message to a group of embedded boxes daisy chained via the seria

Re: Serial port failure

2006-12-15 Thread Nick Craig-Wood
Rob <[EMAIL PROTECTED]> wrote: > I am fairly new to python, but not programming and embedded. I am > having an issue which I believe is related to the hardware, triggered > by the software read I am doing in pySerial. I am sending a short > message to a group of embedded boxes daisy chained v