Re: serial ports, threads and windows




"Tom Brown" <brown@xxxxxxxxxx>


| Hey people,
|
| I've written a python app that r/w eight serial ports to control eight devices
| using eight threads. This all works very nicely in Linux. I even put a GUI on
| it using PyQt4. Still works nicely.
|
| Then I put the app on on a virtual Windows machine running inside of vmware on
| the same Linux box. Vmware only lets me have four serial ports so I run the
| app against four serial ports using four threads. The app did not respond
| quick enough to data from the serial ports and eventually hung.
|
| So, I tried one serial port and the app still did not respond quick enough to
| the single serial port. It eventually hangs.
|
| When the app hung, in each case, it was not hogging the cpu nor reading any
| data off the serial ports. The task manager didn't show it was doing anything
| at all.
|
| When it runs on Windows, could it be:
|
| 1) Just struggling to run inside of VMware?
|
| 2) Using threads with Qt on Windows is a problem?
|
| 3) Threads in python on Windows is a problem?
|
| Any ideas?
|
| Thanks,
| Tom

I cant help you really, but I can put what little weight I have behind you - I
am also struggling with serial port implementation - I posted here some time ago
and got some answers - and my intermittent failure is now down to about once a
week.

I found that while python's file handling and the GUI stuff works seamlessly
across platforms, the serial port handling seems quirky and platform dependant :

It is extraordinarly difficult to write non blocking reads that will work 'out
of the box' across platforms - in fact I dont know if it is possible..

And making a pipe non blocking is poison...

- Hendrik


.



Relevant Pages

  • Re: serial port access from asp.net
    ... The Windows API calls for serial ports don't ... >> by many people you cannot access serial ports from ASP.net. ... > app not work in an ASP.Net app? ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: serial ports, threads and windows
    ... This all works very nicely in Linux. ... Then I put the app on on a virtual Windows machine running inside of vmware ... the app against four serial ports using four threads. ... python app with many threads posting messages to the main application. ...
    (comp.lang.python)
  • Re: How far can Clarion go?
    ... then NetTalk would allow direct communication with the devices themselves. ... Just to be clear, If the devices don't have Serial Ports, it would not work? ... I also like WinEvent, and NetTalk, but unlike the others I _am_ a salesman! ... When I needed my app to work on the Internet, I used Clarionet. ...
    (comp.lang.clarion)
  • Re: serial port access from asp.net
    ... >I use the serial port code that was published in MSDN magazine. ... > by many people you cannot access serial ports from ASP.net. ... Why would code that is written for, and works for a Windows Forms ... app not work in an ASP.Net app? ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: serial ports, threads and windows
    ... I've written a python app that r/w eight serial ports to control eight devices using eight threads. ... Then I put the app on on a virtual Windows machine running inside of vmware on the same Linux box. ... Vmware only lets me have four serial ports so I run the app against four serial ports using four threads. ... def abort: ...
    (comp.lang.python)