-
Toggle KNX binary group values like never before
05/13/2020 at 14:56 • 0 commentsNew Group Value API is here. Using BinaryValue, you can easily read and write binary values (eg. Lights ON/OFF). Blink over KNX now looks really simple. No more hassles with telegrams 😃.
Short example follows (setup, includes etc. omitted).
BinaryValue binaryGroup001(0, 0, 1, &changeListener); // binary group 0/0/1 defined void loop() { delay(5000); binaryGroup001.setValue(!binaryGroup001.getValue()); // toggle binary group 0/0/1 bcu.loop(); }
-
Updater ("OTA") lightning fast
02/14/2020 at 15:26 • 0 commentsThe tool to update KNXduino firmware Over-the-Air, well, Over-the-Wire actually, is called knxduino-updater. Until today, it supported the full image update only. It took 7 minutes to update full 25kB firmware 😞.
Now the updater can perform "diff" update in case it has the old firmware that is currently in device. Only different bytes are sent over KNX bus thus the update is much faster when there are minor changes in the firmware eg. 30 seconds 😀. See the log below.
java -jar knxduino-updater-1.0-SNAPSHOT-all.jar -nat 192.168.0.100 -fileName "/tmp/arduino_build_369255/KNXduinoBlinkOverKNX.ino.hex" -uid 05:B0:01:02:E9:80:AC:AE:E9:07:47:55 -device 15.15.208 Restart device in programming mode... Unlock device... done (0). Hex file parsed: starting at 0x8008000, length 25984 bytes Old firmware's descriptor from MCU: startAddr=0x8008000 endAddr=0x800e580 crc=0x82a71ef8 Olf firmware found in cache (switching to diff upload mode): /home/pavkriz/.cache/knxduino-updater/0.4/image-8008000-25984-82a71ef8.bin Sending application data (116 diff bytes) .......... Program device next page diff, CRC32 0x55fcba92 ... done (0). Sending application data (5 diff bytes) . Program device next page diff, CRC32 0xe368b554 ... done (0). Sending application data (5 diff bytes) . Program device next page diff, CRC32 0x538968ed ... done (0). Sending application data (5 diff bytes) . Program device next page diff, CRC32 0x36258d52 ... done (0). Sending application data (5 diff bytes) . Program device next page diff, CRC32 0x792de65c ... done (0). Sending application data (5 diff bytes) . Program device next page diff, CRC32 0x4e2ea853 ... done (0). Sending application data (5 diff bytes) . Program device next page diff, CRC32 0x1dd01214 ... done (0). Sending application data (5 diff bytes) . Program device next page diff, CRC32 0x2d459147 ... done (0). Sending application data (5 diff bytes) . Program device next page diff, CRC32 0x8d70ed87 ... done (0). Sending application data (5 diff bytes) . Program device next page diff, CRC32 0x8793dcbc ... done (0). Sending application data (5 diff bytes) . Program device next page diff, CRC32 0x92f7da61 ... done (0). Sending application data (5 diff bytes) . Program device next page diff, CRC32 0x62fe847a ... done (0). Sending application data (5 diff bytes) . Program device next page diff, CRC32 0x1e370c38 ... done (0). Compressed (diffed) stream length = 186 Preparing boot descriptor with start address 0x8008000 end address 0x800e580 with CRC32 0x98fe67cd APP_VERSION pointer 0x0 ... .. Update boot descriptor ... done (0). Restarting device ...
-
Two Git repos are better than one
07/11/2019 at 15:18 • 0 commentsToday, I've split the code, docs , etc. into two Git repositories:
- https://github.com/pavkriz/knxduino - HW design files, Bootloader (to be reworked), updater ("OTA" upload tool)
- https://github.com/pavkriz/knxduino-library - Arduino library and example sketch
-
KNXduino board finally up and running
07/10/2019 at 18:48 • 1 commentWhile I started my prototyping using a Nucleo-F303RE board, I switched to STM32G0 line recently and now have a working custom board based on STM32G071 :)
All bells and whistles working:
and ABB binary output understands very well to our commands:
Leason learned today: Do not let a KNX+ wire hang around. 30 volts accidentally touching a GPIO will kill your STM32 in a millisecond.
-
Hooray, STM32 Arduino Core supports STM32G0 MCUs
07/10/2019 at 15:59 • 0 commentsWhile I started to design a KNXduino 1.0 board with a new hacker-friendly STM32G0 MCU, I waited for STM32 Arduino Core support. Now, the STM32G0 line is supported since version 1.6.0.
Why we love STM32G0:
- LQFP32 package - manually solderable
- Fair amount of Flash and RAM while promising more in year 2020
- Single power rail - ie. only two power pins, single decoupling capacitor needed (+1 for Reset pin), thus simpler PCB, fewer components and more IOs available
- Accurate internal RC oscillator - no Xtal needed for many applications, thus simpler PCB, fewer components and more IOs available
- In short - True replacement for 8-bit MCUs