[Bug 31563] New: Problem with an usb-serial card reader
http://bugs.winehq.org/show_bug.cgi?id=31563 Bug #: 31563 Summary: Problem with an usb-serial card reader Product: Wine Version: 1.5.11 Platform: x86 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: ntdll AssignedTo: wine-bugs(a)winehq.org ReportedBy: matthieu.nue(a)gmail.com Classification: Unclassified I would like to use a cards reader (twin30 http://medprice.fr/lecteur-carte-vitale-fixe/lecteur-sesam-vitale-twin30-usb...) on linux with a windows programm. The cards reader is a native serial device but it solds with a USB-serial converter. For testing the cards reader, i use a little programme named cpgesw32.exe. On windows, it works. On linux, it works with the equivalent program for linux. So my card reader works on linux. Now i want testing my cards reader with cpgesw32.exe on linux with wine. The cards reader freeze after several seconds. So i look the source code of wine. The freeze of the device happens with the command KERNEL32.WriteFile(0000004c,0033f2a4,00000009,0033f13c,00000000). To continue, i used an usb sniffer. Before the freeze, the cpgesw32's program call several command : KERNEL32.GetCommState(0000004c,003552c0) KERNEL32.SetCommState(0000004c,003552c0) KERNEL32.GetCommTimeouts(0000004c,0033f8f8) and others. When KERNEL32.GetCommState(0000004c,003552c0) is called, the wine programm launch : - get_baud_rate - get_line_control - get_hand_flow - get_special_chars With the sniffer, i noticed that only the first command (get_baud_rate) transmit a packet on the usb. After that, nothing on the usb port before the WriteFile. I noticed that if i open a connexion with my serial-usb device, only one command works. If i want a second command, i need to close the conexion and reopen it. I suppose this is the object of the "server_get_unix_fd" function for wine. So, - is everyserial device works like that (one command by connexion) or is it only my device ? - is someone can help me on the "server_get_unix_fd" function ? Thank you and sorry for my english (french speaker). Matteli -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=31563 matteli <matthieu.nue(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |matthieu.nue(a)gmail.com -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=31563 Bruno Jesus <00cpxxx(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |00cpxxx(a)gmail.com --- Comment #1 from Bruno Jesus <00cpxxx(a)gmail.com> 2012-08-31 23:02:08 CDT --- Please, attach a +comm log. See http://wiki.winehq.org/FAQ#get_log -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=31563 --- Comment #2 from matteli <matthieu.nue(a)gmail.com> 2012-09-01 03:23:55 CDT --- Created attachment 41542 --> http://bugs.winehq.org/attachment.cgi?id=41542 WINEDEBUG=+comm wine cpgesw32.exe -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=31563 --- Comment #3 from Bruno Jesus <00cpxxx(a)gmail.com> 2012-09-01 07:55:55 CDT --- Is it really supposed to work in 9600? The following line looks suspicious: warn:comm:get_hand_flow ioctl error 'Argument invalide' You have to select the serial port in the application? Since it's a usb-serial device the port name is something like /dev/ttyUSB0 ? Are you in the dialout group? You could try reading http://www.winehq.org/docs/wineusr-guide/misc-things-to-configure -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=31563 --- Comment #4 from matteli <matthieu.nue(a)gmail.com> 2012-09-01 08:06:30 CDT --- (In reply to comment #3)
Is it really supposed to work in 9600? Yes
The following line looks suspicious: warn:comm:get_hand_flow ioctl error 'Argument invalide'
You have to select the serial port in the application? Yes there is a config file where i select the port
Since it's a usb-serial device the port name is something like /dev/ttyUSB0 ? Are you in the dialout group? Yes for the port name and i'm in the dialout group
You could try reading http://www.winehq.org/docs/wineusr-guide/misc-things-to-configure
Already done. The programm begin to communicate with the device because the device freeze. The problem is why the freeze. The freeze occurs when the programm try to write in the device. For the get_hand_flow, there is a problem. I create a little problem and i see that : when i use : ioctl(fd, TIOCMGET, &serial) the function works. when i use : if (ioctl(fd, TIOCMGET, &serial)==-1) { ... } there is a problem of invalid argument. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=31563 --- Comment #5 from Bruno Jesus <00cpxxx(a)gmail.com> 2012-09-01 08:15:59 CDT --- A wild guess is that you are hitting a usb driver bug, I had several issues with usb-serial converters in linux. If you don't check the return of "ioctl(fd, TIOCMGET, &serial)" you are simply hiding the issue, the serial variable will not be filled with the data requested. You could try playing with strace to check if the problem is really in a write call in the lower library levels or if it gets in a loop inside wine. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=31563 --- Comment #6 from matteli <matthieu.nue(a)gmail.com> 2012-09-02 03:02:19 CDT --- I use relay option debug puts some sleep function between function and find it's a write function that cause the freeze of the device. For the get_hand_flow problem, peharps the ioctl (TIOCMGET) is not implented in the driver i use for the device ? I use the Generic Serial driver of the usb serial driver (perhaps the PL2303 driver works better but i don't now how used it). -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=31563 Bruno Jesus <00cpxxx(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|ntdll |-unknown --- Comment #7 from Bruno Jesus <00cpxxx(a)gmail.com> 2012-09-03 08:08:36 CDT --- Since there is a native linux application you could use strace to check what it does. When you said that only the first command works you were testing in wine? By "works" you mean it sends and gets a response? -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=31563 --- Comment #8 from matteli <matthieu.nue(a)gmail.com> 2012-09-03 13:49:37 CDT --- (In reply to comment #7)
Since there is a native linux application you could use strace to check what it does. Good idea
When you said that only the first command works you were testing in wine? Yes By "works" you mean it sends and gets a response? Yes, i used sharkwire to see if something go in usb port and for the 1st command 'get_baud_rate', there is a message to and from the port. After that nothing until the 'write' command (which freeze the device).
-- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=31563 Alois Schlögl <alois.schloegl(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |alois.schloegl(a)gmail.com --- Comment #9 from Alois Schlögl <alois.schloegl(a)gmail.com> --- Have you tried the following procedure ? 1) Connect the Hardware with the serial interface. I've been using a Serial2USB converter, because the Laptop did not have a serial interface. The device was identified as /dev/ttyUSB0. 2) Configure the device in wine with this command ln -s /dev/ttyUSB0 ~/.wine/dosdevices/com1 3) set permissions sudo chmod a+rw /dev/ttyUSB0 This approach was working for me for some other device with a serial interface. see http://appdb.winehq.org/objectManager.php?sClass=version&iId=30086 Alois -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=31563 --- Comment #10 from Austin English <austinenglish(a)gmail.com> --- This is your friendly reminder that there has been no bug activity for over a year. Is this still an issue in current (1.7.51 or newer) wine? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=31563 Zeb Figura <z.figura12(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|-unknown |serial -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=31563 Ken Sharp <imwellcushtymelike(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |Abandoned?, hardware -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=31563 Ken Sharp <imwellcushtymelike(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |ABANDONED Status|UNCONFIRMED |RESOLVED --- Comment #11 from Ken Sharp <imwellcushtymelike(a)gmail.com> --- No response in a decade. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=31563 --- Comment #12 from Austin English <austinenglish(a)gmail.com> --- Closing. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=31563 Austin English <austinenglish(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #13 from Austin English <austinenglish(a)gmail.com> --- Actually closing. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (2)
-
wine-bugs@winehq.org -
WineHQ Bugzilla