dresden-elektronik / gcfflasher

GCFFlasher is the tool to program the firmware of dresden elektronik's Zigbee products.
BSD 3-Clause "New" or "Revised" License
31 stars 3 forks source link

Building on OpenWRT #14

Open MarkoPaasila opened 1 year ago

MarkoPaasila commented 1 year ago

Fails. Gives the following output:

root@APU3D4:~/gcfflasher# ./build_posix.sh 
Package libgpiod was not found in the pkg-config search path.
Perhaps you should add the directory containing `libgpiod.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libgpiod' found
libgpiod-dev not found, building without
gcc -Wall -DPL_LINUX -O2 -DNDEBUG

Looking for libbpiod:

root@APU3D4:~/gcfflasher# locate libgpiod
/root/gcfflasher/linux_libgpiod_reset.c
/usr/lib/libgpiod.so.2
/usr/lib/libgpiod.so.2.2.2
/usr/lib/opkg/info/libgpiod.control
/usr/lib/opkg/info/libgpiod.list
/usr/lib/opkg/info/libgpiod.postinst
/usr/lib/opkg/info/libgpiod.prerm
manup commented 1 year ago

Interesting, there seems to be only the release libriaries but not the required headers and pkg-config files. I don't have experience how these can be installed on OpenWRT.

https://openwrt.org/packages/pkgdata/libgpiod https://github.com/openwrt/packages/tree/master/libs/libgpiod

Note the binary is still be compiled as GCFFlasher it's only without optional gpiod support. Which is used for ConBee I and RaspBee I/II to trigger the reset. If the device has a recent firmware this is also done via serial command reset, not requiring gpiod. Another way to fake the hard reset is to start with parameter -t 60 and unplug the unit, wait a few seconds and attach again.