Playing with BananaPi

After waiting some weeks (longer than promised) I got my
BananaPi from Reichelt. I downloaded the latest Lubuntu_For_BananaPi_v3.0, flashed it an a 8G SD card and hoped I could connect using ssh. Unfortunately, the ssh server was not part of the pre installed image. So I went to the living room connected the TV via HDMI and voila, could login. The fist thing I did was installing ssh
apt-get -y install openssh-server,
And now I can connect using ssh.

The BananaPi Lubuntu image was configured for the Singapure timezone. As man localtime(5) recommends, I did

sudo ln -s  /usr/share/zoneinfo/Europe/Berlin /etc/localtime
to update time information.

And for a nice welome greeting

vi /etc/motd
I used figlet on my PC to create the message
oe@heinz:~> figlet Welcome on Banana Pi
__        __   _                                        
\ \      / /__| | ___ ___  _ __ ___   ___    ___  _ __  
 \ \ /\ / / _ \ |/ __/ _ \| '_ ` _ \ / _ \  / _ \| '_ \ 
  \ V  V /  __/ | (_| (_) | | | | | |  __/ | (_) | | | |
   \_/\_/ \___|_|\___\___/|_| |_| |_|\___|  \___/|_| |_|
 ____                                  ____  _ 
| __ )  __ _ _ __   __ _ _ __   __ _  |  _ \(_)
|  _ \ / _` | '_ \ / _` | '_ \ / _` | | |_) | |
| |_) | (_| | | | | (_| | | | | (_| | |  __/| |
|____/ \__,_|_| |_|\__,_|_| |_|\__,_| |_|   |_|
As a next step it makes sense to update the software package data base. After
sudo apt-get --simulate upgrade
I did
sudo apt-get upgrade
wich did upgrade 39 packages.

Now let's see what I can do with the BananaPi.

can4linux with CAN FD support

can4linux is a popular Linux device driver for CAN interfaces. It is available for several PC interface boards and for micro controllers with integrated CAN controllers used in embedded Linux applications.

The latest revision on SourceForge was done to provide support for the improved CAN protocol CAN FD. With CAN FD the frame size was increased to up to 64 byte and the speed in the data phase of the frame can be up to 4 Mbit/s or more. As one of the first supported hardware interfaces the IXXAT CAN-IB500/PCIe was used. The CAN FD controller is the IFI CANFD, implemented on an ALTERA FPGA. The interface is available with up to two CAN channels. Each CAN channel can send and receive either CAN FD or CAN 2.0A/B messages.

Developers interested in working with CAN FD and without having available a interface can use can4linux in a special mode. It is possible to use the driver without any hardware interface by building a virtual CAN network for classic CAN or CAN FD.

Screen Shot

can4linux is an Open Source project hosted in SourceForge. The work on the CAN FD version was supported by emtas GmbH, a company providing CAN protocol stacks, software tools and services. emtas GmbH latest version of the CANopen protocol stack and the CANopen Device Explorer 2.0, provide users with extensions for handling CAN FD frames.


Putting Geocaches onto Garmin Vista HCx

Wherever you get it from, e.g. from Opencaching, use the file as argument to the following script:

# put GeoCache GPX or Loc to Garmin
# File(s) is argument

# first, for whatever reason
/sbin/rmmod garmin_gps

for file in "$@"
case $file in
*.gpx | *.GPX ) 
        echo "gpx datei \"$file\" to put onn Garmin"
	gpsbabel -i gpx -f $file -o garmin -F usb:
*.loc | *.LOC ) 
        echo "loc datei \"$file\" to put onn Garmin"
	gpsbabel -i geo -f $file -o garmin -F usb: 

        # it's not
	echo "unknown file format \"$file\", only *.gpx or *.loc are supported"

#gpsbabel -i gpx -f OC1987.gpx -o garmin -F usb:
#gpsbabel -i geo -f geocaching.loc -o garmin -F usb: 
Use it like
./put geocaching*.loc

On SuSE Linux I always have problems using gpsbabel with the usb device. I have to unload the kernel module garmin_gps.

Adding CAN to Raspberry Pi and Galileo

EE Times europe published recently in its February issue the article A Comparison of Open Source Hardware: Intel Galileo vs. Raspberry Pi. It gave a very good overview but made one mistake on a topic I'm always interested in. The sentence in this case was: Galileo could be applied in remote monitoring, but without a CAN bus, Galileo cannot interface easily with some industrial networks. while in a table it was suggested that the Raspberry Pi has a CAN interface, which is not true.

The Raspberry Pi does not have a CAN interface, not directly available and not provided on its extension header as can be seen at the General Purpose Input/Output (GPIO) chapter on The forum thread CAN controller discusses some possibilities to extend the Raspberry Pi with CAN. There are only two useful possibilities

  • adding a SPI/CAN controller like the Microchip MCP2515 via SPI available on the expansion header
  • adding a USB/CAN interface to one of the USB ports.

The same is true and possible with the Galileo board. SPI and USB is available to be used to add CAN connectivity.
But the Galileo has an additional way to extend the on board functionality, by the Mini-PCIe slot. This could lead to an better operating performance than both other ways. The CAN-Wiki lists some manufacturers of such CAN interfaces.