A few month ago I’ve been invited by PACKT publishing to review a book about the Banana Pi. This book is for anyone who wants to explore Banana Pi and get started building projects on their own using it. No prior experience of working with single board computers is required.This book will take you from opening your Banana Pi’s box for the first time all the way to working with hardware and code. The book is available from PACKT as ebook and paperback.
As a visitor of many discussion forums about the Raspberry Pi, I recently stumbled upon a lot of cries for help, such as “My RasPi doesn’t boot anymore!” or “Help, my i2c-, spi devices and 1-wire sensors” suddenly disappeared.
All of you probably belong to the Raspi lovers, that wan’t to keep the device’s linux-kernel at a “bleeding-edge” release, doing an “rpi-update” almost every day. Be aware that such a kernel is still tagged as “experimental”, so that it can seriously damage your Raspbian installation. The number of messages is still very high in all discussion forums and a lot of experienced users already became tired in answering the help requests.
To be on the safe site, update your system using “apt-get update && apt-get upgrade” or “apt-get dist-upgrade”, unless you know what you are doing. If your upgrade already has failed, but you’re still able to boot the system, you can roll-back to a previous release with:
sudo rpi-update b2f6c103e5355bee90ff57f55cdf6d7005485a23
The long string represents the Git hash for the specific firmware revision. You can look for those hash in the rpi-update git repos commits list: https://github.com/Hexxeh/rpi-firmware/commits/master.
However, if you want to stay with the latest 3.18 kernel branch, here’s what you can do to solve your problems with i2c, spi, lirc and 1-wire:
I recently purchased a Serial-to-TTL adapter at the Amazon Marketplace for programming of micro-controllers, such as ATMega328P.
The device worked very well until I plugged it into a machine running Windows. It turned out that it contains a counterfeit FTDI chip. The latest FTDI driver bricked the device by setting it’s product ID to “0000”. I understand that FTDI tries to react on faked chips, but I would say that this is quite conniving. I’m a victim of a counterfeit product and I had no chance to recognize a faked chip when I placed my order. FTDI promised to roll back and to stop distributing the malicious driver via Windows Update. However, what shall I do with a bricked device?
Fortunately, there is a method to reset the FTDI chip back to its original VID:PID of 0403:6001:
- Plug-in the bricked device and check the ID with “lsusb” (if it is bricked, it shows 0403:0000).
- To re-program the EEPROM, download ft232r_prog from ft232r_prog (v1.24).tar.gz and extract it to a folder. To compile the program, make sure to have libftdi-dev installed on your system.
- After building the program, run:
sudo ./ft232r_prog --old-pid 0x0000 --new-pid 0x600
- Now, unplug and re-insert your USB device and run “lsusb” again. It should show the proper id of 0403:6001. The device should show up again as ttyUSB0.
If you’re running out of space on your Pi’s SD memory card or want to share folders under Linux, you should consider using the Linux network file system (NFS). All you need to do is to install rpcbind, nfs-common and nfs-kernel-server on your Pi.
On a freshly installed you must enable the rpcbind service before you can start the nfs-kernel-server:
$ sudo update-rc.d rpcbind enable
The network file system is particularly useful if you want to merge folders across your home network which reside on different systems. In order to listen to my ogg/mp3 music collection I’ve attached a Raspberry Pi to the AUX input of my Hi-Fi equipment. The collection resides on a USB stick and can be accessed with the music player daemon (mpd) and Minion, so that I can use my smartphone as a remote. Another music collection resides on my AVM Fritz Box, which acts as a mediaserver and NAS.
Wireless LAN routers such as the AVM Fritz!Box can be particularly useful for integration of hard discs and memory sticks as a Network Attached Storage (NAS).
For MS Windows environments, access to these network drives is achived with the SMB and NMB protocols. However, the Fritz!Box firmware doesn’t support sharing of volumes through UNIX’s NFS protocol.
If you’re a lucky owner of a Fritz!Box, you’re probably not aware that an embedded Linux OS hides underneath AVM’s configuration frontend. With a few steps you can modify your Fritz!Box firmware, replacing it with Freetz to enhance your box’ functions.
Freetz is a firmware-extension (modification) for the AVM Fritz!Box and devices with identical hardware. The original firmware from the manufacturer is extended with new functions and programs which may be selected by the user.