forked from project-chip/connectedhomeip
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update rotating-id-generation from master #15
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This change merges commssioning and commissionable discovery into one method to reduce duplicate code. The change also fixes the hostname publish format not in line with the spec and renames a typo.
…4382) When reading an attribute value into a large buffer, we would read the number of bytes that can fit in the buffer, not the number of bytes the attribute value actually takes up. This would cause us to read whatever memory came after the attribute value. Also fixes some issues in typeSensitiveMemCopy when trying to read a string-valued attribute into a buffer that's not even big enough to fit the length value of the string. Fixes #4371
- make string copy take the source as const - use pragma once in af.h - remove some commented-out includes
This command fails on my machine - unclear as to why, however running sudo commands as part of the devcontainer setup does not sound right. I would rather keep my existing docker setup and permissions.
* [thread] Allow to specify dataset timestamp * Restyled by clang-format Co-authored-by: Restyled.io <[email protected]>
* Remove include dependency from 'gen' from af-types.h * Restyle fixes * Move af-enums into util (since this is where af-types lives) * Remove more gen/enums - hopefully not needed anywhere anymore * ember print does not require gen_config * ef-event.cpp does not seem to require gen/callback.h. call-command-handler.h is empty * Remove gen/command-id from main af.h header. Move it within corresponding clusters. TBD later on how to make clusters not depend on generated code (although probably better for just clusters to have coupling than main code) * Move gen/command-id dependency to cpp file instead of af.h * move gen/af-structs into cpp file rather than af.h main header * Move print cluster generated code into cpp file * Move cluster-id generated header from af.h into corresponding cpp files * Move attribute-type from af.h into cpp files * Move att-storage header from af.h into cpp files * Restyle fixes * Move attribute-id header from af.h to cpp files * Fix lock app includes for nrfconnect * More compile fixes for example apps * More compile fixes - it seems we have quite a bit of copied code * Add lighting app build in vscode for EFR32. Fix EFR32 light app compilation * Fix up qpg6100 builds and add them to vscode build shortcuts * Remove type for management info and tarif type
This fixes the following warnings with clang: src/setup_payload/ManualSetupPayloadGenerator.cpp:50:32: error: unknown warning group '-Wstack-usage=', ignored [-Werror,-Wunknown-warning-option] ^ 1 error generated.
* Fix crashes when BLE rendezvous disconnects unexpectedly In BLE::OnBleEndPointConnectionClosed, the endpoint is already closed. We try to close it again in the Transport::BLE destructor, causing a crash. Clear the endpoint in OnBleEndPointConnectionClosed to avoid this case. In addition, the OnRendezvousError callback ends up calling RendezvousCleanup, which destroys the transport. We therefore cannot call OnRendezvousConnectionClosed after OnRendezvousError; |this| was already freed in OnRendezvousError and we just need to return. * Restyled by clang-format Co-authored-by: Restyled.io <[email protected]>
This fixes the following warning in release src/lib/support/Pool.cpp:69:10: error: unused variable 'value' [-Werror,-Wunused-variable] auto value = mUsage[word].fetch_and(~(kBit1 << offset)); Switch to nlassert since this macro doesn't cause unused variable warnings when assertions are disabled.
We have a mechanism to obtain Zephyr compilation flags, so that we can pass some of them (like include paths etc.) to CHIP build system. The mechanism leverages Zephyr-supplied CMake functions which were supposed to return lists of flags. However, in recent Zephyr revisions, they changed behavior of the functions and the build fails. Switch to using functions which return strings of flags which seem to have more stable API.
* Refactor message encryption and pairing code - Extract message encryption/decryption to its own functions. These can be reused for pairing, and CASE based session setup - Cleanup pairing and rendezvous code to use the new functions. * Use SecureSessionMgr to send encrypted rendezvous messages * fix doxygen * cleanup * cleanup * Fix cirque failure * address review comments * Fix copyright year
The ESP32 SDK automatically adds -std=-gnu++11 to CXXFLAGS (see "make/project.mk" in the SDK). So we just filter it out, and manually add -std=gnu++14 instead.
* NFC Tag Reading support added * Cahneg record to type uri * restyled Co-authored-by: Rob Walker <[email protected]>
1. Fixed TestBufferReader.cpp to use the standard decltype instead of the non-standard typeof 2. Do not filter out --gnu++11 set by the esp-idf 3. Removed the sorting of flags which was causing the gnu++11 to override c++14/c++17 given by the application 4. Removed the forcing of any sort of -std in the common component.mk
) This code is the result of enabling the `Binding Cluster` server & client into the `all-clusters-app` configuration file. Most of the code changes has been generated with `ZAP`. The list of manual actions are: * Run `./scripts/tools/zap_configure.sh` and enable `Binding Cluster` server & client on the first endpoint * Exports `ChipTypesHelper.asBasicType` to templates since the Objective-C generated `.h` file is used by `Objective-C` in `src/darwin` and not `Objective-C++`
CHIP doesn't have native Windows support at the moment, so only embedded builds will compile there. Remove the host builds on Windows.
* Fix leak of DeviceTransportMgr in CHIPDeviceController DeviceTransportMgr is created in Init() but not deleted in Shutdown(). * Restyled by clang-format Co-authored-by: Restyled.io <[email protected]>
This fixes the following compile error on some systems: src/app/server/QRCodeUtil.cpp:42:55: error: expected ')' ChipLogProgress(AppServer, "SetupPINCode: [%" PRIu32 "]", setupPinCode);
When NFC Tag containing commissioning information of a CHIP device is read, ask a user for an action to take: - display the device information - provision into a Wi-Fi network - provision into a Thread network
Via scripts/helpers/pull_submodules.sh Updates: git -C third_party/bluez/repo log e8f8a5966..83c8c1e92 git -C third_party/cirque/repo log 778108f..b87cdef git -C third_party/nanopb/repo log 9f57cc8..35965fd git -C third_party/nlassert/repo log bd2f082..c5892c5 git -C third_party/nlfaultinjection/repo log 79f92f3..e0de0ab git -C third_party/nlio/repo log 5bc9ff0..0e72550 git -C third_party/nlunit-test/repo log ef5a2b9..0c8c907 git -C third_party/pigweed/repo log 5a4db08b..4b3fcb51 git -C third_party/qpg_sdk/repo log a5ce0ab..8fd6c4b git -C third_party/zap/repo log 8312cf7..f462cc9
* Convenience class for BufBound backed by a PacketBuffer. #### Problem Several places use similar code to safely write to a packet buffer. Encapsulating this encourages this safety method by making it easier, and reduces opportunity for mistakes in the steps involved. #### Summary of Changes - Added a `PacketBufBound` class that can never yield a truncated buffer. - Converted existing uses of the `BufBound`+`PacketBuffer` combination. * Fix incorrectly-updated copyright dates * Review * Review 2 — The Commenting
* * Fix - Calculation of TT value in spake2p protocol * Added context length in calculation of TT * Removed pbkdf2 param request/response from calculation of TT * reverting the changes * * Added context length to calculation of TT * Reverted test vectors * Modified Spake2p::Init to accepts context and context_len. * added context length to computation of TT in SecurePairingSession.cpp * crash fix * Restyled by clang-format * build fix * reverting examples/bridge-app/linux/build * reverting link files * reverting submodule commits * moving buffer to PASESession * Calculating context as SHA256("Const String" || PBKDFParamRequest || PBKDFParamResponse) * Restyled by clang-format Co-authored-by: Restyled.io <[email protected]>
…the iOS. (#4498) There is a discussion on the CHIP-Specifications/connectedhomeip-spec#415 about need of replacing spaces with _ in the NFC URI, but it is not fixed yet. Currently iOS CHIP Tool is expecting _ characters, while other Android and nrfconnect platforms are still using spaces. * Added replacing _ with spaces in NFC payload for the Android CHIP Tool * Added replacing spaces with _ in NFC payload for nrfconnect samples
…xamples/all-clusters-app with -Wconversion (#4605) ### Problem While trying to compile the `src/app` code into `examples/all-clusters-app/` with `-Wconversion` enabled, it complains about some conversions errors. For the record, those are: * error: implicit conversion changes signedness: 'int' to 'uint32_t' (aka 'unsigned int') [-Werror,-Wsign-conversion] * error: operand of ? changes signedness: 'int' to 'unsigned int' [-Werror,-Wsign-conversion] * error: conversion from 'long unsigned int' to 'uint32_t' {aka 'unsigned int'} may change value [-Werror=conversion] * error: conversion from 'int' to 'uint16_t' {aka 'short unsigned int'} may change value [-Werror=conversion]
…_PORT (#4590) #### Problem `chip-tool` is sometimes used to connect to a local accessory server running on the same machine. In this case the accessory server and chip-tool conflicts because both listens to port `11097` (`CHIP_TOOL`). It is easy to workaround this by adding a `ListenPort=11098` to `/tmp/chip_tool_config.ini` but it requires an extra step that is not necessary. #### Summary of changes * Listen on port `CHIP_PORT + 1` by default instead of `CHIP_PORT`
) * Use enum class to define protocols message type for strong typing * Apply suggestions from code review Co-authored-by: Boris Zbarsky <[email protected]>
This lets the command line args override the defaults, since the last assignment wins.
* Add a setup script for Raspberry Pi. - Add a package-install script to be able to compile on raspberry pi - add requirement on pygobject for python (and include in raspberry pi) - remove the empty 'install_packages' script in the setup root dir * Add protobuf-compiler to required rpi packages * More requirements for the python side of the build on rpi * Restyle fixes
* Convert asset upload to be backed based on a file list. ESP32 works, still need EFR32 * Add flash bundle support for efr32 * Restyle fixes * Add ref to efr32 build as well * Use runtime_deps to auto-generate the flash bundle for "flashable_executable" builds * Fix typo in comment text * Fix moved newline in script * Restyle fixes
* Add Silabs ZCL8 XML implementation - Add silabs implementation of af-gen-event and af-tokens. Not yet compatible with CHIP (TODO issue #3637) * Restyled by clang-format * Restyled by prettier-json * Restyled by prettier-markdown Co-authored-by: Restyled.io <[email protected]>
#### Problem `gen_tokens.h` is one of the file required by `src/app` but that it still missing a template. If someone tries to create a new app from scratch using `ZAP` it will complains that `gen_tokens.h` is missing. This PR introduce a dumb template based on the content of `gen_tokens.h` from what is in the tree. The tokens list is empty because the tokens code has not yet been fixed in `src/app` and so nobody uses it at the moment. Most of the changes from this PR comes from syncing the tree with the actual zap templates.
* Add UI to manage biding/unbiding * Fix copyright year * Restyled by whitespace * Restyled by clang-format Co-authored-by: Restyled.io <[email protected]> Co-authored-by: Justin Wood <[email protected]>
Co-authored-by: Justin Wood <[email protected]>
Currently enabling certain builds and running: ninja -C out/debug does not build them. This means we can end up building nothing at all, which is fairly confusing. They will however be built if you run either: ninja -C out/debug all ninja -C out/debug <specific target> Add the missing deps to the default target so that all opted in configs are built with the first command. Co-authored-by: Justin Wood <[email protected]>
* Remove map in InteractionModelEngine * Restyled by clang-format * Add TODO comment * Add comment for default dispatcher * Fix Co-authored-by: Restyled.io <[email protected]>
…4388) * Optimize TransportMgrBase::HandleMessageReceived, reduce void* usage * Resolve comments
…opt CHIPFramework API to control different lights/endpoints (#4564) * Hookup different lights to different endpoints - Adds UI to change how many light endpoints developer wants to control - Hooks up the different light endpoints to the various clusters * Fix ordering of initlizing of chipcontroller + clusters befor doing UI * Restyled by whitespace * Restyled by clang-format Co-authored-by: Restyled.io <[email protected]> Co-authored-by: Justin Wood <[email protected]>
#4629) * Pull ot-br-posix version * Update cirque test
* Add cc13x2_26x2 build to unified build There are some missing files in build_overrides to build TI in the unified build, as well as some missing dependencies diagnosed by gn --check --fail-on-unused-args. Fix those issues so that cc13x2_26x2 can be built together with the other examples. Also despam the sysconfig generator so we don't drown out important diagnostics. Tested via ./gn_build.sh enable_cc13x2_26x2_builds=true ti_simplelink_sdk_root=\"$HOME/ti/simplelink_cc13x2_26x2_sdk_4_40_00_44\" ti_sysconfig_root=\"$HOME/ti/sysconfig_1.7.0\" * Use braces in substitution Co-authored-by: Justin Wood <[email protected]>
…ion (#4604) #### Problem In #3608, many reporting specific callbacks has been moved from `gen/callback-stub.cpp` to `src/app/reporting/`. The PR has been a bit overzealous since all the `*ReportingResponseCallback` declarations and definitions has been moved while those still needs to be part of the `gen/` content if one wants to override them. Also, the server specific stack status callbacks are called for both the client and the server, while those only needs to be called by the reporter. Those issues prevents to write a client application that consumes a `.zap` configuration file. #### Summary of changes * Move back `*ReportingResponseCallback` to the `gen/` folder * Update the `#ifdef` in `src/app/server/DataModelHandler.cpp` to only call the stack status callbacks for the server side * Update `HandleDataModelMessage` signature by only passing a `NodeId` for the first argument and remove the last one which is unused.
hnnajh
pushed a commit
that referenced
this pull request
Jul 22, 2022
It's not safe to access line editing state from the IO thread while inside readline() on the main thread. Remove the code that attempts to redraw readline after printing logs. This avoids segfaults during logging at the cost of those logs overwriting the prompt (this is not trivial to fix as readline is a blocking API). ================== WARNING: ThreadSanitizer: data race (pid=63005) Write of size 1 at 0x55f81c7745ff by main thread: #0 InteractiveStartCommand::ParseCommand(char*) ../../examples/chip-tool/commands/interactive/InteractiveCommands.cpp:127 (chip-tool+0x874911) #1 InteractiveStartCommand::RunCommand() ../../examples/chip-tool/commands/interactive/InteractiveCommands.cpp:85 (chip-tool+0x874594) #2 CHIPCommand::StartWaiting(std::chrono::duration<unsigned int, std::ratio<1l, 1000l> >) ../../examples/chip-tool/commands/common/CHIPCommand.cpp:408 (chip-tool+0x83e478) #3 CHIPCommand::Run() ../../examples/chip-tool/commands/common/CHIPCommand.cpp:187 (chip-tool+0x83c839) #4 Commands::RunCommand(int, char**, bool) ../../examples/chip-tool/commands/common/Commands.cpp:147 (chip-tool+0x85d4f7) #5 Commands::Run(int, char**) ../../examples/chip-tool/commands/common/Commands.cpp:51 (chip-tool+0x85c288) #6 main <null> (chip-tool+0x569c0a) Previous read of size 1 at 0x55f81c7745ff by thread T5 (mutexes: write M185): #0 LoggingCallback ../../examples/chip-tool/commands/interactive/InteractiveCommands.cpp:46 (chip-tool+0x874479) #1 chip::Logging::LogV(unsigned char, unsigned char, char const*, __va_list_tag*) ../../src/lib/support/logging/CHIPLogging.cpp:221 (chip-tool+0x8ee4dc) #2 chip::Logging::Log(unsigned char, unsigned char, char const*, ...) ../../src/lib/support/logging/CHIPLogging.cpp:172 (chip-tool+0x8ee30a) #3 chip::app::ReadClient::RefreshLivenessCheckTimer() <null> (chip-tool+0x8b1746) #4 chip::app::ReadClient::ProcessSubscribeResponse(chip::System::PacketBufferHandle&&) ../../src/app/ReadClient.cpp:845 (chip-tool+0x8b20ec) #5 chip::app::ReadClient::OnMessageReceived(chip::Messaging::ExchangeContext*, chip::PayloadHeader const&, chip::System::PacketBufferHandle&&) ../../src/app/ReadClient.cpp:409 (chip-tool+0x8ae2a4) #6 chip::Messaging::ExchangeContext::HandleMessage(unsigned int, chip::PayloadHeader const&, chip::BitFlags<chip::Messaging::MessageFlagValues, unsigned int>, chip::System::PacketBufferHandle&&) <null> (chip-tool+0xa0517a) #7 operator()<chip::Messaging::ExchangeContext> ../../src/messaging/ExchangeMgr.cpp:219 (chip-tool+0xa08c73) #8 Call ../../src/lib/support/Pool.h:126 (chip-tool+0xa0912d) #9 chip::internal::HeapObjectList::ForEachNode(void*, chip::Loop (*)(void*, void*)) ../../src/lib/support/Pool.cpp:127 (chip-tool+0x8ee05a) #10 ForEachActiveObject<chip::Messaging::ExchangeManager::OnMessageReceived(const chip::PacketHeader&, const chip::PayloadHeader&, const chip::SessionHandle&, chip::SessionMessageDelegate::DuplicateMessage, chip::System::PacketBufferHandle&&)::<lambda(auto:2*)> > ../../src/lib/support/Pool.h:396 (chip-tool+0xa08d10) #11 chip::Messaging::ExchangeManager::OnMessageReceived(chip::PacketHeader const&, chip::PayloadHeader const&, chip::SessionHandle const&, chip::SessionMessageDelegate::DuplicateMessage, chip::System::PacketBufferHandle&&) ../../src/messaging/ExchangeMgr.cpp:212 (chip-tool+0xa07e91) #12 chip::SessionManager::SecureUnicastMessageDispatch(chip::PacketHeader const&, chip::Transport::PeerAddress const&, chip::System::PacketBufferHandle&&) ../../src/transport/SessionManager.cpp:616 (chip-tool+0xa1548b) #13 chip::SessionManager::OnMessageReceived(chip::Transport::PeerAddress const&, chip::System::PacketBufferHandle&&) ../../src/transport/SessionManager.cpp:443 (chip-tool+0xa14426) #14 chip::TransportMgrBase::HandleMessageReceived(chip::Transport::PeerAddress const&, chip::System::PacketBufferHandle&&) ../../src/transport/TransportMgrBase.cpp:76 (chip-tool+0xa17dfa) #15 chip::Transport::Base::HandleMessageReceived(chip::Transport::PeerAddress const&, chip::System::PacketBufferHandle&&) ../../src/transport/raw/Base.h:102 (chip-tool+0xb19728) #16 chip::Transport::UDP::OnUdpReceive(chip::Inet::UDPEndPoint*, chip::System::PacketBufferHandle&&, chip::Inet::IPPacketInfo const*) ../../src/transport/raw/UDP.cpp:122 (chip-tool+0xb1a48b) #17 chip::Inet::UDPEndPointImplSockets::HandlePendingIO(chip::BitFlags<chip::System::SocketEventFlags, unsigned char>) ../../src/inet/UDPEndPointImplSockets.cpp:688 (chip-tool+0xb00aa0) #18 chip::Inet::UDPEndPointImplSockets::HandlePendingIO(chip::BitFlags<chip::System::SocketEventFlags, unsigned char>, long) ../../src/inet/UDPEndPointImplSockets.cpp:569 (chip-tool+0xafff89) #19 chip::System::LayerImplSelect::HandleEvents() ../../src/system/SystemLayerImplSelect.cpp:406 (chip-tool+0xb07563) #20 chip::DeviceLayer::Internal::GenericPlatformManagerImpl_POSIX<chip::DeviceLayer::PlatformManagerImpl>::_RunEventLoop() ../../src/include/platform/internal/GenericPlatformManagerImpl_POSIX.ipp:181 (chip-tool+0x98a227) #21 chip::DeviceLayer::PlatformManager::RunEventLoop() ../../src/include/platform/PlatformManager.h:362 (chip-tool+0x988f75) #22 chip::DeviceLayer::Internal::GenericPlatformManagerImpl_POSIX<chip::DeviceLayer::PlatformManagerImpl>::EventLoopTaskMain(void*) ../../src/include/platform/internal/GenericPlatformManagerImpl_POSIX.ipp:205 (chip-tool+0x98a87c) Location is global '(anonymous namespace)::gIsCommandRunning' of size 1 at 0x55f81c7745ff (chip-tool+0x000000c485ff) Mutex M185 (0x55f81c776180) created at: #0 pthread_mutex_lock ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:4240 (libtsan.so.0+0x4f30a) #1 chip::DeviceLayer::Internal::GenericPlatformManagerImpl_POSIX<chip::DeviceLayer::PlatformManagerImpl>::_LockChipStack() ../../src/include/platform/internal/GenericPlatformManagerImpl_POSIX.ipp:78 (chip-tool+0x989e90) #2 chip::DeviceLayer::PlatformManager::LockChipStack() ../../src/include/platform/PlatformManager.h:410 (chip-tool+0x988fa5) #3 chip::DeviceLayer::Internal::GenericPlatformManagerImpl_POSIX<chip::DeviceLayer::PlatformManagerImpl>::_RunEventLoop() ../../src/include/platform/internal/GenericPlatformManagerImpl_POSIX.ipp:170 (chip-tool+0x98a147) #4 chip::DeviceLayer::PlatformManager::RunEventLoop() ../../src/include/platform/PlatformManager.h:362 (chip-tool+0x988f75) #5 chip::DeviceLayer::Internal::GenericPlatformManagerImpl_POSIX<chip::DeviceLayer::PlatformManagerImpl>::EventLoopTaskMain(void*) ../../src/include/platform/internal/GenericPlatformManagerImpl_POSIX.ipp:205 (chip-tool+0x98a87c) Thread T5 (tid=63013, running) created by main thread at: #0 pthread_create ../../../../src/libsanitizer/tsan/tsan_interceptors_posix.cpp:969 (libtsan.so.0+0x5ad75) #1 chip::DeviceLayer::Internal::GenericPlatformManagerImpl_POSIX<chip::DeviceLayer::PlatformManagerImpl>::_StartEventLoopTask() ../../src/include/platform/internal/GenericPlatformManagerImpl_POSIX.ipp:231 (chip-tool+0x98a40a) #2 chip::DeviceLayer::PlatformManager::StartEventLoopTask() ../../src/include/platform/PlatformManager.h:375 (chip-tool+0xaacca2) #3 chip::Controller::DeviceControllerFactory::ServiceEvents() ../../src/controller/CHIPDeviceControllerFactory.cpp:331 (chip-tool+0xab0417) #4 CHIPCommand::StartWaiting(std::chrono::duration<unsigned int, std::ratio<1l, 1000l> >) ../../examples/chip-tool/commands/common/CHIPCommand.cpp:403 (chip-tool+0x83e353) #5 CHIPCommand::Run() ../../examples/chip-tool/commands/common/CHIPCommand.cpp:187 (chip-tool+0x83c839) #6 Commands::RunCommand(int, char**, bool) ../../examples/chip-tool/commands/common/Commands.cpp:147 (chip-tool+0x85d4f7) #7 Commands::Run(int, char**) ../../examples/chip-tool/commands/common/Commands.cpp:51 (chip-tool+0x85c288) #8 main <null> (chip-tool+0x569c0a) SUMMARY: ThreadSanitizer: data race ../../examples/chip-tool/commands/interactive/InteractiveCommands.cpp:127 in InteractiveStartCommand::ParseCommand(char*) ==================
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
<<<<<FILL ME IN - the issue this PR is intended to address>>>>>
Summary of Changes
<<<<<FILL ME IN - what's in this PR>>>>>
Fixes #<<<<<FILL ME IN - issue number(s). If no issue, please create one>>>>>