Serial port control settings

Questions about Wine on Linux
Locked
groff
Newbie
Newbie
Posts: 1
Joined: Tue Sep 26, 2017 7:05 am

Serial port control settings

Post by groff »

Hi,
I'm trying to use wine to run software that configures an ignition controller through a serial port.
I'm using Ubuntu 17.04 and Wine 2.0.2 with an old keyspan USB Serial adapter.

The controller specifies the settings it needs as:

Code: Select all

Bits Per Second: 38400
Data Bits: 8
Parity: None
Stop Bits: 1
Flow Control: none
The kernel recognizes the serial adapter and I set it up using this command

Code: Select all

stty -F /dev/ttyUSB0 38400 cs8 raw -cstopb -parenb -ixon
With this setup I can use basic linux command line tools to communicate with the controller. I send 'C' and get back an expected set of binary data.
Image

I setup the COM1 port in wine and I can launch wine and the windows app. Once launched the USB Serial adapter light blinks indicating data is being sent but in the Wine Command Prompt I just see this message over and over:

Code: Select all

Open COM1 
timed out 
closing serial port 
Open COM1
So.. yeah not working. After closing the program and Wine I go back to the linux prompt.
If I try sending the controller 'C' again I get no response. When I check the serial port settings they have been changed. Here is the before and after settings as reported from stty:
Image
To save your eyes the settings that have changed are:

Code: Select all

eof = 
min = 
hupcl
clocal
ignbrk
noflsh
If I change the serial port settings back it works from the linux command line again.
So, I'm thinking, but could be wrong, that the new port settings are messing up the communication.

Does Wine change the serial port settings somehow? Is there some way to stop it or configure what it changes them to?
tomicdesu
Newbie
Newbie
Posts: 1
Joined: Wed Nov 01, 2017 6:29 pm

Re: Serial port control settings

Post by tomicdesu »

hi -- sounds like you are trying to get MegaJolt Lite Jr Configurator to go?

i'm having the same trouble. recent debian. did you find a solution? exact same issue -- i symlinked dosdevices com1 to my old USB serial adapter, the green linght blinks on at "open" time, but console shows immediate "timed out" and close port, then repeats...
Locked