You are not logged in.

#1 2017-02-19 14:00:30

ninjaprawn
Member
From: Manchester, UK
Registered: 2008-01-26
Posts: 485

Wine and serial cable

Hi guys

I'm a little stuck. So I have a pcb which has a serial port, which I have a serial to USB (ftdi) cable plugged into and running to my laptop. The software to interact with the PCB is windows only, so is installed and being run through Wine.

For some reason, I can't get the software to see the USB connected. Any ideas?

Thanks

Last edited by ninjaprawn (2017-03-05 21:11:28)


2007 - Started using Arch Linux as my only/main OS
- Samsung Series 3, Intel(R) Core(TM) i5-3210M CPU @ 2.50GHz - 8Gb DDR3 ram - 700Gb HDD
On board intel Graphics & Sound

Offline

#2 2017-02-19 17:37:53

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,793

Re: Wine and serial cable

Does the software look for the USB port? or does it look for a serial port?  On windows, your device is likely to show up as some sort of COM port, but it could have some wonky VID:PID that would force Windows to use some custom driver.   On a proper OS, the device is likely to show up as /dev/ttyUSBxx or /dev/ttyACMxx.  These are going to owned by root and group uucp. 

I don't do anything serious in wine, but I would wager that you need to map the /dev/USBxx node to a "COM" port under wine's configuration, then tell your software to use that port.

Last edited by ewaller (2017-02-19 17:38:22)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#3 2017-02-19 18:09:01

ninjaprawn
Member
From: Manchester, UK
Registered: 2008-01-26
Posts: 485

Re: Wine and serial cable

ewaller wrote:

Does the software look for the USB port? or does it look for a serial port?  On windows, your device is likely to show up as some sort of COM port, but it could have some wonky VID:PID that would force Windows to use some custom driver.   On a proper OS, the device is likely to show up as /dev/ttyUSBxx or /dev/ttyACMxx.  These are going to owned by root and group uucp. 

I don't do anything serious in wine, but I would wager that you need to map the /dev/USBxx node to a "COM" port under wine's configuration, then tell your software to use that port.

Cheers mate. Thanks for the advice. I have just done some googling based on what you said. I found this link which sounds along the right lines so I'll work through it http://g8ogj.org/files/Using%20USB%20se … %20ipb.pdf


2007 - Started using Arch Linux as my only/main OS
- Samsung Series 3, Intel(R) Core(TM) i5-3210M CPU @ 2.50GHz - 8Gb DDR3 ram - 700Gb HDD
On board intel Graphics & Sound

Offline

#4 2017-03-05 19:52:13

ninjaprawn
Member
From: Manchester, UK
Registered: 2008-01-26
Posts: 485

Re: Wine and serial cable

ok so progress... or not.

So I have worked through every possible option I can find. I am connecting a PCB to my usb port with an FTDI serial cable. There are no issues with the cable or pcb as it connected fine in Windows.

So back to linux, when I connect the pcb to my laptop, I get /dev/ttyUSB0 which is now symlinked to ~/.wine/dosdevices/com1 which changes from being a triangle with exclamation mark, to a sheet of paper icon when plugged in. So it is definitely finding it and doing what appears to be correct.

I have also added;

KERNEL==”ttyUSB[0 … 9]” SYMLINK+=”%k” GROUP=”users” MODE=”0666” 

to;

/etc/udev/rules.d/ttyUSB.rules

and my terminal output for dmesg and lsusb are;

dmesg | grep
[ 2755.561186] usb 3-4: new full-speed USB device number 7 using xhci_hcd
[ 2755.967217] EXT4-fs (sda1): re-mounted. Opts: data=ordered,commit=600
[ 2757.225013] usbcore: registered new interface driver usbserial
[ 2757.225031] usbcore: registered new interface driver usbserial_generic
[ 2757.225045] usbserial: USB Serial support registered for generic
[ 2757.226551] usbcore: registered new interface driver ftdi_sio
[ 2757.226570] usbserial: USB Serial support registered for FTDI USB Serial Device
[ 2757.226668] ftdi_sio 3-4:1.0: FTDI USB Serial Device converter detected
[ 2757.226777] usb 3-4: Detected FT232RL
[ 2757.227004] usb 3-4: FTDI USB Serial Device converter now attached to ttyUSB0
[ 2757.433434] EXT4-fs (sda1): re-mounted. Opts: data=ordered,commit=600

and

lsusb
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 005: ID 0c45:c35a Microdia 
Bus 001 Device 007: ID 0cf3:3004 Qualcomm Atheros Communications AR3012 Bluetooth 4.0
Bus 001 Device 003: ID 0bda:0129 Realtek Semiconductor Corp. RTS5129 Card Reader Controller
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 010: ID 0403:6001 Future Technology Devices International, Ltd FT232 Serial (UART) IC
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

However when I open the software in through wine to interact with the pcb, i cant see it.

What am I missing?????? Its driving me mad!

Thanks

Last edited by ninjaprawn (2017-03-05 19:57:25)


2007 - Started using Arch Linux as my only/main OS
- Samsung Series 3, Intel(R) Core(TM) i5-3210M CPU @ 2.50GHz - 8Gb DDR3 ram - 700Gb HDD
On board intel Graphics & Sound

Offline

Board footer

Powered by FluxBB