This project enables the access on Linux box to the KNX bus using the USB KNX interface "01847" by VIMAR.
Now with the "C" library libknxusb
you can send and receive messages on Linux box with the VIMAR USB KNX interface "01847".
This project includes many code examples to use the library.
sudo apt-get install build-essential autotools-dev autoconf automake autoconf-archive gnu-standards autoconf-doc libtool
sudo apt-get install libcmocka0 libcmocka-dev
sudo apt-get install libhidapi-hidraw0 libhidapi-dev libhidapi-hidraw0-dbg udev
sudo apt-get install libncurses5-dev
./autogen.sh (or autogen-cross-rpi.sh to cross compile to raspberry-pi)
make
This install the library on the system and many example programs.
make install
- Copy udev rules:
sudo cp udev/99-vimar-01847.rules /etc/udev/rules.d
- Unplug Vimar 01847 device
- Restart udev:
sudo /etc/init.d/udev restart
- Plug Vimar 01847 device
- Check if
/dev/vimar-01847
exists when Vimar 01847 is plugged. - If interface was not found, restart the system.
Run 01847-busmonitor
program to show the knx bus messages.
This program permits also to send messages on the bus.
Commands:
q
key to quits
key to send message in raw format (hex)
Run 01847-busmonitor-nolib
program to show the knx bus messages.
This program does not use the libknxusb
library.
Run 01847-sendmsg "<MSG>"
program to send a KNX raw message from command line.
The <MSG>
must be format in hex value, example:
01847-sendmsg "BC 1001 AABB E1 00 81"
: send a A_GroupValueWrite to group0xAABB
with value1
01847-sendmsg "BC 1001 1002 60 03D7 16 FF 10 01 FF"
: send a A_PropertyValueWrite message
In this project I added the library to use another KNX interface: the "KNX Tiny Interface 810" by Weinzierl Engineering GmbH.
But it is only experimental.
Please check my other repo: knxtinyserial.
To debug, in the root of project, create a file setup-environment.local
like this:
export CPPFLAGS="-DDEBUG -DNO_DAEMON"
export CFLAGS="-g -O0"
This file is sourced inside the autogen*.sh
scripts.
To check if this file works correctly, run:
grep CPPFLAGS config.status
grep CFLAGS config.status
To deploy and test on TARGET raspberry pi
, run script deploy.sh
that copy all ARM binary inside tmp
folder of TARGET.
HOST> ./deploy.sh
TARGET> cd /tmp
TARGET> LD_LIBRARY_PATH=/tmp 01847-busmonitor
To run the unit-test (CMOCKA required):
make check
To release a new version:
- bump version on
AC_INIT
insideconfigure.ac
- run
make distcheck
- copy
.tar.gz
on GitHub release and create a TAG