cancel
Showing results for 
Search instead for 
Did you mean: 

COM PORT query Mint 15

Community Veteran
Posts: 17,014
Thanks: 1,212
Fixes: 13
Registered: 06-11-2007

COM PORT query Mint 15

OK... getting to grips with Mint 15 now... installed WINE and got a couple of my fave progs to work,.... some I need to work on or find alternatives, but .... this one is partly working and I need some help to allocate the COMPORT to it...
The program is CWCOM.... used to "chat" via morse code over the internet...  the program works in "basic" mode... i.e. I can send morse using the down arrow key .... however, in Windows, I can use my morse key(s) via a usb/serial converter that enables the key to be connected to the computer/laptop via the converter.
In the configuration settings, there is a facility for changing from down arrow key to COMPORT.... and the COMPORT has to be "defined" so that the program can use it....
How do I access the COMPORT information,  i.e. find out which ones are already "in use" and one that is free, so I can designate it to CWCOM.?
47 REPLIES
Community Veteran
Posts: 4,939
Thanks: 357
Fixes: 16
Registered: 10-06-2010

Re: COM PORT query Mint 15

2 step process:
Step 1: Easier step. After plugging in the usb-serial adapter, look in the System Log viewer (or run dmesg in a terminal) to find out the name of the device Linux has assigned to the serial port. Something like ttyUSB0
Step 2: Harder step. Create a mapping between the Linux device and a Windows com port name Wine will use. See here: http://ftp.winehq.org/pub/wine/docs/en/wineusr-guide.html#AEN715. That can be done by opening a terminal and creating a symlink:

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

Then you can use com1 in Wine.
Community Veteran
Posts: 17,014
Thanks: 1,212
Fixes: 13
Registered: 06-11-2007

Re: COM PORT query Mint 15

Thanks for the reply.... will have a go at that later tonight.... going out for the day and don`t want to get  "minted"  Roll eyes halfway through ! ! ! ...
Community Veteran
Posts: 17,014
Thanks: 1,212
Fixes: 13
Registered: 06-11-2007

Re: COM PORT query Mint 15

Got yards and yards of stuff that is very hard to read as it keeps jumping about.... so I unplugged the USB adapter and it said something about USB -2 unplugged.... then got this lot....
Quote
Jun  2 18:14:21 gerry-Inspiron-1545 anacron[1272]: Job `cron.daily' started
Jun  2 18:14:21 gerry-Inspiron-1545 anacron[2443]: Updated timestamp for job `cron.daily' to 2013-06-02
Jun  2 18:14:55 gerry-Inspiron-1545 kernel: [  361.008108] usb 6-2: USB disconnect, device number 2
Jun  2 18:14:55 gerry-Inspiron-1545 kernel: [  361.008241] pl2303 ttyUSB0: pl2303 converter now disconnected from ttyUSB0
Jun  2 18:14:55 gerry-Inspiron-1545 kernel: [  361.008255] pl2303 6-2:1.0: device disconnected
Jun  2 18:14:59 gerry-Inspiron-1545 kernel: [  365.076850] sd 6:0:0:0: [sda] Test WP failed, assume Write Enabled
Jun  2 18:14:59 gerry-Inspiron-1545 kernel: [  365.079095] sd 6:0:0:0: [sda] Asking for cache data failed
Jun  2 18:14:59 gerry-Inspiron-1545 kernel: [  365.079098] sd 6:0:0:0: [sda] Assuming drive cache: write through
Jun  2 18:15:01 gerry-Inspiron-1545 kernel: [  367.680052] usb 6-2: new full-speed USB device number 3 using uhci_hcd
Jun  2 18:15:02 gerry-Inspiron-1545 kernel: [  367.842079] usb 6-2: New USB device found, idVendor=067b, idProduct=2303
Jun  2 18:15:02 gerry-Inspiron-1545 kernel: [  367.842084] usb 6-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Jun  2 18:15:02 gerry-Inspiron-1545 kernel: [  367.842087] usb 6-2: Product: USB-Serial Controller D
Jun  2 18:15:02 gerry-Inspiron-1545 kernel: [  367.842089] usb 6-2: Manufacturer: Prolific Technology Inc.
Jun  2 18:15:02 gerry-Inspiron-1545 kernel: [  367.845127] pl2303 6-2:1.0: pl2303 converter detected
Jun  2 18:15:02 gerry-Inspiron-1545 kernel: [  367.857157] usb 6-2: pl2303 converter now attached to ttyUSB0
Jun  2 18:15:02 gerry-Inspiron-1545 mtp-probe: checking bus 6, device 3: "/sys/devices/pci0000:00/0000:00:1d.0/usb6/6-2"
Jun  2 18:15:02 gerry-Inspiron-1545 mtp-probe: bus: 6, device: 3 was not an MTP device
Jun  2 18:15:24 gerry-Inspiron-1545 wpa_supplicant[1005]: eth1: WPA: Group rekeying completed with 00:26:44:7d:94:90 [GTK=TKIP]
Jun  2 18:15:26 gerry-Inspiron-1545 kernel: [  392.112064] usb 2-1: reset high-speed USB device number 2 using ehci-pci
Jun  2 18:15:51 gerry-Inspiron-1545 kernel: [  416.788860] sd 6:0:0:0: [sda] Test WP failed, assume Write Enabled
Jun  2 18:15:51 gerry-Inspiron-1545 kernel: [  416.791222] sd 6:0:0:0: [sda] Asking for cache data failed
Jun  2 18:15:51 gerry-Inspiron-1545 kernel: [  416.791234] sd 6:0:0:0: [sda] Assuming drive cache: write through
Jun  2 18:15:57 gerry-Inspiron-1545 kernel: [  423.120065] usb 2-1: reset high-speed USB device number 2 using ehci-pci
Jun  2 18:16:38 gerry-Inspiron-1545 wpa_supplicant[1005]: dbus: wpa_dbus_get_object_properties: failed to get object properties: (org.freedesktop.DBus.Error.Failed) failed to parse WPA IE
Jun  2 18:16:38 gerry-Inspiron-1545 wpa_supplicant[1005]: dbus: Failed to construct signal
Jun  2 18:16:38 gerry-Inspiron-1545 NetworkManager[984]: <warn> Couldn't retrieve BSSID properties: failed to parse WPA IE.
Jun  2 18:16:42 gerry-Inspiron-1545 kernel: [  468.500888] sd 6:0:0:0: [sda] Test WP failed, assume Write Enabled
Jun  2 18:16:42 gerry-Inspiron-1545 kernel: [  468.503130] sd 6:0:0:0: [sda] Asking for cache data failed
Jun  2 18:16:42 gerry-Inspiron-1545 kernel: [  468.503133] sd 6:0:0:0: [sda] Assuming drive cache: write through

am assuming this .....
Quote

Jun  2 18:15:01 gerry-Inspiron-1545 kernel: [  367.680052] usb 6-2: new full-speed USB device number 3 using uhci_hcd
Jun  2 18:15:02 gerry-Inspiron-1545 kernel: [  367.842079] usb 6-2: New USB device found, idVendor=067b, idProduct=2303
Jun  2 18:15:02 gerry-Inspiron-1545 kernel: [  367.842084] usb 6-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Jun  2 18:15:02 gerry-Inspiron-1545 kernel: [  367.842087] usb 6-2: Product: USB-Serial Controller D
Jun  2 18:15:02 gerry-Inspiron-1545 kernel: [  367.842089] usb 6-2: Manufacturer: Prolific Technology Inc.
Jun  2 18:15:02 gerry-Inspiron-1545 kernel: [  367.845127] pl2303 6-2:1.0: pl2303 converter detected
Jun  2 18:15:02 gerry-Inspiron-1545 kernel: [  367.857157] usb 6-2: pl2303 converter now attached to ttyUSB0

is the ref to the adapter...
so do I now enter in the command box (terminal?)
Quote

ln -s /dev/ttyUSB0 com1

then the "symbolic link" 
Quote

~/ .wine/dosdevices ttyUSB0

followed by....
cd ~/ .wine/dosdevices
ln -s /dev/ttyUSB0  com1
[/quote}
and then I should be able to use the  COM1 port in my program to connect the morse key?

Community Veteran
Posts: 6,607
Thanks: 209
Fixes: 15
Registered: 16-02-2009

Re: COM PORT query Mint 15

The symbolic link is "ln -s"
From you messages it is ttyUSB0
Quote
Jun  2 18:14:55 gerry-Inspiron-1545 kernel: [  361.008241] pl2303 ttyUSB0: pl2303 converter now disconnected from ttyUSB0

Just enter :
Quote
cd ~/.wine/dosdevices                        # <NB NO SPACE between / & .
ln -s /dev/ttyUSB0  com1

in a terminal and then try it, it should be on com1 (as long as it is plugged in) when you run your app.
Community Veteran
Posts: 17,014
Thanks: 1,212
Fixes: 13
Registered: 06-11-2007

Re: COM PORT query Mint 15

OK.. Thanks HB... will do that now.........
watch this space..............
Community Veteran
Posts: 17,014
Thanks: 1,212
Fixes: 13
Registered: 06-11-2007

Re: COM PORT query Mint 15

this is what happened.....
Quote

gerry@gerry-Inspiron-1545 ~ $ cd ~/.wine/dosdevices   
gerry@gerry-Inspiron-1545 ~/.wine/dosdevices $ ln -s /dev/ttyUSB0  com1
ln: failed to create symbolic link ‘com1’: File exists
gerry@gerry-Inspiron-1545 ~/.wine/dosdevices $


app does not connect on "COMPORT" keeps reverting back to "Keyboard".... when I try to change over to comport....  
Community Veteran
Posts: 6,607
Thanks: 209
Fixes: 15
Registered: 16-02-2009

Re: COM PORT query Mint 15

Ok try
rm ~/.wine/dosdevices/com1
and re-enter the command
Funny it thinks com1 exists. All I have are drive links, mind you no com ports!
Community Veteran
Posts: 17,014
Thanks: 1,212
Fixes: 13
Registered: 06-11-2007

Re: COM PORT query Mint 15

Not sure what is happeing....
got three usb ports.... 1.  mouse...... 2...USB caddy with Linux Mint 15  (this is in use)  3.... the USB/serial adapter
There is no Installed HDD..... this is running from a boot up on the USB caddy....
Quote

gerry@gerry-Inspiron-1545 ~ $ rm ~/.wine/dosdevices/com1ln -s /dev/ttyUSB0  com1
rm: invalid option -- 's'
Try 'rm --help' for more information.
gerry@gerry-Inspiron-1545 ~ $



Community Veteran
Posts: 4,939
Thanks: 357
Fixes: 16
Registered: 10-06-2010

Re: COM PORT query Mint 15

Perhaps you don't need to do anything, something set it up automatically for you. Try just using com1 in Wine. If not, pick another number!
Community Veteran
Posts: 17,014
Thanks: 1,212
Fixes: 13
Registered: 06-11-2007

Re: COM PORT query Mint 15

The Program I am trying to work with is called CWCOM.... it is a "on line chat program" that can use the keyboard (like typing)  Joystick .... Mouse.... or COMPORT  these choices are made within the program... I.e. operator choice ...
I can use the program to send morse via the down arrow key..... this does not need the comport..
I can use the program to send morse via the mouse left button.... this does not need the comport.
I can use the program to chat with the keyboard  (like this)... 
But I want to use my morse key... this requires me to connect it to the laptop/computer ( no serial ports ).. via a USB/Serial converter/adapter into a USB port...
I have connected this using windows, and there was a driver CD with the cable... however, I have not used the driver cd with Linux Mint 15... as I think it might not work ?
Whenever I choose the COMPORT option, it immediately reverts back to the KEYBOARD option, as there is no comport activated for the CWCOM program.
In Windows... it is necessary to find the device (serial/usb)  in Device Manager, and then adjust the COMPORT number accordingly, then the CWCOM program can , either , AUTO select the comport, or it can be set as a comport number....
changing the numbers on that setting makes no difference... a comport is not avaialable for CWCOM to use, and it reverts back to keyboard.... in any case the AUTO select should find a comport if one is busy...
Community Veteran
Posts: 17,014
Thanks: 1,212
Fixes: 13
Registered: 06-11-2007

Re: COM PORT query Mint 15

Trying to run the driver under wine.... gets to 95% across the install bar and then stops..... and "not responding" message eventually appears.... Cry
Community Veteran
Posts: 4,939
Thanks: 357
Fixes: 16
Registered: 10-06-2010

Re: COM PORT query Mint 15

I meant create the symlink with a different number.
ln -s /dev/ttyUSB0 com4

In this example, specify com4 in cwcom in Wine.
Community Veteran
Posts: 17,014
Thanks: 1,212
Fixes: 13
Registered: 06-11-2007

Re: COM PORT query Mint 15

Aha..... specific instructions welcome !  Cheesy
Actually, given up on it for tonight... been three hours trying to get it to work....... Cry
Now back on my windows hdd. and going to send some morse on my key to a guy who used to live about 30 miles away, but now lives in the Arizona Desert.!...
will catch up on this later/tomorrow/a couple of days/ next week...... some time soon  Cheesy
will try your suggestion and get back to you.....  Wink
Community Veteran
Posts: 6,607
Thanks: 209
Fixes: 15
Registered: 16-02-2009

Re: COM PORT query Mint 15

Quote from: shutter
rm ~/.wine/dosdevices/com1ln -s /dev/ttyUSB0  com1
rm: invalid option -- 's'

What you have done is combine the two commands, then rm to remove it and the ln -s to add it again,
Put a cr between them
rm ~/.wine/dosdevices/com1
ln -s /dev/ttyUSB0  com1