Using non Raspberry Pi SBCs with GPS-PIE slice boards

This page provides a general guide to using a non Raspberry Pi SBC for use with the GPS-PIE slice boards. Please note that we only support the use of the GPS-PIE slice modules on the Raspberry Pi. It is not possible for us verify our boards on any other SBCs with similar form factors. In this guide we have used the Banana Pi 2M Zero as an example only.

Hardware Compatibility
The GPS-PIE modules uses the 40 pin Raspberry Pi GPIO header for connectivity. The pinout of the modules is shown below. Any other SBC will require a pinout with compatible serial and i2c connections.


Software Compatibility
We provide example software which demostrates the interface to each of the sensors on the GPS-PIE modules. These examples are written in C to run on the Linux operating system. As with many SBCs a variety of operating systems are available for the Banana Pi. We used a version of Raspbian, but the process of adapting the example code should be the same for other Linux versions.
2020-04-10 update Raspbian Stretch, kernel 4.4 ( user : pi password : bananapi )
The device files used by the example software on the Raspberry Pi will not neccessarily be the same on any other SBC. Therefore you will need to find the correct device files which correspond to the serial port and i2c port on the 40 pin header. Use the Linux conmmand ls -l /dev/ser* to list all serial devices supported. Then test each serial device to see which one has the GPS receiver attached. Use the ls -l /dev/i2c* command to list the i2c devices. Then use i2cdetect -y -r n where n is the number of the i2c device to detect the BNO055 at address 28.

These changes to the device files will then need to be made in the example code files.
 

Raspberry Pi device

Banana Pi Device

Serial device

/dev/ttyAMA0

/dev/ttyS3

i2c device

/dev/i2c-3

/dev/i2c-0

The example software requires the use of the Wiring Pi library for interfacing to the GPIO pins. This library, as written, will only run on the Raspberry Pi. Therefore the example code will only run 'as is' on the Raspberry Pi. To use another SBC with the example code 'as is' requires rewriting the Wiring Pi library for the SBC target. Alternatively you would need to access the GPIO directly in C via calls to the operating system devices. In the case of the Banana Pi a Wiring Pi library is provided. However it does not implement the Wiring Pi interrupt function wiringPiISR. Therefore the calls to this function in bno055_funcs.c and ms5637_funcs.c need to be commented out. This function is only required by the example software for button press handling and motion interrupts. It does not affect the interfacing of the GPS-PIE module sensors.
Wiring Pi for the Banana Pi
To download: git clone https://github.com/BPI-SINOVOIP/BPI-WiringPi2

For SBCs without a Wiring Pi library there is the C library libsoc which allows interfacing with common peripherals found in System on Chips (SoC) through generic Linux Kernel interfaces.
In summary the GPS-PIE modules have a simple hardware interface that is likely to be found on most SBCs which follow the Raspberry Pi form factor and GPIO pin out. The serial and i2c interfaces required for software interfacing are present in almost all Linux distributions.
 

Home

Back

© The BlackBoxCameraTM Company Limited 2022