Skip to main content
Skip table of contents

Barionet 400 - Quick Install Guide

Congratulation for buying the Barionet 400. 

Barionet 400 is a fully programmable I/O device server of Barix, based on Linux/Lede/OpenWRT. The device features most common IO interfaces such as USB, digital Inputs and relays. It is IPv4 or IPv6 capable. Supporting multiple communication protocols, the Barionet device can be used in different applications such as automation, building control, public transport and many more. Barix Products are developed in Switzerland and manufactured to the highest standards.

We hope you find a quick start with this product. If you have any feedback or questions, write us at support@barix.com.

Table of Contents

Package Content and Accessories

Package contents

  • Barionet 400

  • 1 Female Terminal block

Device functionality

Top view


J1 - 1xUSB Host 

Pin

Description

1

VCC (+5V) 

2

D – (Data -)

3

D + (Data +)

4

GND


J8 - Digital Inputs, Relays, Power

Pin

Description

1..4

Digital Input 1..4

5,6

GND (Ground)

7

Relay 1 COM

8

Relay 1 NO

9

Relay 2 COM

10

Relay 2 NO

11

Relay 3 COM

12

Relay 3 NO

13

Relay 4 COM

14

Relay 4 NO

15

Power In + (9..30VDC)

16

Power In - (GND)


T1 - Ethernet (RJ45)  

Pin

Description

1

TX + (Transmit data)

2

TX - (Transmit data)

3

RX + (Receive data)

4

PoE DC+

5

PoE DC +

6

RX – (Receive data)

7

PoE DC -

8

PoE DC -


BLUE CPU LED shows Main CPU Status:

  • blinking: startup

  • solid: Main CPU running 


RED CPU LED shows IO CPU Status

  • blinking: startup

  • red solid: IO CPU running


Green Digital Input LEDs show Status of Digital Inputs

  • solid: Digital Input activated


Yellow Relay LEDs show Status of Relay Outputs

  • solid: Relay Output activated

Hardware Installation

Slide the device upwards onto the DIN rail. Push it up and towards the rail until it snaps onto the upper rail edge. Before powering the device please read this quick install guide and mind the polarity of the power supply (see picture on page 2).

Connecting to power and initialization

Power Supply

The Barionet 400 needs a DC supply voltage of 9V to 30V, 4W max. Please mind the polarity. When powered up, the Status LED of the CPUs will start blinking, indicating that the device is starting up.

BLUE CPU LED: Main CPU

RED CPU LED: IO CPU

When the device is initialized, the Status LEDs turn solid.

Power over Ethernet (PoE)

The Barionet 400 also offers the possibility to be powered by PoE supporting the IEEE 802.3af standard. Simply connect the unit to a PoE capable network switch.

Connecting via Ethernet

Plug an Ethernet cable from the Barionet 400 to an Ethernet network.

The Barionet 400 is configured to be a DHCP Client by default. Use the Barix Discovery Tool in order to determine the IP Address, or check the DHCP Lease table of your DHCP server to retrieve the assigned IP according to the given MAC Address.

The Ethernet Interface can be configured using the Barix Web Interface. Use your Web browser in order to connect to the determined IP Address. The Root Password of the Device can be found on a sticker on the Backside of the Device. Use the "Ethernet" Section in order to configure the Ethernet Interface.

Some stickers incorrectly report ‘admin’ as the name of the user to access the device. The user must be ‘root’.

The access is performed by default over HTTP connection with the possibility to update it to HTTPS via Advanced LuCi interface.

Resetting the Network Configuration

If you have entered a wrong Network configuration (Ethernet IP etc.), the Network configuration can be reset using the Factory Defaults Button. Press the button for 3-5 Seconds and the Network Configuration is reset to factory defaults (Ethernet back on DHCP).

Setting Ethernet to Factory Testing IP

The Ethernet Interface can be set to the Factory Testing IP address 192.168.166.1 using the Factory Default Switch. Press the Factory Default Switch for more then 20s (Blue LED will turn off) and the Ethernet IP Address will be set to static IP 192.168.166.1. Please note that this Setting is for configuration only, the Ethernet Configuration will be set back after a Reset if not otherwise configured.

Changing Settings via Advanced LuCi Web Interface

Opening the Advanced LuCi Interface

For advanced users the LuCi web interface can be accessed via the Barix web interface using the Advanced Section -> "LuCi config interface".

Login Data are the same as for the Barix web interface, the password for the Root user can be found on the sticker on the backside of the device.

Changing Network Settings

In the LuCi web interface -> <Network> you will find all relevant settings, so you can set other IP addresses, enable/disable DHCP for each network port.

Make sure you don’t lock yourself out if you change the settings !

Control IOs

In the LuCi web interface -> <Barionet> you will find a Control Interface to control and monitor the GPIOs of the Barionet.

Simply click on the Control Buttons to change the state of Relays and IOs or see the Status of Digital Inputs.

Connecting via SSH

Use ssh or a similar client (for example, PuTTY, port 22, SSH option) and establish a connection as user “root” to the IP address of the Barionet (given DHCP Address if connecting via Ethernet). The SSH root password is the same as used for the Webinterface which can be found on the sticker on the backside of the device. The same can be changed from the LuCi interface

Installing OpenWRT Packages

OpenWRT Packages can be installed by the standard OpenWRT/Lede Package installer by using “opkg” command

opkg list opkg list lists all the available packages

opkg list-installed lists the installed packages

opkg update updates the installed packages

opkg install <file> installes a specific package

Please note all custom installed packages will be deleted if a factory defaults or firmware update is applied.

Updating the Barionet Application Packages (available from V2.15.0.0)

The Barionet Software is represented by different Packages in the Barionet Feed. In order to update the device to the newest Software without loosing any data, the Barionet Packages will need to be updated.

This Update can simply be done by the web interface clicking on the "Check for Updates" button in the Package Version of the Status Page.

IO Access from Scripts or programs

The IO ports are accessible through the standard OpenWrt IO device files.

The Device Files can be found in the folder /dev/gpio.

Relay Outputs

Relay Outputs: bio1 - bio4

Use the following shell command in order to control the relay outputs:
echo 1 > bio1/value set Relay 1
echo 0 > bio1/value reset Relay 1

Digital Inputs

Digital Inputs: bio201 - bio204

Use the following shell command in order to read the digital input value:
cat bio201/value reads Input 1

Mounting a USB Stick

A USB Stick with FAT32 File System can be plugged into the USB port. In order to mount a USB stick to the OpenWRT File System the following command is used:

mount -t vfat /dev/sda1 /mnt/usb mounts the sda1 (first USB stick)

Note that “sda1” is eventually replaced by another interface. Use dmesg in order to determine the right interface.

Note that the /mnt/usb directory needs to be created before mounting.

Use of Modbus

The Barionet 400 is supporting Modbus TCP Protocol in order to be controlled.

Modbus Interface: TCP Port 502

All IOs as well as a lot of more functions are accessible via Modbus IO Registers according to Appendix 1) IO Mapping.

Programming the Barionet in Lua

All the Devices in the Barionet Product Familiy can easy be programmed in Lua programming language. The important Lua packages in order to user IOs and Interfaces are pre-installed in the default Barionet Images.

Please use www.lua.org in order to get familiar with Lua and how it is programmed.

The Lua program will be loaded to the Barionet Device using SSH (see above). The program should be stored in /mnt/data/default.lua in order to be executed automatically after startup.

Persistent User Partition

The user partition (/mnt/data/) is the flash space which is persistent to firmware updates and factory defaults. All custom developments will need to be done in the User Partition in order to be on the device after a firmware update or a factory defaults.

Reboot the Device

With Advanced LuCi Web Interface

On the Advanced LuCi web interface go to the System -> <Reboot>

Select “Perform Reboot”.

By Hardware Button

The Reset/Reboot can also be performed by the RESET Button on the Device. Use a needle to perform Reset by pressing the Button.

Reset to factory defaults

With Advanced LuCi Web Interface

On the Advanced LuCi web interface go to <System> -> <Backup/Flash Firmware>

Under Backup/Restore select “Reset to defaults” and perform the factory reset.

At this point, the device will reboot and apply default settings.

Please note that all data except the User Partition will be deleted. Barionet Application Package will be set back to Firmware Image default.

By Hardware Button

The Factory defaults can also be set by the DEFAULTS Button on the Device. Use a needle to perform Factory Defaults by pressing the Button for at least 10s.
At this point, the device will reboot and apply default settings.

Please note that all data except the User Partition will be deleted. Barionet Application Package will be set back to Firmware Image default.

Upload Firmware Image

For a complete update of the Device, the OpenWRT/LEDE Firmware image is provided by Barix at www.barix.com/downloads.

The easiest way is to upload the Firmware Image is using the Advanced LuCi Webinterface: <System> -> <Backup / Flash Firmware>.

Make sure the “Keep Settings” option is selected, if you want to keep your settings and your Data Files. If "Keep Settings" is not selected, the update procedure ensures that the Device is correctly set back to Factory Defaults after the Firmware Update.

Be patient during the Software update and do not disconnect the Power Supply. The Software Update can Take up to 10 Minutes.

Please note that all data except the User Partition will be deleted.

If other Operating System Data will need to be kept (e.g. custom installed packages etc), only the Barionet related Packages, but not the complete firmware will need to be updated. see more about this above -> "Updating the Barionet Packages".

Reset, Factory Defaults and Update Scenarios

The following table gives an overview about the above described Rest, Factory Defaults and Update Scenarios.

Action

Description

OpenWRT/LEDE OS

Barionet Application
Packages

Network Configuration

Custom Packages

User Partition

Reset

Device Restarts

REMAIN

REMAIN

REMAIN

REMAIN

REMAIN

Network Factory Defaults (Button 3-5 Seconds)

Sets the Network configuration back to factory Defaults

REMAIN

REMAIN

RESET

REMAIN

REMAIN

Standard Factory Defaults (Button >10s or WebUI)

Sets Device back to factory Defaults

REMAIN

RESET

RESET

RESET

REMAIN

Update Barionet Package

Updates the related Barionet Application Packages

REMAIN

UPDATE

REMAIN

REMAIN

REMAIN

Upload Firmware Image (with "keep settings")

Updates the complete OS Image but keeps the Settings

UPDATE

UPDATE

REMAIN

RESET

REMAIN

Upload Firmware Image (without "keep settings")

Updates the complete OS Image and resets the Settings to factory Defaults

UPDATE

UPDATE

RESET

RESET

REMAIN


Appendix

IO Mapping

IO Addr

Read/Write

Size

Description

Driver Alias

Driver Link

1

R / W

1 bit

Relay 1

rel1

bio1

2

R / W

1 bit

Relay 2

rel2

bio2

3

R / W

1 bit

Relay 3

rel3

bio3

4

R / W

1 bit

Relay 4

rel4

bio4

201

R only

1 bit

Digital Input 1

in1

bio201

202

R only

1 bit

Digital Input 2

in2

bio202

203

R only

1 bit

Digital Input 3

in3

bio203

204

R only

1 bit

Digital Input 4

in4

bio204


Compliance and further Information

This equipment has been tested and found to comply with the limits for a Class B digital device, pursuant to part 15 of the FCC Rules. These limits are designed to provide reasonable protection against harmful interference in a residential installation. This equipment generates, uses and can radiate radio frequency energy and, if not installed and used in accordance with the instructions, may cause harmful interference to radio communications. However, there is no guarantee that interference will not occur in a particular installation. If this equipment does cause harmful interference to radio or television reception, which can be determined by turning the equipment off and on, the user is encouraged to try to correct the interference by one or more of the following measures:

  • Reorient or relocate the receiving antenna.

  • Increase the separation between the equipment and receiver.

  • Connect the device into an outlet on a circuit different from that to which the receiver is connected.

  • Consult the dealer or an experienced radio/TV technician for help.

Safety and precaution recommendations apply. Find them in the download section at www.barix.com

Find your distributor on this list for more hardware.

For questions that are extending the documentation, feel free to contact us on:

International: +41 434 33 22 22
USA: +1 866 815 0866
Email: support@barix.com

All information and the use of this product including all services are covered under the Barix Terms & Conditions and our Privacy Policy. Please follow the Safety and Precaution Recommendations. Barix is a ISO 9001:2015 certified company. All rights reserved. All information is subject to change without notice. All mentioned trademarks belong to their respective owners and are used for reference only.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.