Installation of Tinkerforge Brick Daemon

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:

  1. 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/null
  2. Add 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.list
  3. Update 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-https

This 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.

  1. Run the following command in your terminal to install brickd:

     sudo apt-get install brickd
  2. Once installed, the brickd service should start automatically. You can verify its status with the following command:

    sudo systemctl is-active brickd

    To 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 brickd

This 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.