Skip to content
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 local master #24

Merged
merged 27 commits into from
Feb 25, 2021
Merged

Update local master #24

merged 27 commits into from
Feb 25, 2021

Conversation

hnnajh
Copy link
Owner

@hnnajh hnnajh commented Feb 25, 2021

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>>>>>

andy31415 and others added 27 commits February 19, 2021 16:04
* Add an adapter iterator class to bluez

* code review updates

* Fix typo in method

* Fix compilation and off-by-one error

* Ensure we unref the adapter during listing

* Remove unused variable

* Fix typos in comments - I clobbered the fixes that Justin pushed

* Fix typos in comments - I clobbered the fixes that Justin pushed

* Add support for native adapter listing

* Restyle fixes

* Update the init logic

* Do not auto-import GetAdapters. ble is a stand alone package for now

* Update typing

* Move iterator values to std::string and fix typo in linux impl

* Move Bluez files into a separate directory to be able to better split things

* Split out AdapterIterator from bluez

* Restyle fixes

* Remove adapteriterator from helper.h and only keep in adapteriterator.h

* Switch reinterpret cast to static cast
* Listen on all IPv4 interfaces (not only NULL interface ID) so that replies to queries can be sent with link local information as well

* Do a startup mDNS broadcast for available services - no filtering by interface/capability yet

* Ensure mdns advertise at boot only happens on interfaces that it is aware of

* Remove FIXME since it was already addressed

* Revise doc comment on boot time advertisement

* Add a constant for maximum interface name length

* Restyle fixes

* Fix LWIP interface name max size

* Increase LWIP max size some more, to support for 32bit interface numbers (even if unlikely)

* Update include file for zephyr interface name constant

* Deduplicate the detection of usable mdns interfaces

* Deduplicate ip addresses for global mdns broadcast

* Fix compilation

* Fix linkage too

* do not use pre-main initialization for mDNS broadcast IP addresses

* Fix typo: Trottle -> Throttle

* Fix typo: Trottle -> Throttle

* Add todo to have better local loopback detection for interfaces

* Log on IP parse error - we seem to crash in esp32 and am not sure why. Better to log instead of dying

* Fix condition inversion

* Fix logic error: IP address returns a bool not CHIP_ERROR
* Add network provisioning cluster xml

* Update cluster according to spec

* Add Network Provisioning Support in Controller

* Fix type

* Restyled by prettier-json

* Fix python type

* Update generated files

* Update xml

* Fix

* run gen

* Restyled by clang-format

* Restyled by prettier-json

* Provisioning -> Commissioning

* Update zap

* Regenerate files

* Create controller-clusters.zap

* Restyled by prettier-json

* fix

Co-authored-by: Restyled.io <[email protected]>
…lable (#4940)

* [cirque] Only build docker image when the image does not exists on dockerhub

* Update test warpper

* Add GITHUB_ACTION_RUN=1 for cirque bootstrap

* Update help text
…ions (#4832)

* Added documentation of features of CHIP device controller implementations.

Signed-off-by: Markus Becker <[email protected]>

* Restyled by prettier-markdown

* Set SetupCode Android to n.

Signed-off-by: Markus Becker <[email protected]>

* Address comments

NFC on iOS: y
Soft-AP on Android: n
WiFi-BLE on Android: y

Co-authored-by: Restyled.io <[email protected]>
* Integrate KVS with device session tables

* Fix some build failures

* Decouple code from platform header

* Split code from the header file to fix build issues

* Address review comments

* Rename SetDelegates to Init and check storage delegate
Problem
We do not have content launch cluster which is needed for Chip to launch content on TV

Summary of Changes
- Added content launcher cluster.xml file
- Added content launcher server.cpp file
- Updated example chip-tool so you can use content launcher cluster
- Updated example tv-app so you can use it a TV server for content launcher cluster
This fixes the following error reported by valgrind in lighting-app/linux:

==4071== Invalid read of size 2
==4071==    at 0x4851158: __GI_memcpy (in /usr/lib/aarch64-linux-gnu/valgrind/vgpreload_memcheck-arm64-linux.so)
==4071==    by 0x4CF0893: ??? (in /usr/lib/aarch64-linux-gnu/libgio-2.0.so.0.6600.1)
==4071==    by 0x4CF1E8B: ??? (in /usr/lib/aarch64-linux-gnu/libgio-2.0.so.0.6600.1)
==4071==    by 0x4CF1B2F: ??? (in /usr/lib/aarch64-linux-gnu/libgio-2.0.so.0.6600.1)
==4071==    by 0x4CF1BC7: ??? (in /usr/lib/aarch64-linux-gnu/libgio-2.0.so.0.6600.1)
==4071==    by 0x4CF1803: ??? (in /usr/lib/aarch64-linux-gnu/libgio-2.0.so.0.6600.1)
==4071==    by 0x4CF4D87: g_dbus_message_to_blob (in /usr/lib/aarch64-linux-gnu/libgio-2.0.so.0.6600.1)
==4071==    by 0x4CE7E1F: ??? (in /usr/lib/aarch64-linux-gnu/libgio-2.0.so.0.6600.1)
==4071==    by 0x4CEB5B3: g_dbus_connection_send_message (in /usr/lib/aarch64-linux-gnu/libgio-2.0.so.0.6600.1)
==4071==    by 0x4CEF7DF: g_dbus_connection_emit_signal (in /usr/lib/aarch64-linux-gnu/libgio-2.0.so.0.6600.1)
==4071==    by 0x1704F3: _bluez_gatt_characteristic1_emit_changed (DbusBluez.c:12485)
==4071==    by 0x4E909EF: g_main_context_dispatch (in /usr/lib/aarch64-linux-gnu/libglib-2.0.so.0.6600.1)
==4071==  Address 0x5a0df16 is 86 bytes inside a block of size 1,607 free'd
==4071==    at 0x484CF70: free (in /usr/lib/aarch64-linux-gnu/valgrind/vgpreload_memcheck-arm64-linux.so)
==4071==    by 0x12EA23: chip::Platform::MemoryFree(void*) (CHIPMem-Malloc.cpp:132)
==4071==    by 0x14B88B: chip::System::PacketBuffer::Free(chip::System::PacketBuffer*) (SystemPacketBuffer.cpp:545)
==4071==    by 0x127C33: chip::System::PacketBufferHandle::operator=(decltype(nullptr)) (SystemPacketBuffer.h:448)
==4071==    by 0x127BFB: chip::System::PacketBufferHandle::~PacketBufferHandle() (SystemPacketBuffer.h:425)
==4071==    by 0x139F2F: chip::DeviceLayer::Internal::UpdateAdditionalDataCharacteristic(_BluezGattCharacteristic1*) (Helper.cpp:1281)
==4071==    by 0x13A4FB: chip::DeviceLayer::Internal::BluezPeripheralObjectsSetup(void*) (Helper.cpp:1368)
==4071==    by 0x13A5FB: chip::DeviceLayer::Internal::BluezOnBusAcquired(_GDBusConnection*, char const*, void*) (Helper.cpp:1392)
==4071==    by 0x13A733: chip::DeviceLayer::Internal::BluezMainLoop(void*) (Helper.cpp:1427)
==4071==    by 0x486FF73: start_thread (pthread_create.c:463)
==4071==    by 0x523F3DB: thread_start (clone.S:78)
==4071==  Block was alloc'd at
==4071==    at 0x484BDDC: malloc (in /usr/lib/aarch64-linux-gnu/valgrind/vgpreload_memcheck-arm64-linux.so)
==4071==    by 0x12E997: chip::Platform::MemoryAlloc(unsigned long, bool) (CHIPMem-Malloc.cpp:112)
==4071==    by 0x12E96B: chip::Platform::MemoryAlloc(unsigned long) (CHIPMem-Malloc.cpp:106)
==4071==    by 0x14B5D7: chip::System::PacketBufferHandle::New(unsigned long, unsigned short) (SystemPacketBuffer.cpp:458)
==4071==    by 0x1458EF: chip::AdditionalDataPayloadGenerator::generateAdditionalDataPayload(unsigned short, char const*, unsigned long, chip::System::PacketBufferHandle&, chip::BitFlags<unsigned char, chip::AdditionalDataFields>) (AdditionalDataPayloadGenerator.cpp:56)
==4071==    by 0x139E43: chip::DeviceLayer::Internal::UpdateAdditionalDataCharacteristic(_BluezGattCharacteristic1*) (Helper.cpp:1297)
==4071==    by 0x13A4FB: chip::DeviceLayer::Internal::BluezPeripheralObjectsSetup(void*) (Helper.cpp:1368)
==4071==    by 0x13A5FB: chip::DeviceLayer::Internal::BluezOnBusAcquired(_GDBusConnection*, char const*, void*) (Helper.cpp:1392)
==4071==    by 0x13A733: chip::DeviceLayer::Internal::BluezMainLoop(void*) (Helper.cpp:1427)
==4071==    by 0x486FF73: start_thread (pthread_create.c:463)
==4071==    by 0x523F3DB: thread_start (clone.S:78)

We need to pass a pointer to the dup'd data in, not the original packet buffer.
* fix compilation issues from Logging.cpp;
* use directly the current OT stack and avoid forcing the user
to manually update the OT code.

Signed-off-by: Doru Gucea <[email protected]>
* Removed nodeid (local and remote) fromo PASE connection - PASE should have no concept of nodeids as at that time the nodes do not yet belong to the fabric

* Fix test suite compilation

* Cleanup some more node id logic

* Do not send an undefined key ID as part of the destination for secure message headers

* Updated todo a bit

* Update rendezvous session to keep using nodeid in messages for admininfo. Fixes cirque but now logic is highlighted as subject to change
* Initial qpg6100 lighting app

* Initial qpg6100 lighting app
* [Darwin] Add a  base NSObject for the various autogenerated CHIP*Cluster

* [Darwin] Update CHIP*Cluster APIs to return a (void) instead of a (BOOL)

* [Darwin] Use {{description}} for clusters in CHIPClustersObjc.h

* Get the Objc API clusters to inherit from a base CHIPCluster class
#### Problem

Stack overflow running `TestCSR_Gen()`
in `src/crypto/tests/CHIPCryptoPALTest.cpp`

#### Summary of Changes

Increase test task stack from 8K to 12K.

Fixes #2712 ChipCryptoTests are failing on esp32 qemu
* [python] Add command for Thread provisioning

Add a command for setting Thread settings to be used
during the device commissioning process. It is similar to
the existing "set-pairing-wifi-credential" command.

To commission a Thread device over Bluetooth LE, run the
following commands:
  $ ./chip-device-ctrl.py
  > set-pairing-thread-credential 15 1234 00112233445566778899aabbccddeeff
  > connect -ble 3840 12345678 12344321

* [python] Fix provisioning command help
This makes devices receive mdns queries (previously it would receive
only unicast).
* Integrate KVS with device session tables

* Fix some build failures

* Decouple code from platform header

* Split code from the header file to fix build issues

* Address review comments

* Rename SetDelegates to Init and check storage delegate

* Use New<> and Delete, instead of MemoryAlloc and Free for session object

* Fix link issues for Darwin and QPG6100

* Add stubs for K32W & cc13x2_26x2

Co-authored-by: Michael Spang <[email protected]>
Problem
The zap_generate_chip.sh script does not generate the files

Summary of Changes
- Edited the zap_generate_chip.sh and added the new line after change directory command
- Updated the controller.zap file and added content launch cluster as server
This broke after e76ed54 ("CC26X2X7 Initial support of BLE Rendezvous (#4865)")

ERROR at //config/cc13x2_26x2/toolchain/BUILD.gn:23:5: Unable to load "/home/spang/connectedhomeip2/examples/lock-app/cc13x2_26x2/args.gni".
    import("${chip_root}/examples/lock-app/cc13x2_26x2/args.gni")
    ^-----------------------------------------------------------
See //BUILD.gn:245:16: which caused the file to be included.
      deps = [ "${chip_root}/examples/lock-app/cc13x2_26x2(${chip_root}/config/cc13x2_26x2/toolchain:cc13x2_26x2_lock_app)" ]
               ^--------------------------------------------------------------------------------

Fix the build file to use the new paths.

Tested via
  gn gen out/unified --args="target_os=\"all\" enable_ti_simplelink_builds=true ti_simplelink_sdk_root=\"$HOME/ti/simplelink_cc13x2_26x2_sdk_4_40_05_02_eng\" ti_sysconfig_root=\"$HOME/ti/sysconfig_1.7.0\" enable_linux_bridge_app_build=false"
#### Problem

`Platform::New()` uses placment `new` into a possibly-null pointer.

#### Summary of Changes

Check it.

Fixes #4998 platform::New will crash or do other bad things on allocation failure
This path changed way back in 55d6a5f ("Move //gn/* to //* (#3070)").
Remove the directory portion.
…x. (#4960)

* Large squashed change for python scanning support.

Moved Bluez mainloop into a separate class
Moved blezl iterators into separate files
Added ble generic initialization and handle management
Switched bluez to use the newly developed scanner main loop.

* Remove dedup todo: code is not duplicated anymore

* Remove some fixmes for code that is unclear what next to implement

* Add errno.h include due to code using errno

* Added support for "runAndWait" in the ble main loop - that one seems to be very useful

* Update scanning to use blocking main scheduling for stopping , change library handle pointers to not use c_void_p directly. This looks stable on my linux machine (ran >100 scans)

* Use wait for scheduling bluez adapter initialization

* Code review comments: python docstrings, const on mContext

* Drop _t from callback types in python

* Do not use Ptr as a shortcut to std::unique_ptr

* Address code review: odd cleanup logic in main loop fixed

* Use semaphore to detect main loop running instead of pthread_yield

* Set main loop as started right away, since we thread-start and post for wait

* Restyle fixes

* Address code review comments

* Fix typo, use verify or die on context check in main loop

* Make it compile
…_t sizes. (#4997)

Compilers generate a constant for sizeof(), which converts cleanly to
whatever integer size we need as long as the constant is small enough.
Problems:
Need to align with IM encoding spec regarding naming

Summary of Changes
-- Rename related words following  ClusterId, DeltaUTCTimestamp, PriorityLevel, MoreChunkedMessages,SuppressResponse in spec
@hnnajh hnnajh merged commit 113723c into hnnajh:local-master Feb 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.