The Raspberry Pi SPI command-line utility, spincl, has been updated. Version 1.3.0 is now available. iP Solutions originally released the Raspberry Pi SPI utility in February, 2013, licensed under Open Source GNU GPLv3. This spincl update is covered under the same license.
The following items are included in the update:
- Bug Fix: A bug in the way the number of transmit bytes was calculated has been fixed. Previously, if the total byte length of the transfer was greater than the number of specified xmit bytes then an attempt to access command-line arguments beyond the number available would occur, which causes a segmentation fault.
- suid bit is now set in the install target of Makefile.
iP Solutions originally created the Serial Peripheral Interface (SPI) command-line utility for the Raspberry Pi (www.raspberrypi.org) platform for the convenience of hardware debug and to indirectly add SPI functionality to scripting languages such as Bash and Python.
Although a C library exists for the Broadcom bcm2835 with an SPI Application Programming Interface (API) among other things, there are reasons to have a command-line utility, which can be invoked from a shell command line or from within a script. A command-line utility allows easy testing and debugging of SPI slave devices without having to develop a C executable. Additionally, it provides a simple way for bash and python scripts to access the SPI master of the BCM2835 on Raspberry Pi. Although the raspian distribution provides GPIO libraries with the included python installation it doesn’t include an SPI library. spincl, on the other hand, can be invoked from a python (or bash) script.
Check the original post for a full explanation of the Raspberry Pi SPI command-line utility and to download the latest version.