I’ve been trying to experiment with TinkerCAD to model a 3D printable box for this project. I have the bottom of the case designed with the mounting holes for the Pi. I haven’t been able to figure out how to design the top of the case so that it snaps into place.
Here is a top view of the bottom part of the case.
Here is a top view at an angle.
I have no prototyped this so I can’t even say for sure that the mounting holes are correct, but I believe they are. I did make the holes slightly smaller to allow screws to bite into the plastic.
I enabled DMR last week and spent some time configuring it. This week I had to set the DMR transmit deviation in order to get it to work.
Essentially setting the TX deviation for DMR is the same as how I set the transmit deviation for DSTAR in the beginning. I used a service monitor and checked the deviation level while the repeater was transmitting. It was lower than it should have been, so I increased the level in the expert MMDVMHost editor on the line that said DMR Level. This adjusted the deviation for just DMR, leaving the deviation alone for all other modes.
I also created a box/case for my project out of a large crayon box that I found at WalMart for about $3.
I used a template for the Pi to drill four holes in this box for some #4 screws to mount the Pi and MMDVM duplex. I also put a piece of acrylic between the Pi and this case so that it wouldn’t be pressing against the back of the Pi.
I then cut out a hole for the size of my 3.2in Nextion Display.
I also drilled holes around the display cutout to mount the display in place.
I used plastic from an old ice cream container to create a bezel to go around the display since part of the display doesn’t show anything and is instead used for the touch screen controller/wiring.
I added two external antenna connectors. I bought two male to female jack/panel mount SMA connector extensions for about $6 each and then I added some right angle SMA connectors (male to female) 5 for about $4.
For the external antennas I drilled the holes in the box as far apart as I could and installed the female jack connectors through the hole.
Then I screwed a right angle SMA connector on each jack.
Next, I used a couple right angle SMA connectors on the MMDVM hotspot/repeater board.
Finally, I installed all of the electronics.Here is the finished case.
Last week, I had three problems, two of which I couldn’t fix.
Problems & Solutions
Problem 1 was solved by recompiling the Nextion Driver and reinstalling it by hand.
Problem 2 was that the repeater wasn’t starting up as quickly as it does at home. I thought this was caused by the enterprise WiFi at my university. I’m fairly certain that was the problem. This issue seems to sort itself out, if you’re patient. I’m certain the issue is due to the time it takes the Pi to authenticate with the enterprise WiFi. I did add a button to restart the WiFi from the Nextion display. It is two simple commands.
I added a button to the display’s “System” or utilities screen and made it execute the following commands.
sudo ifdown wlan0 && sudo ifup wlan0
Basically this turns off the wlan0 interface and turns it back on.
Problem 3 was that I couldn’t always access the PiStar dashboard over the WiFi. That problem wasn’t really a problem. Again it had to do with the time the Pi takes to authenticate with the WiFi. I found that if I wait about a minute or two after the display shows the IP address, then go to the displayed IP address in a web browser, the PiStar dashboard appears as it should.
As for the issue with the self-assigned IP address over the ethernet connection, it doesn’t appear to matter. The two devices will communicate with one another given enough time.
A problem I ran into this week was that the repeater board doesn’t always initialize and connect to the software on the raspberry Pi, this is fixed by stopping and starting the mmdvmhost service, which can be done from the Nextion display.
Enable & configure dmr
The first thing I did was enable DMR and I did this from the expert settings for MMDVMHost instead of the main configuration tab. The reason for this is that when you configure from the main tab and click apply changes, you can lose settings you set in the expert MMDVMHost page.
Navigate to the expert editor for MMDVMHost.
Scroll down to DMR.
Your settings should look like this:
What do those settings mean? Enable – On (1) or Off (0) Beacon – Turn on (1) or off (0) beacon or a transmission that happens every so many minutes/hours to tell others your repeater exists. ColorCode – A number for your repeater, typically 1, but may be different. A radio set to a color code of 1 cannot talk to a station with their color code set to 2. SelfOnly – Limit DMR communication to your own callsign only (a Private hotspot) DumpTAData – (1) – Talker Alias data (person’s name/location/callsign) are dropped (0) – Talker Alias data (person’s name/location/callsign) are sent to the RF stations. This can cause issues with some radios, but I set mine to off (0). ModeHang – The number of seconds the repeater should stay listening for DMR over RF after the end of a transmission.
Next scroll down to the DMR Network section of MMDVMHost.
What do these settings mean/do? Enable – Turns on the DMR network/gateway to the internet. Address – The IP Address of the Master Server you’re using. I used Brandmeister 3108 and found its IP address on the Brandmeister website under “Masters.” I believe this is only visible after you’ve logged in with your callsign and Brandmeister password. Port – This is the port on the server you’re connecting too. Leave this as the default. Password – The password to the Master Server. The default for most Masters is “passw0rd”. That’s a zero in place of the letter “o”. Slot1 – This turns on or off slot 1. DMR transmissions are sent in one of two “Time Slots.” Repeaters can receive and carry on two completely separate conversations with one on each time slot. Slot2 – This turns on or off time slot 2. ModeHang – This is the number of seconds the repeater should remain in DMR mode after the end of a network transmission.
Click “Apply Changes”
Add Brandmeister panel
Next I added the Brandmeister control panel to the repeater’s admin dashboard. I followed these instructions.
This is what the Admin Dashboard looks like after adding the Brandmeister control panel. This screenshot was taken before I changed to the US Brandmeister 3108 Server which is why it says “BM United Kingdom” as the DMR Master.
This week, I downloaded a Nextion Display layout created by PD0DIB and modified it to include a system control page and an information page. After trying out the Nextion Driver Installer created by ON7LDS, I could get the screen to display information one time, but after switching pages, the data would disappear. To solve this problem, I looked at the Nextion Driver Installer script and followed most of the steps manually. Doing it this way also allowed me to switch the displayed CPU temperature from celsius to Fahrenheit. This pretty much solved the issues with the display.
In the Nextion Driver Installer Script, I followed this section:
if [ "$ND" = "" ]; then
echo "+ No NextionDriver found, trying to install one."
killall -q -I MMDVMHost
killall -9 -q -I MMDVMHost
if [ "$CHECK" = "PISTAR" ]; then
cp $DIR"/mmdvmhost.service.pistar" /usr/local/sbin/mmdvmhost.service
if [ "$CHECK" = "JESSIE" ]; then
cp $DIR"/mmdvmhost.service.jessie" /lib/systemd/system/mmdvmhost.service
cp $DIR"/mmdvmhost.timer.jessie" /lib/systemd/system/mmdvmhost.timer
cp $DIR"/nextion-helper.service.jessie" /lib/systemd/system/nextion-helper.service
if [ -e /etc/systemd/system/nextion-helper.service ]; then
echo "+ there is already a link /etc/systemd/system/nextion-helper.service"
echo "+ I'll leave it like that."
ln -s /lib/systemd/system/nextion-helper.service /etc/systemd/system/nextion-helper.service
cp NextionDriver $BINDIR
echo "+ Check version :"
echo -e "+ NextionDriver installed\n"
echo -e "+ -----------------------------------------------"
echo -e "+ We will now start the configuration program ...\n"
Basically all I did was the following:
Stop MMDVMHost with “sudo service mmdvmhost stop”
Download the Nextion Driver from github into the /tmp folder
git clone https://github.com/on7lds/NextionDriver.git
Compile the driver by running “make”
Then you should end up with a binary called “NextionDriver”.
This was all done AFTER running NextionDriverInstaller.sh on its own. So, my installation had all the helper files already installed before I ran through these commands.
The hotspot/repeater doesn’t startup right away like it does at home. I’m guessing this is because of the enterprise WiFi at my University. Sometimes the repeater starts right up and works perfectly and other times it does not work.
Problem 2 Solutions
Create a simple script to reset the WiFi connection on the Pi and create a button on the Nextion Display Layout that would allow me to run this script.
Use the same script, but have it run after the Pi is completely booted and add a line to restart the MMDVMHost service.
I could not always access the PiStar dashboard through the ethernet/crossover cable or through the University’s WiFi. Again sometimes I had no issues and other times it would not connect. At first I thought this was due to having both the ethernet and the WiFi running on the Pi, but after removing the ethernet, I had the same issue. I’m growing more suspicious of the enterprise WiFi. As for it not working over the crossover cable, I believe this is due to the fact that the computer is addressing itself with a self-assigned IP address (a 169 address). The problem appears intermittent.
Problem 3 Solutions
Use the solutions for problem 2 as I believe the two problems may be related.
Create a static IP on the Pi and the Computer for the ethernet connection.
Change the PiStar firewall rule for the dashboard from “Private” to “Public.”
After setting up the MMDVM duplex hotspot board, it is necessary to adjust the transmit and receive offsets in the MMDVMHost expert editor section. Basically this corrects the transmit (TX) and receive (RX) frequency of the board, if they’re not on frequency.
I went to a fellow amateur radio operator’s house recently to test my board with his HP 8920A Service Monitor. According to this ham, the service monitor is about 30 years old and cost around $30,000 new. Every 2 years he has it calibrated to NIST standards and it is accurate to +/- 1 Hertz.
The back of the board recommends a TX and RX offset of 500 and then tells you to adjust until the BER or Bit Error Rate is less than 5%. With my friend’s help, I tested the output frequency of the repeater/hotspot board without setting any TX offset and the transmit frequency (FRQ) was about 442.999300Mhz. So I adjusted the TX offset to 500 and retested the transmit frequency. It appears to be getting closer, showing a frequency of about 442.999700Mhz. So I bumped the TX offset up to 800 and that brought the TX frequency up to approximately. 443.000000Mhz, which is right on frequency.
Setting the RX offset is a bit more difficult because there isn’t really a way to test that within Pi-Star. So, I transmitted to the repeater board with my DSTAR handheld and found that I had a bit error rate of 0.1% which really doesn’t need to be fixed.
I set the RX offset equal to the TX offset (800) and that brought the bit error rate down to 0.0%, which is perfect.
I also worked on installing the Nextion Display Driver, however I’m encountering problems with it. The screen layout disconnects from the MMDVMHost software every time the screen changes. I need to work on this a little bit more to solve that problem. I’m thinking the problem is the layout I used. I was testing with a layout from another ham that displays a lot of information and I think the screen has trouble keeping up with the amount of data. I will detail this process in my next post.
First we’ll go turn on the DSTAR digital mode and configure it.
Start by going to your PiStar dashboard in your web browser.
After logging into your dashboard, click on the “Configure” tab.
Next we’ll turn on DSTAR in the MMDVMHost Configuration.
Notice that I also set the RF Hangtime and Net Hangtime to 5 seconds. The hangtime is the amount of time the MMDVM will stay in that mode before allowing other digital mode signals a chance to reach the repeater. RF Hangtime is the amount of time the MMDVM waits after the end of an incoming RF (Radio Frequency) signal. Net Hangtime is the amount of time the MMDVM waits after the end of an incoming network transmission from a distant station.
Click “Apply Changes.”
After the changes are applied, scroll down and you will see a new configuration box named “DSTAR Configuration.” The defaults will look like this:
Here are my settings for DSTAR and I’ll explain them after the photo.
Explanation of Settings
RPT1 Callsign – This is the callsign of the node or repeater with its module letter. B = 70CM / C = 2M
RPT2 Callsign – This is the callsign of the gateway, which in our case will be the same as the repeater, but instead of module “B” it will be “G” for “Gateway.”
Remote Password – This is the password used by the ircDDBRemote application as well as the command-line Remote Control application.
Default Reflector – This is the default reflector that the repeater will connect to. A reflector is like a group chat or conference server for many repeaters to connect to. Note that this can be set to “Startup” or “Manual.” I chose “Manual” because I do not want my repeater to automatically connect to a reflector when the repeater turns on.
APRS HOST – APRS stands for Amateur Packet Reporting System and allows data like GPS coordinates, altitude, speed, etc to be reported to other amateurs. This data can be viewed online at a few sites like https://aprs.fi the “rotate” APRS Host is a round robin server according to http://www.aprs-is.net/aprsservers.aspx
ircDDBGateway Language – Select your language and country code if applicable. I selected “english_(US).”
Time Announcements – If turned on, the hotspot/repeater will announce the time every hour.
Use DPLUS for XRF – I don’t use XRF reflectors, so I left it turned off, but this would allow you to use the DPLUS protocol to connect to XRF Reflectors.
Later this week, I’ll discuss programming your DSTAR radio as well as enabling DMR. I’ll also be adding a Nextion Display to this project and attempting to create my own Nextion Display layout in the Nextion Editor Software.
Last week I decided to purchase a little board called an MMDVM_HS_HAT_DUPLEX. What I purchased is a cheaper clone, but it should work about the same as it uses the same firmware. Essentially it is a tiny low-powered repeater on a single circuit board. It is designed to be a personal duplex hotspot.
The board has an STM32 microcontroller and two ADF7021 radio microchips. The board should produce about 10mW of RF power output. The board has a number of LED’s to indicate various things such as, power, carrier operated squelch (COS), Push-To-Talk (PTT), and an LED for each digital mode the board is capable of such as DSTAR, DMR, YSF, P25, and NXDN.
The board is a hat so it sits directly on top of the Raspberry Pi and uses the Pi’s GPIO pins to communicate with the Pi-Star Software.
Fully assembled, this is what the Pi looks like with the MMDVM Duplex Hot Spot board attached.
The other piece of this project that I decided to add, was a screen. It has not arrived yet. This will solve the problem of not knowing the IP address of the Pi to connect to the dashboard. I did some reading and the MMDVM Duplex Board is capable of working with a small OLED display OR a Nextion touch screen. I opted for the touch screen which will give me more options for controlling the device. On most of the forums and Facebook groups for DSTAR hotspots, other hams seem to recommend the 3.5″ display most often. I opted for a slightly smaller 3.2″ display, specifically the NX4024K032_011R.
It’s slightly cheaper than the 3.5″ screen and slightly smaller. This is an enhanced version with more flash memory and more RAM than the basic models.
This display is a Human Machine Interface that is programmed using a piece of software called Nextion Editor. It’s a What You See Is What You Get (WYSIWYG) editor. The coding to make the screen work seems pretty simple, however I have not looked at the code in the Pi-Star software that actually sends the information to the screen.
Here I found a guide on using the Nextion Editor software, which I’m sure will be useful for creating my own display interface. Here is another guide on creating a screen layout/interface that is specific to the MMDVM and ham radio. The interface is designed, saved to an HMI file, and then compiled into a TFT file, which is then uploaded to the screen. You can upload the TFT file via a USB to TTL serial adapter or by using a microSD card with the TFT file on it, inserted into the microSD card slot on the Nextion Display.
You may also find *.TFT files that other amateur radio operators (hams) have made available on a few different MMDVM Hotspot groups. These files (as long as they’re made for the exact screen you’re using) can be downloaded to your computer and uploaded to your screen. If you can get the *.HMI file which is typically available with the *.TFT files, you can edit the HMI file in Nextion Editor to suit your needs and then upload it to your screen. Here is an example interface from the second guide that another ham has created.
Next week I’ll set up the MMDVM to work with the Raspberry Pi and update the MMDVM’s firmware.
This week, I began the installation and configuration of the Pi-Star software on a Raspberry Pi 3B. In this post I will walk you through step by step, how to image the microSD card. I will also discuss setting up a home WiFi Network. In the next post, I’ll talk about configuring the basics of PiStar including enterprise WiFi networks and hashing the WiFi passwords.
The first step is to download the Pi-Star software using the link in the list of parts. At the time of this writing, the version for the Raspberry Pi is “Pi-Star_RPi_V3.4.16_10-Aug-2018.zip”
Download the wpa_supplicant.conf file. If it opens as a web page, simply copy the contents of the file and paste it into Notepad or Text Edit and save as “wpa_supplicant.conf” without quotes.
In the file, replace the capitalized “SSID” with your network name.
Next in the file, replace the capitalized “PSK” with your network password.
Save the file making sure that the filename is wpa_supplicant.conf.
Imaging the microSD Card
First, we’ll download an SD card imaging tool. For general imaging uses, I like to use a software called Etcher, which is available for Mac, Windows, and Linux. If you need to backup an SD Card, I use a tool for Mac called Apple Pi Baker. You can also use this tool to image SD Cards and it allows you to backup/restore an SD card to/frome a compressed file (.zip, .gzip, .7zip, etc). For Windows there is a program called Win32DiskImager which will allow you to backup or image an SD card in the uncompressed “.img” format. In this tutorial, I’ll use Apple Pi Baker on a MacOS PC.
I’m not going to cover backing up the SD card in this tutorial, but if you have anything on your card that you want to save, be sure you have backed it up first as the following steps will ERASE everything on the card.
First insert the microSD card into the SD card adapter and insert the adapter into your computer. Be sure the switch (if any) on the adapter is in the up position to allow the computer to write to the card.
Next, go to the folder you downloaded Pi-Star into and double click the .zip file to extract its contents. It will be a folder that is extracted.
Double click the folder to enter it and make sure there is a file around 2.5-3gb in size named with a “.img” extension.
Next open Apple Pi Baker and enter your administrator password if prompted. The admin password is required to allow the app to write directly to the SD card device.
Next you should see a screen that looks like this:
Select your SD card in the box under Pi-Crust. Mine isn’t shown in the photo above because it wasn’t inserted when I opened Pi Baker. Just click the green refresh button to the top right of the white box and it should show up.
Be 100% sure you’ve selected the correct SD Card/drive in the Pi-Crust Section. If you have other SD cards or flash drives inserted they may show up as well. SELECT THE CORRECT DRIVE. ALL DATA ON THE SELECTED DRIVE WILL BE ERASED.
Under Pi-Ingredients, click the 3 dots button and find the Pi-Star .img file we found in step five.
Uncheck the “Auto eject after successful restore” checkbox.
Next after you are certain you have everything set correctly and have selected the correct SD card, you’ll click “Restore Backup” in the Pi-Ingredients Section.
You should see a screen like this:
Wait until you get the notification that the process is complete and then you can close Pi-Baker.
Setting Up HOME WiFi
Open Finder or My Computer (This PC) and locate the wpa_supplicant.conf file you edited previously.
Copy the file by right clicking the file and left clicking copy.
Navigate to the SD card which should be labeled “Boot”.
Paste the copied wpa_supplicant.conf file by right clicking in the space free of any files and click paste or just press CTRL+V (Windows) or CMD+V (macOS) to paste the file.
Close Finder or Windows Explorer.
Eject or Safely Remove the SD card. On macOS, drag the SD card to the trash bin or click the eject button next to it in Finder. On Windows, in My Computer or This PC, right click the SD card and click “eject.”
Insert the MicroSD card into the Raspberry Pi and plug in the power cord.
The LED on the Pi should light up red, with a flashing green LED next to it.
Wait a few minutes as the Pi will load the WiFi configuration and reboot.
From your PC, connected to the same WiFi network you setup the Pi on, open your web browser and go to one of the following sites:
This week I continued my research on digital repeaters and software. I’ve decided to use a Raspberry Pi with the Pi-Star image, which contains software used to setup, configure, and maintain a digital repeater. It’s the most complete package I’ve seen and is widely recommended by other hams running digital repeaters. I have worked with this particular software package before so I have some understanding of how it works and how to use it. It basically contains many pieces of software which work together to manage and control a digital repeater. It can also be used to control digital multimode hotspots (duplex or simplex hotspots).
Pi-Star contains the popular digital radio software created by Jonathan Naylor, G4KLX: ircDDBGateway, DSTARRepeater, DMRGateway, and MMDVMHost. It also contains a complete dashboard and can support a wide variety of hardware. MMDVM stands for Multi Mode Digital Voice Modem.
The Raspberry Pi is a great piece of hardware for projects like this due to its cost, reliability, availability, and small size. I will be using the one I have already, a Pi 3B.