Thursday, 18 February 2016

DV4mini on RPi1

I have had a great deal of success running the DV4Mini on an original RPi Model B with the lower amount of memory (256MB). Obviously, this model does not really have the grunt to run the entire Mono framework and the DV4MF2 GUI (or the original GUI). As a result, I've had to be creative with any interaction with the system.

Please note that the following supposes a connection to a Brandmeister Master Server is wanted, the same would work for a DMR+ Master server, and I presume it would also work for DStar and Fusion, although I have no way to test these.

I have got the Raspberry Pi running the latest version of Raspbian, and I have connected it to the network using a CAT5 cable rather than a USB WiFi dongle. WiFi dongles do work, but where I want the Pi to sit there is somewhat patchy WiFi coverage and I have an RJ45 port available.

Firstly, running the DV4Mini completely headless is definitely possible. In order for the DV4mini to work, it is sufficient to run only the dv_serial program, as this is the binary that actually governs the communication between the USB interface on the dongle and the network connection on the RPi. As long as the dv_serial binary is running, and the dongle is logged into a master server, the GUI does NOT need to be running.

Running the dv_serial binary is best done in a screen session, so that if the SSH connection used to start start the program drops, the program keeps running, and it can be reconnected to easily. To prepare for this, SSH to the Raspberry Pi and run the following:
pi@hotspot:~ $ sudo apt-get install -y screen

Now copy the dv_serial binary to the pi user's home directory (or another user's home directory if you want to run dv_serial as another user). Once the binary is there, you invoke it inside a screen window like this:
pi@hotspot:~ $ screen -S dv4mini ./dv_serial

You will see output on the command line as the DV4mini is initialised and then logs into the last reflector/master server combo it was set to.
You can detach from the screen session using the "Ctrl+a", "d" key sequence and then close the SSH session. When logging in using SSH at a later time, you can simply reconnect to the screen session using
pi@hotspot:~ $ screen -r dv4mini 
For more help with screen, run
pi@hotspot:~ $ man screen

You can then connect to this instance of dv_serial from another computer on the same network by using the IP address field in the GUI, and use the GUI remotely to control the DV4mini, or alternatively you can use the radio itself to change reflectors, by sending a private call to the ID of the reflector you want to connect to. This normally works, although on occasion it takes two attempts. If you still have a SSH session open to the screen session running dv_serial, you will see lines of output indicating you have logged into a new reflector. You then use TG9 as normal to send traffic.
This has been a short description of how the DV4mini dongle can work very well with older or minimal hardware, albeit with some limitations. The above should work equally well with a Pi Zero, although you will either need a USB hub with built in WiFi or a USB hub with a built in Ethernet connection. If you have any comments or questions, please leave a response below.