Raspian Jessie Lite installation instructions

Here’s the installation steps I took to install Hermione from scratch today.

  • Use Etcher to write the SD card with the latest Raspian Jessie Lite image
  • In windows in the root directory of the SD card, create an SSH file to enable it
    echo hello > ssh
  • Boot up your B2 with SD card, keyboard, mouse, monitor and WAP / soft AP supporting WiFi dongle installed
  • raspi-config to set hostname, GPU memory (128MB), enable I2C, overclock to 1GHz, disable overscan, disable serial UART, enable camera support and SSH server.  Do this incrementally to make sure each change takes effect in /boot/config.txt
  • Set up a WiFi internet connection from the CLI as per these instruction on the Raspberry Pi site.
  • sudo apt-get update
  • sudo apt-get upgrade
  • sudo apt-get install i2c-tools python-smbus python-dev python-setuptools python-picamera python-gps git ftp udhcpd hostapd serial minimalmodbus*
  • edit /boot/config.txt adding
    dtparam=i2c_arm_baudrate=400000
    max_usb_current=1
  • while in /boot/config.txt, disable pointless functions thus
    dtparam=audio=off
    start_x=0
  • git clone https://github.com/pyhys/minimalmodbus*
  • cd minimalmodbus*
  • sudo python ./setup install*
  • cd ~*
  • git clone -b v2 https://github.com/metachris/RPIO
  • cd RPIO
  • check mailbox.c code present in source/c_pwmmailbox.c)
  • sudo python ./setup install
  • cd ~
  • git clone https://github.com/PiStuffing/Quadcopter
  • cd ~
  • cp Quadcopter/qc.py .
  • cp Quadcopter/fp.csv .
  • cp Quadcopter/Quadcopter.py .
  • sudo python ./qc.py
    • –tc 1 -h 150
    • -f fp.csv

Finally, to make her a WAP:

  • Disable the new style network tools:
    sudo apt-get remove dhcpcd5 raspberrypi-net-mods
  • Configure hostapd by creating /etc/hostapd/hostapd.conf “sudo vi /etc/hostapd/hostapd.conf” and add the following:
    interface=wlan0
    drive=nl80211
    ssid=WAPPi
    channel=1
    wmm_enabled=0
    wpa=1
    wpa_passphrase=WAP3.141592654
    wpa_key_mgmt=WPA-PSK
    wpa_pairwise=TKIP
    rsn_pairwise=CCMP
    auth_algs=1
    macaddr_acl=0
  • Enable hostapd by editing /etc/default/hostapd thus, adding
    DAEMON_CONF="/etc/hostapd/hostapd.conf"
  • We next need to configure dhcp for the clients accessing the network to  provide their IP addresses – edit /etc/udhcpd.conf adding:
    start 192.168.42.20 # This is the range of IPs that the hostspot will give to client devices.
    end 192.168.42.254
    interface wlan0 # The device uDHCP listens on.
    remaining yes
    opt domain local
    # opt dns 8.8.8.8 4.2.2.2 # The DNS servers client devices will use.
    opt subnet 255.255.255.0
    opt router 192.168.42.1 # The Pi's IP address on wlan0 which we have set up.
    opt lease 864000 # 10 day DHCP lease time in seconds
  • Enable dhcp by editing /etc/default/udhcpd thus to comment out the line
    #DHCPD_ENABLED="no"
  • Add the dhcp leases file by typing
    sudo touch /var/lib/misc/udhcpd.leases
    sudo chmod 666 /var/lib/misc/udhcpd.leases
  • Now to configure the WAP static IP address – “sudo vi /etc/network/interfaces”, adding the static IP address for wlan0 and commenting out anything related to the dynamic address – note that these have changed from the default values to add “iface wlan0 inet manual” so internet access can be reinstated easily if needed.
    auto wlan0
    iface wlan0 inet static
    address 192.168.42.1
    netmask 255.255.255.0
    
    #allow-hotplug wlan0
    #iface wlan0 inet manual
    #    wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
    #iface default inet dhcp
  • Edit /etc/hostname to ensure the domain name is included – in my case, the domain is called local, and the hostname is wappi, so /etc/hosts reads
    wappi.local
  • Next assign static IP address for the server in /etc/hosts
    127.0.1.1 wappi.local
    192.168.42.1 wappi.local wappi
  • Check, double check, and triple check that you’ve done all the above steps, and then finally
     sudo reboot

I’ve converted the above installation instruction into a simple HTML page you can then print from your browser to have a paper copy next to you when you’re working through the installation.


* All crossed out instructions relate to LEDDAR installation requirements which I’m not going to continue to support.

Leave a Reply

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