Pi-Star notes

Revised: Aug 2019, CC BY-SA = open in new tab ]
Most up-to-date version: amateurradionotes.com/pi-star-notes.htm
Links: Standalone articles & PDFs

a) Pi-Star: sites

b) Pi-Star: forums & groups

c) Pi-Star: articles

d) Pi-Star: presentations

e) Pi-Star: videos

f) Pi-Star: hardware & software

g) Pi-Star: tools

1) SSH Access to Pi-Star

You can use SSH to access Pi-Star directly from the Pi-Star Expert Editor:

  1. Enter the Expert Editor:
    • On the Configuration page, click the Expert link.
    • Or, for macOS, Linux, and Windows 10, you can use the URL: http://pi-star.local/admin/expert. For older versions of Windows: http://pi-star/admin/expert.
  2. Click the SSH Access link and log in.
    To use the full screen version of the SSH Access client, click the "fullscreen SSH client" link at the bottom of the window and log in.

Alternatively, use a standalone SSH app

Using a standalone SSH app is recommended for running Pi-Star updates and upgrades:

Some SSH commands that can be run

See also:

2) Port forwarding

Port forwarding is becoming less necessary for hotspots, but may be needed for QuadNet Smart Group and some X-Reflectors (XRF).

Notes:

3) Radio/modem types supported

  1. Icom Repeater Controller ID-RP2C (DStarRepeater Only)
    For more info, see the Pi-Star User Forum post: Icom RP2C support
  2. DVMEGA Raspberry Pi Hat (GPIO) - Single Band (70cm)
  3. DVMEGA Raspberry Pi Hat (GPIO) - Dual Band
  4. DVMEGA on Arduino (USB - /dev/ttyUSB0) - Dual Band
  5. DVMEGA on Arduino (USB - /dev/ttyACM0) - Dual Band
  6. DVMEGA on Arduino (USB - /dev/ttyUSB0) - GMSK Modem
  7. DVMEGA on Arduino (USB - /dev/ttyACM0) - GMSK Modem
  8. DVMEGA on Bluestack - Single Band (70cm)
  9. DVMEGA on Bluestack - Dual Band
  10. GMSK Modem (USB DStarRepeater Only)
  11. DV-RPTR V1 (USB)
  12. DV-RPTR V2 (USB)
  13. DV-RPTR V3 (USB)
  14. DVAP (USB)
  15. MMDVM / MMDVM_HS / Teensy / ZUM (USB)
  16. STM32-DVM / MMDVM_HS - Raspberry Pi Hat (GPIO)
  17. STM32-DVM (USB)
  18. ZUMspot Libre (USB)
  19. ZUMspot - USB stick
  20. ZUMspot - Raspberry Pi Hat (GPIO)
  21. ZUM Radio - MMDVM for Pi (GPIO)
  22. MicroNode Nano-Spot (Built In)
  23. MicroNode Teensy (USB)
  24. MMDVM F4M-GPIO (GPIO)
  25. MMDVM F4M/F7M (F0DEI) for USB
  26. MMDVM_HS_Hat (DB9MAT & DF2ET) for Pi (GPIO)
  27. MMDVM_HS_Hat Dual (DB9MAT, DF2ET & DO7EN) for Pi (GPIO)
  28. MMDVM_HS_Hat Dual (DB9MAT, DF2ET & DO7EN) for Pi (USB)
  29. MMDVM_HS_AMBE (D2RG HS_AMBE) for Pi (GPIO)
  30. MMDVM_RPT_Hat (DB9MAT, DF2ET & DO7EN) for Pi (GPIO)
  31. MMDVM_HS_MDO Hat (BG3MDO) for Pi (GPIO)
  32. MMDVM_HS_NPi Hat (VR2VYE) for Nano Pi (GPIO)
  33. MMDVM_HS_Hat Dual (VR2VYE) for Pi (GPIO)
  34. MMDVM_NANO_DV (BG4TGO) for NanoPi Air (GPIO)
  35. MMDVM_NANO_DV (BG4TGO) for NanoPi Air (USB)

4) Entering read-write mode

By default, Pi-Star is in read-only mode. To toggle:

  1. Log into Pi-Star via SSH.
  2. To enable read-write mode:
    rpi-rw
    The command line prompt will change
    from: pi-star@pi-star(ro):tmp$
    to: pi-star@pi-star(rw):tmp$
  3. To re-enable read-only mode:
    rpi-ro

5) Running commands as the root user

To run commands as the root user:

  1. Log into Pi-Star via SSH.
  2. Run a single command as the root user:
    sudo [cmd]
    for example:
    sudo pistar-update

To switch user (su) to the root user (proceed carefully when using the root user; you can easily mess things up):

  1. Log into Pi-Star via SSH.
  2. Switch to the root user:
    sudo su
    The command line prompt will change
    from: pi-star@pi-star(ro):tmp$
    to: root@pi-star-m(ro):pi-star#
    – or –
    To switch to the root user and to the root user's home directory (/root):
    sudo su -
    The command line prompt will change
    to: root@pi-star-m(ro):~#
  3. To exit the root user:
    exit

There's a good answer about sudo su and related commands on AskUbuntu.com.

6) Expanding the filesystem

Note: For Pi-Star version 4 and above, this happens automatically as part of the first boot up.

Pi-Star runs in read-only mode and takes up very little space on the microSD card. If Pi-Star is used for a hotspot, 4 GB usually is more than enough space. However, if Pi-Star is used for a repeater or you run it hard, 8 GB is probably better, and you should expand the filesystem to take up all the available space.

In Raspbian, the command to expand the filesystem to fill the SD card is part of the raspi-config utility, but that utility isn't available Pi-Star; instead, run the Pi-Star expand command:

  1. Log into Pi-Star via SSH.
  2. Optionally, look at the pre-expansion disk space used by the filesystem in human-readable format (pay attention to the /dev/root numbers):
    df -h
  3. Expand the root partition:
    sudo pistar-expand
    (Note: "pistar" with no hyphen)
  4. Important! Reboot Pi-Star.
  5. Optionally, look at the post-expansion numbers.

Example: When I ran pistar-expand on the filesystem on my 16 GB microSD card to test it out, I ended up with 1.28 GB used (9%) and 13.37 GB free.

7) Manually adding or overriding repeaters and reflectors

Pi-Star updates the lists of reflectors and repeaters stored in the hosts files (/usr/local/etc) nightly, but there may be times when you want to use one that isn't listed or override an incorrect entry. If you add the changes to the regular hosts file, they will be overwritten the next time a Pi-Star Update is run, either by the automatic overnight method or a manual update. To get around this, you can add the changes manually to the override hosts file in the /root directory, which is the root user's home directory. Once you've done this, you can run a regular Pi-Star Update and your changes will be appended to the regular hosts file.

  1. Log into Pi-Star via SSH.
  2. Enable read-write mode:
    rpi-rw
  3. Switch user so that you're in root's home directory (/root) with root's privileges:
    sudo su -
  4. Edit the appropriate hosts file, for example:
    nano DExtra_Hosts.txt
    Note: The filename, including capitalization, must be exact. Available hosts files: DCS_Hosts.txt, DMR_Hosts.txt, DPlus_Hosts.txt, NXDNHosts.txt, XLXHosts.txt (for DMR), DExtra_Hosts.txt, and P25Hosts.txt. (There isn't a file for YSF Hosts. According to Andrew, M1DNS, in the Pi-Star User Forum, "The list is generated from the online registry. Register at https://register.ysfreflector.de/ and Ur reflector will automagically get added to the server that updates pistar.")
  5. Make your additions or changes.
    Note: For the DPlus_Hosts.txt file, you can add a capital L to the end of the line to force the entry in this file to override any duplicates in the main Pi-Star host file.
  6. Write out the changes (^o), and exit (^x).
  7. Exit root user:
    exit
  8. Re-enable read-only mode:
    rpi-ro
  9. Run a Pi-Star update so your changes get appended to the files in /usr/local/etc:
    sudo pistar-update
  10. Note: From what I've seen, the P25 and NXDN Hosts files work a bit different from the other modes. The other modes append the addition in the root hosts files to the hosts files with the same name in /usr/local/etc. But for P25 and NXDN, they are added to a different file in /usr/local/etc: P25HostsLocal.txt and NXDNHostsLocal.txt. Regardless, the outcome is the same. After you run the Pi-Star Update, you should find your added reflector in the P25 or NXDN Startup Host drop-down list on the Configuration page, and it won't get deleted by the automatic overnight update.

Here's an example of the file for adding a DPlus entry.

#######################################
# #
# DPlus_Hosts.txt - Overrides #
# #
#######################################
# #
# Add your over-ride lines below, #
# following the example #
# please make sure that lines are tab #
# delimited and NOT space delimited. #
# #
# Adding a capital L to the end of the #
# line will force the entry in this #
# file to override any duplicates #
# in the Pi-Star host files.#
# #
# #
#######################################
# Reflector IP/Hostname Lock #
#######################################
#REF000 1.2.3.4 L
XRF005 216.16.240.236 L

7a) Method for overriding default XLX rooms

As of Pi-Star Dashboard 20190115, this is now handled via Configuration > DMR Configuration > DMR Master = DMRGateway > XLX Startup Module.

8) Updating hotspot firmware via Pi-Star

It's possible to update the firmware of several hotspot boards via Pi-Star.

Standalone article: Updating hotspot firmware via Pi-Star
Related article: Updating and upgrading Pi-Star

Note: These instructions are for hotspots. For updating firmware on MMDVM repeaters, see the Pi-Star Wiki article: Headless MMDVM Firmware Building.

8a) Updating ZUMspot/MMDVM_HS, etc.

Current version as of Jun 1, 2019: v1.4.17

Beginning with Pi-Star dashboard v20181214, you can see in the Radio Info section which TCXO chip (12.288 or 14.7456 MHz) a ZUMspot/MMDVM_HS board is running. This info is needed to determine which firmware update to apply, for example, with the MMDVM_HS_HAT or MMDVM_HS_DUAL_HAT, there are separate firmware update script commands for the different chips.
Pi-Star dashboard displaying firware (FW) version

Firmware release notes on GitHub: ZUMspot/MMDVM_HS.

  1. Log into Pi-Star via SSH.
  2. Run a Pi-Star Update:
    sudo pistar-update
    Note: If there's anything unusual about the update process, for example, if there are unusual error messages or it finishes with a "mount: / is busy" message, it might be a good idea to rerun the update and also to reboot before proceeding:
    sudo reboot
  3. Run one of the following commands:
    Note 1: It isn't necessary to first put Pi-Star into read-write mode (rpi-rw); the script takes care of that.
    Note 2: When you first enter one of the following commands, you'll see a message showing the current version of firmware that is installed on your hotspot, for example:
    MMDVM_HS_Hat-v1.3.3 20180224 ADF7021 FW by CA6JAU GitID #d90263f
    Press any key to write the hs_hat firmware to this modem or Ctrl-C to quit…

    If you press any key to continue, the next thing you'll see is a message about the new version of firmware that is being installed, for example:
    Flashing your hs_hat modem to the latest version
    --2018-05-23 08:41:20-- http://github.com/juribeparada/MMDVM_HS/releases/download/v1.3.6/ install_fw_hshat.sh
    • ZUMspot board connected to GPIO:
      sudo pistar-zumspotflash rpi
    • MMDVM_HS_Hat board with 14.7456 MHz TCXO1 connected to GPIO:
      sudo pistar-mmdvmhshatflash hs_hat
    • MMDVM_HS_Hat board with 12.288 MHz TCXO connected to GPIO:
      sudo pistar-mmdvmhshatflash hs_hat-12mhz
    • MMDVM_HS_DUAL_Hat board with 14.7456 MHz TCXO connected to GPIO:
      sudo pistar-mmdvmhshatflash hs_dual_hat
    • MMDVM_HS_DUAL_Hat board with 12.288 MHz TCXO connected to GPIO:
      sudo pistar-mmdvmhshatflash hs_dual_hat-12mhz
    • Nano Hat board connected to GPIO:
      sudo pistar-vyehsflash nano_hs
    • HS_DUAL_HAT (VR2VYE) connected to GPIO:
      pistar-vyehsflash hs_dual_hat
    • NanoDV NPi board:
      sudo pistar-nanodvflash pi
    • NanoDV USB board:
      sudo pistar-nanodvflash usb
    • BD7KLE/BG3MDO devices:
      sudo pistar-mdoflash
    • ZUMspot duplex board connected to GPIO:
      sudo pistar-zumspotflash rpi_duplex
    • ZUMspot USB key:
      sudo pistar-zumspotflash usb
    • USB-connected Libre Modem:
      sudo pistar-zumspotflash libre
  4. A prompt will tell you to press any key to begin.
  5. When the update is finished, another prompt will tell you to press any key to reboot Pi-Star. Be patient, this step takes a bit of time during which it doesn't look like anything is happening.
  6. Once the firmware update is complete, you can see the new version in the Radio Info module on the Pi-Star Dashboard or Admin pages.

[1] TCXO = Temperature Compensated Crystal Oscillator
[2] The script for updating a ZUM Radio MMDVM-Pi board can be found here: GitHub: juribeparada/MMDVM_man.

8b) Updating DVMEGA mounted on an RPi

Alert: This method doesn't work with Pi-Star 4.0.0-RC3 or RC4.

Note: This method, which was figured out by Tom, ON4TOP. Tony Corbett, G0WFV, discusses it in detail on his Radio Geek blog, HOW-TO Update DVMega firmware without a programmer or an Arduino:

Tom, ON4TOP, has come to your rescue. He has figured out that it is possible to flash the DVMega firmware using the Rpi itself with the DVMega still in situ by wiring the reset pin of the ATMEGA328 directly to a spare GPIO port and then using (a slightly modified version of) avrdude to flash the hex file straight over /dev/ttyAMA0. The same procedure works just as well on a single band DVMega….

Subsequently, Andy Taylor, MW0MWZ, adapted this method for use with Pi-Star. What follows is a summary of Andy's adaption.

This process works in Pi-Star's default Read-Only mode. These are the instructions for the non-"Japan" firmware update. (Sorry Japanese hams but I don't know the process for the "Japan" firmware update.)

  1. For updating the DVMEGA firmware using a Raspberry Pi 3, solder a jumper wire between the ATMEGA328 reset pin and GPIO header Pin 7.
    - - - - - - - - - - - - - - -
    Important! Soldering a DVMEGA and updating its firmware are at your own risk. The only thing that is guaranteed is that if you wreck your DVMEGA doing this, then you own a wrecked DVMEGA.
    - - - - - - - - - - - - - - -
    Important! This jumper configuration is for use only when using the Raspberry Pi for updating the firmware. When using the BlueStack board, there is a different configuration and method (see Updating DVMEGA firmware using a BlueStack board).
    Note: You can leave the soldered jumper wire in place after updating the firmware, making subsequent updates much easier.
     
    DVMEGA-DUAL
    Illustration of DVMEGA-DUAL board showing where to connect the jumper wire for firmware update using the RPi
    Photo DVMEGA board showing the jumper wire in place
     
    DVMEGA-SINGLE:
    Illustration of DVMEGA-DUAL board showing where to connect the jumper wire for firmware update using the RPi
  2. SSH into your Pi-Star.
  3. Change directory to tmp:
    pi-star@pi-star(ro):~$ cd /tmp
  4. Download the imaging tools:
    pi-star@pi-star(ro):tmp$ wget --tries=3 http://www.pistar.uk/downloads/dvmega-flash-tools.zip
  5. Download the DVMega firmware update file:
    1. To find the latest firmware version, visit the DVMEGA Downloads page and look in the section for BlueDV-MMDVMhost for Raspberry Pi.
      Where ### is the firmware update version:
      • For firmware versions 3.19 and earlier:
        pi-star@pi-star(ro):tmp$ wget --tries=3 http://www.dvmega.nl/wp-content/uploads/2018/11/DVMEGA_RH_V###_UNO.zip
      • For firmware versions 3.26 and later:
        pi-star@pi-star(ro):tmp$ wget --tries=3 http://www.dvmega.nl/wp-content/uploads/2018/11/DVMEGA_RH_V###_RPI.zip
      • - - - - - - - - - - - - - - -
        Thanks to Bruce, NB0DV, for his post about the change that happened with v3.26 on the Pi-Star User Forum.
        - - - - - - - - - - - - - - -
        Note: I added --tries=3 after I ran into a problem with the DVMEGA site being unavailable the first time I tried this. The retries kept happening and each one took a long time, so this step seemed to be in an unending loop. I ended up rebooting the device to break the looping. Turns out the default for wget (web get) is 20 retries, which seems excessively high to me for this operation.
        - - - - - - - - - - - - - - -
    2. Unzip both imaging tools and firmware files to the dvmega directory:
      pi-star@pi-star(ro):tmp$ unzip -d dvmega dvmega-flash-tools.zip
    3. Where ### is the firmware update version:
      • For firmware versions 3.19 and earlier:
        pi-star@pi-star(ro):tmp$ unzip -j -d dvmega DVMEGA_RH_V###_UNO.zip
      • For firmware versions 3.26 and later:
        pi-star@pi-star(ro):tmp$ unzip -j -d dvmega DVMEGA_RH_V###_RPI.zip
      • - - - - - - - - - - - - - - -
        Note: The -d switch causes the files to be extracted into the dvmega folder. The -j switch extracts files into the current folder without the folder structure in zip file being recreated.
        - - - - - - - - - - - - - - -
    4. Change directory to dvmega:
      pi-star@pi-star(ro):tmp$ cd dvmega/
    5. In version 3.26, two hex files are inflated: dvmega/DVMEGA_RH_V326_RPI.hex and dvmega/DVMEGA_RH_V326_RPI_JAPAN.hex. Remove the one you don't need. In my case, I'm installing the non-JAPAN firmware, so:
      pi-star@pi-star(ro):dvmega$ rm DVMEGA_RH_V326_RPI_JAPAN.hex
    6. Run the script:
      pi-star@pi-star(ro):dvmega$ sudo ./flash_gpio.sh
    7. When the script is finished, you'll see:
      strace: |autoreset: Broken pipe
      Once flashing has been completed, you should reboot your Pi-Star
    8. Reboot Pi-Star:
      pi-star@pi-star(ro):dvmega$ sudo reboot
      (or you can exit the SSH session and reboot from the Pi-Star dashboard).

9) Fine tuning to reduce high BER

If you're experiencing high (greater than 1%) Bit Error Rate (BER) with your radio, you can try reducing it by adjusting the RX Offset:

  1. Set up Pi-Star with the MMDVMHost Configuration Mode you want to use. Be sure to apply changes.
  2. The best way to work on this is to have Pi-Star open in two browsers:
    1. Set up the first to view the Expert Editor, where you'll do the adjustments:
      1. Enter Expert Editor: pi-star.local/admin/expert.
      2. Click MMDVMHost.
      3. Scroll down to the Modem section and find the RXOffset setting.
    2. Set up the second to view the dashboard so you can view the resulting BER readings.
  3. The easiest thing to do is to make calls lasting a few seconds to a Parrot talkgroup or reflector.
  4. In the Expert Editor, adjust the RXOffset setting, make a parrot call, and observe the readings. You're aiming for a BER of less than 1% preferably less the 0.5%.
    1. Begin with +/-100 offsets, and see how that affects the BER.
    2. Once you find the lowest BER with the +/-100-step offsets, repeat the process with +/-50-step offsets, and finally +/-10-step offsets until you find the lowest BER.
  5. Repeat this process in each MMDVMHost Configuration Mode in which you're experiencing high BER, until you achieve the optimal BER. If you can't find a good balance for the BER between the different modes, it may be better to use different hotspots for each different mode.

Alternative and more exact method to calculate offsets: Daniel, K9NPX, has a good article on using MMDVMCAL to get more exact RXOffset (and TXOffset) settings for a DMR radio: Hotspot Offset Calibration.

10) Manually adding WiFi settings to RPi

After flashing the Pi-Star image to microSD card, you can manually add the WiFi settings you want used so that they'll auto-install on first boot up:

  1. Create a wpa_supplicant.conf file. I used NotePad++ for this. The file should contain the following lines and should be saved as a plain txt file with the name wpa_supplicant.conf (replace WirelessNetworkName and WirelessNetworkPassword with your own network's name and password):
    • ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
      update_config=1
      ap_scan=1
      fast_reauth=1
      country=JP
      network={
      ssid="WirelessNetworkName"
      psk="WirelessNetworkPassword"
      id_str="0"
      priority=100
      }

      Note: JP is the default country code because it has the broadest selection of channels. It's fine to leave that as is, no matter where you are located.
  2. Optionally, you can add additional WiFi connections in the same way:
    1. The first WiFi connection should have an ID of 0 and a priority of 100:
      • id_str="0"
        priority=100
    2. For each additional WiFi connection, increment the ID by one and decrement the priority by one, for example, for the second WiFi connection:
      • id_str="1"
        priority=99
  3. Insert into your computer a microSD card that was preloaded with the Pi-Star image (such as the one that comes with a ZUMspot kit) or flash a fresh Pi-Star image to a microSD card.
    Note: You can ignore any system messages about needing to format the card that are displayed when you first insert the card or after you finish flashing the image. After flashing the Pi-Star image to the microSD card, eject it, and then reinsert it.
  4. Copy the wpa_supplicant.conf file to the boot partition of the freshly imaged microSD card, and then eject it again.
  5. Insert the microSD card into the RPi. Upon boot-up, the file is moved to:
    /etc/wpa_supplicant/wpa_supplicant.conf
    and becomes the installed wireless network settings.
  6. If necessary, you can subsequently change the wireless network settings (add, edit, or delete) via Wireless Configuration in Pi-Star's Configuration view, or via WiFi Config in Pi-Star's Expert Editor.

11) Connecting a Pi-Star hotspot via cell phone

You also can connect a Pi-Star hotspot to a cell phone, wirelessly or via USB tethering. This makes it possible to easily create a mobile hotspot.

Important! Make sure your battery pack or power supply provides enough amperage to your hotspot; otherwise, it may not work or may work erratically. This is always the case with hotspots, but since connecting a hotspot to a cell phone is often done to make the hotspot mobile, and a battery pack is often used in that case, it's worth emphasizing this.
- - - - - - - - - - - - - - -
Note: I had to turn off the VPN service that was running on my Android phone before I was able to connect to the Pi-Star dashboard via the phone's hotspot connection, whether the connection was via WiFi or USB tethering.

11a) Connecting via WiFi

  1. If you haven't already, set up your phone's hotspot with a name and password. Important! Don't use special characters in your phone's WiFi Hotspot network name (SSID). They can prevent connection.
  2. Add your phone's hotspot name and password to Pi-Star.
    • You can add more than one wireless network connection. If you have multiple wireless network connections, when you boot up Pi-Star, it will scan each one in turn based on its priority until it finds one to connect to:
      • Be patient, each connection attempt takes about 40 seconds.
      • The first wireless network connection you add is given an ID of 0 and a priority of 100. For each additional wireless network connection you add, the ID is increased by one and the priority is decreased by one. Thanks to Bob, N0YWB, for his post in the Pi-Star Users Support Group explaining how this works.
    • Turn on your phone's portable hotspot.
    • Turn on your Pi-Star hotspot and give it time to connect wirelessly to your phone's hotspot.
    • In your phone's browser, open the Pi-Star dashboard. On some phones you may be able to use http://pi-star/ or http://pi-star.local/ to connect, but on many phones, like my Android device, you must use the Pi-Star hotspot's IP address.

Note 1: I run a VPN on my Android device and have found that I need to disconnect from the VPN in order to connect my Pi-Star hotspot to my Android device's portable hotspot.

Note 2: Some Android devices show a list of connected devices on the Android device's hotspot settings page, and you can tap a listed device to discover its IP address (thanks to Mike, K2GC, for this hint).

Note 3: Setting up Pi-Star's wireless configuration using a phone and Auto AP is a bit like juggling, but it is possible:

  1. Again, on my Android device, I have to start by turning off the VPN.
  2. Then I turn on the Pi-Star hotspot, wait 3 minutes until it goes into Pi-Star Auto AP mode, and then select it in my Android device's list of available WiFi networks. Android freaks out a bit about being connected to a network that doesn't have internet connectivity, but I tell it to calm down and carry on.
  3. Next, I use the standard Pi-Star Auto AP mobile IP address (192.168.50.1) as the URL in my browser to connect to the Pi-Star dashboard.
  4. Once the Pi-Star dashboard opens, I navigate to the Configuration page and add the wireless network credentials in the Wireless Configuration section. Scan for networks does work. After adding each wireless network, I click Save (and connect), but of course, it won't connect, because the Pi-Star hotspot is locked into the private Pi-Star Auto AP network. After I add all the networks I want to, I navigate to the Power and page and reboot.
  5. Once the Pi-Star hotspot has reconnected to my Android device's portable hotspot via regular wireless connection, I use the Android LAN scanner app to find its IP address (which will be different from the Pi-Star Auto AP mobile IP address) and use it as the URL in my browser to connect to the Pi-Star dashboard and begin using it.

Note 4: If your RPi is connected to a monitor and keyboard, you can also run ifconfig. In the returned results, look for the IP address for USB 0.

11b) Connecting via USB tethering

Note: John, K1WIZ, posted in the Pi-Star Users Support Group introducing the idea of using USB tethering with a hotspot running Pi-Star: "This allows your hotspot to use the USB connection (instead of WiFi) so that your battery stays charged and isn't drained. Also, using USB is far superior to using WiFi to tether to a phone with a data plan—WiFi is half duplex, whereas the 'Ethernet over USB' is full duplex."

  1. Plug your Pi-Star hotspot into your phone via USB, and then turn on the Pi-Star hotspot.
  2. Different models of phones will behave differently. On my Android phone, I get a notification that the phone is being powered via USB. Once I see that, message, the USB tethering option is enabled in Settings ⟩ Network & Internet ⟩ Hotspot & tethering, and I can turn it on.
  3. In your phone's browser, open the Pi-Star dashboard. On some phones you may be able to use http://pi-star/ or http://pi-star.local/ to connect, but on many phones, like my Android phone, you must use the connected hotspot's IP address, which you can find using a LAN scanner app.

Note: Thanks to Carty, KA2Y, for sharing his experiences setting up USB tethering with me, which helped me improve these notes.

12) Re-syncing system time and changing date format

Forcing RPi system time re-sync

The RPi uses Network Time Protocol (NTP) to synchronize its clock to UTC. In some cases, the time may get out of sync. In that case, you can simply restart the RPi and the NTP daemon should re-synchronize to UTC. If necessary, you can force a manual re-synchronization via Pi-Star:

  1. Log into Pi-Star via SSH.
  2. sudo systemctl stop ntp.service
    sudo ntpdate pool.ntp.org
    sudo systemctl start ntp.service

Changing the date format

Warning! It's possible that changing the date format can cause problems with running some scripts, for example, a Pi-Star Update. Proceed at your own risk!

There may be times when you want to change the way a date is displayed, for example, if you're using a Nextion screen. This can't be done via Pi-Star Configuration; instead, you must configure the system Locales setting.

  1. Log into Pi-Star via SSH.
    Note: I tested this a lot of times in various ways. If I used Pi-Star's built-in SSH Access client, it all worked fine. If I used an external SSH client, after rebooting, when I returned to the Pi-Star dashboard in my browser, MMDVMHost would stop running, and I needed to power off the hotspot and then restart it to get things working properly, including the new locale.
  2. Enable read-write mode:
    rpi-rw
  3. Open the locales configuration utility
    sudo dpkg-reconfigure locales
  4. When the Configuring locales window opens an introductory message is displayed. (If your screen is small, proceed to the next screen by pressing Enter to select Ok.)
  5. A list of locales is displayed. Use the arrow keys to navigate to the locale(s) you want generated for the system. Press the Space Bar to select or deselect a locale.
    Note: For both of my installation of Pi-Star, two locales were enabled by default were en_GB.UTF-8 and en_US.UTF-8.
  6. Once you have selected the locale(s) you want generated for the system, press Tab to select Ok (or Tab again to select Cancel), and then press Enter.
  7. A message about default system locales is displayed. (If your screen is small, proceed to the next screen by pressing Enter to select Ok.)
  8. A list of your selected locales is displayed. Use the arrow keys to highlight the locale you want to use as the default system locale, press Tab to select Ok (or Tab again to select Cancel), and then press Enter.
  9. You'll be returned to the SSH command line. Wait for the system locales to be generated.
  10. When the process is complete, reboot Pi-Star:
    sudo reboot

13) DMRGateway notes

Setting up and using DRMGateway is significantly more complex than simply setting up a single DMR Master for one of the systems: BrandMeister, DMRPlus (a.k.a., DMR+), and XLX.

Auto-connecting to DMR talkgroups

Per Andy Taylor in the Pi-Star Users Support Group: "DMR Talkgroups - those are controlled by the master (rather than the client). On DMR+, you need to use the options line; on BrandMeister, you need to sign up for self-care and set them using their nifty app [ed note: the app is named: My hotspots]." For related info, see the following note: Pi-Star's BrandMeister Manager module.

A DMR+ example per Andy Taylor in an answer in the Pi-Star Users Support Group – If you don't want to auto-connect to a talkgroup (when Pi-Star is set up as a hotspot):
StartRef=4000;RelinkTime=60;UserLink=1;TS1_1=9;

And another example – To set up a DMR+ auto-connect, for example, to 4409:
StartRef=4409;RelinkTime=60;UserLink=1;

DMR reflectors, talkgroups 6, 8, and 9

On the DMR network, DMR reflectors enable DMR repeaters to be dynamically connected, similar to how reflectors work on D-STAR. When DMRGateway is enabled, XLX reflector traffic uses talkgroup 6, DMR+ reflector traffic uses talkgroup 8, and BrandMeister uses talkgroup 9.

DMR reflector XLX950

XLX950 is a Multiprotocol Gateway developer platform hosted by DVC, and provides a bridge between DMR and D-STAR. XLX950 talkgroups 4001 - 4026 are bridged to XRF950 modules A - Z:

Notes:

14) D-STAR routing (QuadNet)

The QuadNet2 USA IRC Network team is doing some good work on D-STAR routing, and Pi-Star works well with QuadNet. An excerpt from the QuadNet Mission Statement:

We are an open ircDDB routing network that doesn't require registration. We contend that valid Amateur Radio license is enough to operate on the QuadNet2 USA IRC Network. We do not require a special club or repeater call sign for use on the network. As long as the call sign is valid and being legally used, we fully support your use of dongles, hotspots and repeaters (both homebrew and ICOM) on the QuadNet network. The purpose of QuadNet is to support ROUTING. Routing is an alternate method of connecting to other D-Star users.

An excerpt from the QuadNet Routing FAQ:

Routing is a powerful method to connect to individuals, repeaters or groups on a D-STAR network. Routing is a connectionless protocol that does not require a Hosts.txt file to to connect. The QuadNet network server does all the heavy lifting for you. You just have to program your radio with the routes you want to use. If there is an individual, repeater or STARnet Group on the QuadNet network, you should be able to route there just by knowing the call sign, or in the case of Group Routing, a "subscribe call."

There are three kinds of routing:

  1. Call Sign Routing is used to make a person to person connection.…
  2. Zone Routing or sometimes called Repeater Routing will route you radio directly to a repeater on the network. It's just like linking to a repeater, but it's easier to do.…
  3. Group Routing means routing to a STARnet Digital Group. A STARnet Group is kind of like a reflector, but it is actually more like a repeater without the RF transceiver. A STARnet Group can have many individual users "subscribed" to it. Anyone subscribed to a STARnet Group will hear all traffic on the Group.

From a post related to D-STAR to DMR cross-mode reflectors by Jeff, VE6DV, on the Pi-Star User Forum:

Another very popular cross mode reflector would be the Quadnet Array. This is one of the most active systems outside of REF001C and REF030C.

On the D-STAR side you can access the Array by going to:

  • D-STAR Reflectors:
  • XRF757A in Atlanta
  • XLX735A in New York
  • XLX307D in Wyoming
  • XLX049D in Northern Ireland
  • QuadNet Smart Groups
  • DSTAR1 located in New York
  • DSTAR2 located in San Francisco
  • DSTAR3 located in Ohio
  • DSTAR4 located in Alabama

On DMR you can use Brandmeister TG 31012. Alternatively you can access the transcoder directly by using XLX307 as your DMR master and then use talkgroup 6.

15) Watchdogs, Remote RF commands, and Keepers

What do these services do, anyway?

Pi-Star Admin console with Watchdog, Remote, and Keeper circled

Per Andy Taylor in the Pi-Star Users Support Group:

PiStar-Watchdog – This does what most watchdogs do, it watches; specifically, it watches the services that relate to radio functions and keeps them running. If you stop say MMDVMHost, the watchdog will see that, and will restart it again within 5 mins. This is less handy than it used to be. I could migrate this functionality to SystemD, but the PiStar-Watchdog has been around for a while, it's an old and trusted friend :)

PiStar-Remote – In the old days, before MMDVMHost was born, ircDDBGateway (D-Star) had the ability to listen for commands via RF; you could command your system to reboot, shutdown, etc., from your radio. Then came MMDVMHost – this feature was missing, and so a need became apparent. PiStar-Remote is my answer to that need. It's far from perfect, but gives you some basic remote control ability via RF, including RF kill switch.

PiStar-Keeper – This service has a VERY specific use… In the UK there is a special class of repeater license that requires the keeper to be present. This service uses bluetooth to watch for the keeper's cell phone, and disables the services when the keeper moves too far away. Like I said, REALLY specific!

Note: Configuration settings for PiStar-Keeper are in the /etc/pistar-keeper file.

Remote Control RF commands

You can access these settings via the Expert Editor's PiStar-Remote tab. Once you have set this feature up the way you want, you can call these codes from your radio to invoke the associated command. For example, to reboot your hospot: if you're using a DMR radio, you can make a private call to DMR ID 8999997; if you're using D-STAR, you can make a call to URCALL=REBOOTPI.

Important:

  1. Enabled MUST be set to true.
  2. Callsign MUST be set to your CALLSIGN, which MUST be UPPERCASE.
  3. For the mode(s) you want to use, if you want to enable the shutdown, hostfiles, getip, or 8Ball commands, you MUST remove the leading # (comment symbol).
  4. APR 2019 – In previous versions of Pi-Star, the default commands for DMR were in the 899999x range; however, in the current version of Pi-Star, 4.0.0-RC3, the default commands for DMR are in the 999999x range. This might conflict with BrandMeister's AirSecurity feature, which uses that range. One consequence of this is that if you use a PiStar-Remote command in the 999999x for BrandMeister, you'll hear a strange announcement, "Secret not found," although the command still will work. Until this gets sorted out, it might be best to revert to the 899999x range, so that's what I'm showing below.

[banner]
# Pi-Star Remote config file
# This config file is designed for the Pi-Star Keeper remote control
# The remote control system is designed to give repeater keepers an
# RF KillSwitch for their repeaters.

[enable]
# Should PiStar-Remote be Enabled? (true|false)
enabled=false

[keeper]
# Keepers Information
callsign=YOURCALLSIGN

[d-star]
# UR fields
svckill=SVCKILL
svcrestart=SVCRSTRT
reboot=REBOOTPI
#shutdown=SHUTDOWN
getip=GETIP
#hostfiles=HOSTFILE
#8Ball=8BALL

[dmr]
# TG commands [Ed note: Use private calls]
svckill=8999999
svcrestart=8999998
reboot=8999997
#shutdown=8999996
#hostfiles=8999995

[ysf]
# ROOM commands
svckill=99999
svcrestart=99998
reboot=99997
#shutdown=99996
#hostfiles=99995

[p25]
# P25 Talkgroups are limited to 1->65535
svckill=65531
svcrestart=65532
reboot=65533
#shutdown=65534
#hostfiles=65530

Some notes about PiStar-Remote

16) Pi-Star's BrandMeister Manager module

If you choose to use BrandMeister, you can register for an account on the BrandMeister Network, which gives you access to a variety of "SelfCare" information and settings, including access to settings specific to your hotspot via the "My hotspots" menu.

BrandMeister My hotspots menu

If you use that feature, you can turn on Pi-Star's BrandMeister Manager module in order to access some of the key hotspot settings from Pi-Star's Admin view, including: drop calls and dynamic talkgroups, link/unlink reflectors, and add/remove static talkgroups.

BrandMeister Manager

To enable the BrandMeister Manager module, see the instructions on the Pi-Star Wiki: PI-Star integration with BrandMeister API.

Note 1: BrandMeister views simplex hotspots as having only one time slot: TS0. So for simplex hotspots, the BrandMeister Manager time slot options are ignored, and when you make changes, you'll see the status update message refer to "TS0." For duplex hotspots, time slots 1 and 2 are used.

BrandMeister Manager status update message

Note 2: As of Pi-Star dashboard version 201901014, the BrandMeister Manager tools support duplex hotspots; the Slot selection now applies to Drop QSO and Drop All Dynamic.

Note 3: If Pi-Star is configured for a repeater, the time slot options are used.

Note 4: For advanced BrandMeister API use, see the article Using the BrandMeister API by Vladimir, AC2F.

17) Adding a custom NXDN reflector to Pi-Star

NXDNGateway was added in Pi-Star v3.4.12.

To add a custom NXDN reflector to Pi-Star, for example, 31672 using port 41500:

  1. Watch the Pi-Star NXDN Upgrades video by Craig, W1MSG.
  2. Refer to the Pi-Star Wiki article: Adding custom firewall rules to Pi-Star.

For reference, here are the steps:

  1. Log into Pi-Star via SSH.
  2. Put Pi-Star into read-write mode:
    pi-star@pi-star(ro):~$ rpi-rw
  3. Add an NXDNHosts.txt (note capitalization) override file to the root user's home directory (/root):
    pi-star@pi-star(rw):~$ sudo nano root/NXDNHosts.txt
  4. Add the following tab-separated entry to NXDNHosts.txt:
    # Ref URL Port
    31672 pi-nxdn.trianglenc.net 41500
    Write out the changes and exit:
    Ctrl+o
    Ctrl+x
    Note: This info, which won't be overwritten by an update, will be appended to the main NXDNHosts.txt file that is stored in the /usr/local/etc folder whenever an update is run.
  5. Create custom firewall rules in the ipv4.fw file:
    pi-star@pi-star(rw):~$ sudo nano root/ipv4.fw
    Add the following two lines to the ipv4.fw file:
    iptables -A OUTPUT -p udp --dport 41500 -j ACCEPT
    iptables -t mangle -A POSTROUTING -p udp --dport 41500 -j DSCP --set-dscp 46
    Write out the changes and exit:
    Ctrl+o
    Ctrl+x
  6. Update the firewall to add your changes:
    pi-star@pi-star(rw):~$ sudo pistar-firewall
  7. Put Pi-Star back into read-only mode:
    pi-star@pi-star(rw):~$ rpi-ro
  8. Run an update:
    pi-star@pi-star(ro):~$ sudo pistar-update
  9. Exit SSH mode:
    exit

18) CSS Tool (color party!)

The Expert Editor CSS Tool let's you play around with the color scheme.
(June 2018: This is a beta feature. Not all UI colors can be changed, and it doesn't yet apply to mobile view.)

I feel like a blue color scheme today!

Note: In this example, I changed Background Banners to the web color royalblue (hex value 4169E1) and the Tables HeadDrop to dark gray (hex value 303030).

If you do create custom CSS settings, it's a good idea to write them down because they aren't included in backups.

The default values:

Note: "If you took it all too far and now it makes you feel sick," the CCS Tool's Factory Reset button resets the CSS options back to their original settings.

19) RSSI Expert Editor

Per Andy Taylor in the Pi-Star User Forum: "RSSI values depend on the radio—the stock values are there for MMDVM_HS units that support RSSI; if you use anything else, you may well need to tune it."

# This file maps the raw RSSI values to dBm values
# to send to the DMR network.
# A number of data points should be entered and
# the software will use those to work out the in-between values.
#
# The format of the file is [tab separated]:
# Raw RSSI Value    dBm Value
#
# RSSI Default Values for MMDVM_HS:
#
# 43    -43
# 53    -53
# 63    -63
# 73    -73
# 83    -83
# 93    -93
# 99    -99
# 105    -105
# 111    -111
# 117    -117
# 123    -123
# 129    -129
# 135    -135
# 141    -141

20) Prevent sending APRS info via BrandMeister

Thanks to KH6HZ for this hint posted in the Pi-Star User Forum: A sysop of a repeater or a hotspot can prevent APRS reporting by adding the tag NOGATE or NOAPRS to the Priority Message field in the BrandMeister dashboard. For a hotspot, you can find that field in the My hotspots settings.

NOAPRS command in BrandMeister Priority Message field

Note: There's also an APRS-related setting in the Expert Editor > ircDDBgateway Quick Editor: aprsEnabled (0 = disabled; 1 = enabled).

21) Upgrading to Pi-Star V4

Standalone article: Upgrading to Pi-Star V4

If you're upgrading an existing hotspot from Pi-Star V3.#.## to Pi-Star V4 (or from Pi-Star 4.0 to 4.1): Due to the complexity of the OS upgrade, you can't just click the Upgrade link or run sudo pistar-upgrade. (Yep, Andy has spoiled us!) However, there's a shortcut that can make the upgrade easier. Just watch this short (3 min) tutorial video by Craig, W1MSG: Upgrade to 4.0.

I've tested this on Mac and Windows 10, and it worked well. Here are the steps:

  1. Backup the Pi-Star configuration on your existing hotspot. See Backing up and restoring Pi-Star
  2. Download the Pi-Star V4 image:
  3. Insert a microSD card into your computer and flash a download of the Pi-Star V4 image to a microSD card. See Flashing Pi-Star
    Note: If using Windows, dismiss the system Format Disk message.
  4. After flashing the Pi-Star image to the microSD card, eject it, and then reinsert it.
    Note: If using Windows, once again dismiss the Format Disk message.
  5. Copy the backup zip file to the boot partition of the freshly imaged microSD card, and then eject it again.
  6. Insert the microSD card into the RPi and power it up. The first boot up will take a bit longer than usual because V4 now automatically expands the filesystem (sweet!) and then unpacks and restores your backed up configuration. The good news is that subsequent boot ups are even quicker than they were previously.
    - - - - - - - - - - - - - - -
    Hint (thanks to Larry, KF7L): If the image doesn't connect to your WiFi network and instead goes into Auto AP mode, the issue could be because your router doesn't broadcast SSIDs. In that case, try adding:
    scan_ssid=1
    to the /etc/wpa_supplicant/wpa_supplicant.conf file, between ssd and psk:
    network={
       #ssid="WirelessNetworkName"
       ssid=576972656c6573734e6574776f726b4e616d65
       scan_ssid=1
       #psk="WirelessNetworkPassword"
       psk=364b8070f605f9222cca4e21173ad266e6a54e1495a13d38280c67e78a3d5ff2
    047c5d
       id_str="0"
       priority=100
  7. Log into Pi-Star in order to open the Configuration page.
    • User Name – This your hotspot's hostname, either the default, pi-star, or whatever you changed it to in your backed up configuration.
    • Password – Even if you used your own Remote Access Password in the configuration you backed up, for security reasons, the Pi-Star backup does not back up this password, so you must use the default password to log in: raspberry.
  8. It's a good idea to double-check your configuration settings. Some settings are not backed up, so if you changed them to something other than the default, you'll find that they are back on the default settings of a new install, for example:
    • General Configuration:
      • System Time Zone (default Europe/London)
      • Dashboard language (default English_uk)
    • D-Star Configuration – Time Announcements (default: On) and Use DPlus for XRF (default: Off). If you change the Use DPlus for XRF setting, you must run a Pi-Star Update to put the new setting into effect.
    • Firewall Configuration – Auto AP (default: On)
    • Remote Access Password – Since Pi-Star backup does not back up this password, if you want to use your own password, which is a good idea, you'll need to enter your own password.
    • Expert Editor > CSS Tool – Custom CSS settings aren't backed up. If you change CSS settings, write them down so you can manually restore them.
  9. It's also a good idea to make a backup of your new Pi-Star V4 configuration. For more info, see Backing up and restoring Pi-Star.

22) Linking to reflectors from the command line

There is a script for linking to and unlinking from reflectors from the command line, for example, in an SSH session.

23) A few Raspbian OS commands

< Pi-Star cross modes · Troubleshooting >