Hello, I've got RFID card reader plugged in serial port. cat /dev/ttyS0 ...gives me ID of the card I'm using => that's OK As soon as I open the port with win32 appication via wine... I get no data from reader. Even cat /dev/ttyS0 does not work anymore afterwards. I thinks it's because as soon as application opens it via wine some tty flags change: (PS: Of course I created symlinks in .wine/dosdevices/com[1-4] -> /dev/ttyS[0-3] )it changes some flags: min=1 -> min=0 -hupcl -> hupcl -ignbrk -> ignbrk icrnl -> -icrnl ixon -> -ixon opost -> -opost isig -> -isig icanon -> -icanon iexten -> -exten echo -> -echo -noflsh -> noflsh Is it possible to tell wine to not change any flags or set them on my own?
On Fri, 2011-01-14 at 11:28 -0600, luboss wrote:> I've got RFID card reader plugged in serial port. > cat /dev/ttyS0 ...gives me ID of the card I'm using => that's OK > As soon as I open the port with win32 appication via wine... I get no data from reader. Even cat /dev/ttyS0 does not work anymore afterwards. > I thinks it's because as soon as application opens it via wine some tty flags change: >The problem is more likely to be caused by the access permissions for the serial port. Who owns /dev/ttyS0 and what permissions does it have? IOW, does the user where you're running the application have read and write access to the serial port. Please show us what "ls -l /dev/ttyS[0-3]" shows. What Linux distro are you using? If its an access permission problem, the information here may help: http://www.libelle-systems.com/free/wine/serial_port_access.html If you're comfortable adding UDEV rules that explains how to do it. If not, add the chmod command to /etc/rc.d/rc.local or wherever your distro puts local commands to be run at the end if the boot sequence.> > (PS: Of course I created symlinks in .wine/dosdevices/com[1-4] -> /dev/ttyS[0-3] )it changes some flags: > min=1 -> min=0 > -hupcl -> hupcl > -ignbrk -> ignbrk > icrnl -> -icrnl > ixon -> -ixon > opost -> -opost > isig -> -isig > icanon -> -icanon > iexten -> -exten > echo -> -echo > -noflsh -> noflsh > > Is it possible to tell wine to not change any flags or set them on my own? >You can set them with the stty command. Martin
Martin Gregorie wrote:> > The problem is more likely to be caused by the access permissions for > the serial port. > > Who owns /dev/ttyS0 and what permissions does it have? IOW, does the > user where you're running the application have read and write access to > the serial port. Please show us what "ls -l /dev/ttyS[0-3]" shows. >I don't think that permission is the cause, see: Code: ls -l crw-rw---- 1 root dialout 4, 64 2011-01-17 12:26 /dev/ttyS0 crw-rw---- 1 root dialout 4, 65 2011-01-17 12:26 /dev/ttyS1 crw-rw---- 1 root dialout 4, 66 2011-01-17 11:27 /dev/ttyS2 crw-rw---- 1 root dialout 4, 67 2011-01-17 11:27 /dev/ttyS3 (I belong to dialout group) Martin Gregorie wrote:> > What Linux distro are you using? >Ubuntu Hardy with kernel 2.6.24-28-generic I tried also Gentoo with 2.6.34-r1. Martin Gregorie wrote:> > > > Is it possible to tell wine to not change any flags or set them on my own? > > > You can set them with the stty command. > Martinyes, I did. what I actually did is: 1. opened the port with win32 appl. called hwtest 2. restored previous settings (backed up with stty -g -F /dev/ttyS0) 3. placed card, nothing comes from the port. (cat /dev/ttyS0 works) I tried another COM test. It died after choosing the port to test. In windows with the same reader those programs work well. Could someone help me out with this? Do I have to file a bug at bugs.winehq.org?
luboss wrote:> As soon as I open the port with win32 appication via wine... I get no data from reader. Even cat /dev/ttyS0 does not work anymore afterwards.Sounds like the program that you using setting up the port wrong. You sure there is no way to specify all the port settings for your program?
vitamin wrote:> > luboss wrote: > > As soon as I open the port with win32 appication via wine... I get no data from reader. Even cat /dev/ttyS0 does not work anymore afterwards. > > Sounds like the program that you using setting up the port wrong. You sure there is no way to specify all the port settings for your program?I can do some settings from the program, but they are little bit corrupted because another bug. From what I can see it looks like that the settings are default ones. Even if it does some port settings how can you explain that the same app works well in Windows.