This FAQ will explain what the Unix Domain Socket Protocol is and the ways in which the BB-400 can communicate using this protocol.

What is Unix Domain Socket?

Unix Domain Socket is a way for data communication to occur bi-directionally on the same system. Sockets including Unix Domain Sockets are an important part of Inter-process communication, a beneficial method in which different programs on the same system can communicate with each other.

Unix Domain Socket uses a local file on the device. It does not require network ports to be open, instead the Linux system controls who can have access to the file for communication. This is advantageous as you can assign permissions that suit the way you want to set up the system.

Another key benefit of Unix Domain Socket is the overhead for communication using Unix Domain Socket is less than other processes for example using a TCP stack. The network stack is not required (no need for checksums/headers) so communication is faster.

An example application of a Unix Domain Socket is Docker. Docker uses a REST based for docker local communication.

BB-400 and UDS

Unix Domain Socket allows applications on the BB-400 to talk (using REST) to a secure, device only, endpoint. The endpoint looks like a file which can be communicated with using REST, and can be used from any other application on the BB-400 including with Docker Containers.

There are 2 Unix Domain Socket files on the BB-400:

  • bb-core.sock - deals with the core functionality of the BB-400 including the state of any LEDs.
  • bb-io.sock - holds information regarding IO line states.

How to communicate with Unix Domain Socket on the BB-400

We have created 2 FAQs on how to communicate with the Unix Domain Socket to retrieve and alter the IO status: