Commit Graph

32 Commits (better-conbee-versioning)

Author SHA1 Message Date
Michael Zanetti 22837865f1 Fixes reconnecting the ZigBee controller after a reset during runtime
Resets may occur by unplugging the stick or calling a softReset() from
the software side.

Additionally resets the stick when 5 subsequent timeouts happen
as there are firmwares of the CC2652 available which tend to
crash occationally.
2022-12-30 20:49:45 +01:00
Michael Zanetti 75d286b29a Expose raw dataIndications and allow sending raw commands on ZigbeeCluster 2022-11-04 18:25:05 +01:00
jenkins 4ea83aa44c Merge PR #70: Update all debug operators and make use of state saver 2022-10-17 11:20:00 +02:00
Simon Stürz 2aa22ee262 Update all debug operators and make use of state saver 2022-10-13 12:48:43 +02:00
Michael Zanetti ac7972df35 Complete the OTA cluster implementation 2022-10-12 12:17:30 +02:00
Michael Zanetti fd12d0518b Explicitly stop the ZCL timeout timer
Also don't use a QueuedConnection, as it's not guaranteed the
sender will still live on by the time slot is called.
2022-05-12 17:33:35 +02:00
Michael Zanetti b96f9fa98f Timeout ZCL replies
This is basically the same as #41 does with ZDO replies but for ZCL replies.

Working with a z-stack dongle and a Gewiss binary input device a lot of
timeouts happen during the device interview. While basic device interview
timeouts are caught by the ZDO timeouts, later interview steps like
cluster attribute reading run into the same issue with this device and
the interview process never finishes.
2022-04-25 14:31:10 +02:00
Michael Zanetti a38e8be190 Simplify ZigbeeCluster inheritance
Instead of having 2 methods (setAttribute and addOrUpdateAttribute)
to allow specific cluster implementations to override behavior,
merge them into one, setAttribute, and use standard C++ syntax for
calling a base class implementation.
2022-02-14 11:23:36 +01:00
Michael Zanetti df0b7e9c63 Rafactor handling of TSNs in ZCL to allow the application using it.
This patch separates the transactionSequenceNumber used for sending from the
one received. According to the specification, the transactionSequenceNumber is
not meant to equally increase on both ends, but instead really just be a "random"
number which allows to match a reply to a request. Syncing them on both ends
has the outcome to increase the likelyhood of collisions if a device sends
a notification at the same time we send a request and thus even may wrongly
interpret that incoming command as a reply to the request. In fact, ideally TSNs for
outgoing messages would stay away as far as possible from incoming ones.

The old code additionally had the problem that it would re-use the last received
TSN for outgoing requests, given it used a post-increment when reading
m_transactionSequenceNumber after setting it to the last received TSN.

The new code will use a single static upcounting TSN for all outgoing requests
but will still allow overriding it with a custom TSN of for some reason a certain
device requires a specific TSN (apparently those exist).
It will not do anything with incoming TSNs but forward them now to the application
layer which may decide to use it match its own transactions or to deduplicate packets.

This allows fixing the issue in nymea that remote controls sometimes produce duplicate
pressed events (seen most often with the Tradfri Symfonisk) by discarding commands that
didn't increase the TSN.
2022-01-22 13:51:21 +01:00
Michael Zanetti e7d533b9e8 Add support for IAS Zone enrollment 2021-10-15 17:01:14 +02:00
Simon Stürz 2f8af57d4e Add invalid measurment filtering for measurement clusters 2021-05-21 08:54:49 +02:00
Simon Stürz 5072ad7c1e Add develco profile and manufacturer, implement manufacturer specific cluster methods, improve binary input cluster 2021-04-28 13:39:07 +02:00
Simon Stürz 108898053e Make default response a gloabl command in the frame control header field 2020-12-15 15:21:39 +01:00
Simon Stürz 1c30c1de8b Implement ZCL default response for clusters and improve ISA zone cluster 2020-12-15 15:17:41 +01:00
Simon Stürz 61114fc773 Restructure error handling depnding on layer and add MAC layer errors to replies 2020-11-24 18:14:54 +01:00
Simon Stürz 4eafe285b0 Clean up clusters and implement default get methods for now 2020-11-12 13:27:37 +01:00
Michael Zanetti 40512509ae Fix some typos 2020-11-11 14:43:26 +01:00
Simon Stürz 231c1d134f Improve debug prints 2020-11-06 19:19:46 +01:00
Simon Stürz 0c6924e3f2 Implement command responding over cluster api and implement OTA server for default responses 2020-11-06 19:19:46 +01:00
Simon Stürz df7260fe41 Add write attribute command for cluster 2020-10-01 08:45:00 +02:00
Simon Stürz ed5517fbf1 Implement reply timeout and restructure uart communication queue 2020-06-30 16:49:09 +02:00
Simon Stürz cdd7a1a1aa Implement power configuration cluster 2020-06-13 21:18:01 +02:00
Simon Stürz 5085487bda Implement first attempt for network database loading and saving 2020-06-04 21:58:21 +02:00
Simon Stürz 80d4b1416e Restructure the descriptor handling and implement level control cluster server side 2020-06-03 19:50:47 +02:00
Simon Stürz b5b6709da3 Implement multiple attributes report parsing 2020-05-30 18:30:28 +02:00
Simon Stürz 74995ce401 Implement NWL Layer error handling 2020-05-30 16:30:39 +02:00
Simon Stürz 8105a9082b Add identify and iaszone cluster implementations 2020-05-29 13:55:00 +02:00
Simon Stürz 4c4f540f21 Finish humidity sensor and update attribute internally at attribute read 2020-05-28 21:03:49 +02:00
Simon Stürz 69ed7e3496 Implement new clusters and restructure ZCL frame flow and implement attribute reports 2020-05-28 18:03:33 +02:00
Simon Stürz 7e5643a1cf Add on off cluster and use zigbedatatype for atributes 2020-05-27 21:56:41 +02:00
Simon Stürz 396c86a0d2 Implement data parsing and continue with basic cluster 2020-05-26 11:15:12 +02:00
Simon Stürz 4e897686bb Implement basic cluster comands and commuication 2020-05-25 22:25:49 +02:00