Commit Graph

44 Commits

Author SHA1 Message Date
Michael Geramb
53425e2ef7
Add callback functions for prog mode and improve documentation (#173) 2022-02-19 20:23:50 +01:00
Domos
fb74931bec
Add 2 new methods: paramSignedByte and paramBit. Comments and usage inside code (#159) 2021-12-23 20:04:34 +01:00
SirSydom
4f6c837b78
added support for RP2040 (Raspberry Pi Pico) (#145) 2021-07-08 19:45:33 +02:00
OutOfSync1
95cf9df7fc
fix userdata saverestore (#133) (#135)
* set saveSize at compile time

* make sure USERDATA_SAVE_SIZE is set to valid value
2021-05-04 16:17:27 +02:00
OutOfSync1
14162fb1a4
fix userdata saverestore (#133)
* * fix for save/restore of userdata

* change declaration of restore() in knx_facade.h to "const uint8_t* restore(const uint8_t* buffer)" to avoid calling default implementation in save_restore.h

* change typedefs to separate SaveCallback and RestoreCallback

* fix BME60 example, knx.setRestoreCallback() needs to use const uint8_t* as well

* fix commitToEeprom for ESP32

* trigger dirty flag for ESP32 to make sure data is committed
2021-04-14 23:46:03 +02:00
OutOfSync1
e57bbf9dbe
generate unique serial number (#90) (#131)
* generate unique serial number (#90)

* see https://github.com/ricaun/ArduinoUniqueID

* calculated from ESP.getEfuseMac() on ESP32

* ESP.getChipId() on ESP8266

* SERIAL_NUMBER_WORD_0-3 on SAMD

* HAL_GetUIDw0-2() on STM32

* defaults to 0x01020304 on other platforms

* fix variable name for ESP platform

* another fix variable name for ESP platform (need more coffee...)
2021-04-12 11:40:56 +02:00
Dennis Fleurbaaij
f169e20f2f
opt-out global KNX, ability to DIY construct knx object, minor cleanups (#121)
* Refactored the knx_facade a bit to make the auto-building of the global knx object and the buttonUp() ISR function opt-in. Also added the ability to quite easily attach another serial (in this case tested with Serial2 of an ESP32).

* Added visual studio code temp files to .gitignore

* Fix for missing build flag for WifiManager in ESP32_ip demo

* Added example in which we DIY build the KNX object and use ESP32's second UART to connect so that you can debug with the first one that's connected to USB.

* Minor platform cleanups to remove compilation warnings.

* ESP32 can't handle the defaulted 8192 byte EPROM. Next to that I needed to begin() the eprom lib in my setup() to get it to work and that requires knowing how much memory KNX will use. This fix makes the default more conservative and moves it's definition to the .h file so that other files can always use it as well.

* After comments from thelsing, inverted the logic. The default global knx object is now opt-out by defining KNX_NO_AUTOMATIC_GLOBAL_INSTANCE. See the knx-demo-diy project for an example.
Minor syntactic cleanups.

* Removed hardwareserial from facade (detail which was not needed)
Placed facade constructors together
Minor syntactic cleanup

* Fixed knx-cc1310 where own button routine was calling now private internal knx facade variable.
Renamed files in knx-demo-diy
Minor syntactic stuff

* Added gitattributes for binary knxprod files
2021-02-05 15:57:45 +01:00
rueckix
d46b51fd4f
Fix ambiguous call to attachInterrupt (#118)
* Fix ambiguous call to attachInterrupt
in new SAMD arduino core

* select attachInterrupt
signature based on Arduino version
2021-01-08 14:06:13 +01:00
Thomas Kunze
24c27815cf fix build 2020-11-18 18:39:35 +01:00
Thomas Kunze
9dd7aeb353 add masks for esp8266 2020-11-18 17:56:19 +01:00
ali esmaeilpour
083d83f777
Add float type for parameters & a few fixes (#95)
* Fix not-relative include

throws if a include directory is not set.

* add forgotten defined() in environment checking '#elif's

* fix mis-spelled "config.j"

* Add float type support to Parameters

All 3 encodings supported.

* Using dptconvert functions to handle parameters handling
2020-11-11 22:55:35 +01:00
nanosonde
d90843ba45
Add support for CC1310 platform based on SimpleLink SDK (#94)
* Initial commit

* Clean up

* Remove display code

* Change cmake build

* Add SimpleLink SDK for CC13xx/CC26xx as submodule

* Remove commented line from build.sh

* Working build

* Remove SDK submodule

* Squashed 'examples/knx-cc1310/coresdk_cc13xx_cc26xx/' content from commit 0d78d32

git-subtree-dir: examples/knx-cc1310/coresdk_cc13xx_cc26xx
git-subtree-split: 0d78d3280357416a5c0388148cda13717c9ffaa5

* Add more comments and enable Power_idleFunc() for NoRTOS variant.
Internal SDK driver functions which have to wait for something
will cause Power_idleFunc to be called instead of doing busy wait.

* Move CC1310 platform init around

* Optimize a bit more in debug build config as the binary does not fit into 128Kb flash otherwise.

* Explicitly list each source/header file in build config. Use linker group to resolve circular dependencies.

* Ignore vscode settings.json

* Increase stacks size

* Only compile CC1310 source code if #define DeviceFamily_CC13X0

* initial commit of CC1310 RF driver with first working RX version

* Better handling of buttonUp() across platforms

* Start cleanup

* continue cleanup

* Fix bau2920 compilation

* Continue cleanup

* Fix compilation in other examples

* Fix compilation

* htons() and ntohs() only for SAMD and STM32, but not for Linux and ESP8266 and ESP32

* htons(9 and ntohs() needed for CC13x0

* Continue cleanup

* Add CC1310 platform to CI

* Fix CI

* Use more recent toolchain from ARM

* Fix travis

* Use Ubuntu Focal

* Fix toolchain for travis

* Fix package name

* Fix toolchain

* Add libstdc++-dev package

* Add newlib packages

* Remove commented commands from CI

* Fix travis

* Fix compilation of knxPython

* Clean up linefeeds

* Fix RX callback

* Move RF CRC16-DNP to bits.cpp

* Fix TX

* Optimization: do not calc CRC for block1 again in rf_data_link_layer

* Make newline optional in printHex

* Cleanup. First working version: ETS5 programming of individual address via KNX/RF coupler.

* Use LEDs and Buttons to control ProgMode and Flash Erase

* Remove settings.json (VScode)

* Add README.md

* Update README.md

* Update README.md

* Fix typo
2020-11-10 21:52:38 +01:00
Dominik Westner
5451235368
Nikwest (#100)
* fixed tipo: RepititionAllowed

* fixed typo: frameRecieved

* fixed typo: individualAddressDuplication

* fixed typo: induvidualAddress

* fixded Typo: InduvidualAddress

Co-authored-by: Dominik Westner <nikwest@github.com>
2020-11-09 20:20:21 +01:00
nanosonde
77a796a39c
Add coupler support (#79)
* save work.

* save work

* save work

* save work

* save work

* Remember which interface received the cemi frame

* save work

* save work

* save work

* Use default value from PID_ROUTING_COUNT

* Add simple alternative to std::function without smart pointers or move semantics

* Remove include

* Add more comments about cleanup

* save work

* Remove forgotten code.

* Move crc16Ccitt to bits.c as it also used for PID_MCB

* save work

* move comment

* save work

* save work

* save work

* save work

* save work

* save work

* save work

* derive from TableObject instead of InterfaceObject

* save work

* save work

* Fix wrong pointer arithmetic in TableObject

* Filter table setting/clearing

* move comment

* save work

* save work

* save work

* handle SBC on closed media

* save work

* move coupler example to different dir

* Restore device example for linux

* save work

* Remove MEDIUM_TYPE and use MASK_VERSION

* save work

* save work

* save work

* save work

* save work

* save work

* save work

* save work

* save work

* save work

* save work

* save work

* save work

* save work

* Replace MEDIUM_TYPE by MASK_VERSION

* Remove adafruit/travis-ci tests

* Disable travis ci cache for platformio

* Fix missing changes

* Fix cemi server and add missing MASK_VERSION definitions

* Enable platformio caching on travis ci again

* Handle device address update for routing decision

* source address is set in network layer and not in data link layer

* Add remaining APCI types that are used with system broadcast

* Add debug print for routing

* Remove simple_functional

* Fix CMakLists.txt

* Use MASK_VERSION to conditionally compile code.

* Remove fixed version reuqirement from platform esp8266

* Add demo-coupler for MCUs

* Remove simple_functional.h from demo knx-linux

* Enable CI for coupler demos

* Correct path for knx-linux-coupler

* Fix knx_facade.h

* Refactor NetworkLayer to use getInterface() for devices and getPrimaryInterface(), getSecondaryInterface() for couplers

* Add platformio configs for other currently possible mask/platform combinations

* Add class diagrams and remove obsolete includes

* Add some minimal docs
2020-09-06 21:41:34 +02:00
nanosonde
96884f768e
Add support for KNX data secure (#66)
* initial comic

* save work

* Handle SystemBroadcast and Broadcast for TP and IP

* Rework

* Fix comment

* save work

* save work

* save work

* save work

* save work

* Restore old broadcast structure

* Readd systembroadcast methods

* Make sure that services from SystemBroadcast are also available from Broadcast on closed media

* save work

* Save work

* save work

* Save work

* save work

* save work

* save work

* save work

* save work

* Change maximum number of elements for the key tables, etc.

* save work

* First working seqno sync with ETS

* save work

* save work

* save work

* save work

* save work

* save work

* Remove magic value and add comment

* save work

* Extend restart and masterreset for factory reset

* save work

* First working secure broadcast mode with IA programming

* Add FunctionPropertyExt* AL services

* Fix FunctionPropertyExt*. Working T_DATA_CONNECTED with FunctionPropertyExt*.

* Add PropertyValueExt* AL services. Handle master reset in AL service RESTART.

* Fix FunctionPropertyExtStateRead, fix restart. MILESTONE: Working physical programming of IA and toolkey with confirmed restart. Reading deviceinfos working.

* Handle PDT_CONTROL in FunctionPropertyExt*

* Fix FunctionPropertyExt* and FunctionProperty for PDT_CONTROL

* Change comment.

* save work

* save work

* Add group object security handling

* Move map to own file

* use simple_map

* Include simple_map.h in CmakeFile

* Move code from header to source file

* Remove obsolete code

* MILESTONE: working programming of secure device with IA and tables

* cleanup

* bugfix

* flashSize must be big enough. Security IF object contains a lot more data.

* Merge master into feat_datasecure

* Revert "Merge master into feat_datasecure"

This reverts commit 0c8358692a.

* Revert "Revert "Merge master into feat_datasecure""

This reverts commit aa59253785.

* Bugfixes

* cleanup

* cleanup

* Add printing of uint64_t

* Don't compile secapplayer if data secure not enabled

* pin platform for ESP8266 to specific version

* SecIfObject: save/restore required for persisting STATE. Bugfix: use correct PID for group key table

* Cleanup comment and debug output

* Further cleanup.

* Refactor master reset

* Remove unused IP data link layer test code

* Only reset TOOL kkey to FDSK on factory reset

* Modify .gitignore and remove vscode config file

* Correct comment

* Handle SBC flag (systembroadcast) in SCF field. Couplers between open and closed media need this.

* Remove code that slipped in.
2020-07-06 19:16:54 +02:00
etrinh
f880114da5
Stm32 port (#71)
* Fix Stm32 Eeprom handler
Fix missing parenthesis
Fix some type consistencies

* Fix #73
Add ability to override config.h with define NO_KNX_CONFIG

* change tabs to space

* coding style

Co-authored-by: etrinh <etrinh@zdionline.net>
2020-06-30 14:58:53 +02:00
etrinh
d789fb1459 Enable TP medium for ESP32 2020-04-07 18:24:28 +02:00
etrinh
0f99a4c969 Fix compilation warning
STM32 uses TP
2020-04-02 22:10:50 +02:00
etrinh
34df27ee87 fix bad commit 2020-04-02 18:16:15 +02:00
etrinh
147a3942ad Add priliminar Arduino STM32 port 2020-04-02 18:09:53 +02:00
Thomas Kunze
894a54fa7f enable RF and TP 2020-03-12 21:34:00 +01:00
Thomas Kunze
e2fd20ab9a implement knx-ip searchresponse 2019-12-28 00:29:17 +01:00
Thomas Kunze
396994c1a5 add Property, DataProperty and CallbackProperty classes 2019-12-11 22:23:21 +01:00
Thomas Kunze
8421279d53 -add saveLength to SaveRestore
-undo split of Restore from SaveRestore
-add some dynamic memory management to memory-class
2019-11-03 22:09:22 +01:00
nanosonde
c93dc81367 Add default MEDIUM_TYPE 0 (TP) 2019-10-28 13:33:06 +01:00
nanosonde
fc0153e52a initial KNX RF S-Mode support 2019-10-25 16:41:29 +02:00
mumpf
4a0b46e062 Progbutton interrupt (#35)
* corrected float with DPT9

* Switch Programming-LED also via Bus/ETS

* Again: Prog-LED switchable from bus/ETS

* DPT16 (to bus) implemented

* - Allows ProgButton interrupts on FALLING signal
2019-09-14 18:24:34 +02:00
Thomas Kunze
3d90532feb add forgotten initialisation code 2019-09-09 19:07:22 +02:00
Fabian Schmieder
14d2da82f1 added ESP32 platform (#30)
* added ESP32 platform

* fixed typo in comments
2019-08-26 13:45:14 +02:00
Thomas Kunze
d23613ad65 convert KnxFacade to a template class 2019-08-22 22:57:35 +02:00
Thomas Kunze
da05a1d51b add restart request 2019-06-24 22:22:56 +02:00
Thomas Kunze
5b31b24337 correct flag handling for group objects 2019-05-27 22:06:32 +02:00
Thomas Kunze
0628d88921 change last pull request a bit 2019-05-27 21:41:04 +02:00
Maggyver
87828bd530 circuit of the led adapted for different boards (#15)
* Update knx_facade.cpp

* Update knx_facade.h

* Update knx-demo.ino
2019-05-27 20:13:57 +02:00
Thomas Kunze
9cbd9a0760 use KnxFacade for linux too 2019-05-18 21:04:49 +02:00
Thomas Kunze
174e29372c make GOT completely dynamic from ETS. GOs are now only available if device was programmed via ETS 2019-05-09 20:52:04 +02:00
Thomas Kunze
c79b921d1c fix build with new esp-core 2019-03-01 20:21:03 +01:00
Thomas Kunze
f2b97ecd09 add WifiManger to examples, remove states for wps configuration 2019-02-26 22:42:06 +01:00
Thomas Kunze
f46f6aa70e add sonoff s20 example (not tested) 2019-01-03 22:20:50 +01:00
Thomas Kunze
cdbf3e70cc include linux and samd versions here 2018-11-07 00:32:36 +01:00
Thomas Kunze
dc362a79c3 add writeMemory to facade, remove debug output from platform 2018-09-15 00:22:30 +02:00
Thomas Kunze
ecce8ddd3c add save + restore callbacks 2018-09-04 21:12:50 +02:00
Thomas Kunze
809de53cc8 move more code from demo to knx-esp 2018-04-09 23:58:35 +02:00
Thomas Kunze
e99a001ac7 move common files to submodule 2018-04-09 22:46:21 +02:00