Raspian Jessie Lite installation instructions

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

http://downloads.raspberrypi.org/raspbian/images/raspbian-2017-02-27/ February 2017 Jessie Lite image is the last that works due to I2C enhancements which the Garmin LiDAR-Lite V3 do not support

The latest up to date installation instructions are now here on GitHub.

Everything below is left in case someone references it but is not maintained.  Instead use the links above.


  • 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 RPi with SD card, keyboard, mouse, monitor and WAP / soft AP supporting WiFi dongle installed (no WiFi dongle needed for 3B and Zero-W)
  • 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 https://www.raspberrypi.org/documentation/configuration/wireless/wireless-cli.md.
  • sudo apt-get update
  • sudo apt-get dist-upgrade
  • sudo apt-get install i2c-tools python-smbus python-dev python-setuptools python-picamera python-gps python-serial git ftp udhcpd hostapd serial minimalmodbus
  • edit /boot/config.txt adding
    dtparam=i2c_arm_baudrate=400000
  • while in /boot/config.txt, disable pointless functions thus
    dtparam=audio=off
    start_x=0
  • If you are using a Pi3 or Zero-W, you may want to disable Bluetooth in /etc/modprobe.d/raspi-blacklist.conf thus:
    # WiFi
    # blacklist brcmfmac
    # blacklist brcmutil
    
    # Bluetooth
    blacklist btbcm
    blacklist hci_uart

    Likewise if you’re using an WiFi USB dongle, you can disable the internal one by removing the ‘#’s for that pair of lines.

  • If you are using a B2 V1.2, it can be overclocked to 1.2GHz thus in /boot/config.txt
    arm_freq=1200
    core_freq=500
    sdram_freq=600
    force_turbo=1
    over_voltage=6
  • If you are using USB GPS and / or Scanse Sweep, it’s worth linking the USB tty to a unique name for each. In /etc/udev/rules.d add a file such as ’99-usb-serial.rules containing something like this:
    SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6015", ATTRS{serial}=="DO004VY5", SYMLINK+="ttySWEEP"
    SUBSYSTEM=="tty", ATTRS{idVendor}=="067b", ATTRS{idProduct}=="2303", SYMLINK+="ttyGPS"
    

    The details of what to fill in come from /var/log/messages as a USB UART is plugged in. Also /etc/default/gpsd and Quadcopter.py to reference these tty* names instead of ttyUSB*

  • 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_pwm/mailbox.c)
  • sudo python ./setup.py install
  • cd ~
  • git clone https://github.com/PiStuffing/Quadcopter
  • cp Quadcopter/qc.py .
  • cp Quadcopter/fp.csv .
  • cp Quadcopter/Quadcopter.py .
  • sudo python ./qc.py
    • –tc 1 -h 1150
    • -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
    driver=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.
    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"
  • 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.
    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

BACK OUT THE CHANGES TO THE FOLLOWING FILES FOR INTERNET ACCESS UPGRADES ETC

/etc/default/hostapd
/etc/default/udhcpd
/etc/network/interfaces
/ets/hosts
/etc/hostname
sudo reboot

* 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 *