np43 / qextserialport

Automatically exported from code.google.com/p/qextserialport
Other
0 stars 0 forks source link

Windows : Improve opening of USB serial emulation and all other port #51

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I was not able to open any serial port created by a FTDI USB/serial device.

A simple workaround could allow this. In "win_qextserialport.cpp", function
"open" :
Win_Handle=CreateFileA(port.toAscii(), GENERIC_READ|GENERIC_WRITE,
                              FILE_SHARE_READ|FILE_SHARE_WRITE, NULL,
OPEN_EXISTING, 0, NULL);

Require to add a path to port name : 

Win_Handle=CreateFileA("\\\\.\\"+port.toAscii(), GENERIC_READ|GENERIC_WRITE,
                              FILE_SHARE_READ|FILE_SHARE_WRITE, NULL,
OPEN_EXISTING, 0, NULL);

Original issue reported on code.google.com by eric.jou...@gmail.com on 29 Mar 2010 at 10:30

GoogleCodeExporter commented 9 years ago
All COM port numbers greater 9 are effected. In order to use them one should 
use this modified call. I included this change in the attached patch. (I hope 
it works, the last patch creation was some time ago.)

Original comment by ulrich.l...@hhi.fraunhofer.de on 8 Jul 2010 at 3:59

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks for the hint! You've really saved a lot of my time!

Original comment by fax.k.r...@gmail.com on 24 Jan 2011 at 12:01

GoogleCodeExporter commented 9 years ago
The patch doesn't work for me...
May anybody can show me its win_qextserialport.cpp please?
Thank you!

Original comment by dc.casto...@gmail.com on 15 Apr 2011 at 3:10

GoogleCodeExporter commented 9 years ago

Original comment by dbzhang...@gmail.com on 19 Apr 2012 at 2:03