Brick Daemon Installation on Linux – Tinkerforge

- Getting Started
  - Primer
  - Tutorials
  - FAQ
- Hardware
  - Bricks
  - Bricklets
  - Master Extensions
  - Power Supplies
  - Accessories
  - Timeline
- Software
  - Brick Daemon (brickd)
    - Requirements
    - Installation
      - Windows
      - Linux
        - Debian Package
        - From Source
      - Mac OS X
    - Logging
    - Configuration
    - Checking Installed Version
    - Commandline Options
  - Brick Viewer (brickv)
  - API Bindings
  - Firmwares and Plugins
  - Device Identifier
  - Source Code and Bug Tracking
  - Programming Interface
- Starter Kits
  - Weather Station
  - Hardware Hacking
  - Server Room Monitoring
  - Blinkenlights
  - Internet of Things
  - Camera Slider
- Embedded Boards
  - Raspberry Pi
- Specifications
  - Technical Data
  - TCP/IP Protocol
  - Modbus Protocol
  - Wireshark Dissector

# Brick Daemon Installation on Linux

The Brick Daemon can be installed on Debian based distribution (Ubuntu, Mint, etc.) from a `.deb` file. On other distributions it can be installed from source.

## Debian Package

First, download the Brick Daemon `.deb` from here. Right-click on the file and choose "Open with GDebi Package Installer":

Then click "Install Package":

Ready:

On Ubuntu you can also use the Ubuntu Software Center, other Desktop environments have very similar tools that practically work the same way.

To install Brick Daemon from the console use the following:

    # Use libudev1 instead of libudev0 in Ubuntu 13.04
    sudo apt-get install libusb-1.0-0 libudev0 pm-utils

    # On ARM (e.g. Raspberry Pi)
    wget http://download.tinkerforge.com/tools/brickd/linux/brickd_linux_latest_armhf.deb
    sudo dpkg -i brickd_linux_latest_armhf.deb

    # On 64bit x86
    wget http://download.tinkerforge.com/tools/brickd/linux/brickd_linux_latest_amd64.deb
    sudo dpkg -i brickd_linux_latest_amd64.deb

    # On 32bit x86
    wget http://download.tinkerforge.com/tools/brickd/linux/brickd_linux_latest_i386.deb
    sudo dpkg -i brickd_linux_latest_i386.deb

The Brick Daemon will be started after the installation and at startup automatically.

## From Source

To install Brick Daemon from source you need to clone/download its source code from GitHub:

    git clone https://github.com/Tinkerforge/brickd

Brick Daemon uses the common Tinkerforge daemonlib. Clone/Download its source code from GitHub to the `src/` folder in the brickd clone:

    cd src/
    git clone https://github.com/Tinkerforge/daemonlib

Also install the following libraries:

- libusb-1.0
- libudev (optional for USB hotplug)
- pm-utils (optional for suspend/resume handling)

On Debian based distributions you can install the dependencies with apt-get:

    sudo apt-get install build-essential pkg-config libusb-1.0-0-dev libudev-dev pm-utils

On Fedora you can install the dependencies with yum:

    sudo yum groupinstall "Development Tools"
    sudo yum install libusb1-devel libudev-devel pm-utils-devel

On other distribution you have to search for and install the equivalent packages.

To compile and install from source run:

    cd src/brickd/
    make
    sudo make install

Run the following commands to register brickd for autostart on Debian based Linux distributions and start it:

    sudo update-rc.d brickd defaults
    sudo /etc/init.d/brickd start

The content of this page is licensed under Creative Commons Attribution 3.0 Unported License.