Using HDSDR with Wine on Linux and on the Mac

General

HDSDR will run on Linux using Wine (http://www.winehq.org/). This has been tested since HDSDR version 2.13.

HDSDR will run on a Mac using Wine. The ExtIO_SRlite DLL will provide PTT for a suitable SDR. (Remember Options - TX - SDR TX Support.)


ExtIO/Drivers

For proper operation the (T)RX's ExtIO will also need to run.

Wine does support TCP/IP networking. Thus network attached receivers e.g. Hermes should work with HDSDR (I cannot verify without such a device).

Receiver's delivering I/Q to a soundcard, will also be usable. BUT you won't be able to control the LO within HDSDR/it's ExtIO, because most receivers are controlled over USB, but USB is not supported in Wine!

Serial 'CAT' Devices

There are many table transceivers connected via serial CAT interface. These are supported in Wine, but it's setup is not so easy. You may be able to control several transceivers using HamLib or Alinco ExtIO, which are controlled over serial interface. Here a tutorial for the setup in Ubuntu/LinuxMint-Linux setups:

Step 1: open a console
Press a desktop icon for a console or press Alt-F2 on the desktop and enter gnome-terminal. Another alternative is Ctrl-Alt-F2 to switch to a console. You can switch back to GUI with Ctrl-Alt-F7 or Ctrl-Alt-F8.

Step 2: find the device name for your (USB) serial (converter) device
$ dmesg | grep ttyS
$ dmesg | grep ttyUSB

Look for something like this in:
[    0.660955] serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
[    0.700813] 00:0e: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
or
[ 4196.724612] usb 3-5: pl2303 converter now attached to ttyUSB0
[ 4213.783009] pl2303 ttyUSB0: pl2303 converter now disconnected from ttyUSB0
[ 4227.126611] usb 3-3: pl2303 converter now attached to ttyUSB0

Step 3: Have a look, that your user/account has enough access rights
$ ls -al /dev/ttyS* /dev/ttyUSB*
Usually the device' owner is "root" and it is associated with the group "dialout", both with "rw" rights. Others usually won't have any access rights. This is signed with "---" in the coloumns for other.
Now you need root rights:
$ sudo bash
Then add your user to the group dialout. This will grant you access, also after reboot. But you will need to logout and login before you can access the device.
# usermod -a -G dialout <user>     # you may user `whoami` in place of user
If you want immediate acccess to the serial device:
# chmod o+rw /dev/ttyS0               # you need to fill in your device name
You can now exit the root shell

Step 4: Alternative to Step 3, setup a virtual serial line
You can emulate 2 serial ports - to allow control with a terminal (minicom) or some other software (Fldigi) these virtual devices exist only as long as following command is running:
$ socat -d -d pty,raw,echo=0 pty,raw,echo=0
2014/01/26 03:23:58 socat[5287] N PTY is /dev/pts/1
2014/01/26 03:23:58 socat[5287] N PTY is /dev/pts/2
2014/01/26 03:23:58 socat[5287] N starting data transfer loop with FDs [3,3] and [5,5]
You see, that socat has created /dev/pts/1 and /dev/pts/2, which are interconnected like with a null-modem-cable.

With a small modification, you can let socat generate symbolic links for the generated devices, which may be used for Wine:
$
socat -d -d pty,link=$HOME/.wine/dosdevices/com2,raw,echo=0  pty,link=$HOME/.wine/dosdevices/com3,raw,echo=0
Now COM2 and COM3 are connected each other. Unfortunately, you need to start above command every time, before starting HDSDR.

Step 5: Let Wine use the (physical) serial device(s)
Just generate symbolic links to each device in ~/.wine/dosdevices:
$ cd ~/.wine/dosdevices
$ ln -s /dev/ttyS0 com1
$ ln -s /dev/pts/1 com2 # unnecessary with the link= option to socat
$ ln -s /dev/pts/2 com3 # unnecessary with the link= option to socat

Step 6: Let HDSDR (and other programs) find the serial devices as COM<n>
This requires some registry entries in section HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM.
You may edit Wine's registry manually - open ~/.wine/system.reg with your favourite editor and add
[HARDWARE\\DEVICEMAP\\SERIALCOMM]
"Serial1"="COM1"
"Serial2"="COM2"
"Serial2"="COM3"
Create one line per serial device. But take care that all wine applications are closed when editing.

Now you are ready to use the serial device within HDSDR in Wine in Linux.
The above steps were tested January 2014 with Ubuntu and LinuxMint distributions.




Comments