How to map COM1 to a virtual linux com port ?

Questions about Wine on Linux
Locked
Spirare
Level 1
Level 1
Posts: 5
Joined: Fri Dec 18, 2020 2:23 pm

How to map COM1 to a virtual linux com port ?

Post by Spirare »

Context:
a) I am running a Windows app under wine that needs to connect to a COM port to get GPS data.

b) My Kubuntu is running Kplex (http://www.stripydog.com/kplex/index.html) to multiplex GPS data across devices. It is setup to send GPS data to a virtual com port (pty:direction=out,mode=master,filename=/home/sergio/.virtual_com,group=dialout,perm=640).

Toward a solution:
The Wine User's Guide (4.3.1 Serial and Parallel Ports) talks about remapping. Could I just map a registry key to "/home/sergio/.virtual_com" ?

I am not yet that familiar with Linux to fully understand all of this.

Any hints would be greatly appreciated.
jkfloris
Level 12
Level 12
Posts: 3141
Joined: Thu Aug 14, 2014 10:10 am

Re: How to map COM1 to a virtual linux com port ?

Post by jkfloris »

Could I just map a registry key to "/home/sergio/.virtual_com" ?
Yes, that is possible
Use wine regedit and browse to HKEY_LOCAL_MACHINE\Software\Wine\Ports
Create a new string value with the name COM1
Edit the value data to /home/sergio/.virtual_com

Restart Wine and your new com port should be visible in .wine/dosdevices
Spirare
Level 1
Level 1
Posts: 5
Joined: Fri Dec 18, 2020 2:23 pm

Re: How to map COM1 to a virtual linux com port ?

Post by Spirare »

Great...this is working...well to the extent that the port is now mapped to COM1.

I can see the data stream (NMEA GPS) in COM1 with Putty.

However, WinlinkExpress (Window app) can't connect to that COM1("error opening GPS: Request not supported").

Am I missing something obvious ?

Any hints on how to investigate this problem ?
Spirare
Level 1
Level 1
Posts: 5
Joined: Fri Dec 18, 2020 2:23 pm

Re: How to map COM1 to a virtual linux com port ?

Post by Spirare »

Any suggestion on how to investigate what is actually going on the com port ?
jkfloris
Level 12
Level 12
Posts: 3141
Joined: Thu Aug 14, 2014 10:10 am

Re: How to map COM1 to a virtual linux com port ?

Post by jkfloris »

Unfortunately, I don't have much experience with GPS modules.
Personally I only have a built-in GPS module that sends the data with gpsd, gpspipe and socat to COM1.
This works for me with Garmin Mobile PC.
daveweaton
Level 2
Level 2
Posts: 23
Joined: Mon Aug 30, 2021 2:14 am

Re: How to map COM1 to a virtual linux com port ?

Post by daveweaton »

It's possible that the software installs a driver to run in Windows. My understanding is that those drivers don't do anything in Wine. So perhaps the software is making some sort of a call to a Windows driver which is not supported.
Locked