thelsing / knx

knx stack (TP, IP and RF) for arduino and linux, Can be configured with ETS
GNU General Public License v3.0
276 stars 95 forks source link

Fix buffer overflow #252

Closed mumpf closed 1 year ago

mumpf commented 1 year ago

This pull request addresses a Problem with ignored KNX-Telegrams in Hight-Load-Situations on the KNX-Bus. It does not change the default behaviour, but allows to set according defines outside of the project. OVERRUN_COUNT limits the number of not processed bytes in UART buffer before telegrams are ignored. Default here is 7, on an RP2040 I got very good results with 31. EOPR_TIMEOUT limits the time the processing of the address part of a telegram has. Default here is 8, on an RP2040 I got very good results with 32.

The other file (application_layer.cpp) was already part of the stack for some time, but produced many unnecessary mesages. My correction (removing the messages) also removed the _saveASAPxxx = 0; settings.

Please accept this pull request, as far as I can see here it has no side effects.

Regards, Waldemar