Re: Reading from serial port

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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





[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux