Raspberry Pi to Banana Pi migration

Update [2014-11-02]

Meanwhile a new kernel version appeared on github (bananapro-bsp 3.4.103). However the CPU-frequency patch didn’t make it in the new kernel. Thus, It is still necessary to keep the CPU freq above 600000 MHz.

Update [2015-01-14]

Due to the CPU freq issue, my sensors such as DHT22 and DS18S20 produce a lot of “spikes” i.e. temperature and humidity values which are out of range. Although there were no kernel updates in the meantime, a patch for cpu_freq.c has been released in the Lemaker.org forum. With the patch applied, the message:

w1_slave_driver 10-000802b478b7: 18S20 doesn't respond to CONVERT_TEMP

disappeared from /var/log/messages and the number of spikes was significantly reduced. Since, several lines of the code in the forum were truncated because of copy & paste, you can download the patched version of cpu_freq.c from here. Place the file into the /bananapro-bsp/linux-sunxi/arch/arm/mach-sun7i/cpu-freq/ directory and re-compile the 3.4.103 kernel. Instructions for building a new kernel can be found in the Lemaker-Wiki. Be aware that you need a cross-compiler for compiling a new kernel  for the ARM platform. A toolchain for the ARM platform can be downloaded from here: https://wiki.linaro.org/Source (see below).

Meanwhile I figured out that a 100nF ceramic capacitor between VCC and GND on both power rails of my breadboard significantly reduced noise and lockups for DHT22 and DS18S20.

I2C bus

In order to use the I2C bus of the Banana Pi, I had to adjust a few Python scripts to the new hardware. In contrast to the Raspberry Pi, the I2C devices are now being connected to bus number 2. To force the I2C bus number in the Adafruit_I2C.py Python module, add the line:

self.bus = smbus.SMBus(2); # Force I2C2 (1G Banana Pi)

and disable I2C bus auto-detection, by inserting:

#self.bus = smbus.SMBus(
 # busnum if busnum >= 0 else Adafruit_I2C.getPiI2CBusNumber()
)

Leave a Reply

  Subscribe  
Notify of