Errata‎ > ‎RaspberryPi‎ > ‎

SuitiePi - WiFi AP/Extender using old RPi

Final Update:  8 October 2021:   Moved to https://tech.tpedersen.net/raspberry-pi/pi-recipes/suitiepi-ap

Last update: 8 February 2021

// Now running on an overclocked Pi Model B, we'll see how it holds up //

Background

SuitiePi was initially thrown together to fill-in a WiFi deadspot in our basement.  It plugged into an existing Ethernet cabled to our guest network and basically serves as a WiFi extender for visitors and hotspot for the PanelPi.  

Software 

Hardware

As usual, the SuitiePi world was pieced together using stuff laying around. 
Specifically:
  • Raspberry Pi 1 Model B, overclocked to 800
    Ran fine on
    Raspberry Pi 2 Model B.
  • EDIMAX USB WiFi adapter
  • Older RPI Power Supply (2 amp)
  • Really Old 8g Micro SD card FAILED in 2020 after approx 6 years of varied but constant use!
    Replaced by another really old Kingston 8g Micro SD (2015) because I like living on the edge!

Step by Step (rough notes to self, I'll cleanup later)

Raspberry Pi OS Lite

  • Singing along with Instructions @ raspap.com/#prerequisites 
  • Download RaspOS Lite (quickstart)
  • Etcher sd card
  • <Boot>
  • Update
    sudo apt-get update
    sudo apt-get dist-upgrade
    sudo reboot
  • Post boot cleanup via raspi-config
    • System Options
      • Change pi password
      • Set Hostname
    • Interface Options
      • Enable SSH
    • Localisation Options (season to taste)
      • Locale = en_US.UTF-8, UTF-8
      • Set Timezone 
      • Keyboard = US
      • WiFi Country code
    • Interfacing Options
      • Enable SSH
    • Display Options
      • Screen Blanking
    • Update Raspi-config tool
    • Install favorite editor - sudo apt-get install joe
    • <ReBoot>

RaspAP Install

  • Quick installer seems to be way to go on this one ... NICE!

    I say:
    curl -sL https://install.raspap.com | bash
    It says:
     888888ba                              .d888888   888888ba
     88     8b                            d8     88   88     8b
    a88aaaa8P' .d8888b. .d8888b. 88d888b. 88aaaaa88a a88aaaa8P
     88    8b. 88    88 Y8ooooo. 88    88 88     88   88
     88     88 88.  .88       88 88.  .88 88     88   88
     dP     dP  88888P8  88888P  88Y888P  88     88   dP
                                 88
                                 dP       version 2.4.1
    
    The Quick Installer will guide you through a few easy steps
    
    
    RaspAP Install: Configure installation
    Detected OS: Raspbian GNU/Linux 10 (buster)
    Using GitHub repository: billz/raspap-webgui master branch
    Install directory: /etc/raspap
    Install to lighttpd root: /var/www/html? [Y/n]: Y
    Installing to lighttpd directory: /var/www/html
    Complete installation with these values? [Y/n]: Y
    <Setting up, Creating, yada yada>
    Enable HttpOnly for session cookies (Recommended)? [Y/n]: Y
    <yada yada>
    Enable RaspAP control service (Recommended)? [Y/n]: Y
    <yada yada>
    Install ad blocking and enable list management? [Y/n]: Y
    <nice, but not now>
    Install OpenVPN and enable client configuration? [Y/n]: n
    <yada yada>
    The system needs to be rebooted as a final step. Reboot now? [y/N]: y
    
  • RaspAP Config (relative to v2.5.2)
    http://<IP suitiepi> returns login screen - Initial login is admin/secret. 
    Settings:
    • Dashboard:  Nice!
    • Hotspot Settings
      • Basic:  Set SSID, Mode & Channel (I use OSX Wireless Diagnostics to find best channel)
      • Security:  WPA2, CCMP & set PSK
      • Advanced:  Set MAX Clients & Set Country Code
      • Ad Blocking:  Enable blocklists 1.92.168
    • DHCP Server Settings
      • Adjust IP Subnet (Start/Stop IP Address)
    • Ad Blocking:  Give it a try!  
    • Networking:  
      • eth0 - DHCP (IP is reserved in our router)
      • wlan0 - I set static IP, gateways and DNS to 9.9.9.9 to avoid 1.1.1.1.  (see below)
    • WiFi client:  No change
    • Authentication:  Set Admin UC/PW
    • Change Theme:  Default is fine
    • Data Usage:  Nice!
      • System:  Nice 





Trials, Tribulations and Previous Struggles:

February 2021 - Ended up downgrading SuitiePi hardware to RPI 1 Model B so I could dedicate the RPi 2 to Kodi.
  • Basically swapped the sd card and Wifi USB dongle to older hardware, plugged in via 2.1amp USB charger and it came right up, runs reasonably well.   iPhone shows speeds of round 20Mbps
  • Overclock via Raspi-Config, set to:
    Modest 800MHz ARM, 250MHz core, 400MHz SDRAM, 0 overvolt
  • Runs between 45c and 50c.  CPU shows 100% during heavy use (150% via RaspAP status page!).   Should be good enough for my purposes - very occasional use, no need for speed.  ~20Mbps up/down via 802.11n 2.4GHz
December 2020 - Need an itsy, bitsy browser on the basement TV.  Will see if Pi2 has enough horsepower to play exercise videos too ...
  • SuitiePi V2:  All of above RaspAP stuff PLUS chromium kiosk from step by step @ https://die-antwort.eu/techblog/2017-12-setup-raspberry-pi-for-kiosk-mode/ (if that doesn't work: pimylifeup.com/raspberry-pi-kiosk/)
  • Notes as I go ... will incorporate changes into above recipe
    • Raspberry Pi OS Lite
      • Dowloaded 2020-12-02-raspios-buster-armhf-lite.zip
      • A few Raspi-Config changes, they rearranged some options
    • RaspAP
      • Installed 2.5.2 version, step by step above semed fine
      • Still no internet access after install/config
        • Had to AGAIN modify /var/www/html/includes/defaults.php
          changed ...
          'RASPI_ACCESS_CHECK_IP' => '1.1.1.1',
          'RASPI_ACCESS_CHECK_DNS' => 'one.one.one.one',

          to ...

          'RASPI_ACCESS_CHECK_IP' => '9.9.9.9',
          'RASPI_ACCESS_CHECK_DNS' => 'dns.quad9.net',
    • Kiosk - singing along with https://die-antwort.eu/techblog/2017-12-setup-raspberry-pi-for-kiosk-mode/
      • Install X Server and Window Manager
        sudo apt-get install --no-install-recommends xserver-xorg x11-xserver-utils xinit openbox
      • Install Web Browser
        sudo apt-get install --no-install-recommends chromium-browser
      • Configure Openbox by editing /etc/xdg/openbox/autostart
        # TPed was here - The following cut/pasted for kiosk pi
        #        
        # Disable any form of screen saver / screen blanking / power management
        xset s off
        xset s noblank
        xset -dpms

        # Allow quitting the X server with CTRL-ATL-Backspace
        setxkbmap -option terminate:ctrl_alt_bksp
        # Start Chromium in kiosk mode
        sed -i 's/"exited_cleanly":false/"exited_cleanly":true/' ~/.config/chromium/'Local State'
        sed -i 's/"exited_cleanly":false/"exited_cleanly":true/; s/"exit_type":"[^"]\+"/"exit_type":"Normal"/' ~/.config/chro
        chromium-browser --disable-infobars --kiosk 'http://ventures.tpedersen.net/errata/raspberrypi/<start page>'

      • Start it up to test via startx --
      • Sloooooowww!  It barely runs videos on RPi3+!!!  My GramPi plays videos better!
        ToDo List - Looking at alternative light/fast browser/kiosk things

September 2020 - Rebuild due to Micro SD failure
  • Install recipe worked fine .... BUT no internet access?!?  Due to a Change in RaspAP
    • https://github.com/billz/raspap-webgui/pull/620 added internet check
    • Default check was see if cloudflare dns server was alive - 1.1.1.1
    • Our ISP blocks 1.1.1.1, so pings fail and RaspAP never marked internet up!
    • Fix is to change 1.1.1.1 to something that works - I used quad9 (9.9.9.9)
    • Option is in /var/www/html/includes/defaults.php
      changed ...
      'RASPI_ACCESS_CHECK_IP' => '1.1.1.1',
      'RASPI_ACCESS_CHECK_DNS' => 'one.one.one.one',

      to ...

      'RASPI_ACCESS_CHECK_IP' => '9.9.9.9',
      'RASPI_ACCESS_CHECK_DNS' => 'dns.quad9.net', 
June 2020 - Back to Rasap and RPI v1 Model B.  Gave up on RPiPlay!  Roku for TV smartener!
  • RPiPlay
    • Build executable using README.md Via SSH (remember to sudo!)  
      sudo apt-get update
      sudo apt-get dist-upgrade
      Install editor - no like nano. 
      sudo apt-get install joe
      <reboot>
      sudo apt-get install git
      git clone https://github.com/FD-/RPiPlay.git
      cd RPiPlay
      sudo apt-get install cmake 
      sudo apt-get install libavahi-compat-libdnssd-dev
      sudo apt-get install libssl-dev
      mkdir build
      cd build
      cmake ..
      make
    • Run/Test
      • Test using fully qualified executable
        /home/pi/RPiPlay/build/rpiplay -n AppleTV -a hdmi 
      • Connect with iphone using Screen Sharing on pull-up control/gadget screen *not* airplay share icon!
      • Works pretty well!
      • Argh!  AppleTV wont play movies!  Message box:
        Cannot Play Movie
        The Connected display is 
        not authorized to play
        protected movies  
May 2020 - Gave up on dietpi, hostapd and kodi! ... remnants below

Software
  • Dietpi.com - My Favorite!  Download latest RPI version (Donate!)
  • Etcher.io - Much easier way to flash OS images to SD 
  • Hostapd (Wifi Access Point) provided in DietPi Optimized Software
  • TV/Entertainment services via Kodi option in DietPi Optimized Software
Step-by Step
  • Download latest DietPi and Etcher.  Follow DietPi Quickstart Guide
    // used DietPi_RPi-ARMv6-Buster.7z (~110MB Download) //
  • Config DietPi using keyboard and monitor
  • Install editor - no like nano.  apt-get install joe
  • Quick Kludge/Fix - Dietpi added network check that is a real pain ... attempts to ping 1.1.1.1, which appears to be blocked by our ISP (tds), stops updates and dietpi config/software in its tracks
    • Edit /boot/dietpi.txt - Code block looks like this:
# General connection and DNS testing
# - IP to ping when checking network connectivity. Default: 1.1.1.1 (Cloudflare DNS, should be very fast world-wide)
# TPed Mod - TDS blocks 1.1.1.1, I have to use similar - quad9.net
CONFIG_CHECK_CONNECTION_IP=9.9.9.9
# - Domain to ping when checking DNS resolver. Default: one.one.one.one (Cloudflare DNS domain, see above)
CONFIG_CHECK_DNS_DOMAIN=quad9.net
  • via Dietpi-Software 
    • install following - all under Software Optimized
      • Media Systems - Kodi
      • Wifi Hotspot (hostapd)
      • System Stats/Management - RPi-Monitor (web interface system status 
    • Install: Go >> Start installation for selected software
    • Dietpi-config 
      • Hostapd via Network Adapters 
        • SSID+password
        • Country
        • Channel (scan for best using Mac Wireless Diagnostics)
        • DON'T FORGET to APPLY (save changes and restart networking)
      • Normal dietpi tweaks
        • Audio -> onboard HDMI (rpi-bcm2835-auto)
        • Language/Regional -> US Local, Timezone & keyboard for me
        • Security Options -> change passwords & set hostname
        • Auto Start -> Kodi
  • Shutdown and move to final Subnet/Resting place 
    • Switch to SSH access for rest of setup at this point
  • Manual Tweaks
    • Connected PanelPi (Rpi0) to Hostapd,  
      • Edit /etc/dhcp/dhcpd.conf to pre-assign IP so I can find that little Pi ...
        # TPed Add - Reserve IP for our PanelPi 
        host panelpi {
        hardware Polish up ethernet xx:xx:xx:xx:xx:x;
        fixed-address 192.168.xx.xx;
        }
      • Added static route to upstream router and can now access Rpi0 via SuitiePi AP subnet
    • Had to edit /etc/hostapd/hostapd.conf to get hostapd_cli working CLI for hostapd status and such)
      • Added ctrl_interface and group - can't recall where I found this.  ctrl_Interface is path to hostapd.pid, not sure what group is ... but it works!
        # TPed Add - enable hostapd_cli client 
        ctrl_interface=/run/hostapd
        ctrl_interface_group=0
    • Season RPi-Monitor display to taste - edit /etc/rpimonitor/data.conf
      • Uncomment wlan.conf line - we want to see wlan activity
      • Comment dhtll.conf line - some sort of temp sensor.  Adds "Living Room" page - drove me nuts!
    • Good Time to Boot and check work so far
      • RPi-Monitor should work to both SuitePi and PanelPi
      • journalctl -u hostapd should also show PanelPi mac address authenticated & associated
      • hostapd_cli list_sta will also show active mac addresses
  • RPiPlay:  Sing-a-Long @ https://github.com/FD-/RPiPlay
    • Looks like cc compile opportunity, install some development stuff via dietpi-software (software-additional)
      • Build-Essentials, Git-Client and UnRar
      • <reboot, of course!>
    • Building (as root)
      git clone https://github.com/FD-/RPiPlay.git
      apt-get install cmake
      apt-get install libavahi-compat-libdnssd-dev
      cd RPiPlay
      mkdir build
      cd build
      cmake ..

    • CRAP!  No ilclient in dietpi? This is nuts!  Switching back to Raspbian for a while.  Dietpi seems to be more trouble than its worth!



March 2020 - back at it.  SuitiePi has been working quite well, some periodic failings (unable to connect), but overall pretty good.  Adding a static host (rpi0) to help me reach some hardwired sensors our home
  • Switched to RPi model 2, Kodi takes more power & SuitiePi is now integral part of Smart home (good or bad?!).  
  • no more shairport-sync for now, we'll see what Kodi can do 
  • Rpi-Monitor added 
  • Connected PanelPi (Rpi0) to Hostapd,  
    • Edit /etc/dhcp/dhcpd.conf to pre-assign IP so I can find that little Pi ...
      host panelpi {
      hardware ethernet xx:xx:xx:xx:xx:x;
      fixed-address 192.168.xx.xx;
      }
    • Added static route to upstream router and can now access Rpi0 via SuitiePi AP subnet
Now to figure out Kodi

Lots of struggles w/ EDIMAX adapter on Model B Pi ... switching to PI 2 for shortrun
WHOOPS - PI2 is missing - used for MoviePI for my parents (play fam movies from google drive with VCR-Like Remote!)
Switched to Pi 3 

Ghadzooks!  Complicated!  Combination of arm6 vs arm7 and EDIMAX adapter may be too much for dietpi.  Makes me grumpy, I had this working on Pi 2 w/EDIMAX adapter - wasn't that hard!!  Didn't take image of sd card - ARG!!  

Notes (so I can retrace my steps)
  • Attempting to install over dietpi REALLY want to use a Pi Model B here if I can
  • Configures and comes up fine 
  • Kernel Panic when first client connects - fully connects, pass auth completes
  • Switching to Raspian Lite (buster) - to eliminate diet pi 
  • Must be Arm6 - Raspian Lite's Kernel Panic's and dies too!
  • Back to DietPi on a RPI 3
  • <I'm sooo confused!  this one is a pain!>

Step by Step
// Attempting on Mod B w/ edimax & 8g SD //
- Download DietPi (of course)
- DietPi install (.5 - 45mins)
- Change a couple of passwords
- upgrades itself
// Approx 15 mins //
Dietpi Software/Dietpi Config
- Config cleanup 
--- Performance/Overclocking/Safe 900MHz (2over)
--- Advanced/Update firmware
--- Language/Locale/Timezone/Keyboard
--- Security/Hostname
--- Network - turned off IPV6 (for heck of it)
<reboot>
Dietpi Software
-- WiFi Hotspot (Hostapd)
-- Rpi-Monitor
-- Remember to Start Installation


Links 


Odd things to figure out - Dietpi v6.19.7

Raspberry Pi Model B hostapd dies - Kernel Panic

# journalctl -u hostapd
-- Logs begin at Thu 2016-11-03 12:16:43 CDT, end at Sat 2018-12-15 08:03:09 CST
. --
Dec 15 08:01:30 SuitiePi systemd[1]: Starting LSB: Advanced IEEE 802.11 management daemon...
Dec 15 08:01:31 SuitiePi hostapd[965]: Starting advanced IEEE 802.11 management:hostapdIllegal instruction
Dec 15 08:01:31 SuitiePi hostapd[965]: failed!
Dec 15 08:01:31 SuitiePi systemd[1]: Started LSB: Advanced IEEE 802.11 management daemon.

------------------------------------

Uninstalled hostapd and FINALLY got regular wifi working (adapter was chronically DISABLED) ... interesting wlan0 state ... both networks showing - hostap was ..42.1/24 and normal net 192.168.11. :
root@SuitiePi:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
    link/ether b8:27:eb:63:0d:47 brd ff:ff:ff:ff:ff:ff
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 74:da:38:8b:2e:0b brd ff:ff:ff:ff:ff:ff
    inet 192.168.42.1/24 brd 192.168.42.255 scope global wlan0
       valid_lft forever preferred_lft forever
    inet 192.168.11.64/24 brd 192.168.11.255 scope global wlan0
       valid_lft forever preferred_lft forever
    inet6 fe80::76da:38ff:fe8b:2e0b/64 scope link 
       valid_lft forever preferred_lft forever