Setting up a Raspberry Pi to work with a DV Access Point Dongle (DVAP)

A while back, my friend NS4U mentioned that he was going to buy a Raspberry Pi.  My first thought was that he was talking about dessert.  As it turns out, he was referring to a miniature, inexpensive Linux based computer.  After our talk, I decided to investigate this a little more, with an eye towards setting this little machine up to run my DV Access Point Dongle (“DVAP”) on either VHF or UHF.  At first, I did not find any “road maps” to help me set this up.  After quite a bit of looking, I stumbled across a file in the pcrepeatercontroller Yahoo! Group that provided an excellent white paper guide to getting this system working.  But, before I go into that, just exactly what is a Raspberry Pi and what other components are needed to turn it into a mobile or portable hotspot with a DVAP?

As I mentioned above, a Raspberry Pi (“RPI”) is a small computer using an ARM processer.  It has 512 MB of RAM, two USB ports, an HDMI port, a component video port, audio out port, Ethernet port and a slot for an SD card.  A picture of this wonderful little device is below.  You can learn more about it at the Raspberry Pi Foundation web site http://www.raspberrypi.org .

rpi

The SD card is the key to this setup, as it will hold the operating system and all software necessary to get the DVAP and Pi up and running together.  While many articles I have read suggest that a 4 GB SD card is the minimum for a RPI to get up and running, I have found that with the setup I am using for the DVAP, an 8 GB card is necessary.

Where does one get an RPI?  Fortunately, there are many sources, from the Raspberry Pi Foundation directly, to Amazon to MCM Electronics to others.  You can expect to pay a minimum of $25.00 to $35.00 for the RPI, but all you get is the basic board with no frills.  Make sure you don’t buy the old revision A.  The newer revision B is the board shown above and is a must for making this system work with the DVAP.  It has 512 MB of RAM, 2 USB 2.0 ports and other enhancements.

When you are ready to buy the RPI to use with your DVAP, what else do you need?  That really depends on how you are going to use the system.  I built mine with an eye towards mobile and portable use, but you could build one just to use at home.  Here’s the list of the RPI/DVAP system components I purchased and why:

  1. RPI Board (Basic component of the system)
  2. Clear RPI case (The RPI does not come in a case, so I purchased a clear case for around $10.00 to protect the components)
  3. Power Supply (You have to provide power to the RPI, and this is not supplied with the board.  If you have an old phone charger that outputs 5 volts and at least 1 amp you are good to go.  I prefer a little more amperage, so I opted to use a Belkin iPad charger that is rated at 5 volts and 2.1 amps.  This is enough to power the RPI, DVAP and WIFI dongle I use.  You may want to find a 3 amp supply if you are going to be powering more devices.  You will need a micro USB plug to supply the RPI with power.)
  4. SD Card (This will hold the OS and all other software.  I purchased a 16 GB Sandisk card at Office Depot and it works just fine.  There are some cards that are not compatible.  Check this web site for compatibility http://elinux.org/RPi_SD_cards.
  5. WIFI Dongle (This is optional if you are going to use the RPI and DVAP at home with the Ethernet connection built into the board; however, for portable or mobile use this is a must-have.  There are many of these little devices available for as little as $10.00 on Amazon.  I have successfully used several of these devices and the RPI has instantly recognized them with no problem.  Here’s a link to one that I have used http://www.amazon.com/Edimax-EW-7811Un-Wireless-Adapter-Wizard/dp/B005CLMJLU/ref=pd_cp_pc_1 )
  6. USB Mouse and Keyboard. (This is pretty obvious.  You will need this at a minimum to complete the initial setup of your RPI. Once it is setup, you will no longer need to use these.)
  7. Powered USB Hub.  (If you connect the WIFI dongle, keyboard, mouse and DVAP, you will need the extra USB ports and the extra power provided by this device.)
  8. Monitor.  (Again, this will only be needed during setup.  I use a monitor with a HDMI input, but you can use a component cable or an adapter to fit your monitor).
  9. DVAP. (Ok, this is obvious, too.  You need either the UHF or VHF DVAP device.  I have used and tested both with the RPI with excellent results.  The DVAP will be the most expensive part of this project, aside from whatever D-Star radio you use with it.)
  10. Portable Power. (If you want a truly portable setup, you can buy any number of battery powered devices to run your system.  You can also build one.  I opted to purchase a Powergen PGMPP12000 for $59.99 from Amazon (http://www.amazon.com/gp/product/B0085OB0IE/ref=oh_details_o02_s00_i00?ie=UTF8&psc=1 ).  It is rated 5 volts at 12,000 mAh and powers the whole system with no problem.  It also comes with two cables and micro USB adapters.)

Here are some photos of my completed system (shown with Icom ID-51A HT):

pi1

pi4

Ok, now that you have assembled all of your components, how do you make it work?  That’s where the white paper guide comes into play.  Here’s a link to the PDF file created by Mark, WD9JEN.  Raspberry PI DVAP 12-24-2012 small.  Without Mark’s well written guide and examples, this would have been a much more time consuming and difficult job.  KUDOS to Mark for authoring this paper.  While I could restate everything Mark has written, that would be a waste of bits and bytes, so at this point, just download the PDF and follow his instructions.  The bottom line here is that you will do the following:

  1. Go to http://westerndstar.co.uk, navigate to the Downloads screen, and get the DVAP file, “DVAP+ircDDB+VNC”.  This file is a 1 GB RAR compressed filed, so it will take a while to download.
  2. You will decompress the file to a folder, resulting in a file that is around 4 GB.
  3. You will use an image writer to burn the image of this file to your SD card.  You cannot simply copy or “drag and drop” the file to the SD card.  You must burn the image.
  4. You will insert the SD card into the RPI with all devices attached and apply power to boot up the RPI.
  5. You will configure the settings in the software packages (DVAP Node and IrcDDB).
  6. After all settings are configured, you will do a soft reboot of the RPI (Do not do a hard reboot by pulling the power cord) and all of your settings will be saved.
  7. After reboot, you will be able to access the DVAP with your radio and get on the air.  Please note that you do not need to have the monitor, keyboard or mouse connected at this point.  If everything was set up correctly, the system will boot and after about 45 seconds or so your DVAP will be ready for commands from your radio.  If you see the blue light slowly blinking on your DVAP you are properly connected.

As I set up my RPI and DVAP, I ran into a few glitches that I will share here.  Some of these resulted in trial and error solutions, while others were resolved by email assistance from Mark, WD9JEN, David, K9RUF,  and Terry, W5TMP.

  1. Carefully look at each field in the DVAP Node and IrcDDB packages and make sure you complete every field as indicated in the paper.  Even one setting that is not correct will result in operation problems.
  2. When you enter the frequency for your DVAP, you MUST enter the correct amount of digits without a decimal.  You will enter exactly 9 digits, nor more and no less.  So, if your DVAP is on 146.500, you would enter 146500000.  If you don’t, you will receive an “out of range” error message.
  3. If you are using a UHF DVAP, make sure you select “B” mode in the setup screen.  If you are using a VHF DVAP, make sure you slect the “C” mode in the setup screen.
  4. DO NOT change any settings in either software package unless indicated in Mark’s guide.
  5. As mentioned above, do a soft reboot after changing any settings.  If you simply pull the power, all settings will be lost and it will be back at the default.

That’s about it!  After the above is successfully completed, you will be on the air with your RPI and DVAP and will be able to use any D-Star radio to communicate.

But what about mobile or portable operation?

As I mentioned above, I have used my setup in mobile and portable environments.  While traveling down the road, I use the Personal Hotspot feature of my iPhone to connect the RPI via the WIFI dongle.  It has worked flawlessly so far.  In the car, you can use a phone charger that plugs into the lighter socket, as long as it delivers the appropriate voltage and amperage for your set up.  You can also use an inverter or similar device if you vehicle is so equipped.

hotspot

pi2

For portable use, I take advantage of the large capacity of the Powergen battery pack listed above.  This makes the RPI and DVAP a truly portable system that you can take anywhere you have access to the Internet.

pi3

The final item I would like to mention here is the WIFI setup using the SD card image referenced above.  I had a little difficulty getting this setup and working.  It turned out that I had an error in the configuration file for the WIFI adapter.  There is a GUI WIFI program included with the build that may work for you.  To set up the WIFI, just load this program and instruct it to scan for available WIFI networks.  If it finds yours, double click on it and enter your password.  That should work.  If not, you may have to edit the wpa-supplicant.conf file found at the path: /etc/wpa-supplicant/wpa-supplicant.conf.  You can use the Nano editor to do this, but just make sure you load the editor using the sudo command so you have rights to edit the file.

UPDATE:

After working on this post, I noticed that Robin, AA4RC, the father of the DAVP had posted in the DVAPDongle group that he now has DVAPTool software available for the RPI.  As of the time of this post I have not loaded and used this software, but I wanted everyone to be aware of it.  I hope to see some comments to this post about how this software works with the RPI and DVAP.  Here’s Robin’s post:

From: DVAPDongle@yahoogroups.com [mailto:DVAPDongle@yahoogroups.com] On Behalf Of aa4rc
Sent: Monday, February 18, 2013 2:45 PM
To: DVAPDongle@yahoogroups.com
Subject: [DVAPDongle] DVAPTool version 1.04 for Raspberry Pi released

DVAPTool for the Raspberry Pi is now available for the Raspian Wheezy distribution 2013-02-09-wheezy-raspian.img.
Follow the steps below to install/run:
1) make sure you are running Raspian Wheezy 2013-02-09 and are connected to the internet with your Pi.
2) open an LXTerminal window and run: “sudo apt-get install qt4-dev-tools”. Answer “Y” when prompted.
3) in terminal window run: “curl -O http://opendstar.org/tools/DVAPTool-1.04-rpi.tgz
4) in terminal window run “sudo tar xzPf DVAPTool-1.04-rpi.tgz”
5) in terminal window run DVAPTool with “./DVAPTool” from your home directory.
Note that this is a full GUI version. I’m working on a text only daemon.
There are no current plans to compile DVAPTool for any distribution other than Raspian. It may or may not work on others.

73,
Robin
AA4RC

That’s it!  I hope everyone enjoys using the RPI and DVAP for a great D-Star experience.

UPDATE – DVAPTool Auto Start – 3/2/2013

Thanks to John, WB4QDX for emailing me instructions for setting up the AA4RC DVAPTool software to auto start in the “open” mode (i.e., with the blue light blinking and the DVAP awaiting radio commands).  Please note that before you do this you should first follow the steps in Robin’s email that is quoted in the main post above to load the DVAPTool software and all associated software.

Here’s what you need to do to set up a headless (no keyboard, mouse or monitor) DVAP system using DVAPTool and either the UHF or VHF DVAP devices:

1.   Using the text editor of your choice (Leafpad, Nano, etc.) , edit /etc/rc.local by adding the following lines:

# Start X Server so DVAPTool can start

su pi –c startx

2.  Again, using the text editor of your choice, create a text file in /home/pi  with the name .xinitrc with the following lines:

#!/bin/sh

#.xinitrc

# Start DVAPTool

exec  /home/pi/DVAPTool  –open

Again, this file must be placed in the /home/pi directory and it must be made executable.  To make it executable, type the following command from a command line in the terminal:

chmod 755 .xinitrc

After you complete the above, reboot the RPI and you should see the system boot into the DVAPTool software in open mode ready for a command from the radio.

I have tested this on both the UHF and VHF DVAPs with DVAPTool  and it works great.  With the DVAP Node and DVAPTool packages, you now have two choices to set up a headless portable or mobile RPI/DVAP system.  I have created separate SD cards for each system to allow me to switch back and forth, if needed.

This entry was posted in Uncategorized. Bookmark the permalink.

28 Responses to Setting up a Raspberry Pi to work with a DV Access Point Dongle (DVAP)

  1. Bill says:

    As a follow up to this post, it appears that at this point the DVAPTool software authored by Robin, AA4RC has to be accessed through the GUI after boot-up of the RPI. It will not auto start and auto connect the DVAP to the computer. This would have to be done manually. This obviously presents a problem for those of us who use the DVAP/RPI in a mobile or portable setting without a monitor, mouse and keyboard. Currently, the DVAP Node software will auto start and auto connect to the DVAP.

    The issue with the DVAPTool software may be a simple matter of modifying the program, and I will keep everyone posted here if Robin informs me that the change is possible. If you are going to use the DVAP and RPI with a keyboard, mouse and monitor, the DVAPTool software reportedly works very well and is a great option, with a look and feel very similar to the versions for Windows, OS X and Linux.

  2. John - K7VE says:

    Great Post!

    A couple of comments:

    The ircDDBGateway plus DVAPnode allows you to link on all major linking systems (DPLUS, DExtra, DCS, and CCS) and if you have a club callsign (registered with ircDDB.net) you can do callsign routing as well (including STARnet Digital Groups).

    There is also the standard install process documented under Files->Documentation in the ircDDBGateway Yahoo! Forum.

    Using a GUI requires extra resources and configuration/operation on ircDDBGateway/DVAPnode can be done completely through the command line.

  3. Bill says:

    After reading over this post, I realized that one of the biggest oversights was not thanking Jonathan, G4KLX, for posting the RAR file of the image at his web site, westerndstar.co.uk. Not only did Jonathan post the file, but he created it as well and has done a fantastic job of keeping it updated. So, Jonathan, please accept my apology for not recognzing you in the original post and please keep up the great work you have done in creating this image!

    For those of you who are running the image on your RPI/DVAP system, please note that Jonathan has made it very easy to update the software. There is a “read me” file on the desktop that describes how to perform the update, so give that a read and make sure you keep your system current.

  4. Bill says:

    I’ve had a lot of questions about the best case to get for your RPI board. There are many available, and some are much better than others. They come in many different shapes, sizes and colors. Your mileage may vary; however, my favorite case is the Multicomp Clear Raspberry Pi Enclosure, part number MC-RP001-CLR. This case is small, closes securely and comes with rubber feet. I’ve used several others, but for portable and mobile use this is the best in my opinion. You can get this case for around $7.50 from Newark/Element 14. Here’s a link: http://www.newark.com/multicomp/mc-rp001-clr/enclosure-raspberry-pi-clear/dp/07W8936

  5. Bill says:

    As an alternative to a telephone charger wall wart, Powerwerx has a great little charger called the “USB Buddy”. This charger has Anderson Power Pole connectors on one end and a female USB plug on the other. It will take your battery or 12 volt supply down to 5 volts with an output of 3 amps. All you need is a USB to micro-USB cable and this will supply your RPI and all accesories. It will also serve as a rapid charger to your phone or tablet. Here’s a link to the device:

    http://www.powerwerx.com/batteries-chargers/usbbuddy-powerpole-12v-usb-5v-device-charger.html

  6. Deborah K9ONY says:

    Is the GUI WiFi in the build capable of automatically switching from your home WiFi to your iPhone hotspot? That would be really cool since you could continue to run headless rather than connecting peripherals to the Pi to affect the switch.

    Super info, thanks for the post.

  7. Bill says:

    @K9ONY – I have not tried that, but I’m pretty sure it will work. The way to check is to load the various WIFI connections using the GUI interface and then check the wpa_supplicant.conf file to see if all of your connections are included in the file. If they are the RPI sould connect to the available WIFI connection on boot up. I’ll let you know the results if I try this.

    You can also create a second SD card with an alternate WIFI connection. Just boot with the SD card with your WIFI connection of choice.

    73,
    AB4BJ

  8. Lewis says:

    Thanks for update on setting up the pi and DVAP for stand alone operation. I plan to give it a shot tomorrow.

    Any plans to add VNC to the setup ?

    73
    Lewis

  9. Bill says:

    @Lewis – VNC is included in the image with DVAP Node. You should be able to load and set up VNC on your system with DVAPTool. There are a number of tutorials out there. This one is pretty good: http://myraspberrypiexperience.blogspot.com/p/setting-up-vnc.html

    73,

    AB4BJ

  10. Lewis says:

    Thanks, I’ll give a try ! I know NOTHING about Linux, but guess if I’m going to play in the Linux playpen I need to learn my way around.

  11. Terry says:

    Great job consolidating the thread Bill. Catch ya on the air. 73, Terry W5TMP

  12. Bill says:

    I just noticed a nice article about the RPI on page 52 of the March 2013 issue of CQ Magazine. No mention of D-Star, though.

  13. Roy M1EIV says:

    K9ONY asks is the pi able to switch between your home wifi and iPhone hotspot automatically ? Well yes it can I have mine working fine this way. Just remember to save the configuration for each connection then do a reboot . Good look

  14. Bill says:

    @Roy M1EIV – Thanks for your comments and the great video of your setup. I also confirmed this weekend that you can configure the RPI to work on more than one WIFI connection. My portable setup is working on my home WIFI and on my Personal Hotspot.

    73,

    Bill
    AB4BJ

  15. Pingback: AB4BJ » A Go Box for the DVAP with Raspberry Pi for DSTAR

  16. Pingback: AB4BJ » UPDATE to Implementing an auto start system with the DVAP and RPI

  17. vk4tux says:

    “Re: K9ONY – I have not tried that, but I’m pretty sure it will work. The way to check is to load the various WIFI connections using the GUI interface and then check the wpa_supplicant.conf file to see if all of your connections are included in the file. If they are the RPI sould connect to the available WIFI connection on boot up. I’ll let you know the results if I try this.”

    The fedora remix Rpi package will auto connect to any close wifi it can detect on an open system tested here, with a Rpi travelling to different outlets with public wifi etc., configured in network manager.

    Adrian … vk4tux

  18. Dennis says:

    Keep up with the documentation.
    There needs to be a step-by-step guide showing the GUI settings of the ircddb
    software showing both the DVAP and GMSK settings using the most current version of ircDDBgateway software.
    This would be a nice addition to your site for new users of the RPi + ircddb software.
    I just do not have time to do this many other projects working on with the RPI.
    I instructed many (W5TMP and others) with their first install.

    Dstar User since 2005 helping with the WD5STR gateway install.

    Dennis
    N5VRP

  19. scott says:

    Trying to get the DVAP to work with the RPI and having some trouble. when following Robin instructions after I enter this line sudo tar xzPf DVAPTool-1.04-rpi.tgz, I get a “child error” can any one help?

  20. SCOTT says:

    Finally got it working. turn out I had some conectivaty errors and the whole dvap tool didnot down load. so now all is well, I can use the rpi with the dvap. Now to just get to come up automatically.
    ab1mc

  21. Mike KG2IS says:

    I got stock on simple rc.local script save with Permission denied message.
    Can someone help?
    Thanks

    Mike

  22. Mike says:

    I have my iphone personal hotspot working for my laptop and so on but can not get my raspberry PI to connect to it. I can get my raspberry pi to connect to my wireless network at home but it won’t connect to my iphone.

    Can someone post the interface settings for the iphone

    Etc/network interface

    I have no idea what encryption the iphone 4gs uses for its hotspot.

  23. David says:

    Can anyone tell me do I need to register with the ircddb before I start this project?
    Thanks
    David
    N3DMS

  24. Pingback: Raspberry PI - Sammlung spannender Amateurfunk Projekte » Amateurfunk! Transceiver, SDR, Software & Meinungen

  25. Interesting at the moment I’m in Brisbane when I get back to the Uk I hope to have one do these fully set up for the Great Northern Hamfest 6 October 2013 in Barnsley.

    G4LUE.

  26. Pingback: DVAP + Pi | Amateur Radio Weblog by KD0BIK

  27. David Bishop says:

    I have downloaded the software to use with my raspberry pi on 2 different 8gig mem cards boith allow the PI to boot will not allow me to use wifi and will not allow me to set the dvap frequency — keeps saying out of range I am UK and want to use the same frequency as I do in windows which is 144.625000 any one help me ?

  28. Dave K4WHE says:

    Pulling my hair out, and I already have a shaved head… I can’t get this to work at all and have tried several way to get it to work. Could I have some more detail on where to put this into my radio? I guess another question is, is it entirely necessary to have that function working or can I just manually power the Pi off?

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>