It includes also some optimizations for KNX-IP in general.
Squashed commit of the following:
commit 14bf9bef25ccc2c9bddefe7c8f1e0f6b1d63b3bc
Author: Ing-Dom <dom@ing-dom.de>
Date: Sun Dec 24 10:17:05 2023 +0100
clean up, remove KNX_LOG_IP
commit 57223e46e414010662772989c2520cf1960ed268
Merge: 2911448 a870dd8
Author: Ing-Dom <dom@ing-dom.de>
Date: Sun Dec 24 10:10:19 2023 +0100
Merge remote-tracking branch 'remotes/origin/master' into rp2040_ip
commit 2911448d22a454aacae472762677381acce6a159
Merge: 8ac6aec 3c29d16
Author: Dom <dom@ing-dom.de>
Date: Wed Dec 20 10:04:32 2023 +0100
Merge pull request #13 from OpenKNX/fix_serialnumber
Fix serialnumber
commit 8ac6aeccce20a9e5e1bbf5300008a72383f7ee71
Author: Ing-Dom <dom@ing-dom.de>
Date: Thu Dec 14 12:28:02 2023 +0100
fix macAddress reading for Wifi
commit 9db2cd58708e9d7bbfd485ada2ff38c829447c42
Author: Ing-Dom <dom@ing-dom.de>
Date: Tue Dec 12 13:08:53 2023 +0100
remove LARGE_BUFFERS and clean up header files of ETHERNET_GENERIC
commit 2f229ae90c6f72e01c2a9b9efe134f75fc85547c
Author: Ing-Dom <dom@ing-dom.de>
Date: Tue Dec 12 00:56:32 2023 +0100
temporary fix, solution needed for tunneling
commit f6e7e619a454f43db10e644b41c58b43a1a2b453
Author: Ing-Dom <dom@ing-dom.de>
Date: Mon Dec 11 13:54:26 2023 +0100
unified approach for different ip stacks with rp2040 plattform
commit 4723edab84986bca6d31ea7b3083b1b7b8ef907e
Author: Marco Scholl <develop@marco-scholl.de>
Date: Mon Dec 11 08:34:25 2023 +0100
wip
commit 5bf3e615c8649dd9c34be7b1fe6ad4062ce96c34
Author: Ing-Dom <dom@ing-dom.de>
Date: Thu Dec 7 14:53:42 2023 +0100
ip and not ip in one rp2040 plattform
commit aaca34a237686c5389888b7bd040b860331bdbff
Merge: fd97f59 d44606d
Author: Dom <dom@ing-dom.de>
Date: Wed Dec 6 15:30:17 2023 +0100
Merge branch 'thelsing:master' into rp2040_lwip
commit fd97f5920ef486ca955f5425cbcaec062e3ef977
Author: Marco Scholl <develop@marco-scholl.de>
Date: Thu Nov 30 23:19:13 2023 +0100
dd sime ifdef to allow build without ip interface
commit c665a79db9cee7063dd77a155108633db81ef8e8
Author: Ing-Dom <dom@ing-dom.de>
Date: Tue Nov 14 10:03:48 2023 +0100
stub for handling SearchRequestExt to prevent console messages
commit 50745be66681616681f67d7bdf17008f5d19640d
Author: Ing-Dom <dom@ing-dom.de>
Date: Tue Nov 14 00:02:49 2023 +0100
adding ip support for rp2040 plattform
- all DPT9 numbers of the form (2^n)/100, n>10 (first value is 20.48) were converted to a payload of 0
- in other words: 20.48; 40.96; 81.92; etc. were send as 0!
with start = 0 (read the number of current elements) and current elements = 0 (empty property) 0 was returned which results in an error message when reading this property.
* add commitNonVolatileMemory overload to batch write chars n times to flash
* changed uint8_t getEepromBuffer(uint16_t size) to uint8_t getEepromBuffer(uint32_t size) to allow eeprom > 65k
* reworked PR #230
* reimplemented binary search for translateAsap()
- new prepareBinarySearch() after association_table change
- fallback to linear search if ETS does not provide sorted ASAP entries
- activated with #define BIN_SEARCH
* added required comments to explain algorithm
Co-authored-by: Waldemar Porscha <wp@porscha.eu>
* #175
added a binary search for address and assoc table
can be enabled by defining USE_BINSEARCH
* Corrected BIN_SEARCH
* AddressTableObject::contains minimal improve
* Review: changed ntohs to htons
* corrected byte order during access to sorted array
Co-authored-by: SirSydom <com@sirsydom.de>
Co-authored-by: Waldemar Porscha <wp@porscha.eu>
* RP2040 EEPROM/Flash compiler flag fix
only check flash size if Flash is used, not EEPROM
* RP2040 EEPROM/Flash compiler flag fix
use EEPROM emulation as default to allow build of the knx-demo (memory.h defines EEPROM size 1024 which doesn't work with Flashsize 4k)
* Update rp2040_arduino_platform.h
* Add defines for LED, button and serial port
To make supporting different board layouts easier, this introduces some new defines:
For all platforms:
- `KNX_LED` - the programming LED, defaults to `LED_BUILTIN`
- `KNX_BUTTON` - the programming button, defaults to `0`
For Arduino platforms:
- `KNX_DEBUG_SERIAL` - the serial port that is used for debugging, defaults to `Serial`
- `KNX_SERIAL` - the serial port used for communication with the TPUART, default depends on platform
* GD32 flash workaround
Addressing #181
At least some GD32 devices seem to require unlocking the flash twice. As the unlock function exits with `HAL_OK` if the flash is already unlocked, STM32 devices can run the same code without issues.
* Add H8I8O and H8C09 configurations to knx-demo
Addressing #181
These configurations both serve as examples for the use of these boards and other custom boards that don't use the standard pinout.
* Add STM32 unlock target
This copies the brute force unlock approach by @pavkriz into a custom target. With this commit, it is possible to automatically unlock e.g. a H8I8O board without leaving the PlatformIO IDE.
See #181
* Update stm32_platform.cpp
Addresses a side effect of https://github.com/thelsing/knx/pull/177, which causes the eeprom buffer to be overwritten every time getEepromBuffer is called. This prevented programming of STM32 boards as their initial bus address was lost before programming.
* progbutton fix
* Update stm32_platform.cpp
Addresses a side effect of https://github.com/thelsing/knx/pull/177, which causes the eeprom buffer to be overwritten every time getEepromBuffer is called. This prevented programming of STM32 boards as their initial bus address was lost before programming.
* Update knx_facade.h
Remove superfluous attribute _buttonPinInterruptOn
* Update knx_facade.h
attachInterrup on CHANGE for progbutton detection
* Update stm32_platform.cpp
Addresses a side effect of https://github.com/thelsing/knx/pull/177, which causes the eeprom buffer to be overwritten every time getEepromBuffer is called. This prevented programming of STM32 boards as their initial bus address was lost before programming.
* Code style fix
- happens just with large applications
- occured mainly on SAMD platform
- new crc16ccitt algorithm without additional buffer
- reorder groupObjTable in memory for less fragmentation
Co-authored-by: Waldemar Porscha <waldemar.porscha@sap.com>
* Fix#191 by initializing the platform pointer in all KnxFacade constructors
* Revert "Fix #191 by initializing the platform pointer in all KnxFacade constructors"
This reverts commit adc05cfaf7.
* Alternative fix for #191 by initializing the platform pointer in KnxFacade(&bau) from the platform stored in bau
* GroupObjects can communicate internally
- GroupObjects use callback infrastructure also during write to bus
- external and internal write of a GO can be handled identically
- needs #define INTERNAL_GROUPOBJECT
* FIX-Works now also if SMALL_GROUPOBJECT is not set
* Remove #ifdef INTERNAL_GROUPOBJECT
Co-authored-by: Waldemar Porscha <waldemar.porscha@sap.com>
* Feature: Allow additional version check on startup
- added versionCheckCallback
- added apiVersion to DeviceObject
- added new versionCheck to memory,cpp
* updated source code formatting
* changes for PR
- (old) version is again part of version check
- naming conventions
* forgotten parameter in callback
* correct wrong buffer initialization
* version <-> apiVersion swapped
Co-authored-by: Waldemar Porscha <waldemar.porscha@sap.com>
* solves #178 bugfix when sending frames > 63 byte, missing masking of upper bits after sending a U_DataOffset
* also masked U_L_DATA_END_REQ correctly
* used bit masking instead of %
* save WIP on flash api + header reorder
* reduce diffs to master
* added support for RP2040 (Raspberry Pi Pico)
* support DPT9.009 (airflow) and DPT9.029 (absolute humidity)
* added support for RP2040 (Raspberry Pi Pico) (#145)
* worked on flash implementation
* worked on flash implementation
* added malloc for _EraseBlockBuffer, fixed some bugs
* fixed memoryread and crash while loading KOs (+debugstuff)
* some fixes and debugs
* align to pagesize
* clean up debug stuff, comments ...
* added support for both Eeprom and Flash (NvMemoryType) plattforms.
* changed memoryReadIndicationP to memoryReadIndication
added stdlib and defines
* fixed std::min
* another try for fixing the min problem
* rolled back linux plattform to eeprom
* comments only, hints for plattforms
* bugfix when calculating memorywrites over multiple blocks by mumpf
* added support for EEPROM-Emulation / RAM-buffered Flash
improvements in RP2040 plattform
* fixed typo in KNX_FLASH_OFFSET
* - writebuffersize clarified (PR discussion)
- changed alignment from flashpagesize to 32bit
- added override modifier (PR discussion)
- changed comment regarding flash/eeprom functions for plattforms to override/implement (PR discussion)
* resolved CodeFactor issue
Co-authored-by: Thomas Kunze <thomas.kunze@gmx.com>
* added support for RP2040 (Raspberry Pi Pico)
* support DPT9.009 (airflow) and DPT9.029 (absolute humidity)
* adapted to work with the latest arduino-pico core V1.11.0
- setPollingMode for knxSerial
* Made the rx loop shorter to avoid tx buffer saturation.
* sendSingleFrameByte return false on last byte
* sendSingleFrameByte return false on last byte
* * 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
* fixes to enable partial programming (thanks to mumpf and proggerKA at KNX-UF!)
* add PID_MCB_TABLE to TableObject
* add CallBackProperty to send PID_MCB_TABLE
* calculate crc checksum using Crc16Citt when state switches to LOAD_COMPLETED
* add crc to save(), restore() and saveSize() to save crc to flash
* add CallBackProperty for read and write of PID_PROG_VERSION to ApplicationProgramObject
* create overrides for save, restore, and saveSize in ApplicationProgramObject to save _programVersion to flash
* improve crc calculation
* removed TableObject::crc16Citt method and use the one in bits.h
* do not save crc in flash, instead calculate on-the-fly in CallbackProperty when state==LS_LOADED
* use DataProperty to store PID_PROG_VERSION
* WARNING: segmentSize calculation for crc calculation is currently not correct. Need to somehow access size of data in class that inherits from TableObject (e.g. ApplicationObject or RouterObject)
* fix segment size in TableObject()
* save size after TableObject::allocTable() is called. Also change save() and restore() to save _size to flash. Modify saveSize()
* use _size to calculate crc value in CallbackProperty
* reduce footprint, save 5 byte
* add comment why _size field is needed
* remove PID_MCB_TABLE from RouterObject
* this is now implemented in TableObject
* 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...)
* Add KNX_NO_DEFAULT_UART to avoid default uart assignation for ArduinoPlatforms and derivatives, with associated defines (HWSERIAL_NONE for stm32) to recover RAM from unused RX/TX buffers
Remove ArduinoPlatform(HardwareSerial* knxSerial) constructor, seems not useable by KnxFacade
* Restore ArduinoPlatform::ArduinoPlatform(HardwareSerial* knxSerial) constructor
* revert xxxPlatform(HardwareSerial* s) constructors
* 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
* 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
* 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
* Add inital serial port support for Linux platform
* Add missing print implementation for uint64_t and enable mask 07B0 for Linux platform using TPUART
* Create executable per mask
* Add one executable per mask for coupler
* 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
* 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.
* Bugfix for property entry 0 and PID_IO_LIST
* Remove unsused method
* Fix comment and add missing size adjustment in other method
* Callback properties must return valid data on startIndex 0. The return value must contain the actual element count within the property.
* 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
* Allow lambda on platforms which support it, can be forced with HAS_FUNCTIONAL 0/1
* remove automatic detection of functional due to breakage with some platforms:
In file included from /home/travis/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/arm-none-eabi/include/c++/7.2.1/bits/char_traits.h:39:0,
from /home/travis/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/arm-none-eabi/include/c++/7.2.1/string:40,
from /home/travis/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/arm-none-eabi/include/c++/7.2.1/stdexcept:39,
from /home/travis/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/arm-none-eabi/include/c++/7.2.1/array:39,
from /home/travis/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/arm-none-eabi/include/c++/7.2.1/tuple:39,
from /home/travis/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/arm-none-eabi/include/c++/7.2.1/functional:54,
from /home/travis/arduino_ide/libraries/Adafruit_Test_Library/src/knx/group_object.h:37,
from /home/travis/arduino_ide/libraries/Adafruit_Test_Library/src/knx/group_object_table_object.h:4,
from /home/travis/arduino_ide/libraries/Adafruit_Test_Library/src/knx/bau_systemB.h:8,
from /home/travis/arduino_ide/libraries/Adafruit_Test_Library/src/knx/bau07B0.h:4,
from /home/travis/arduino_ide/libraries/Adafruit_Test_Library/src/knx_facade.h:12,
from /home/travis/arduino_ide/libraries/Adafruit_Test_Library/src/knx.h:86,
from /home/travis/build/thelsing/knx/examples/knx-bme680/knx-bme680.ino:4:
/home/travis/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/arm-none-eabi/include/c++/7.2.1/bits/stl_algobase.h:243:56: error: macro "min" passed 3 arguments, but takes just 2
min(const _Tp& __a, const _Tp& __b, _Compare __comp)
^
/home/travis/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/arm-none-eabi/include/c++/7.2.1/bits/stl_algobase.h:265:56: error: macro "max" passed 3 arguments, but takes just 2
max(const _Tp& __a, const _Tp& __b, _Compare __comp)
^
To be investigated...
Co-authored-by: etrinh <etrinh@zdionline.net>
* Add missing source files
* Fix comment
* Refactor Broadcast/SystemBroadcast
* Add empty confirm methods
* Remove unclean solution to suppress warning about unsed var
* Restore old structure
* Fix issues
* Add more missing source files
* Make sure that services from SystemBroadcast are also available from Broadcast on closed media
* Make sure that sent broadcast/systembroadcast frames are always marked as broadcast frames on closed media