DV4mini on Linux and MacOS - marco-garcia/ham GitHub Wiki

This procedure has been tested under Ubuntu Linux 16.04 LTS only, but should work on other Linux distros and MacOS as well. If you have the opportunity to test, please send a message to [email protected] .

Boot your system with the DV4mini USB stick pluged in, then follow the “SETUP” steps below. After making it work for the first time, check “USING AFTER SETUP” section.

IMPORTANT: your system must be set to timezone UTC – on Debian/Ubuntu based distros, use “sudo dpkg-reconfigure tzdata”, on the 1st screen “none of the above”, and next “UTC

You can get your DV4mini USB stick & more information about the device at:

http://www.dv4mini.de

http://wirelesshold.com/


SETUP

1) Install latest winehq “stable” release (by Aug 2017 version 2.0.2) following the procedures:

Ubuntu: https://wiki.winehq.org/Ubuntu
Debian: https://wiki.winehq.org/Debian
MacOS: https://wiki.winehq.org/MacOS

2) Set wine version to “Windows 10”:

$ winecfg

First time you run winecfg, it’s likely to ask you to install some additional modules, normally “mono” and “gecko” – just choose install/yes as much as it asks. After winecfg goes up:

tab “Applications” > “Windows version” > Windows 10 > OK

3) Create symlink on ~/.wine/dosdevices:

You’ll need to find out what device is being created when you insert the DV4mini dongle (you could use “tail -f /var/log/syslog” and watch the logs as you insert the USB device); in my case, it was /dev/ttyACM0

$ ln -s /dev/ttyACM0 ~/.wine/dosdevices/com4

Important: make sure you have proper rights to access the device, by checking if your user is member of the group under wich it has been created:

$ ls -la /dev/ttyACM0
crw-rw---- 1 root dialout 166, 0 Ago 25 17:04 /dev/ttyACM0
$ cat /etc/group | grep dialout
dialout:x:20:your_user

If your user isn’t on the proper group:

$ sudo usermod -aG dialout your_user

On Ubuntu 16.04, it was necessary to set the serial as “raw” interface, otherwise the voice quality when testing (i.e. connecting to echo module 99) will be bad; to fix that,create an udev rule:

$ sudo vi /etc/udev/rules.d/49-dv4mini.rules
# 04d8:000a - DV4mini
ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="000a", RUN+="/bin/stty -F /dev/%k raw"

Then reboot the system – actually it is always recommended to shutdown (power off) and then power on, to have energy on the USB dongle go off, otherwise you may experience serial connection problems.

4) Install DV4mini software (tested version 1.65)

Download dv4mini software from http://www.dv4mini.de/edownload.html

$ wine 2016_05_23_setup.exe

5) First start dv_serial.exe

$ wine ~/.wine/drive_c/Program\ Files\ \(x86\)/DV4mini/dv_serial.exe

Depending on what version of dv4mini software you’ve installed, the path can be either “Program Files (x86)” or “Program Files”; if “wine: cannot find (…)” appears, just change the command above accordly.

If everything goes fine, you’ll see in the logs the dv4mini dongle has been found by the dv_serial.exe (among a lot of other stuff)

6) Then start dv4mini.exe after some seconds

$ wine ~/.wine/drive_c/Program\ Files\ \(x86\)/DV4mini/dv4mini.exe

On the 1st time it runs, it’s usual to present internet connection and other kind of errors, show an alert then close itself; just run the command again to star it over

After the GUI comes up, insert your DMR ID and set frequency accordly

Some other messages are likely to show up on promt and on the GUI itself, but the program connects to the reflector and works.


USING AFTER SETUP

In order to have it working with last used settings, you only need dv_serial.exe running in background:

$ wine ~/.wine/drive_c/Program\ Files\ \(x86\)/DV4mini/dv_serial.exe > /dev/null &

You could include this line on a boot script – but remember to run it as your user, as the settings reside in your home directory.

Only if you wish to change the settings (i.e. the frequency or reflector, or even the mode), you’ll need to open dv4mini.exe – but remember to first start dv_serial.exe as mentioned above, and give at least 30 seconds for it to come up:

$ wine ~/.wine/drive_c/Program\ Files\ \(x86\)/DV4mini/dv4mini.exe

If you close dv4mini.exe, it’ll also close dv_serial.exe. So to use the reflector, you’ll need to start dv_serial.exe again

To make life simple, I’ve created startup scripts dv4mini_background and dv4mini_configure .


.
.
.
.
.
.
.
.
.


TROUBLESHOOTING & TESTING LOG DATA

KEPT ONLY FOR REFERENCE, DO NOT USE

https://wiki.winehq.org/Wine_User%27s_Guide#Serial_and_Parallel_Ports

wine ~/.wine/drive_c/Program\ Files\ \(x86\)/DV4mini/dv_serial.exe

wait some seconds

wine ~/.wine/drive_c/Program\ Files\ \(x86\)/DV4mini/dv4mini.exe
$ sudo apt-get install wine
$ wine <dv4mini_installer>

set wine configuration to Windows 10 version:

$ winecfg
$ winetricks vcrun2008
$ winetricks vcrun2012
$ winetricks vcrun2013
$ cd ~/.wine/drive_c/Program\ Files\ \(x86\)/DV4mini/
$ wine dv4mini.exe
(...)
err:module:import_dll Library VCRUNTIME140.dll (which is needed by L"C:\\Program Files (x86)\\DV4mini\\dv_serial.exe") not found
err:module:import_dll Library api-ms-win-crt-stdio-l1-1-0.dll (which is needed by L"C:\\Program Files (x86)\\DV4mini\\dv_serial.exe") not found
err:module:import_dll Library api-ms-win-crt-string-l1-1-0.dll (which is needed by L"C:\\Program Files (x86)\\DV4mini\\dv_serial.exe") not found
err:module:import_dll Library api-ms-win-crt-runtime-l1-1-0.dll (which is needed by L"C:\\Program Files (x86)\\DV4mini\\dv_serial.exe") not found
err:module:import_dll Library api-ms-win-crt-utility-l1-1-0.dll (which is needed by L"C:\\Program Files (x86)\\DV4mini\\dv_serial.exe") not found
err:module:import_dll Library api-ms-win-crt-convert-l1-1-0.dll (which is needed by L"C:\\Program Files (x86)\\DV4mini\\dv_serial.exe") not found
err:module:import_dll Library api-ms-win-crt-time-l1-1-0.dll (which is needed by L"C:\\Program Files (x86)\\DV4mini\\dv_serial.exe") not found
err:module:import_dll Library api-ms-win-crt-math-l1-1-0.dll (which is needed by L"C:\\Program Files (x86)\\DV4mini\\dv_serial.exe") not found
err:module:import_dll Library api-ms-win-crt-locale-l1-1-0.dll (which is needed by L"C:\\Program Files (x86)\\DV4mini\\dv_serial.exe") not found
err:module:import_dll Library api-ms-win-crt-heap-l1-1-0.dll (which is needed by L"C:\\Program Files (x86)\\DV4mini\\dv_serial.exe") not found
err:module:LdrInitializeThunk Main exe initialization for L"C:\\Program Files (x86)\\DV4mini\\dv_serial.exe" failed, status c0000135
(...)
$ strace -odv4mini_strace.log -e trace=open mono dv4mini.exe

DV4mini manual http://75.151.47.161/Manual-DV4mini_English-V2_0-2016_07_23.pdf

running DV4mini on Debian / Ubuntu and variants (didn’t work for me)

https://askubuntu.com/questions/486145/connecting-a-pyboard-via-usb-gives-could-not-grab-port-tty-ttyacm0

$ sudo vi /etc/udev/rules.d/49-dv4mini.rules
# 04d8:000a - DV4mini
ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="000a", ENV{ID_MM_DEVICE_IGNORE}="1"
ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="000a", ENV{MTP_NO_PROBE}="1"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="000a", MODE:="0666"
KERNEL=="ttyACM*", ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="000a", MODE:="0666"
$ sudo udevadm control --reload-rules

http://www.kb8aob.info/running-a-dv4mini-on-a/

http://www.buckhannonwv.info/ham//draft-3-of-how-to.pdf

install mono-complete (didn’t work for me)

$ sudo apt-get install mono-complete

make a working directory

$ mkdir ~/dv4mini

download “ARM-Linux software” from http://www.dv4mini.de/edownload.html and move it to the working directory

$ cd ~/dv4mini
$ mv ~/Downloads/ARMHF_32bit.zip ./
$ unzip ARMHF_32bit.zip

idVendor=04d8
idProduct=000a

usb 1-1: New USB device found, idVendor=04d8, idProduct=000a
Aug 20 21:41:55 marco-Latitude-E5470 kernel: [77046.146789] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Aug 20 21:41:55 marco-Latitude-E5470 kernel: [77046.146791] usb 1-1: Product: DV4mini Virtual Com
Aug 20 21:41:55 marco-Latitude-E5470 kernel: [77046.146793] usb 1-1: Manufacturer: DV4mini ASF
Aug 20 21:41:55 marco-Latitude-E5470 mtp-probe: checking bus 1, device 7: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-1"
Aug 20 21:41:55 marco-Latitude-E5470 mtp-probe: bus: 1, device: 7 was not an MTP device
Aug 20 21:41:55 marco-Latitude-E5470 kernel: [77046.205738] cdc_acm 1-1:1.0: ttyACM0: USB ACM device
Aug 20 21:41:55 marco-Latitude-E5470 kernel: [77046.205908] usbcore: registered new interface driver cdc_acm
Aug 20 21:41:55 marco-Latitude-E5470 kernel: [77046.205910] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
Aug 20 21:42:11 marco-Latitude-E5470 ModemManager[965]: <info>  Creating modem with plugin 'Generic' and '1' ports
Aug 20 21:42:11 marco-Latitude-E5470 ModemManager[965]: <warn>  Could not grab port (tty/ttyACM0): 'Cannot add port 'tty/ttyACM0', unhandled serial type'
Aug 20 21:42:11 marco-Latitude-E5470 ModemManager[965]: <warn>  Couldn't create modem for device at '/sys/devices/pci0000:00/0000:00:14.0/usb1/1-1': Failed to find primary AT port
⚠️ **GitHub.com Fallback** ⚠️