Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
gentoo and ssdc
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
hedmo
Veteran
Veteran


Joined: 29 Aug 2009
Posts: 1305
Location: sweden

PostPosted: Sat Jan 17, 2015 7:49 am    Post subject: gentoo and ssdc Reply with quote

hi all

i have a little project.i like to run scalextric sport digital console in gentoo via wine.i have bought a cable :

mybox hedmo # lsusb
Bus 004 Device 005: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC
mybox hedmo

and as i understand,i need to make a link to wine like this:

ln -s /dev/ttyUSB0 ~/.wine/dosdevices/com1

i need help to find out what tty is my cable.

best regards hedmo
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54239
Location: 56N 3W

PostPosted: Sat Jan 17, 2015 1:39 pm    Post subject: Reply with quote

hedmo,

Look at dmesg after your cable is plugged in or look in dev for your new /dev/ltty entry.

You should get the /dev entry anyway but you will need to add kernel support for your USB to serial device before it will work.
Thats the ftdi_sio module.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
hedmo
Veteran
Veteran


Joined: 29 Aug 2009
Posts: 1305
Location: sweden

PostPosted: Sun Jan 18, 2015 12:45 pm    Post subject: Reply with quote

Thanks NeddySeagoon

I rebuild the kernel and now the device is at /dev/ttyUSB0 and i made a symlink ln -s /dev/ttyUSB0 ~/.wine/dosdevices/com1 .
But the program does not found the device.there are some who have made it in ubuntu like this.but i keep looking for More answers
Why.

Best regards hedmo
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54239
Location: 56N 3W

PostPosted: Sun Jan 18, 2015 3:32 pm    Post subject: Reply with quote

hedmo,

Serial ports need to be configured. Your /dev/ttyUSB0 is no different.
You neet to use the same settings at both ends of the serial link.

Its actually RS485, whic is similar to RS232. RS232 is point to point only. RS485 does away with that limitation.

This document says you need te set up /dev/ttyUSB0 to use 1 start bit, 8 Data bits, 1 stop bit, no parity and a baud rate af 19,200.

There is really no standard settings but USB serial ports are rarely set as slow as 19,200 baud.
The software that sets up the serial port needs to run as root. Hopefully, WINE is not running as root, so it won't be able to make the setup to the serial port.
Thats inconvient.

What does
Code:
ls -l /dev/ttyUSB0
show?
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
hedmo
Veteran
Veteran


Joined: 29 Aug 2009
Posts: 1305
Location: sweden

PostPosted: Mon Jan 19, 2015 6:55 pm    Post subject: Reply with quote

NeddySeagoon wrote:

What does
Code:
ls -l /dev/ttyUSB0
show?


mybox hedmo # ls -l /dev/ttyUSB0
crw-rw---- 1 root uucp 188, 0 Jan 20 20:29 /dev/ttyUSB0
mybox hedmo # dmesg | grep 4-1
[ 0.000000] usb 4-1: new full-speed USB device number 2 using ohci_hcd
[ 0.000000] usb 4-1: New USB device found, idVendor=0403, idProduct=6001
[ 0.000000] usb 4-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 0.000000] usb 4-1: Product: FT232R USB UART
[ 0.000000] usb 4-1: Manufacturer: FTDI
[ 0.000000] usb 4-1: SerialNumber: A900DAYO
[ 0.000000] ftdi_sio 4-1:1.0: FTDI USB Serial Device converter detected
[ 0.000000] usb 4-1: Detected FT232RL
[ 0.000000] usb 4-1: Number of endpoints 2
[ 0.000000] usb 4-1: Endpoint 1 MaxPacketSize 64
[ 0.000000] usb 4-1: Endpoint 2 MaxPacketSize 64
[ 0.000000] usb 4-1: Setting MaxPacketSize 64
[ 0.000000] usb 4-1: FTDI USB Serial Device converter now attached to ttyUSB0
mybox hedmo #



NeddySeagoon wrote:

Serial ports need to be configured. Your /dev/ttyUSB0 is no different.
You neet to use the same settings at both ends of the serial link.

This document says you need te set up /dev/ttyUSB0 to use 1 start bit, 8 Data bits, 1 stop bit, no parity and a baud rate af 19,200.


can you help me with it?

NeddySeagoon wrote:

The software that sets up the serial port needs to run as root. Hopefully, WINE is not running as root, so it won't be able to make the setup to the serial port.
Thats inconvient.


what do you mean?can t wine it self run as "root" even if i am loged in as root?

here is a link from ubuntu http://ubuntuforums.org/showthread.php?t=1335098

as allways NeddySeagoon.thanks

regards hedmo
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54239
Location: 56N 3W

PostPosted: Mon Jan 19, 2015 7:25 pm    Post subject: Reply with quote

hedmo,

Code:
crw-rw---- 1 root uucp 188, 0 Jan 20 20:29 /dev/ttyUSB0

Add your normal user to the uucp group, then you and WINE, running as you can configure the serial port.
You need to log out and log in again to pick up your new permissions.

With those permissions and not being in the uucp group, you cannot use the device at all.
You will still need the symlink as the ubuntu forum shows.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum