PiStar-Remote Setup & Configuration

To control Pi-Star using RF commands, you can setup the commands at http://pi-star/admin/expert/fulledit_pistar-remote.php
In any event, you go to your PiStar dashboard then click Configuration > Expert > PiStar-Remote.

In that text box that comes up will be the configuration file. You will need to change the following:

enabled=true
callsign=N3TDM

PiStar-Remote Configuration File

Whatever callsign you enter is the callsign that must be in the transmitting radio as My Callsign in order for PiStar to initiate the commands. In other words, if the callsign in this file is yours, I would not be able to initiate these RF commands using my callsign in my radio.

Then for each service you are using (DSTAR, DMR, etc) you can either add a # in front of a line that you don’t want enabled or remove the # from the front of the line to enable a given command. For instance, if you want to enable the shutdown command for DSTAR, you would go under the DSTAR section/stanza and remove the # symbol from before the word shutdown. Then when you’re done, click Apply Changes at the bottom of the page.

To use this Shutdown RF Command, in DSTAR in your radio’s UR call field, you would put the word SHUTDOWN in all capital letters. And in your RPT1 and RPT2 call fields would be the same as they are in your standard Talk channel, likely something like RPT1: N3TDM B and RPT2: N3TDM G. When you press PTT on this channel/memory it will again cause the Pi to shutdown and halt. Just remember you will need to physically unplug and plug it back in to restart it. The RF commands can’t turn it back on once it has been turned off.

You can enable the other options as well and I’ll briefly describe them here:

[d-star]
# UR fields

svckill=SVCKILL
This turns off DSTAR, kills the ircddbgateway service.

svcrestart=SVCRSTRT 
This restarts the ircddbgateway service.

reboot=REBOOTPI
This reboots/restarts the Raspberry Pi.

#shutdown=SHUTDOWN
This causes the Raspberry Pi to shutdown.

getip=GETIP
This will cause Pi-Star to announce via DSTAR the LOCAL IP address of the Pi – helpful to get into the Pi or get to the PiStar dashboard if http://pi-star/ doesn’t work.

#hostfiles=HOSTFILE
This will cause Pi-Star to update the host files that map DSTAR reflectors/repeaters to their IP addresses.

#8Ball=8BALL
This will cause ircddbgateway to connect to a random reflector or other DSTAR station.

PiStar-Remote Configuration File

Even if you’re not using DSTAR, the same descriptions above apply to the lines under the other services, just in regards to that service and not the DSTAR services.

I hope you find this helpful and as always, if you need assistance don’t hesitate to reach out to me via my contact page or the comment section.

Schedule Update of Stripped.csv File

I recently had a gentleman, Richie M6XRM, contact me on how to do this. It proved to be quite the challenge.

Instructions & Script

The information and how to has been posted on my GitHub page along with the script (you will need to supply your own URL to the stripped.csv file). Below I’ll explain the issues we encountered while trying to configure this automatic update. I can’t say that this is the best or only way to do this, however this is how I did it and I can confirm it works.

Issues & Fixes

Issue 1

One of the biggest issues was writing the script on Windows and converting/keeping the line endings of that script as unix line endings so they’re compatible with linux. I used Notepad++ to write and edit the script before uploading it to GitHub. Apparently it is not enough to save the file as a UNIX bash/sh file type. At the bottom of Notepad++ it says what the line endings are and I never noticed it. The DOS line endings created a lot of issues when the script was run on the Pi.

Fix 1

The fix for this in Notepad++ is to click Edit > EOL Conversion > Unix and then save the file as a UNIX bash/sh file with the extension “.sh”. The fix in the nano text editor is to press CTRL + x, then y, then ALT + d, then enter.

Issue 2

The other major issue was that system cron on the Pi does not understand rpi-rw even when it is run inside the script which is being run as root.

The cause of this is that rpi-rw is actually an alias set in the bash profile for the logged in user. Since cron runs as it’s own thing/shell separate from the logged in user (pi-star), it doesn’t understand rpi-rw or at least it didn’t understand it for me or Richie.

Fix 2

The fix for this is to put the actual command that rpi-rw points to in the script instead of using rpi-rw. That command is as follows:

sudo mount -o remount,rw / ; sudo mount -o remount,rw /boot

I came across this page on Medium which explained how to convert Raspbian to a read-only filesystem which is what Pi-Star uses. At the end of the page it talks about creating an ro and rw alias to quickly switch the filesystem between read-only and read-write. That’s when it dawned on me that this is the way the Pi-Star developers handled the read only operating system and that rpi-rw/rpi-ro are aliases.

A huge thank you to Richie M6XRM for his patience with me in figuring this out and for being so understanding while I was recovering from surgery.

We just hope this helps someone else and explains a bit of the mystery behind the rpi-rw and rpi-ro aliases.

73,
Tyler N3TDM

Scheduling Pi-Star Reboot

Why schedule a reboot?

I wanted to schedule the DSTAR repeater, that I manage, to reboot automatically every Monday morning. The reason for this is that sometimes Pi-Star stops working and/or freezes up. This typically happens every 2 or 3 weeks of uptime without a reboot. My best guess is that due to the log files not being deleted after rotation, that the Pi software gets “clogged up.” I’ve found settings that are supposed to rotate the logs and only keep a certain number of log files, but those do not appear to work, at least not on our setup.

Since these log files are deleted on every reboot of the Pi, the next best idea in my opinion is to schedule a late-night/early-morning reboot once a week.

I used cron to schedule a reboot. I also use cron to schedule automatic linking and unlinking of reflectors. Pi-Star uses a specialized version of cron that adds a “run as user” option.

Find the Expert Cron Editor Tab

  1. The first step is to log in to your Pi-Star dashboard. This can be accessed by opening a web browser and going to http://pi-star.local/ or http://pi-star/ or the IP address/host name of your Pi-Star repeater or hotspot.
  2. After logging in to your Pi, click on “Configuration” in the upper right of the page.
  3. Next in the upper right of the page click on “Expert”, then on the following page in the bottom row of links on the top of the page click on “System Cron.”

Understanding cron

  1. You will see a text box open with a bunch of seemingly cryptic text. Each line is a cron task that is scheduled to happen at a certain time. It should look similar to this:
    Shows pi-star expert cron configuration
  2. About halfway down the text box you will see the following line:
    # m h dom mon dow user command
  3. This line tells us the format of each cron task. The # symbol indicates a comment and tells cron to ignore that line.
    The “m” indicates “minutes”, “h” indicates hours, “dom” indicates Day of Month, “mon” indicates month, “dow” indicates Day of Week, “user” indicates the user the the command should run as, and “command” is the command you want to run at the given time/day. Refer to the chart below for options for each position in the line.
m
(Minutes)
Enter the minute you want to run the task at or * for any minute.
h
(Hours)
Enter the hour you want to run the task at or * for any hour.
dom
(Day of Month)
Enter the day of the month you want the task to run at or * for any day of the month.
Options: 1-31 (date of the month)
Example: * = any day of the month
Example: 5 = 5th of the Month
mon
(Month)
Enter the month you want to run a task or * for any month.
Options: 1 = January, 2 = February, 12 = December
Example: 4 = Run in April
Example: 1,6,12 = Run in January, June, & December
Example: * = Run any month
dow
(Day of Week)
Enter the day of the week you want to run the task or * for any day of the week.
Options: 0 or 7 = Sunday, 1 = Monday, 2 = Tuesday, 3 = Wednesday, 4 = Thursday, 5 = Friday, 6 = Saturday
Example: 0,3 = run on Sunday and Wednesday
Example: 7 = run on Sunday
Example: * = run any day
user Enter the username of the user that you want to run the command.
Options: pi-star, root
Example: root
command Enter the command to run. This can be a script or a single command or multiple commands.
Example: reboot
Example: pistar-link unlink && pistar-link ref063_c
The above example will unlink the repeater and then link to REF063C.
  1. Normally when you add a cron task it can be anywhere in the cron file, new lines are typically added at the end. In Pi-Star this works too, except that for some reason a line containing the reboot command should be put in as the first cron task in the list, right below the line we see in step 2 under “UNDERSTANDING CRON”.
  2. Note that if you add anything to the end of the file that you must maintain the new blank line at the end of the file. If you’re at the end of the last cron line, press the down arrow on your keyboard. If you see the cursor move down to the blank line, you’re all set. If the cursor doesn’t go down, just press “enter” on the keyboard to add a blank line at the end of the file.

How to Schedule a Reboot

  1. In order to schedule a reboot every Monday at 4:55am, I entered the following line as a cron job.
    55 4 * * 1 root reboot >/dev/null 2>&1
  2. Don’t forget to put it at the top of the cron job list, before the first cron job line, but after the line: # m h dom mon dow user command
  3. Now we have a job that says, at 4:55AM every/any month, every/any day of the month, on Monday, run the reboot command as the root user, and do not show output.
  4. The >/dev/null 2>&1 means that whatever text output the command generates won’t be shown or logged. For more info on what this part of the command means, see this forum post on Stack Exchange.

More Info on Cron

https://www.adminschoice.com/crontab-quick-reference
https://www.freeformatter.com/cron-expression-generator-quartz.html

If you use the cron expression generator from Free Formatter, it will not work with Pi-Star, but it will give you the idea of how to write a cron expression. It also lists all the different options and has plenty of great examples of how to use cron.

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.

Week 8 – Setting TX & RX Offset

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.

0.1% Bit Error Rate

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.

0.0% Bit Error Rate

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.

Week 7 – Configure DSTAR Mode

First we’ll go turn on the DSTAR digital mode and configure it.

  1. Start by going to your PiStar dashboard in your web browser.
  2. After logging into your dashboard, click on the “Configure” tab.
  3. Next we’ll turn on DSTAR in the MMDVMHost Configuration.
  4. 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.
  5. Click “Apply Changes.”
  6. After the changes are applied, scroll down and you will see a new configuration box named “DSTAR Configuration.” The defaults will look like this:
  7. Here are my settings for DSTAR and I’ll explain them after the photo.

Explanation of Settings

  1. RPT1 Callsign – This is the callsign of the node or repeater with its module letter. B = 70CM / C = 2M
  2. 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.”
  3. Remote Password – This is the password used by the ircDDBRemote application as well as the command-line Remote Control application.
  4. 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.
  5. 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
  6. ircDDBGateway Language – Select your language and country code if applicable. I selected “english_(US).”
  7. Time Announcements – If turned on, the hotspot/repeater will announce the time every hour.
  8. 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.

Week 7 – Update MMDVM HS Duplex Firmware

To start this week, I updated the firmware on the duplex MMDVM hot spot board. Follow the steps below to do that.

From where I left off previously, I still needed to select the board/modem in the configuration first.

Selecting the Board

  1. Login to the Pi-Star dashboard and click on the configuration page.
  2. Under “General Configuration” find the option that says “Radio/Modem Type.” and select the MMDVM board that you’re using. In my case I selected the MMDVM_HS_DUAL_HAT for Pi (GPIO).
  3. After making your selection, don’t forget to click “Apply.”

Update MMDVM HS Duplex firmware

Next we’ll update the firmware.

  1. First open the “expert” tab and then click “SSH Access.”
  2. Login with the pi-star user.
  3. Run the following command:
    sudo pistar-update
  4. When the update is complete you should see the following:
  5. Next, restart the Raspberry Pi by going to the “Admin” tab and clicking “Power,” then click “Restart/reboot.”
  6. For the MMDVM_HS_DUAL_HAT board with the 14.7456 TXCO like I’m using, you will want to run the following command:
    sudo pistar-mmdvmhshatflash hs_dual_hat

Reference: https://github.com/juribeparada/MMDVM_HS

Week 5 – PiStar Setup Part 2 of 2

In this post I will explain how to update, upgrade, and configure the basic settings for Pi-Star. I will also explain how to register your amateur radio callsign for DSTAR and DMR use.

Part 1 of this post: https://n3tdm.tdmorris.com/week-4-setup-part-1/

First of all, for this project you MUST be a licensed Amateur Radio Operator. In the USA, that means passing a licensing exam and being assigned a callsign from the Federal Communications Commission (FCC). For licensing information check out the American Radio Relay League.

Register your Callsign for Dstar

  1. Follow the instructions to register your own callsign found here: http://www.dstargateway.org/D-Star_Registration.html
  2. After you receive your confirmation email, go to this page to learn how to assign terminal ID’s to your callsign (STEP 1 only). Terminal ID’s are just what they sound like, it’s an identifier for your individual station. If you’re just using one radio, you can typically set a terminal ID of a single space, however we’re setting up a repeater, so you would need the space terminal ID and whatever module you’re using B for 70CM or C for 2M frequencies.
  3. My terminal ID’s look like the following: 
  4. Here is more information on Terminal ID’s: https://wb1gof.dstargateway.org/DStarTerminalIDs.html
  5. After you’ve registered for DSTAR you need to get a CCS7 ID for DMR.

Get a ccs7 id number for DMR / DSTAR

  1. Head over to this site and fill out the form selecting the option for a private callsign and NOT a repeater. I’m going to be setting up a private repeater for experimentation so it won’t be running 24/7.
  2. Once your request is processed, you’ll receive an email containing your CCS7 ID number. Put that in a safe place.

Setup and Configure wifi

In order to configure this, because I had no way of getting the IP address from a headless Raspberry Pi, I connected a crossover cat5e cable between the Pi and a PC so I could connect into it and make adjustments.

That said, I want to first explain how I setup the enterprise WiFi for the Pi to work on Pitt’s wireless network.

    1. I followed the instructions located here: https://gist.github.com/chatchavan/3c58511e3d48f478b0c2
    2. First open a new tab in your browser and go to
      Windows: http://pistar/admin/expert/ssh_access.php
      macOS: http://pistar.local/admin/expert/ssh_access.php
    3. Enter “pi-star” without the quotes for the username and press enter.
    4. Enter “raspberry” for the password without quotes and press enter.
    5. You should be greeted with a screen spelling out PI-STAR.
    6. Now type
      sudo nano /etc/networking/interfaces
    7. You should see the following screen:
    8. Use the arrow keys to navigate the page and move down to the section that says
      allow-hotplug wlan1
      iface wlan1 inet manual
              wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
    9. Erase the section above and enter the following:
      auto wlan1
      allow-hotplug wlan1
      iface wlan1 inet dhcp
      	pre-up wpa_supplicant -B -Dwext -i wlan1 -c/etc/wpa_supplicant/wpa_supplicant.conf
      	post-down killall -q wpa_supplicant
    10. Press CTRL+o and press enter, then press CTRL+x to exit the nano editor.
    11. Then go to the Configuration page of your Pi, then to the Expert tab, then click “WiFi” in the “Full Edit” line of editors.
    12. You should see a list of networks (probably just one) after a header of sorts
    13. Make sure the country code following “country=” matches your country code. In the USA it’s “country=US” without quotes.
    14. For the enterprise wifi you need to make a new network in this config file. For WIRELESS-PITTNET at the University of Pittsburgh at Bradford, I used the following settings. In this editor I set up the following network:
    15. Go back to your SSH access page in your browser and do the follow steps.
    16. Enter the following substituting YOUR_PASSWORD with your university email password leave the single quotes around your password. and press enter.
      echo -n 'YOUR_PASSWORD' | iconv -t utf16le | openssl md4
    17. Next copy the resulting random letters and numbers into the WiFi editor in the other tab after the colon where it says “password=hash:”
    18. Now go back to your SSH editor and clear your history by typing:
      history -c
    19. Press “Apply Changes” at the bottom of the page beneath the wifi editor.
    20. If you followed these steps correctly your pi should connect to WIRELESS-PITTNET.

Configure Pi-star

  1. In your browser go the main page of your Pi-Star dashboard at:
    Windows: http://pi-star/
    macOS: http://pi-star.local/
  2. You should see the following page:
  3. Start by selecting MMDVMHost and Duplex (repeaters) or Simplex (personal hotspots), then click apply changes.
  4. After the services are restarted, you should see the following page:
  5. I started the configuration process without the actual interface board, keep that in mind. I did not activate any services yet, however I set the hostname, the node callsign, the RX/TX Frequencies, the GPS coordinates, the town (in the format of “city”, “grid locator”, the country, the URL (this can be either a manual URL of the dashboard for the repeater or automatic and will default the QRZ page for the node callsign), the node type (public – anyone can use it / private – only the node callsign can use it), the time zone, and the dashboard language_country code.
  6. You can also setup the firewall if you wish. Private makes it only work within your local network, public will make it work from outside your network provided the correct ports are forwarded on the router.
  7. I left Auto AP on because if the Pi doesn’t/can’t make a network connection, it will create a wifi hotspot of it’s own so you can connect to it and configure the network settings.
  8. I left UPNP turned off. If your router also has UPNP, you can turn this feature on and Pi-Star will configure your router’s firewall to open the necessary ports.

I found a neat little circuit board on eBay that works with MMDVMHost software and is a mini personal repeater on a single board. I thought this would be a great way to demonstrate a repeater without having to bring in multiple radios, a power supply, the computer, etc. So I’m going to use the MMDVM_HS_Dual_Hat. The board on eBay is a cheaper Chinese “clone” of the original board which is pictured below.

Week 4 – PiStar Setup Part 1 of 2

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.

First you’ll need the following:

  • Pi-Star Software – You’ll want to download the one for the RPi
  • WiFi (wpa_supplicant) Configuration File (basic USA file can be found here)
  • Blank microSD Card – Class 10/UHS-1 – backup data first if needed
  • MicroSD to SD Card Adapter (Optional – depends on your PC)
  • Raspberry Pi 3B
  • Raspberry Pi Power Supply of 2 amps or greater
  • PC with SD Card or MicroSD Card reader/writer
  • SD Card Imaging Tool (Etcher, Apple Pi Baker, Win32DiskImager)

Tutorial

Download the Files

  1. 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”
  2. 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.
    1. In the file, replace the capitalized “SSID” with your network name.
    2. Next in the file, replace the capitalized “PSK” with your network password.
    3. Save the file making sure that the filename is wpa_supplicant.conf.

Imaging the microSD Card

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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.
  6. 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.
  7. Next you should see a screen that looks like this:
  8. 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.
  9. 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.
  10. Under Pi-Ingredients, click the 3 dots button and find the Pi-Star .img file we found in step five.
  11. Uncheck the “Auto eject after successful restore” checkbox.
  12. 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.
  13. You should see a screen like this:
  14. Wait until you get the notification that the process is complete and then you can close Pi-Baker.

Setting Up HOME WiFi

  1. Open Finder or My Computer (This PC) and locate the wpa_supplicant.conf file you edited previously.
  2. Copy the file by right clicking the file and left clicking copy.
  3. Navigate to the SD card which should be labeled “Boot”.
  4. 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.
  5. Close Finder or Windows Explorer.
  6. 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.”

First Boot

  1. Insert the MicroSD card into the Raspberry Pi and plug in the power cord.
  2. The LED on the Pi should light up red, with a flashing green LED next to it.
  3. Wait a few minutes as the Pi will load the WiFi configuration and reboot.
  4. 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:
    1. http://pi-star/  (Windows)
    2. http://pi-star.local (macOS)
  5. Verify that you see something similar to the following:
  6. I’ll continue the setup in the following post: https://n3tdm.tdmorris.com/week-5-setup-part-2