Installation of Tinkerforge Brick Daemon
The following is a guide to installing an APT repository, dependencies and Tinkerforge Brick Daemon (also referred to as brickd) on Raspberry Pi OS for use in our projects.
Tinkerforge Brick Daemon
The Brick Daemon is a daemon (or service on Windows) that acts as a bridge between the Bricks/Bricklets and the API bindings for the different programming languages.
The daemon routes data between the USB ports and TCP/IP sockets. When using the API bindings, a TCP/IP connection is made to the daemon. This concept allows the creation of bindings for almost any language without any dependencies. It is therefore possible to program Bricks and Bricklets from embedded devices that only support certain languages, such as smartphones.
It is also possible to separate the machine running the brick daemon from the machine running the user code. This allows, for example, a Brick connected to a PC to be controlled from a smartphone or over the Internet from another PC.
Set Up the APT Repository
To add the Tinkerforge APT repository to your Raspberry Pi OS and install the necessary packages, follow these steps:
Add Tinkerforge APT Repository
Open the terminal on your Raspberry Pi and enter the following commands:
Import public GPG key:
wget https://download.tinkerforge.com/apt/$(. /etc/os-release; echo $ID)/tinkerforge.asc -q -O - | sudo tee /etc/apt/trusted.gpg.d/tinkerforge.asc > /dev/nullAdd APT repository:
echo "deb https://download.tinkerforge.com/apt/$(. /etc/os-release; echo $ID $VERSION_CODENAME) main" | sudo tee /etc/apt/sources.list.d/tinkerforge.listUpdate APT package list:
sudo apt update
Install Depencies
Ensure you have all necessary dependencies installed before proceeding with the brickd installation:
sudo apt-get install apt-transport-httpsThis package enables the system to use the https transport protocol, which is required for downloading packages from secure repositories.
Install Brickd
Once the repository is set up and the dependencies are installed, you can proceed to install brickd, the service responsible for controlling Tinkerforge Bricks and Bricklets.
Run the following command in your terminal to install brickd:
sudo apt-get install brickdOnce installed, the
brickdservice should start automatically. You can verify its status with the following command:sudo systemctl is-active brickdTo manually start or enable the service (if needed), use these commands:
sudo systemctl start brickd sudo systemctl enable brickd
Update or Upgrade brickd (Optional)
To update or upgrade brickd in the future, simply run:
sudo apt-get update
sudo apt-get upgrade brickdThis will ensure you have the latest version of brickd installed.
By following these steps, you will have successfully installed and configured the Tinkerforge APT repository and brickd service on your Raspberry Pi OS.