Week 10 – Many Solutions & DMR

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.

    1. Navigate to the expert editor for MMDVMHost.
    2. Scroll down to DMR.
    3. Your settings should look like this:
    4. 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.
    5. Next scroll down to the DMR Network section of MMDVMHost.
    6. 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.
    7. Click “Apply Changes”

Add Brandmeister panel

  1. Next I added the Brandmeister control panel to the repeater’s admin dashboard. I followed these instructions.
  2. 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.

 

Week 9 – Many Problems

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."
    compileer
    $SYSTEMCTL
    $NDSTOP
    $MMDVMSTOP
    killall -q -I MMDVMHost
    killall -9 -q -I MMDVMHost
    if [ "$CHECK" = "PISTAR" ]; then 
        cp $DIR"/mmdvmhost.service.pistar" /usr/local/sbin/mmdvmhost.service
    fi
    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."
        else
            ln -s /lib/systemd/system/nextion-helper.service /etc/systemd/system/nextion-helper.service 
        fi
    fi
    cp NextionDriver $BINDIR
    echo "+ Check version :"
    NextionDriver -V
    checkversion
    helpfiles
    echo -e "+ NextionDriver installed\n"
    echo -e "+ -----------------------------------------------"
    echo -e "+ We will now start the configuration program ...\n"
    $DIR/NextionDriver_ConvertConfig $CONFIGDIR$CONFIGFILE
    herstart
    exit
fi

Basically all I did was the following:

  1. Stop MMDVMHost with “sudo service mmdvmhost stop”
  2. Download the Nextion Driver from github into the /tmp folder
  3. rpi-rw
    cd /tmp
    git clone https://github.com/on7lds/NextionDriver.git
    cd NextionDriver
    
  4. Compile the driver by running “make”
  5. Then you should end up with a binary called “NextionDriver”.
  6. Copy the binary into /usr/local/bin with
    sudo cp NextionDriver /usr/local/bin/NextionDriver
    
  7. 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.

Problem 2

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

  1. 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.
  2. Use the same script, but have it run after the Pi is completely booted and add a line to restart the MMDVMHost service.

Problem 3

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

  1. Use the solutions for problem 2 as I believe the two problems may be related.
  2. Create a static IP on the Pi and the Computer for the ethernet connection.
  3. Change the PiStar firewall rule for the dashboard from “Private” to “Public.”

Going Forward

  1. Enable DMR and configure it.
  2. Install the Brandmeister control panel on PiStar.
  3. Program the DMR Radio.
  4. Create a blog post about programming the DSTAR and DMR radios.

I also wanted to create a 3D printed case for this project, however I am not sure I will have enough time to do that, especially with encountering these problems.