Libre Computer Wiring Tool

To install via apt:

sudo apt update
sudo apt install libretech-gpio libretech-dtoverlay

libretech-gpio
To get a list of headers for your board:

lgpio headers

To get a list of the header pins for a header:

lgpio header HEADER

For getting the information for a pin number on the main GPIO header of the board:

lgpio info PIN#

For getting the information for a pin number on a specific header of the board:

lgpio info HEADER PIN#

For getting the libgpiod chip and line number for a pin on the main GPIO header of the board:

lgpio info PIN# gpiod

For getting the deprecated sysfs export GPIO number for a pin on the main GPIO header of the board:

lgpio info PIN# sysfs

For conversion from existing Raspberry Pi BCM numbering:

lgpio bcm PIGPIO#

For quickly getting the GPIO level of a specific pin on the main GPIO header of the board:

sudo lgpio get PIN#

For quickly getting the GPIO level of a specific pin on a specific header of the board:

sudo lgpio get HEADER PIN#

For quickly setting the GPIO level of a specific pin on the main GPIO header of the board:

sudo lgpio set PIN#=0 or 1

For quickly setting the GPIO level on multiple pin on the main GPIO header of the board:

sudo lgpio set PIN#=0 or 1 PIN#=0 or 1

For quickly setting the GPIO level of a specific pin on a specific header of the board:

sudo lgpio set HEADER_PIN#=0 or 1

For quickly setting the GPIO level on multiple pin on specific headers of the board:

sudo lgpio set HEADER_PIN#=0 or 1 HEADER_PIN#=0 or 1

We do not recommend using lgpio get or set as an API call since the overhead is high. It also does not support pinctrl biases like gpioget/gpioset commands from the gpiod package does. Please use the libgpiod or sysfs numbers from the lgpio info command with standard libraries for libgpiod or sysfs.

libretech-dtoverlay
List Device Tree Overlays

sudo ldto list

Enable Device Tree Overlays

sudo ldto enable OVERLAY temporarily, not applied on next boot

Disable Device Tree Overlays that were applied temporarily, some hardware overlays cannot be disabled once active and require reboot.

sudo ldto disable OVERLAY

Merge Device Tree Overlay permanently on every boot, applied on next boot

sudo ldto merge OVERLAY

Remove all permanent Device Tree Overlays, applied on next boot

sudo ldto reset
sudo reboot

You must reboot in order for the system to reset before merging new device trees. Otherwise, the device tree may become corrupted resulting in a system that will fail to boot. In this case, you must remove the dtb folder on the first partition of the storage device.

Overlay Descriptions

Using Upstream Repo for Custom Device Tree Overlay
To install git version:

sudo apt install git
git clone https://github.com/libre-computer-project/libretech-wiring-tool.git
cd libretech-wiring-tool
sudo ./install.sh

To update git version:

cd libretech-wiring-tool
git pull origin master
make

If you have an addon device you would like supported, please post below.

1 Like

This should be set instead of get, correct?

1 Like

Fixed in the documentation. Thanks for pointing out the typo.

Does this tool work on armbian? I keep getting “No vendor found!” message

This is designed for first party images only.