Serial ports in WINE
I am running wine am kubuntu 7.04, AMD64.
I need to run some apps, that need a serial port, and some to control usb hardware, how can I pass a serial port to wine?, how can I invoke a "found new hardware" equivalent to install a usb device into wine. (These programs are for setting up equipment, they do not have Linux versions, and they are in my way to go full linux!)
Since no one is answering...
I can't say that I am an expert on wine and com ports but here we go...
With Wine on Linux you won't be able to do a "find new devices" command. Unless your device is already supported (i.e. the driver is already in your Linux kernel) you will find it very difficult to get it working under Wine (try VMware Player or VirtualBox). You Google to find out if that device is supported on Linux natively.
Now, Wine has simulated ports and drive letters in the ~/.wine/dosdevices directory. In there you will find symbolic links to the Linux paths of your physical devices. Go to that directory in a terminal window and type "ll" (two L's). You should see something like this:
c: -> ../drive_c
com1 -> /dev/ttyS0
com2 -> /dev/ttyS1
lpt1 -> /dev/lp0
These are the simulated ports and drive letters Wine need to access your hardware. From here you need to determine where Linux has put your device in its path and make an appropriate symbolic link to it. Sound complicated...not really but it your are going to use Linux, you need to do some self education unless you can find the perfect Linux HowTo for your device.
Hope that helps.
Thanks, it helps, as it is an indication of what should happen!
I have created a few simlinks to a number of my ports, which I verified with "serial port terminal", but my program just gives me a blank space for the port selection. It is also unable to create virtual com ports on its output.
Thanks for responding
In my case, I was using a usb to serial converter. Here is the script that I need to run to allow it to work:
mknod /dev/usb/ttyUSB0 c 188 0
ln -s /dev/usb/ttyUSB0 ~/.wine/dosdevices/com1
Thanks for this. I have some USB to Serial port adaptors from MAPLIN (UK) which are often knocked out at £10 on sale. These are automagically recognised by the UBUNTU kernel and appear in the /dev directory as /dev/ttyUSBx where x is some number (and this does vary).
I found that simply doing the following saved the day, using the idea mentioned above:
sudo ln -s /dev/ttyUSB0 com1
which I did from within the .wine/dosdevices directory.
It worked with my WinXP program (a radio control program from ICOM).