Below you will find pages that utilize the taxonomy term “Raspian”
Set up a Raspberry Pi Zero headless
If you are using the GUI (Raspian full download) and want to connect your RPi Zero to a keyboard and monitor there are probably easier ways to do this. These notes are for people that want to use a headless (no monitor and GUI) setup ready to connect to your RPi after first boot via SSH from another terminal.
RaspberryPi Version 3 SOE
Since there is now a supported Raspbian version without GUI and other unneeded add-ons available as Raspbian Lite the need to use other installers (with sometimes some downsides) is now not a necessity anymore. Below is a list of steps I like to perform before using them for any purpose as my Standard Operating Environment.
Download Raspbian Lite
Download link: https://www.raspberrypi.org/downloads/raspbian/
Write to SD Card
dd bs=4M if=2016-05-27-raspbian-jessie-lite.img of=/dev/sdb
Boot RPi
Default login details are
UID: pi
PWD: rasbperry
FreedomBox + RaspberryPi = FreedomPi
I have been watching progress on FreedomBox ever since watching a video of Eben Moglen a few years ago.
Turns out that that they recently announced the availability of their 0.1 preview release. As part of this there is one component that is extremely useful for RaspberryPi users (funnily the co-founder of RasperryPi is also called Eblen by first name – go figure) out there concerned about increasing snooping of private information by governments and corporations for a variety of reasons.
Enabling the watchdog timer on the Raspberry Pi
Turns out that the Broadcom BCM2708 chip on the RPi has a hardware watchdog. This can be very useful if your RPi is located remotely and locks up. However, this would not the preferred method of restarting the unit and in extreme cases this can result in file-system damage that could prevent the RPi from booting. If this occurs regularly you better find the root cause of the problem rather than fight the symptoms.
Dropping the wires on the Raspberry PI
Testing the RPi for some remote sensing application I needed to use a wireless connection as it would have been a pain to reach with an Ethernet cable.
Parts
- Raspberry Pi Series B 512MB
- Raspbian 3.6.11+ Kernel
- Comfast 802.11n – Realtek RTL8188CUS WLAN Adapter
Install WPA Supplicant
sudo apt-get install wpasupplicant
See http://en.wikipedia.org/wiki/Wpa_supplicant
Check for the USB adapter
sudo lsusb
This should show output similar to this (depending on your USB adapter)
Bus 001 Device 004: ID 0bda:8176 Realtek SemicondRTL8188CUSuctor Corp. 802.11n WL:AN Adapter
Webserver and database combination on Raspberry Pi
My normal combination on the big-server side would be Apache + MySQL (or PostgreSQL), but on the RPi this seems to be absolute overkill. For data-logging operations I would not use the local system anyway (looking at MQTT as well as Remote MongoDB datastore via REST Webservices).
After some poking around and reading up on the options I decided to go for the following combo: LightHTTPD + SQLite. Both are lightweight replacement of their fully-featured big-server counterparts (Apache HTTP & MySQL) and have very familiar configurations. There would be other options that have even less resource usage, but I really don’t have the time to start from scratch somewhere.
Raspberry Pi - Raspbian post install tasks
The Raspbian Install process is fairly well documented using the Raspbian Installer. This is just to document common tasks after the stock install.
Install base utils
apt-get install sudo vim ntpdate git-core binutils make gcc ca-certificates rpi-update
Allow non-root user account access to ‘sudo’
adduser USERNAME sudo
For those Ubuntu users there is no ‘admin’ group in Raspbian (Debian Wheezy).
NTP time update
sudo rm /etc/localtime<br></br>sudo ln -s /usr/share/zoneinfo/Australia/Adelaide /etc/localtime<br></br>sudo ntpdate -u au.pool.ntp.org
Accessing 1-wire devices on Raspberry Pi using OWFS
To connect 1-wire serial devices to the RPi I am using a DS9490R USB 1-wire adapter (rather than wiring I2C 1-Wire master components to GPIO I2C – which I might look at sometime down the track)
Install packages
sudo apt-get install owfs ow-shell
Edit config file
vim /etc/owfs.conf
! server: server = localhost:4304<br></br># USB device: DS9490<br></br>server: usb = all<br></br>######################### OWFS ##########################<br></br>mountpoint = /mnt/1wire<br></br>allow_other<br></br>####################### OWHTTPD #########################<br></br>http: port = 2121<br></br>####################### OWFTPD ##########################<br></br>ftp: port = 2120<br></br>####################### OWSERVER ########################<br></br>server: port = localhost:4304
Installing OMXPlayer on Raspberry Pi
Since I didn’t have any luck playing videos on the RPi using mplayer I found omxplayer after some search. It has the ability to use the RPi’s GPU thus taking some load of the CPU.
UPDATE 2013-04-01: omxplayer is now included in the Raspbian (Debian Wheezy) repositories and can be simply installed by one line.
sudo apt-get install omxplayer
Check another article on how to install Raspbian.
Raspberry Pi - Text to Speech
Just a quick note on Speech Synthesis a Raspberry Pi project. I had to research some of the options on the Raspberry Pi while looking into a project where I need some audio announcements.
Configuring Sound
echo 'snd-bcm2835' >> /etc/modules<br></br>sudo modprobe snd-bcm2835
sudo apt-get install mplayer alsa-base alsa-utils pulseaudio mpg123<br></br># make mplayer use mpg123 codec instead of default ffmp3float<br></br>echo "afm=mp3lib" >> ~/.mplayer/config
Since I am using Raspbian which is a Debian based (Wheezy) Distribution I used some Ubuntu documentation (https://help.ubuntu.com/community/TextToSpeech) as the starting point.