Some notes to keep track of my raspberry pi configurations.

Rapsberry Pi Configuration

Keeping wifi adapter alive during inactivity

  1. Check if power management features are enabled via cat /sys/module/8192cu/parameters/rtw_power_mgnt.
    • 0 = disabled, 1 = min. pwr. mgmt, 2 = max. pwr. mgmt.
  2. To disable pwr. mgmt. create a file via sudo nano /etc/modprobe.d/8192cu.conf

  3. Add the following to the new file.

     # Disable power management
     options 8192cu rtw_power_mgnt=0
  4. After rebooting the wifi should stay active forever. See this Stack Exchange post for more details.

Connect directly to raspberry pi via ethernet

Update 2018: I recently had to do this again with a newer raspberry pi and was surprised when this solution didn’t work. Thankfully I found a much simpler solution: connect the ethernet cable to your mac and pi then ssh pi@raspberrypi.local.

  1. Edit this file on the pi so the ethernet section looks like the following via sudo nano /etc/network/interfaces:

     iface eth0 inet static
  2. Run this command to update changes, /etc/init.d/networking restart.

  3. On OSX, navigate to System Preferences -> Network -> USB 10/100/1000 LAN, if using a usb ethernet adapter, and change the settings such that is looks like the following: osx network config
  4. Connect the devices via ethernet and you should be able to ssh via ssh pi@ from osx.

Dynamic DNS on Cloudflare

If your domain is on Cloudflare, is not necessary. You can use the Cloudflare API to update DNS records dynamically through a simple bash script.

It is a little complicated to setup at first, but I find it simplier than using no-ip. See this website for setup instructions:

Configuring wifi settings to connect to eduroam on Raspbian

  1. Edit this file via sudo nano /etc/network/interfaces and make sure that the wifi section looks like the following:

     auto wlan0
     allow-hotplug wlan0
     iface wlan0 inet dhcp
     wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
  2. Edit this file via sudo nano /etc/wpa_supplicant/wpa_supplicant.conf and add the following to the file. (Ensure that you add your credentials)

     phase1=tls_disable_tlsv1_1=1 tls_disable_tlsv1_2=1
  3. Finally reboot the pi and it should connect to eduroam on boot.