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
Rob wrote:
> try:
> response = p.readline()
> except SerialException:
> print ">>>>>Timed out<<<<<"
> try:
> port.writelines(msg)
> except OSError:
> print &quo
########
> > def GetNumLanes(Lanes):
> >print "Looking for connected units"
> > # give a turn command and wait for responses
> >msg = ".g t 0 336\n"
>
> >for i in range(3):
> >port = OpenPort()
>
ts"
> # give a turn command and wait for responses
> msg = ".g t 0 336\n"
>
> for i in range(3):
> port = OpenPort()
> time.sleep(3)
> print port.isOpen()
> print "Request #%d" % (i+1)
> try
message
> >> > reslen = len(response)
> >> > if reslen > 5:
> >> > if res[1] == 'Ack':
> >> > return res[0]
> >> > elif res[1] == 'Nak':
> >> > return 0x7F
> >> > else:
> >> >
On 2006-12-15, hg <[EMAIL PROTECTED]> wrote:
>> Here is OpenPort
>>
>>
>> OpenPort procedure
>>
>> def OpenPort(name):
>> BRate = 19200
>> Tout =
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
gt;> > #look for ack in the return message
>> > reslen = len(response)
>> > if reslen > 5:
>> > if res[1] == 'Ack':
>> > return res[0]
>> > elif res[1] == 'Nak':
>> > return 0x7F
>> > else:
>&
gt; >>>>>> Snip <<<<<<
> >
> > #### GetNumLanes Procedure
> >
> > def GetNumLanes(Lanes):
> >
#
> GetNumLanes Procedure
>
> def GetNumLanes(Lanes):
> print "Looking for connected units"
> # give a turn command and wait for responses
&g
[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
ts"
> # give a turn command and wait for responses
> msg = ".g t 0 336\n"
>
> for i in range(3):
> port = OpenPort()
> time.sleep(3)
> print port.isOpen()
> print "Request #%d" % (i+1)
> try
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
mLanes(Lanes):
print "Looking for connected units"
# give a turn command and wait for responses
msg = ".g t 0 336\n"
for i in range(3):
port = OpenPort()
time.sleep(3)
print port.isOpen()
print "Request #
14 matches
Mail list logo