RPi Chronicles

Fix SDCard not booting

Edit your /boot/config.txt file and add this to your kernel line:

sdhci-bcm2708.emmc_clock_freq=100000000

Fix WiFi: Realtek RTL8188CUS

I bought this micro WLAN adapter. Unfortunately, the power management is active on this particular adapter on the kernel drivers and it will turn off and disable itself from time to time.

Lets start by creating a script to check if we have internet connectivity:

sudo nano wifi.sh

Add this to this file:

#!/bin/bash
ping -c 1 www.google.com &> /dev/null
if [ $? != 0 ]; then
   echo "Network down..."
   ifdown --force wlan0
   ifup --force wlan0
else
   echo "Network ok!"
fi

Set the right permissions:

sudo chmod 755 wifi.sh

And now add a crontab job as root to check the network status every minute:

sudo crontab -e

And add this line:

* * * * * /home/pi/wifi.sh

Disable power management from turning off the WLAN adapter:

sudo nano /etc/modprobe.d/8192cu.conf

Add this to this file (8192cu.conf)

# Disable power saving
options 8192cu rtw_power_mgnt=0

Last step is to make sure to restart wpa_supplicant daemon when the network is lost, by replacing the default ifupdown script with wpa_supplicant’s version:

sudo cp /etc/wpa_supplicant/ifupdown.sh /etc/ifplugd/action.d/ifupdown
sudo reboot

Raspberry Pi support for Mac stuff + printing

Install all the required packages like this:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install netatalk cups

You should be able to see your Raspberry Pi on Finder on your Mac when it finishes installing (takes about 10 seconds or so). Now you need to edit a couple of files to add the folders and services you want to have access to:

sudo service netatalk stop
sudo nano /etc/netatalk/AppleVolumes.default

At the end of the file (use Ctrl+v to go faster down), edit to add your external hard drives:

:DEFAULT: options:upriv,usedots,tm
/media/yourhdd  "Your HDD label"

That should enable you to mount your hard drive in Finder.

1 thought on “RPi Chronicles”

  1. Hi!
    I’ve downloaded your free app “Overcharged”. I would like to send you a gift, i.e. a donation. I can’t find on your web page how to do that. I’m very interested in what you & your teams are doing.
    Keeping up what you are doing, my friend!
    Blessings!
    Philip Lee

Leave a Reply

Your email address will not be published.