1
0
mirror of https://github.com/thelsing/knx.git synced 2025-03-08 00:16:06 +01:00
Commit Graph

409 Commits

Author SHA1 Message Date
Thomas Kunze
ee4d4ba3da Merge commit '7f11927' into openknx-merge 2024-08-09 20:30:39 +02:00
Thomas Kunze
5ddbff2d16 Merge commit '093ae42' into openknx-merge 2024-08-09 20:14:40 +02:00
Thomas Kunze
934d9ca5ba translate german comments with deepL 2024-08-09 19:53:00 +02:00
Thomas Kunze
f676cd2a20 Merge commit '06e0365' into openknx-merge 2024-08-09 19:32:26 +02:00
Marco Scholl
b2bcba7e1b
Merge pull request from mgeramb/add_DPT17.001
add DPT 27.001
2024-08-07 21:24:50 +02:00
Michael Geramb
f0cd44cefa add DPT 27.001 2024-08-07 21:09:05 +02:00
Marco Scholl
845aa38bd6
Merge branch 'v1' into v1dev 2024-08-03 21:27:20 +02:00
Marco Scholl
84a0ce3c22
fixes modulo in rx queue 2024-08-03 21:27:00 +02:00
Dom
7f119275ee
Better Routing and new Tunneling Support ()
Support 0x091A IP-Router better, including KNX IP Tunneling and a lot of smaller fixes
2024-07-29 10:47:41 +02:00
thelsing
5e337591b1
Update bau57B0.cpp 2024-07-22 12:56:06 +02:00
Marco Scholl
d0b5e84526
remove generic ethernet support on rp2040. uses now KNX_IP_LAN or KNX_IP_WIFI 2024-07-20 23:47:58 +02:00
Michael Geramb
093ae425b0
String \0 terminated in group objects ()
* String \0 terminated in group objects

* Remove copy constructor, fix bugs in setting buffer to 0

* Remove copy constructor in GroupObject
2024-07-20 16:27:47 +02:00
Ing-Dom
12fb67cc63 fix: only set pinMode of Prog button pin when pin is >= 0 and isr function is defined
otherwise it is useless anyway and causes warnings.
2024-07-17 22:22:58 +02:00
Tony
9a46d7b1b2 Fix build for cemi_server without RF support 2024-06-20 02:09:16 +08:00
Marco Scholl
4f0e47f809
drop unexpected udp data packet length 2024-06-03 10:38:48 +02:00
Ing-Dom
6eb7af74a0 flag also repeated telegrams as echoed / own telegrams 2024-06-02 23:45:54 +02:00
Marco Scholl
a645575a72
support detect acks with busy + nack and show in monitoring 2024-05-23 15:38:31 +02:00
Marco Scholl
2adac5e4af
fix: resets stats 2024-05-23 09:35:07 +02:00
Marco Scholl
06e0365a53
Merge branch 'v1dev-tp2' into v1dev 2024-05-21 22:47:18 +02:00
Michael Geramb
a330699a0e Add function to group object to send a value only if it was changed. 2024-05-21 19:15:58 +02:00
Marco Scholl
f94bd0b674
allow to change MAX_TX_QUEUE 2024-05-19 23:52:21 +02:00
Marco Scholl
97e15c7d92
remove some debug output.
adds a tx queue size limit with warning.
2024-04-10 14:36:19 +02:00
Marco Scholl
1754e5387b
fixes some problems with txqueue 2024-04-08 21:21:30 +02:00
Marco Scholl
e65afebd3a
reenable sendframe handling
reenable rxProcess in loop
fixes a memory leak
2024-04-05 00:04:43 +02:00
Marco Scholl
7b910eba59
small optimizes 2024-04-04 20:51:45 +02:00
Marco Scholl
9d7e29d705
auto format 2024-03-30 09:52:15 +01:00
Marco Scholl
6884734cc3
fixes the missing processRx() in loop() 2024-03-30 06:58:18 +01:00
Marco Scholl
cf1b6bc7ac
some bugfixes 2024-03-29 22:32:18 +01:00
Marco Scholl
8388c79f9f
adds gcc optimize for tp frame 2024-03-29 22:31:59 +01:00
Marco Scholl
1ee78a45d1
Reimplementation of the tpuart data link layer 2024-03-28 08:38:55 +01:00
Marco Scholl
6b2ac7e50b
Adds dma support for rp2040 uart 2024-03-28 08:33:15 +01:00
Marco Scholl
f5724c64d1
Extends the platforms with additional uart methods. 2024-03-28 08:21:59 +01:00
Marco Scholl
03f55f5503
Makes the data link layer accessible from outside 2024-03-28 08:20:12 +01:00
thelsing
57b5b05ce1
Merge pull request from OpenKNX/feature/set-value-and-check-change
Allow Setting Value of Group-Object with Checking for Modification of Converted Value
2024-02-12 08:54:21 +01:00
Cornelius Köpp
1f426e9203 Update for New Uninitialized-Handling 2024-01-24 21:54:08 +01:00
Cornelius Köpp
f5f45e2ce1 Allow Setting Value of GroupObject (KO) with Checking Change after Conversion by valueNoSendCompare(..)
* Return if Value was Changed
* Always Set the First Value
* Copy on Changes Only
* Make Comparison Independent of Sending
* Extend Doc of `valueNoSendCompare(..)`; Add Note for using `valueNoSend(..)`
2024-01-24 21:54:07 +01:00
Waldemar Porscha
c6368db8a3 Finalize uninitialized handling 2024-01-18 22:43:31 +01:00
Waldemar Porscha
efe2c46d32 New implementation of Uninitialized state for group object
- old implementation is still there for compatibility reasons
- new implementation reflects the case "uninitialized while transmitting"
- Just states "Updated", "WriteRequest" and "Ok" remove uninitialized state
2024-01-16 00:39:26 +01:00
Cornelius Köpp
0b33f0d67e Fix Error Detected in Pipeline: Build knx-demo 2024-01-07 20:18:02 +01:00
Cornelius Köpp
e9541a9e76 Extend Doc of valueNoSendCompare(..); Add Note for using valueNoSend(..) 2024-01-07 19:55:42 +01:00
Cornelius Köpp
fd887b9df1 Fix: Prevent False-Positive Change-Detection from Undefined Bits in (at least) DPT1 2024-01-07 19:31:08 +01:00
Cornelius Köpp
ee55abd2b9 Allow Setting Value of GroupObject (KO) with Checking Change after Conversion
* Return if Value was Changed
* Always Set the First Value
* Copy on Changes Only
* Make Comparison Independent of Sending
2024-01-07 19:31:06 +01:00
Marco Scholl
50cde2cd0f fixes the dpt13 converting 2024-01-05 15:36:25 +01:00
Michael Geramb
4cd733b86d Fix build error for missing variable if KNX_NETIF is not defined 2024-01-02 19:37:52 +01:00
Michael Geramb
c1691b7e81 Fix for RP2040 UART pin handling: Setting of uart pins moved setupUart method. 2023-12-31 14:25:24 +01:00
thelsing
7215f470af
Merge pull request from OpenKNX/feature_activitycallback
Add activity callback function
2023-12-26 21:24:55 +01:00
Ing-Dom
142e0a2325 fixing issues from PR review 2023-12-26 13:48:50 +01:00
thelsing
946d116e63
Merge pull request from OpenKNX/rp2040_ip_merge2
IP support for RP2040 plattform
2023-12-26 13:13:03 +01:00
Michael Geramb
ddd8284578 Allow to set uart pins for RP2040 and ESP32 platform 2023-12-25 19:45:52 +01:00
Ing-Dom
311abdd88f redesigned the activitycallback without using the facade and with a more flexible approach.
For performace reasons, the calls in the actual link layer is only activated when KNX_ACTIVITYCALLBACK is defined.

There is now a DataLinkLayerCallback class where a specific Bau *can* inherit from and - if the specific link layer supports it, pass itself to that linklayer(s).
2023-12-25 16:34:40 +01:00
Ing-Dom
470ec8b521 this adds IP (WiFi and wired Ethernet) support to the rp2040 platform.
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  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
2023-12-24 10:20:23 +01:00
Marco Scholl
3c29d16450 fix IndividualAddressSerialNumberReadResponse 2023-12-20 09:35:29 +01:00
Marco Scholl
38300f7e0d Revert "fix serialNumberReadResponse"
This reverts commit 9f28f8efd2.
2023-12-20 09:24:29 +01:00
Ing-Dom
53842ad0c5 Add the possibility to have a callback function signaling knx activity (for e.g. flashing LEDs)
Can be enabled with KNX_ACTIVITYCALLBACK

# Conflicts:
#	src/knx/ip_data_link_layer.cpp
2023-12-17 14:53:50 +01:00
thewhobox
9f28f8efd2 fix serialNumberReadResponse 2023-12-01 20:25:58 +01:00
Marco Scholl
354e5f56bb remove byteorder macros for rp2040 platform as they are already included in lwip 2023-10-25 13:03:17 +02:00
Marco Scholl
f89a3919e4 increase kFunctionPropertyResultBufferMaxSize to 0xFF 2023-09-14 19:55:20 +02:00
Marco Scholl
3202b33fcb
add support for external flash system by using callbacks 2023-08-25 22:42:32 +02:00
Waldemar Porscha
fd952c817e soved merge problem 2023-08-24 10:49:55 +02:00
Waldemar Porscha
a5c79214e3 Improved float16ToPayload correction 2023-08-24 10:43:21 +02:00
Waldemar Porscha
9c4e5d259a FIX: float16ToPayload
- 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!
2023-08-22 11:28:10 +02:00
thelsing
6dda682fa7
Merge pull request from OpenKNX/feature/dpt-14-80
Add Support for DPT 14.080 (`DPT_Value_ApparentPower`)
2023-08-09 10:28:38 +02:00
thelsing
69d553df9c
Merge pull request from OpenKNX/fix/dptconvert-8.010-to-busvalue
Fix: Conversion of DPT8.010 to Bus
2023-08-09 10:28:25 +02:00
Marco Scholl
2934782d3c
fix: check initalize AssociationTableData 2023-08-06 18:19:17 +02:00
Cornelius Köpp
efbbb52717 Fix: Writing Both Bytes of DPT8.010 to Bus 2023-08-02 23:01:14 +02:00
thelsing
f7ac39c66f
Merge pull request from OpenKNX/fix_data_property_read_idx0
fixed wrong answers to property read
2023-07-13 11:08:46 +02:00
thelsing
aa57fdf482
Merge pull request from OpenKNX/fix-buffer-overflow
Fix buffer overflow
2023-07-13 11:08:11 +02:00
Cornelius Köpp
3c2a371711 Add DPT 14.080 (DPT_Value_ApparentPower) 2023-07-02 14:04:32 +02:00
Waldemar Porscha
09985ea793 FIX: Allow setting of EOPR_TIMEOUT from pio.ini 2023-06-30 21:23:44 +02:00
John Doe
a5ba7bcd5e fixed wrong answers to property read:
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.
2023-06-26 10:15:51 +02:00
Waldemar Porscha
f8bd27b4b5 allow user defined OVERRUN_COUNT
reset _savedAsapXXX always to 0
2023-06-18 14:06:41 +02:00
thelsing
48000b25aa
Merge pull request from Maggyver/master
New PlatformIO Build Flags "KNX_LED_ACTIVE_ON" , default is low
2023-06-16 11:18:38 +02:00
thelsing
494c76c7d8
Merge pull request from OpenKNX/fix-tpuart-error
fix  - TPUART Error Message
2023-06-16 11:18:10 +02:00
thewhobox
e1596ebaf4 fix wrong functionPropertyState handling 2023-06-14 21:30:27 +02:00
Mike
c5fc04c487 fix-tpuart-error 2023-06-13 11:21:48 +02:00
Maggyver
90cafdbd01
New PlatformIO Build Flags "KNX_LED_ACTIVE_ON" , default is low 2023-06-11 14:38:40 +02:00
thelsing
245b82e627
Merge pull request from OpenKNX/fix-reset-chip
fix: reset chip blocks
2023-05-29 19:10:34 +02:00
thewhobox
338aa1b825 fix reset chip 2023-05-28 12:06:55 +02:00
Ing-Dom
b088ffe10d Rename function for better understanding, fix inverse logic 2023-05-27 13:55:11 +02:00
Ing-Dom
49ae48eacb some minor improvements from first code review 2023-05-26 12:48:50 +02:00
Ing-Dom
1f3a5fe5a9 improve the implementation of the 50 packet / second limit
delay knx.loop by 20ms has ugly side effects.
count the frames in 100ms chunks to allow more than 5 packets per 100ms
drop packet if over the limit.
2023-05-26 11:26:33 +02:00
thelsing
4cdf6d4ffe
Merge pull request from OpenKNX/hotfix-uninitialized-asap
Hotfix: remove of _savedAsapXXX = 0
2023-05-13 10:07:22 +02:00
Waldemar Porscha
5abd3d4408 Hotfix: remove of _savedAsapXXX = 0 2023-05-13 01:11:34 +02:00
thelsing
e4bb3e1c59
Merge pull request from OpenKNX/support-samd-flash-offset
support KNX_FLASH_OFFSET on samd
2023-05-07 20:29:12 +02:00
Marco Scholl
2b8ad2f1ad support KNX_FLASH_OFFSET on samd 2023-05-07 11:52:39 +02:00
thewhobox
859b50eff6 functionproperty respond only if handled 2023-05-06 20:53:06 +02:00
mumpf
d52df6d584
fix: prevent use of uninitialized _savedAsapXXX variables ()
- src/knx/application_layer.h: Initialize _savedAsapXXX
- src/knx/application_layer.cpp: prevent xxxConfirm-Calls if _savedAsapXXX values are 0

Co-authored-by: Waldemar Porscha <wp@porscha.eu>
2023-05-05 00:42:28 +02:00
Mike
0d140a5182
Added FunctionProperty Callback ()
* add commitNonVolatileMemory overload to batch write chars n times to flash

* added functionproperty callback

* added function property state

* fixed function data length

* removed ifdef and fixed missing references

* added adc response

* fix

* fixed ADCResponse

---------

Co-authored-by: Ing-Dom <dom@ing-dom.de>
2023-04-06 15:35:37 +02:00
mobil750
5007462c70
correction for DPT 10.001 TimeOfDay implemented; #define DPT_TimeOfDay Dpt(10, 1, 1) ()
extension of dptconvert.cpp to get "tmp.tm_wday = weekDay;" decoded in Struct tm
2023-04-06 12:25:52 +02:00
mumpf
8807780b55
FIX: occasional endless loop (wrong buffer limit) ()
Co-authored-by: Waldemar Porscha <wp@porscha.eu>
2023-03-20 14:41:31 +01:00
Dom
4c37c21699
make the Prog Button handling in the knx stack deativateable by pin value <0 () 2023-02-20 14:21:11 +01:00
Dom
dce92403e5
32bit eeprom size ()
* 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 
2023-02-13 21:39:30 +01:00
mumpf
9894a8c8b8
improved/corrected prog button debouncing ()
Co-authored-by: Waldemar Porscha <wp@porscha.eu>
2022-11-25 07:24:27 +01:00
mumpf
b51c5950c5
reimplemented binary search for translateAsap() ()
* 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>
2022-11-12 11:23:04 +01:00
mumpf
7bf3696a3b
Feature175 binarysearch ()
* 
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>
2022-10-21 10:03:11 +02:00
Sonnengruesser
a0134e6cfb
RP2040 EEPROM/Flash compiler flag fix ()
* 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
2022-10-15 22:25:22 +02:00
mumpf
5b48f21f53
get rid of some warnings during build ()
(comparison between signed and unsigned integer expressions)

Co-authored-by: Waldemar Porscha <wp@porscha.eu>
2022-10-15 22:24:58 +02:00
mumpf
3bf7f5ce48
remove unnecessary print to console ()
Co-authored-by: Waldemar Porscha <waldemar.porscha@sap.com>
2022-07-15 23:11:10 +02:00
Matthias B
8b9ff4fce1
H8I8O ()
* 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 

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 

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 
2022-06-08 21:13:34 +02:00
rueckix
bd907c242d
Fix prog button handling ()
* 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
2022-05-31 07:20:59 +02:00