Re: Serial port failure



Rob <Amateur.N7TZG@xxxxxxxxx> 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 via the serial port.
When I send a 'global' message, all the connected units should reply
with their Id and Ack in this format '0 Ack'

What is to stop all the embedded boxes talking at once?

I suspect that the embedded boxes all taking at once is confusing the
serial port driver. Maybe it is creating a break condition that it
doesn't deal with properly? Or perhaps I've misunderstood the
topology!

What sort of flow control are you using? Could it have got out of
step with XON-XOFF?

Assuming the driver is locking up then it looks like a serial port
driver bug. In my day job I do a lot of stuff with serial ports and
I've found that drivers vary wildly in quality!

My advice is to try a different serial port hardware. I've found ones
based on the PL2303 chip to be very reliable both under windows and
linux.

Eg this one :-

http://www.scan.co.uk/Products/ProductInfo.asp?WebProductID=98192

Or one of these (which were based on PL2303 last time I bought one)

http://www.comtrol.com/products/catalog.asp?group=usbserialhubs

I don't think anything you can do from python/user-space should be
able to lock up the kernel mode serial driver. If it does lock up it
is a driver bug.

Here you'll find a little program I wrote which, with the help of a
loopback connector, you can check your serial port out

http://www.craig-wood.com/nick/pub/cambert.exe

Run the program from a cmd prompt and it will tell you how to use it.

I've broken a lot of serial port drivers with that program ;-)

--
Nick Craig-Wood <nick@xxxxxxxxxxxxxx> -- http://www.craig-wood.com/nick
.



Relevant Pages

  • Re: Accessing peripherals from a managed application
    ... And .NET CF 2.0 has serial port classes built into it... ... I tried the P/Invoke Wizard from Paul Yao's ... Maybe you open the driver with CreateFile, ... Call on the imported functions to access the hardware. ...
    (microsoft.public.windowsce.app.development)
  • Re: WRITE_PORT_BUFFER_ULONG
    ... WRITE_PORT_BUFFER_ULONG is normally used in a disk driver or ethernet ... This sounds like too high speed of an operation for a serial port. ... If the hardware you are using can support such high data-rates, ... |> smaillet at EmbeddedFusion dot com ...
    (microsoft.public.windowsce.embedded.vc)
  • [PATCH] zs: Move to the serial subsystem
    ... This is a reimplementation of the zs driver for the serial subsystem. ... to use a console on a serial port, say Y. Otherwise, say N. ... * This is the Z85C30 driver's generic interrupt routine. ...
    (Linux-Kernel)
  • Re: Accessing peripherals from a managed application
    ... There's a driver for, ... I did find that System.IO.Port has the functionalities of a serial port ... Paul G. Tobey wrote: ... Call on the imported functions to access the hardware. ...
    (microsoft.public.windowsce.app.development)
  • Re: Accessing peripherals from a managed application
    ... I did find that System.IO.Port has the functionalities of a serial port ... Bruce Eitman (eMVP) ... Maybe you open the driver with CreateFile, ... Call on the imported functions to access the hardware. ...
    (microsoft.public.windowsce.app.development)

Loading