http://bugs.winehq.org/show_bug.cgi?id=29011
Bug #: 29011 Summary: Non-standard serial baud rates are not reported correctly. Product: Wine Version: 1.2.2 Platform: x86 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: ntdll AssignedTo: wine-bugs@winehq.org ReportedBy: jstutch@googlemail.com Classification: Unclassified
Running VCDS-Lite 1.1 (connects to car diagnostics), with a FTDI-based USB-Serial cable, when a non-standard baud rate is set on the port (10.4Kbps I think), and the rate is read back by the program, wine reports "err:comm:get_baud_rate unknown speed 1000", and returns an error to the program. This breaks the serial port in the program until it is reset.
Replacing the offending lines in dlls/ntdll/serial.c: get_baud_rate with "sbr->BaudRate = speed; break;", removes the error, and the program operates correctly, although this may not be the right way to do this.
This was noted running Ubuntu Maverick (10.10), kernel 2.6.35-25-generic. Running wine from the Maverick ubuntu package, rebuilt from package source to correct the error as above.
Thanks,
JStutch
http://bugs.winehq.org/show_bug.cgi?id=29011
Bruno Jesus 00cpxxx@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |00cpxxx@gmail.com
--- Comment #1 from Bruno Jesus 00cpxxx@gmail.com 2011-11-09 08:44:31 CST --- You should have seen a giant warning about invalid baudrates on the console output, right?
http://source.winehq.org/source/dlls/ntdll/serial.c#L475
Please Attach a +comm log. WINEDEBUG=+comm wine <exe path> &> /tmp/output.txt
http://wiki.winehq.org/FAQ#head-16da35b6327024d6ea576e3678488b16862d0f5e
Does the program have a download link and can the problem be triggered by simply opening the program and pressing a button to open the serial port?
http://bugs.winehq.org/show_bug.cgi?id=29011
--- Comment #2 from John jstutch@googlemail.com 2011-11-13 05:07:38 CST --- Created attachment 37476 --> http://bugs.winehq.org/attachment.cgi?id=37476 Debug output with +comm
http://bugs.winehq.org/show_bug.cgi?id=29011
--- Comment #3 from John jstutch@googlemail.com 2011-11-13 05:30:55 CST --- I have attached +comm output, sorry about the huge file. This was the output of running the program, going to 'Options', selecting COM1, and clicking 'Test' to test the interface. (I have a symlink in .wine/dosdevices/com1 to /dev/ttyUSB0). A success message was displayed, following this, the interface was tested again, this time a failure message was displayed.
Once the port has been tested (or accessed by the program) once, the baud rate needs to be reset (e.g stty -F /dev/ttyUSB0 9600), before it can be tested (or used) correctly again. As I mentioned, I have got this to work completely by making the changes to serial.c detailed previously.
I don't think the giant warning is shown without +comm, but it is in the attached log.
The program can be downloaded at http://www.ross-tech.com/vcds-lite/download/index.html, some fairly detailed usage instructions are on that site too. It will, however require a USB-OBD2 interface. The one I have is a cheap KKL one from eBay. It is an FTDI FT2322 with a 12V line driver interface. As the KKL interface is a half-duplex bus, I think when testing the interface it puts some data onto the bus, and reads it back, checking for noise/latency/etc, so you may get the program to report a valid interface from a simple loopback interface. Certainly, using any valid linux tty, the program attempts to set the 10.4Kbps, and will report the port as OK (but interface not found), but only once before the baud is re-set manually.
It seems this behaviour has been noted before, at http://appdb.winehq.org/objectManager.php?sClass=version&iId=14255. Some seem to have managed with the launcher script given there, but I couldnt get it to work, even after fixing spelling mistakes, and it seems a bit of a hack anyway.
Thanks,
JStutch
http://bugs.winehq.org/show_bug.cgi?id=29011
--- Comment #4 from Austin English austinenglish@gmail.com 2013-11-13 16:50:19 CST --- This is your friendly reminder that there has been no bug activity for 2 years. Is this still an issue in current (1.7.6 or newer) wine? If so, please attach the terminal output in 1.7.6 (see http://wiki.winehq.org/FAQ#get_log).
https://bugs.winehq.org/show_bug.cgi?id=29011
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |ABANDONED
--- Comment #5 from Austin English austinenglish@gmail.com --- Abandoned.
https://bugs.winehq.org/show_bug.cgi?id=29011
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #6 from Austin English austinenglish@gmail.com --- Closing.
https://bugs.winehq.org/show_bug.cgi?id=29011
Paul Gardner-Stephen paul.gardner.stephen@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |paul.gardner.stephen@gmail. | |com
--- Comment #7 from Paul Gardner-Stephen paul.gardner.stephen@gmail.com --- Can we resurrect this issue, as it affects the Microchip Bluetooth DFU Utility:
0120:trace:comm:io_control 0xc4 IOCTL_SERIAL_SET_BAUD_RATE 0x31e230 4 (nil) 0 0x31e1e4 0120:warn:comm:set_baud_rate You (or a program acting at your behest) have specified a non-standard baud rate 1382400. Wine will set the rate to 921600, which is as close as we can get by our present understanding of your hardware. I hope you know what you are doing. Any disruption Wine has caused to your linux system can be undone with setserial (see man setserial). If you have incapacitated a Hayes type modem, reset it and it will probably recover. 0120:trace:comm:io_control 0xc4 IOCTL_SERIAL_SET_LINE_CONTROL 0x31e22d 3 (nil) 0 0x31e1e4 0120:trace:comm:io_control 0xc4 IOCTL_SERIAL_SET_HANDFLOW 0x31e23c 16 (nil) 0 0x31e1e4 0120:trace:comm:io_control 0xc4 IOCTL_SERIAL_SET_CHARS 0x31e236 6 (nil) 0 0x31e1e4
https://bugs.winehq.org/show_bug.cgi?id=29011
Michał Mirosław mirq-wine@rere.qmqm.pl changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |mirq-wine@rere.qmqm.pl
--- Comment #8 from Michał Mirosław mirq-wine@rere.qmqm.pl --- Created attachment 70088 --> https://bugs.winehq.org/attachment.cgi?id=70088 PoC fix
glibc already has c_ispeed/c_ospeed in its struct termios, but those are undocumented and it lacks BOTHER/IBSHIFT constants. This uses a Linux-specific TCGETS2/TCSETS2 ioctls on a tty.