_______________________________________________________________________________________
© Barix AG 7/2018, 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. Barix, Exstreamer and SonicIP are trademarks of Barix AG, Switzerland, and are
registered in certain countries.
Analog Inputs
Analog Inputs: bio501 – bio504
Use the following shell command in order to
read the analog input values:
“cat bio501” -> reads Analog Input 1
Make sure that Pull-Up Resistors on the
Analog Inputs are turned off for reading
analog values
7. Use of Serial Ports from
Scripts or programs
The Serial Ports (RS232 and RS485) are
accessible through the standard OpenWrt
USB device files.
The Device Files can be found in the folder
/dev.
RS232 Interface:
ttyS1
Use the following shell command in order to
write to the Serial Port:
“echo hello world > ttyS1” -> writes to
RS232
Use the following shell command in order to
read from the Serial Port:
“cat ttyS1” -> reads from RS232
8. Mounting a USB Stick
In order to mount a USB stick to the
OpenWRT
File
System,
the
following
packages need to be installed:
-> kmod-usb-storage (Kernel support for
USB Mass Storage devices)
-> kmod-fs-vfat (support of the right file
system, vfat for fat32)
The USB Stick can now be plugged in and
mounted
with
mount
command
as
following:
“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.
9. Use of Modbus
The Barionet 1000 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.
10. Lua Programming
The Barionet 1000 can easily be custom
programmed in Lua. For more information
about Lua Programming see www.lua.org.
A limited set of Lua Packages are pre-
installed on the Barionet 1000 already.
Most of the common Packages can easily
be installed using OPKG packet installer
(see above).
Lua Programs can be loaded onto the
device using ssh and scp. The Lua program
will
be
started
using
the
following
command:
“lua helloworld.lua” -> starts helloworld.lua