HSMM-Mesh on Raspberry Pi2

The HSMM-MESH or Broadband-Hamnet is a Ham Radio network of linked WiFi repeaters.

The Raspberry Pi2 can be configured to become a Node on the HSMM-Mesh. The Raspberry Pi2 is capable of providing server functions while being a HSMM-Mesh node. For example the Raspberry Pi2 could run an Asterisk PBX which is directly addressable across the Mesh network, or it could run a NAS, or both.

The HSMM-Pi nodes lack the more robust router features of the WRT54Gx series of routers or the Ubiquity routers, but they do provide a great way to consolidate servers on the network and are quite useful for mobile connections to HSMM-MESH networks.

To setup a Raspberry Pi2 for this HSMM-Mesh service follow the directions at:

Depending on the type of service you intend for your Raspberry Pi node, will indicate what type of antenna you will want to use. The new Pi3 that just came out has a built in WiFi but the Pi2 does not and you will need a USB to WiFi adapter. The Raspberry Pi2 has a limited current capability through the USB ports and therefore you might need a powered USB Hub to power the WiFi and/or other USB devices connected to it. A list of supported WiFi adapters and discussion on the problems and attributes of each one is located here:
http://elinux.org/RPi_USB_Wi-Fi_Adapters .

I have been using the ALFA AWUS036H v5 802.11 b/g Long Range USB Adapter with my PI node. It does a good job, but it did require some setup in the operating system to make it work reliably in this service. I added a file containing the following to the folder “/etc/init.d”.

iwconfig wlan0 rate auto 
iwconfig wlan0 frag 512
iwconfig wlan0 rts 512
iwconfig wlan0 retry short 11
iwconfig wlan0 retry long 11
iwconfig wlan0 power off

The permissions for this file would be set by “chmod 755” and the owner and group are root:root. The file is added to the system with this command:
sudo update-rc.d <yourfilename> defaults

After a reboot IWCONFIG wlan0 gives this report:

pi@KA7U-2 / $ sudo iwconfig wlan0
wlan0 IEEE 802.11bg ESSID:"BroadbandHamnet-20-v3" 
 Mode:Ad-Hoc Frequency:2.412 GHz Cell: 86:E9:B7:56:2F:EF 
 Tx-Power=20 dBm 
 Retry short long limit:11 RTS thr=512 B Fragment thr=512 B 
 Encryption key:off
 Power Management:on

pi@KA7U-2 / $

A different WiFi adapter may or may not need this instruction to stay on and operate correctly with the RPI, but I have included the information in case you have a challenge and need to know where to look.

There is a Google Community for the HSMM-Pi here:

Ron Morell – KA7U

Raspberry Pi2 RTL_TCP Server

The Raspberry Pi2 makes a nice RTL_TCP server. You can place it anywhere on the network close to a good antenna. The sample rate requires good throughput on the Network and generally Ethernet has more throughput than WiFi and Ethernet is preferred for connectivity on the LAN. Fast WiFi will work however. So to setup the RPi2 for this service, you will first install Raspbian Jessie on the SanDisk card and boot the Pi with it. Once you have logged in to the Pi, open a terminal and do the following:

  1. Passwd
  2. sudo raspi-config
  3. sudo apt-get update
  4. sudo apt-get upgrade
  5. sudo rpi-update
  6. reboot
    log back into the Raspberry Pi
  7. cd /etc/modprobe.d
  8. sudo nano rasp-blacklist.conf #and add the following, then save the file:
    blacklist dvb_usb_rtl28xxu
    blacklist rtl2832
    blacklist rtl2830
  9. sudo update-initramfs -u
  10. cd
  11. sudo apt-get install git
  12. sudo apt-get install cmake
  13. sudo apt-get install libusb-1.0-0.dev
  14. sudo apt-get install build-essential
  15. sudo apt-get autoremove
  16. git clone git://git.osmocom.org/rtl-sdr.git
  17. cd rtl-sdr
  18. mkdir build
  19. cd build
  20. cmake ../
  21. make
  22. sudo make install
  23. sudo ldconfig
  24. cd /etc/udev
  25. sudo cp ~/rtl-sdr/rtl-sdr.rules ./
  26. sudo reboot
Log back into the Pi and start the RTL_TCP Service with:
 rtl_tcp -a <the Pi's IP address>

Then using SDR# or HDSDR or whatever receiver you use on your local computer, configure the TCP interface for the server’s IP address and set the sample rate and other parameters as appropriate to start receiving from the RTL-DVB USB receiver served by the Raspberry Pi.


Ron – KA7U
March 4, 2016