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

Some conversions to use PacketBufferHandle #3909

Merged
merged 10 commits into from
Nov 24, 2020

Conversation

kpschoedel
Copy link
Contributor

Problem

Code should use PacketBufferHandle rather than PacketBuffer *.

Summary of Changes

This PR focuses on converting various message-received functions'
arguments from PacketBuffer* to PacketBufferHandle, notably:

  • Rename PacketBufferHandle::Clone() to Retain() for clarity
  • Base::HandleMessageReceived() and associated types and impls
  • IPEndPointBasis::HandleDataReceived() and impls
  • Device::OnMessageReceived()
  • ChipDeviceController::OnMessage()
  • SecureSessionMgrDelegate::OnMessageReceived()
  • BleEndPoint::Receive() and related
  • SecurePairingSession::HandlePeerMessage()
  • RendezvousServer::OnRendezvousMessageReceived()
  • chip-tool command functions
  • ExchangeContext receive functions

Some arguments and variables are named with _ForNow to indicate that
they will be replaced in a future conversion step.

Part of issue #2707 - Figure out a way to express PacketBuffer ownership in the type system

#### Problem

Code should use `PacketBufferHandle` rather than `PacketBuffer *`.

#### Summary of Changes

This PR focuses on converting various message-received functions'
arguments from `PacketBuffer*` to `PacketBufferHandle`, notably:

- Rename `PacketBufferHandle::Clone()` to `Retain()` for clarity
- `Base::HandleMessageReceived()` and associated types and impls
- `IPEndPointBasis::HandleDataReceived()` and impls
- `Device::OnMessageReceived()`
- `ChipDeviceController::OnMessage()`
- `SecureSessionMgrDelegate::OnMessageReceived()`
- `BleEndPoint::Receive()` and related
- `SecurePairingSession::HandlePeerMessage()`
- `RendezvousServer::OnRendezvousMessageReceived()`
- `chip-tool` command functions
- `ExchangeContext` receive functions

Some arguments and variables are named with `_ForNow` to indicate that
they will be replaced in a future conversion step.

Part of issue project-chip#2707 - Figure out a way to express PacketBuffer ownership in the type system
{
System::PacketBuffer::Free(buffer);
}
exit:;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as we increasingly start having empty exit labels, I would propose to move to 'return' rather than 'gotol'. This will probably need to wait for #3880. Not for this PR, just thinking aloud (exit:; looks ugly).

@mspang
Copy link
Contributor

mspang commented Nov 19, 2020

What caused the size to increase?

@@ -932,7 +932,7 @@ class BarrierControlGoToPercent : public ModelCommand
ModelCommand::AddArguments();
}

uint16_t EncodeCommand(PacketBuffer * buffer, uint16_t bufferSize, uint8_t endPointId) override
uint16_t EncodeCommand(PacketBufferHandle buffer, uint16_t bufferSize, uint8_t endPointId) override
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This, and other EncodeCommand functions in this file, does not look right to me. They are not consuming the buffer; they are just borrowing it to write into, then the caller does something with it. So I'd think they should take const PacketBufferHandle &

@@ -95,7 +95,7 @@ bool ModelCommand::SendCommand(ChipDeviceController * dc)
ChipLogProgress(chipTool, "Endpoint id: '0x%02x', Cluster id: '0x%04x', Command id: '0x%02x'", mEndPointId, mClusterId,
mCommandId);

uint16_t dataLength = EncodeCommand(buffer.Get_ForNow(), bufferSize, mEndPointId);
uint16_t dataLength = EncodeCommand(buffer.Retain(), bufferSize, mEndPointId);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And then this would be EncodeCommand(buffer, bufferSize, mEndPointId);

@@ -132,7 +132,7 @@ BLE_ERROR BLEEndPoint::StartConnect()
req.SetSupportedProtocolVersion(i, CHIP_BLE_TRANSPORT_PROTOCOL_MAX_SUPPORTED_VERSION - i);
}

err = req.Encode(buf.Get_ForNow());
err = req.Encode(buf.Retain());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, this seems like it should pass a borrowed const ref.

One issue is that Encode() calls SetDataLength. I think fundamentally what should happen is that operator-> on a const PacketBufferHandle should return a non-const PacketBuffer. That is, the handle is const, so you can't change which object it holds. But you can still modify the state of the object... Thoughts?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this seems right; const PacketBufferHandle would be equivalent to a const std::xyz_ptr<T> vs being treated as const xyz_ptr<const T> as it is now.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that is exactly the right analogy.

@@ -1179,7 +1181,7 @@ BLE_ERROR BLEEndPoint::HandleCapabilitiesRequestReceived(PacketBuffer * data)
}
ChipLogProgress(Ble, "using BTP fragment sizes rx %d / tx %d.", mBtpEngine.GetRxFragmentSize(), mBtpEngine.GetTxFragmentSize());

err = resp.Encode(responseBuf.Get_ForNow());
err = resp.Encode(responseBuf.Retain());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And here, I suspect this can be a borrow.

@@ -1324,7 +1316,7 @@ BLE_ERROR BLEEndPoint::Receive(PacketBuffer * data)
VerifyOrExit(mState == kState_Connecting, err = BLE_ERROR_INCORRECT_STATE);
SetFlag(mConnStateFlags, kConnState_CapabilitiesMsgReceived, true);

err = HandleCapabilitiesResponseReceived(data);
err = HandleCapabilitiesResponseReceived(std::move(data));
data = nullptr;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't need this null assignment anymore.

break;

case State::kNetworkProvisioning:
err = HandleSecureMessage(msgBuf);
err = HandleSecureMessage(std::move(msgBuf));
break;

default:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And this used to leak on error...

{
CHIP_ERROR err = CHIP_NO_ERROR;
PacketHeader packetHeader;
uint16_t headerSize = 0;
System::PacketBufferHandle msg_ForNow;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks unused.

@@ -318,7 +318,7 @@ CHIP_ERROR TCPBase::SendAfterConnect(const PeerAddress & addr, System::PacketBuf
return err;
}

CHIP_ERROR TCPBase::ProcessSingleMessageFromBufferHead(const PeerAddress & peerAddress, System::PacketBuffer * buffer,
CHIP_ERROR TCPBase::ProcessSingleMessageFromBufferHead(const PeerAddress & peerAddress, System::PacketBufferHandle buffer,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one is not right. The caller wants to retain ownership of this buffer (hence the Retain below before calling HandleMessageReceived), so we should be taking a ref, not getting ownership transferred to us.

System::PacketBuffer * old = buffer;
buffer = old->DetachTail();
System::PacketBuffer::Free(old);
buffer.Adopt(buffer->DetachTail());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might want, in a followup, to add a method to PacketBufferHandle that encapsulates this "drop the head" pattern.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, there are a whole bunch of DetachTail and AddToEnd that I intend to cover later. Most of them are on the sending path, so I left it alone for this PR.

@@ -381,7 +377,7 @@ CHIP_ERROR TCPBase::ProcessReceivedBuffer(Inet::TCPEndPoint * endPoint, const Pe
// - there is no reason to believe that an error would not occur again on the
// same parameters (errors are likely not transient)
// - this guarantees data is received and progress is made.
err = ProcessSingleMessageFromBufferHead(peerAddress, buffer, messageSize);
err = ProcessSingleMessageFromBufferHead(peerAddress, buffer.Retain(), messageSize);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, ok, we're doing the extra Retain here to get the right semantics. I still think it would be clearer if callee took a reference instead.

@kpschoedel
Copy link
Contributor Author

What caused the size to increase?

Mostly passing PacketBufferHandles, at about 12 bytes each pair on ARM, plus destructing for 8. Maybe a later pass could change some to forwarding.

- `const PacketBufferHandle` does not imply `const PacketBuffer`;
  most Retains changed to pass by reference.
- Some leftover `p = nullptr` removed.
- Minor text fixes.
@@ -985,7 +986,9 @@ u8_t RawEndPoint::LwIPReceiveRawMessage(void * arg, struct raw_pcb * pcb, struct

if (enqueue)
{
pktInfo = GetPacketInfo(buf);
System::PacketBufferHandle buf_ForNow;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is wrong; buf is conditionally freed below.

Copy link
Contributor

@bzbarsky-apple bzbarsky-apple left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good with the one comment nit.

@@ -125,7 +125,8 @@ class DLL_EXPORT ExchangeContext : public ReferenceCounted<ExchangeContext, Exch
* @retval #CHIP_NO_ERROR if the CHIP layer successfully delivered the message up to the
* protocol layer.
*/
CHIP_ERROR HandleMessage(const PacketHeader & packetHeader, const PayloadHeader & payloadHeader, System::PacketBuffer * msgBuf);
CHIP_ERROR HandleMessage(const PacketHeader & packetHeader, const PayloadHeader & payloadHeader,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment for this function should change, though, since the function signature changed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I misunderstood you as suggesting that none should change because PacketBufferHandle counts as a pointer.

@github-actions
Copy link

Size increase report for "nrfconnect-example-build" from 0f45b74

File Section File VM
chip-shell.elf text 140 140
chip-shell.elf log_const_sections 4 4
chip-lock.elf text 288 288
chip-lighting.elf text 292 292
chip-lighting.elf shell_root_cmds_sections 12 12
Full report output
BLOAT REPORT

Files found only in the build output:
    report.csv

Comparing ./master_artifact/chip-shell.elf and ./pull_artifact/chip-shell.elf:

sections,vmsize,filesize
.debug_info,0,1611
.debug_line,0,1181
.debug_loc,0,404
.debug_ranges,0,368
.debug_abbrev,0,344
.debug_str,0,256
text,140,140
.debug_frame,0,92
.strtab,0,42
.debug_aranges,0,24
log_const_sections,4,4
.shstrtab,0,2

Comparing ./master_artifact/chip-lock.elf and ./pull_artifact/chip-lock.elf:

sections,vmsize,filesize
.debug_info,0,2456
.debug_line,0,1742
.debug_abbrev,0,618
.debug_ranges,0,520
.debug_str,0,351
text,288,288
.strtab,0,260
.debug_loc,0,253
.debug_frame,0,164
.debug_aranges,0,48
.symtab,0,32

Comparing ./master_artifact/chip-lighting.elf and ./pull_artifact/chip-lighting.elf:

sections,vmsize,filesize
.debug_info,0,2494
.debug_line,0,1740
.debug_abbrev,0,618
.debug_ranges,0,520
.debug_str,0,351
text,292,292
.strtab,0,260
.debug_loc,0,249
.debug_frame,0,164
.debug_aranges,0,48
.symtab,0,32
shell_root_cmds_sections,12,12


@github-actions
Copy link

Size increase report for "esp32-example-build" from 0f45b74

File Section File VM
chip-all-clusters-app.elf .flash.text 160 160
Full report output
BLOAT REPORT

Files found only in the build output:
    report.csv

Comparing ./master_artifact/chip-all-clusters-app.elf and ./pull_artifact/chip-all-clusters-app.elf:

sections,vmsize,filesize
.debug_info,0,5009
.debug_line,0,4014
.debug_loc,0,1770
.debug_ranges,0,1112
.debug_abbrev,0,981
.debug_str,0,179
.flash.text,160,160
.debug_frame,0,120
.strtab,0,84
.xt.prop._ZN4chip28SecurePairingUsingTestSecret17HandlePeerMessageERKNS_12PacketHeaderERKNS_9Transport11PeerAddressENS_6System18PacketBufferHandleE,0,76
.debug_aranges,0,40
.xt.lit._ZN4chip9Transport5TupleIJNS0_3UDPES2_EE11SendMessageERKNS_12PacketHeaderENS_8BitFlagsItNS_6Header10FlagValuesEEERKNS0_11PeerAddressEPNS_6System12PacketBufferE,0,40
.xt.prop._ZN4chip9Transport3UDP13CanSendToPeerERKNS0_11PeerAddressE,0,40
.shstrtab,0,4
.xt.prop._ZN4chip8Encoding12LittleEndian7Write32ERPhj,0,-1
.xt.prop._ZN4chip28SecurePairingUsingTestSecret17HandlePeerMessageERKNS_12PacketHeaderERKNS_9Transport11PeerAddressEPNS_6System12PacketBufferE,0,-76
.xt.prop._ZN4chip8BufBound3PutEPKvj,0,-80


@BroderickCarlin BroderickCarlin merged commit f54b925 into project-chip:master Nov 24, 2020
@kpschoedel kpschoedel deleted the x2707-02-receive branch November 24, 2020 19:35
vivien-apple added a commit to vivien-apple/connectedhomeip-1 that referenced this pull request Nov 25, 2020
…em::PacketBuffer *' to 'System::PacketBufferHandle' in src/platform/Darwin/BleConnectionDelegateImpl.mm
kpschoedel added a commit to kpschoedel/connectedhomeip that referenced this pull request Nov 25, 2020
#### Problem

Some conversions to use PacketBufferHandle (project-chip#3909) broke Darwin builds,
which aren't currently run in CI.

#### Summary of Changes

Fix src/platform/Darwin/BleConnectionDelegateImpl.mm to match the API
change in project-chip#3909.
andy31415 pushed a commit that referenced this pull request Nov 25, 2020
#### Problem

Some conversions to use PacketBufferHandle (#3909) broke Darwin builds,
which aren't currently run in CI.

#### Summary of Changes

Fix src/platform/Darwin/BleConnectionDelegateImpl.mm to match the API
change in #3909.
hnnajh pushed a commit to hnnajh/connectedhomeip that referenced this pull request Dec 10, 2020
#### Problem

Some conversions to use PacketBufferHandle (project-chip#3909) broke Darwin builds,
which aren't currently run in CI.

#### Summary of Changes

Fix src/platform/Darwin/BleConnectionDelegateImpl.mm to match the API
change in project-chip#3909.
chrisdecenzo pushed a commit that referenced this pull request Jan 6, 2021
* RotatingId: version0

* RotatingId: version1

* RotatingId: version0

* RotatingId: version1

* Fix Darwin host build (#3990)

#### Problem

Some conversions to use PacketBufferHandle (#3909) broke Darwin builds,
which aren't currently run in CI.

#### Summary of Changes

Fix src/platform/Darwin/BleConnectionDelegateImpl.mm to match the API
change in #3909.

* Add '-Wextra' to compiler flags (#3902)

* Implement Level Control Cluster (#3806)

* New seekbar in Android CHIPTool
* Sample usage in lighting-app/nrfconnect

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

* Fix Rendezvous over BLE after recent changes (#4012)

PR #3704 introduced a change that the BLE transport in
RendezvousSession is only initialized when PeerAddress
in RendezvousParams is of type BLE. However, PeerAddress
isn't initialized anywhere. As a result Rendezvous over BLE
stopped working between Android CHIPTool and accessories.

Btw, remove an assert related to the storage delegate
as it seems an optional member of the device controller.

* [thread] fix invalid configuration of active dataset (#4008)

* Fix data loss or crash in TCPEndPoint with LwIP (#4022)

* Fix data loss or crash in TCPEndPoint with LwIP

#### Problem

Under the configuration CHIP_SYSTEM_CONFIG_USE_LWIP, in some cases where
the data size exceeds the TCP window size, TCPEndPoint can either die or
lose data when accounting of un-acked data falls out of sync.

#### Summary of Changes

Imported fix from Weave:

* This change removes separate accounting of the unsent
  data position and replaces it with simple counting of
  sent-but-not-acked data and a skip-loop at the start
  of DriveSending().

Fixes #4013 - Data loss or crash in TCPEndPoint with LwIP

* Restyled by clang-format

Co-authored-by: Restyled.io <[email protected]>

* Update lighting-app gen/ folder with ZAP generated content (#4010)

* Fix segmentation fault error in response echo message (#3984)

* Add back Android default build coverage & fix the build (#3966)

mDNS doesn't build with no device layer. Remove it from the build and
add back the coverage that would catch this that was lost in #3340.

* Update all-clusters-app gen/ folder with ZAP generated content (#3963)

* Move src/inet/tests to auto-test-driver generation (#3997)

* Rename TestUtils to UnitTestRegistration. (#4021)

Looking to remove usage of 'Utils' unless we have really no choice.
'UnitTestRegistration' seems clearer in what it does compared to
'TestUtils'.

* Update src/lib/core/tests to auto-test-driver generation (#3991)

* Cleanup zap chip-helper.js (#3973)

* Cleanup zap chip-helper.js

* Restyled by clang-format

Co-authored-by: Restyled.io <[email protected]>

* Move src/transport/tests to auto-test-driver generation (#3999)

* Move src/transport/tests to auto-test-driver generation

* Add relevant libraries (and more test-capable libs) to nrf.

* Refactor inet test helpers (to not include actual inet tests), try to make qemu allow better linkage but still failed for transport tests so disabled for now

* Added more tests on esp32 qemu

* Restyle fixes

* Fix cast errors in InetCommon

* Disable raw tests from zephyr: somehow they fail running out of endpoints

* Disable DNS test on zephyr

* Remove inet endpoint test from zephyr

* Remove inet endpoint test from zephyr - fix again

* Modify gitignore

* Restyle fixes

* Use CHIPDeviceController instead of CHIPDeviceController_deprecated (#3979)

* Implement the missing part of Exchange Header in Transport layer (#4017)

* Implement the missing part of Exchange Header in Transport layer

* Revert comment 'if' back to 'iff'("if and only if")

* Remove duplicated send flag defines and put ExchangeMgr/ExchangeConte… (#3994)

* Remove duplicated send flag defines and put ExchangeMgr/ExchangeContext under the same namespace as CRMP

* Rename kSendFlag_Default to kSendFlag_None

* Move src/lib/asn1/tests and src/ble/tests to auto-test-driver generation (#3998)

* Move src/lib/asn1/tests and src/ble/tests to auto-test-driver generation

* Remove one more unused file

* Attempt to enable asn1 and ble tests in esp32 - see if they pass or not

* Fix merge error

* Update include header for ASN1 test

* Include  ASN1 in libCHIP

* Some conversions to use PacketBufferHandle (#4011)

* Some conversions to use PacketBufferHandle

#### Problem

Code should use `PacketBufferHandle` rather than `PacketBuffer *`.

#### Summary of Changes

- Converts remaining receive path in //src/inet and //src/transport.
- Converts most of //src/ble.
- Introduces Handle versions of the `AddToEnd`/`DetachTail` pair.

Part of issue #2707 - Figure out a way to express PacketBuffer ownership in the type system

* Restyled by clang-format

* review

* revive BtpEngine::Clear[TR]xPacket()
* simplify conditional
* (void) message.DetachTail() → message.FreeHead()
* remove ExchangeContext::kSendFlag_RetainBuffer
* missed pBuf.IsNull()
* DetachHead() → PopTail()
* typos

Co-authored-by: Restyled.io <[email protected]>

* Move src/system/tests to auto-test-driver generation (#4000)

* Move src/system/tests to auto-test-driver generation

* Remove a TCP/IP init call that was killing qemu

* Remove explicit "all" target from root build file (#3967)

The "all" target exists implicitly and contains everything. We don't
need to specify one, and it's misleading to do so specifying deps has no
effect.

* Make src/setup_payload compile with -Werror=conversion (#4032)

* Add SSID and password to chip-tool pairing (#4054)

* Get temperature-measurement and all-clusters-app to use examples/common/chip-app-server (#4039)

#### Problem

PR #3704 introduced a change where a `PeerAddress` is now required in order to start `RendezvousSession`.
Sadly the multiple code paths bootstrapping `RendezvousSession` has not been updated.

PR #4012 add a fix for some of the `examples/` but not for the `all-clusters-app` nor the `temperature-measurement-app`.

To avoid such situation, this PR merge `examples/common/chip-app-server` and the custom code from `all-clusters-app` and `temperature-measurement-app`.

One of the more discutable change of this PR (imo) is the code that moves the custom `Echo` mechanism from the `all-clusters-app` to `chip-app-server`. I was hoping to get rid of it before doing this change but the `all-clusters-app` and the `temperature-measurement-app` are broken since #3704 and this PR should fix that.
Also I have a PR (mostly) ready once #3979 lands to get rid of this `Echo` specific code and replace it by a manufacturer specific `ping` command.

 #### Summary of Changes
 * Remove `EchoServer.cpp`, `RendezvousDeviceDelegate.cpp` and `include/RendezvousDeviceDelegate.h` from `all-clusters-app`
 * Remove `ResponseServer.cpp`, `RendezvousDeviceDelegate.cpp` and `include/RendezvousDeviceDelegate.h` from `temperature-measurement-app`
 * Introduce `chip-app-server/include/AppDelegate.h` in order to keep the behavior the `all-clusters-app` that turns on/off leds on different events. Maybe it should be converted to some types of `ChipDeviceEvent` or `CHIPCallback` at some point.
 * Fix `chip-app-server` to accomodate for the specifics of `all-clusters-app`

* Add all Thread ULA addresses to the lwip interface (#4053)

ULA prefixes will used for CHIP network so we need to add all these
addresses to the interface.

* Remove src/lib/message. (#4055)

* Remove src/lib/message.

Updated messaging implementation lives in src/messaging and the
src/lib/message is not currently compiled or linked in.

This saves us from looking at this code when some refactoring is needed
(e.g. the SystemPacketBuffer changes).

* Remove one more unused file

* [ChipTool] Add Payload Parse Command (#3696)

* [ChipTool] Add Payload Parse Command

* [ChipTool] Add Payload Parse Command

* [ChipTool] Restyle issues resolved

* Restyled by whitespace

* Resolve build errors caused by Command.h schema change

Co-authored-by: lijayaku <[email protected]>
Co-authored-by: Restyled.io <[email protected]>

* rename ParseCommand to QRCodeParseCommand

* adding AdditionalDataParseCommand version 0

* Adding parsing logic + logging

* adding another parsing method

* Basic Parsing is DONE

* fixing memory issue

* removing some logs

* removing more logs

* minor update

* Add RotatingDeviceId to DNS-SD

* fix compilation problem

* fix minor diffs

* cleanup rotating id in ble

* fix dns

* nits

* fix compilation

* Revert "fix minor diffs"

This reverts commit 88fb69c.

* nits

* nit fixes

* update allocation

* update allocation

* refactoring

* revert settings.json

* fix styling

* Update README file

* adding a build flag to bypass advertising the additional data field

* fix styling

* fixing README style

* Fixing nits + added description about the additional data

* fixed minor comment

* remove ParseCommand

* removing unused headers + nits

* Fixing Additional data TLV Tags

* Fix Styling

* removed unnecessary logging tag

* fixing writing rotating id

* fixing minor styles

* adding check for rotating id tag

* restyling

* update AdditionalDataPayloadParser to work on vector of bytes

* restyling

* Nit fix

* Renaming QRCode command to SetupPayload command

* update parse command for additional data

* change compile flags

* update some comments

* fixing parsing/generating the additional data payload

* changing the additional parser APIs

* restyling

* reverting pigweed repo changes

* rename CHIP_ENABLE_ADDITIONAL_ADVERTISING

* removing logging tag

* adding extra validation in parser

* adding docs to the additional data payload parser

* Update ReadME.md

Co-authored-by: Kevin Schoedel <[email protected]>
Co-authored-by: Vivien Nicolas <[email protected]>
Co-authored-by: Markus Becker <[email protected]>
Co-authored-by: Damian Królik <[email protected]>
Co-authored-by: Łukasz Duda <[email protected]>
Co-authored-by: Restyled.io <[email protected]>
Co-authored-by: Yufeng Wang <[email protected]>
Co-authored-by: Michael Spang <[email protected]>
Co-authored-by: Andrei Litvin <[email protected]>
Co-authored-by: jepenven-silabs <[email protected]>
Co-authored-by: Boris Zbarsky <[email protected]>
Co-authored-by: Jiacheng Guo <[email protected]>
Co-authored-by: Liju Jayakumar <[email protected]>
Co-authored-by: lijayaku <[email protected]>
kpschoedel added a commit to kpschoedel/connectedhomeip that referenced this pull request Jan 8, 2021
* RotatingId: version0

* RotatingId: version1

* RotatingId: version0

* RotatingId: version1

* Fix Darwin host build (project-chip#3990)

#### Problem

Some conversions to use PacketBufferHandle (project-chip#3909) broke Darwin builds,
which aren't currently run in CI.

#### Summary of Changes

Fix src/platform/Darwin/BleConnectionDelegateImpl.mm to match the API
change in project-chip#3909.

* Add '-Wextra' to compiler flags (project-chip#3902)

* Implement Level Control Cluster (project-chip#3806)

* New seekbar in Android CHIPTool
* Sample usage in lighting-app/nrfconnect

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

* Fix Rendezvous over BLE after recent changes (project-chip#4012)

PR project-chip#3704 introduced a change that the BLE transport in
RendezvousSession is only initialized when PeerAddress
in RendezvousParams is of type BLE. However, PeerAddress
isn't initialized anywhere. As a result Rendezvous over BLE
stopped working between Android CHIPTool and accessories.

Btw, remove an assert related to the storage delegate
as it seems an optional member of the device controller.

* [thread] fix invalid configuration of active dataset (project-chip#4008)

* Fix data loss or crash in TCPEndPoint with LwIP (project-chip#4022)

* Fix data loss or crash in TCPEndPoint with LwIP

#### Problem

Under the configuration CHIP_SYSTEM_CONFIG_USE_LWIP, in some cases where
the data size exceeds the TCP window size, TCPEndPoint can either die or
lose data when accounting of un-acked data falls out of sync.

#### Summary of Changes

Imported fix from Weave:

* This change removes separate accounting of the unsent
  data position and replaces it with simple counting of
  sent-but-not-acked data and a skip-loop at the start
  of DriveSending().

Fixes project-chip#4013 - Data loss or crash in TCPEndPoint with LwIP

* Restyled by clang-format

Co-authored-by: Restyled.io <[email protected]>

* Update lighting-app gen/ folder with ZAP generated content (project-chip#4010)

* Fix segmentation fault error in response echo message (project-chip#3984)

* Add back Android default build coverage & fix the build (project-chip#3966)

mDNS doesn't build with no device layer. Remove it from the build and
add back the coverage that would catch this that was lost in project-chip#3340.

* Update all-clusters-app gen/ folder with ZAP generated content (project-chip#3963)

* Move src/inet/tests to auto-test-driver generation (project-chip#3997)

* Rename TestUtils to UnitTestRegistration. (project-chip#4021)

Looking to remove usage of 'Utils' unless we have really no choice.
'UnitTestRegistration' seems clearer in what it does compared to
'TestUtils'.

* Update src/lib/core/tests to auto-test-driver generation (project-chip#3991)

* Cleanup zap chip-helper.js (project-chip#3973)

* Cleanup zap chip-helper.js

* Restyled by clang-format

Co-authored-by: Restyled.io <[email protected]>

* Move src/transport/tests to auto-test-driver generation (project-chip#3999)

* Move src/transport/tests to auto-test-driver generation

* Add relevant libraries (and more test-capable libs) to nrf.

* Refactor inet test helpers (to not include actual inet tests), try to make qemu allow better linkage but still failed for transport tests so disabled for now

* Added more tests on esp32 qemu

* Restyle fixes

* Fix cast errors in InetCommon

* Disable raw tests from zephyr: somehow they fail running out of endpoints

* Disable DNS test on zephyr

* Remove inet endpoint test from zephyr

* Remove inet endpoint test from zephyr - fix again

* Modify gitignore

* Restyle fixes

* Use CHIPDeviceController instead of CHIPDeviceController_deprecated (project-chip#3979)

* Implement the missing part of Exchange Header in Transport layer (project-chip#4017)

* Implement the missing part of Exchange Header in Transport layer

* Revert comment 'if' back to 'iff'("if and only if")

* Remove duplicated send flag defines and put ExchangeMgr/ExchangeConte… (project-chip#3994)

* Remove duplicated send flag defines and put ExchangeMgr/ExchangeContext under the same namespace as CRMP

* Rename kSendFlag_Default to kSendFlag_None

* Move src/lib/asn1/tests and src/ble/tests to auto-test-driver generation (project-chip#3998)

* Move src/lib/asn1/tests and src/ble/tests to auto-test-driver generation

* Remove one more unused file

* Attempt to enable asn1 and ble tests in esp32 - see if they pass or not

* Fix merge error

* Update include header for ASN1 test

* Include  ASN1 in libCHIP

* Some conversions to use PacketBufferHandle (project-chip#4011)

* Some conversions to use PacketBufferHandle

#### Problem

Code should use `PacketBufferHandle` rather than `PacketBuffer *`.

#### Summary of Changes

- Converts remaining receive path in //src/inet and //src/transport.
- Converts most of //src/ble.
- Introduces Handle versions of the `AddToEnd`/`DetachTail` pair.

Part of issue project-chip#2707 - Figure out a way to express PacketBuffer ownership in the type system

* Restyled by clang-format

* review

* revive BtpEngine::Clear[TR]xPacket()
* simplify conditional
* (void) message.DetachTail() → message.FreeHead()
* remove ExchangeContext::kSendFlag_RetainBuffer
* missed pBuf.IsNull()
* DetachHead() → PopTail()
* typos

Co-authored-by: Restyled.io <[email protected]>

* Move src/system/tests to auto-test-driver generation (project-chip#4000)

* Move src/system/tests to auto-test-driver generation

* Remove a TCP/IP init call that was killing qemu

* Remove explicit "all" target from root build file (project-chip#3967)

The "all" target exists implicitly and contains everything. We don't
need to specify one, and it's misleading to do so specifying deps has no
effect.

* Make src/setup_payload compile with -Werror=conversion (project-chip#4032)

* Add SSID and password to chip-tool pairing (project-chip#4054)

* Get temperature-measurement and all-clusters-app to use examples/common/chip-app-server (project-chip#4039)

#### Problem

PR project-chip#3704 introduced a change where a `PeerAddress` is now required in order to start `RendezvousSession`.
Sadly the multiple code paths bootstrapping `RendezvousSession` has not been updated.

PR project-chip#4012 add a fix for some of the `examples/` but not for the `all-clusters-app` nor the `temperature-measurement-app`.

To avoid such situation, this PR merge `examples/common/chip-app-server` and the custom code from `all-clusters-app` and `temperature-measurement-app`.

One of the more discutable change of this PR (imo) is the code that moves the custom `Echo` mechanism from the `all-clusters-app` to `chip-app-server`. I was hoping to get rid of it before doing this change but the `all-clusters-app` and the `temperature-measurement-app` are broken since project-chip#3704 and this PR should fix that.
Also I have a PR (mostly) ready once project-chip#3979 lands to get rid of this `Echo` specific code and replace it by a manufacturer specific `ping` command.

 #### Summary of Changes
 * Remove `EchoServer.cpp`, `RendezvousDeviceDelegate.cpp` and `include/RendezvousDeviceDelegate.h` from `all-clusters-app`
 * Remove `ResponseServer.cpp`, `RendezvousDeviceDelegate.cpp` and `include/RendezvousDeviceDelegate.h` from `temperature-measurement-app`
 * Introduce `chip-app-server/include/AppDelegate.h` in order to keep the behavior the `all-clusters-app` that turns on/off leds on different events. Maybe it should be converted to some types of `ChipDeviceEvent` or `CHIPCallback` at some point.
 * Fix `chip-app-server` to accomodate for the specifics of `all-clusters-app`

* Add all Thread ULA addresses to the lwip interface (project-chip#4053)

ULA prefixes will used for CHIP network so we need to add all these
addresses to the interface.

* Remove src/lib/message. (project-chip#4055)

* Remove src/lib/message.

Updated messaging implementation lives in src/messaging and the
src/lib/message is not currently compiled or linked in.

This saves us from looking at this code when some refactoring is needed
(e.g. the SystemPacketBuffer changes).

* Remove one more unused file

* [ChipTool] Add Payload Parse Command (project-chip#3696)

* [ChipTool] Add Payload Parse Command

* [ChipTool] Add Payload Parse Command

* [ChipTool] Restyle issues resolved

* Restyled by whitespace

* Resolve build errors caused by Command.h schema change

Co-authored-by: lijayaku <[email protected]>
Co-authored-by: Restyled.io <[email protected]>

* rename ParseCommand to QRCodeParseCommand

* adding AdditionalDataParseCommand version 0

* Adding parsing logic + logging

* adding another parsing method

* Basic Parsing is DONE

* fixing memory issue

* removing some logs

* removing more logs

* minor update

* Add RotatingDeviceId to DNS-SD

* fix compilation problem

* fix minor diffs

* cleanup rotating id in ble

* fix dns

* nits

* fix compilation

* Revert "fix minor diffs"

This reverts commit 88fb69c.

* nits

* nit fixes

* update allocation

* update allocation

* refactoring

* revert settings.json

* fix styling

* Update README file

* adding a build flag to bypass advertising the additional data field

* fix styling

* fixing README style

* Fixing nits + added description about the additional data

* fixed minor comment

* remove ParseCommand

* removing unused headers + nits

* Fixing Additional data TLV Tags

* Fix Styling

* removed unnecessary logging tag

* fixing writing rotating id

* fixing minor styles

* adding check for rotating id tag

* restyling

* update AdditionalDataPayloadParser to work on vector of bytes

* restyling

* Nit fix

* Renaming QRCode command to SetupPayload command

* update parse command for additional data

* change compile flags

* update some comments

* fixing parsing/generating the additional data payload

* changing the additional parser APIs

* restyling

* reverting pigweed repo changes

* rename CHIP_ENABLE_ADDITIONAL_ADVERTISING

* removing logging tag

* adding extra validation in parser

* adding docs to the additional data payload parser

* Update ReadME.md

Co-authored-by: Kevin Schoedel <[email protected]>
Co-authored-by: Vivien Nicolas <[email protected]>
Co-authored-by: Markus Becker <[email protected]>
Co-authored-by: Damian Królik <[email protected]>
Co-authored-by: Łukasz Duda <[email protected]>
Co-authored-by: Restyled.io <[email protected]>
Co-authored-by: Yufeng Wang <[email protected]>
Co-authored-by: Michael Spang <[email protected]>
Co-authored-by: Andrei Litvin <[email protected]>
Co-authored-by: jepenven-silabs <[email protected]>
Co-authored-by: Boris Zbarsky <[email protected]>
Co-authored-by: Jiacheng Guo <[email protected]>
Co-authored-by: Liju Jayakumar <[email protected]>
Co-authored-by: lijayaku <[email protected]>
woody-apple pushed a commit that referenced this pull request Sep 17, 2021
…aligned with the spec (#9455)

* RotatingId: version0

* RotatingId: version1

* RotatingId: version0

* RotatingId: version1

* Fix Darwin host build (#3990)

#### Problem

Some conversions to use PacketBufferHandle (#3909) broke Darwin builds,
which aren't currently run in CI.

#### Summary of Changes

Fix src/platform/Darwin/BleConnectionDelegateImpl.mm to match the API
change in #3909.

* Add '-Wextra' to compiler flags (#3902)

* Implement Level Control Cluster (#3806)

* New seekbar in Android CHIPTool
* Sample usage in lighting-app/nrfconnect

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

* Fix Rendezvous over BLE after recent changes (#4012)

PR #3704 introduced a change that the BLE transport in
RendezvousSession is only initialized when PeerAddress
in RendezvousParams is of type BLE. However, PeerAddress
isn't initialized anywhere. As a result Rendezvous over BLE
stopped working between Android CHIPTool and accessories.

Btw, remove an assert related to the storage delegate
as it seems an optional member of the device controller.

* [thread] fix invalid configuration of active dataset (#4008)

* Fix data loss or crash in TCPEndPoint with LwIP (#4022)

* Fix data loss or crash in TCPEndPoint with LwIP

#### Problem

Under the configuration CHIP_SYSTEM_CONFIG_USE_LWIP, in some cases where
the data size exceeds the TCP window size, TCPEndPoint can either die or
lose data when accounting of un-acked data falls out of sync.

#### Summary of Changes

Imported fix from Weave:

* This change removes separate accounting of the unsent
  data position and replaces it with simple counting of
  sent-but-not-acked data and a skip-loop at the start
  of DriveSending().

Fixes #4013 - Data loss or crash in TCPEndPoint with LwIP

* Restyled by clang-format

Co-authored-by: Restyled.io <[email protected]>

* Update lighting-app gen/ folder with ZAP generated content (#4010)

* Fix segmentation fault error in response echo message (#3984)

* Add back Android default build coverage & fix the build (#3966)

mDNS doesn't build with no device layer. Remove it from the build and
add back the coverage that would catch this that was lost in #3340.

* Update all-clusters-app gen/ folder with ZAP generated content (#3963)

* Move src/inet/tests to auto-test-driver generation (#3997)

* Rename TestUtils to UnitTestRegistration. (#4021)

Looking to remove usage of 'Utils' unless we have really no choice.
'UnitTestRegistration' seems clearer in what it does compared to
'TestUtils'.

* Update src/lib/core/tests to auto-test-driver generation (#3991)

* Cleanup zap chip-helper.js (#3973)

* Cleanup zap chip-helper.js

* Restyled by clang-format

Co-authored-by: Restyled.io <[email protected]>

* Move src/transport/tests to auto-test-driver generation (#3999)

* Move src/transport/tests to auto-test-driver generation

* Add relevant libraries (and more test-capable libs) to nrf.

* Refactor inet test helpers (to not include actual inet tests), try to make qemu allow better linkage but still failed for transport tests so disabled for now

* Added more tests on esp32 qemu

* Restyle fixes

* Fix cast errors in InetCommon

* Disable raw tests from zephyr: somehow they fail running out of endpoints

* Disable DNS test on zephyr

* Remove inet endpoint test from zephyr

* Remove inet endpoint test from zephyr - fix again

* Modify gitignore

* Restyle fixes

* Use CHIPDeviceController instead of CHIPDeviceController_deprecated (#3979)

* Implement the missing part of Exchange Header in Transport layer (#4017)

* Implement the missing part of Exchange Header in Transport layer

* Revert comment 'if' back to 'iff'("if and only if")

* Remove duplicated send flag defines and put ExchangeMgr/ExchangeConte… (#3994)

* Remove duplicated send flag defines and put ExchangeMgr/ExchangeContext under the same namespace as CRMP

* Rename kSendFlag_Default to kSendFlag_None

* Move src/lib/asn1/tests and src/ble/tests to auto-test-driver generation (#3998)

* Move src/lib/asn1/tests and src/ble/tests to auto-test-driver generation

* Remove one more unused file

* Attempt to enable asn1 and ble tests in esp32 - see if they pass or not

* Fix merge error

* Update include header for ASN1 test

* Include  ASN1 in libCHIP

* Some conversions to use PacketBufferHandle (#4011)

* Some conversions to use PacketBufferHandle

#### Problem

Code should use `PacketBufferHandle` rather than `PacketBuffer *`.

#### Summary of Changes

- Converts remaining receive path in //src/inet and //src/transport.
- Converts most of //src/ble.
- Introduces Handle versions of the `AddToEnd`/`DetachTail` pair.

Part of issue #2707 - Figure out a way to express PacketBuffer ownership in the type system

* Restyled by clang-format

* review

* revive BtpEngine::Clear[TR]xPacket()
* simplify conditional
* (void) message.DetachTail() → message.FreeHead()
* remove ExchangeContext::kSendFlag_RetainBuffer
* missed pBuf.IsNull()
* DetachHead() → PopTail()
* typos

Co-authored-by: Restyled.io <[email protected]>

* Move src/system/tests to auto-test-driver generation (#4000)

* Move src/system/tests to auto-test-driver generation

* Remove a TCP/IP init call that was killing qemu

* Remove explicit "all" target from root build file (#3967)

The "all" target exists implicitly and contains everything. We don't
need to specify one, and it's misleading to do so specifying deps has no
effect.

* Make src/setup_payload compile with -Werror=conversion (#4032)

* Add SSID and password to chip-tool pairing (#4054)

* Get temperature-measurement and all-clusters-app to use examples/common/chip-app-server (#4039)

#### Problem

PR #3704 introduced a change where a `PeerAddress` is now required in order to start `RendezvousSession`.
Sadly the multiple code paths bootstrapping `RendezvousSession` has not been updated.

PR #4012 add a fix for some of the `examples/` but not for the `all-clusters-app` nor the `temperature-measurement-app`.

To avoid such situation, this PR merge `examples/common/chip-app-server` and the custom code from `all-clusters-app` and `temperature-measurement-app`.

One of the more discutable change of this PR (imo) is the code that moves the custom `Echo` mechanism from the `all-clusters-app` to `chip-app-server`. I was hoping to get rid of it before doing this change but the `all-clusters-app` and the `temperature-measurement-app` are broken since #3704 and this PR should fix that.
Also I have a PR (mostly) ready once #3979 lands to get rid of this `Echo` specific code and replace it by a manufacturer specific `ping` command.

 #### Summary of Changes
 * Remove `EchoServer.cpp`, `RendezvousDeviceDelegate.cpp` and `include/RendezvousDeviceDelegate.h` from `all-clusters-app`
 * Remove `ResponseServer.cpp`, `RendezvousDeviceDelegate.cpp` and `include/RendezvousDeviceDelegate.h` from `temperature-measurement-app`
 * Introduce `chip-app-server/include/AppDelegate.h` in order to keep the behavior the `all-clusters-app` that turns on/off leds on different events. Maybe it should be converted to some types of `ChipDeviceEvent` or `CHIPCallback` at some point.
 * Fix `chip-app-server` to accomodate for the specifics of `all-clusters-app`

* Add all Thread ULA addresses to the lwip interface (#4053)

ULA prefixes will used for CHIP network so we need to add all these
addresses to the interface.

* Remove src/lib/message. (#4055)

* Remove src/lib/message.

Updated messaging implementation lives in src/messaging and the
src/lib/message is not currently compiled or linked in.

This saves us from looking at this code when some refactoring is needed
(e.g. the SystemPacketBuffer changes).

* Remove one more unused file

* [ChipTool] Add Payload Parse Command (#3696)

* [ChipTool] Add Payload Parse Command

* [ChipTool] Add Payload Parse Command

* [ChipTool] Restyle issues resolved

* Restyled by whitespace

* Resolve build errors caused by Command.h schema change

Co-authored-by: lijayaku <[email protected]>
Co-authored-by: Restyled.io <[email protected]>

* rename ParseCommand to QRCodeParseCommand

* adding AdditionalDataParseCommand version 0

* Adding parsing logic + logging

* adding another parsing method

* Basic Parsing is DONE

* fixing memory issue

* removing some logs

* removing more logs

* minor update

* Add RotatingDeviceId to DNS-SD

* Revert "Merge pull request #4 from hnnajh/rotating-id-test"

This reverts commit 0235d05, reversing
changes made to 3e1a4b9.

* Storing RI in Octet String + Adding Binary format for BLE

* Fixing rotating id parser + adding unittests

* restyling

* refactoring rotating id unit tests

* Added more unit tests for Rotating Device Id

* updated styling

* refactor RI tests

* Added RI Unittest + more validation

* applying restyling

* Fix CI

* update styling

* Fix CI

* Update Styling

* Fix CI

* Restyling

* Fixing nits

* Using MutableByteSpan in RI generation

* Fixing nits

Co-authored-by: Kevin Schoedel <[email protected]>
Co-authored-by: Vivien Nicolas <[email protected]>
Co-authored-by: Markus Becker <[email protected]>
Co-authored-by: Damian Królik <[email protected]>
Co-authored-by: Łukasz Duda <[email protected]>
Co-authored-by: Restyled.io <[email protected]>
Co-authored-by: Yufeng Wang <[email protected]>
Co-authored-by: Michael Spang <[email protected]>
Co-authored-by: Andrei Litvin <[email protected]>
Co-authored-by: jepenven-silabs <[email protected]>
Co-authored-by: Boris Zbarsky <[email protected]>
Co-authored-by: Jiacheng Guo <[email protected]>
Co-authored-by: Liju Jayakumar <[email protected]>
Co-authored-by: lijayaku <[email protected]>
mleisner pushed a commit to mleisner/connectedhomeip that referenced this pull request Sep 20, 2021
…aligned with the spec (project-chip#9455)

* RotatingId: version0

* RotatingId: version1

* RotatingId: version0

* RotatingId: version1

* Fix Darwin host build (project-chip#3990)

#### Problem

Some conversions to use PacketBufferHandle (project-chip#3909) broke Darwin builds,
which aren't currently run in CI.

#### Summary of Changes

Fix src/platform/Darwin/BleConnectionDelegateImpl.mm to match the API
change in project-chip#3909.

* Add '-Wextra' to compiler flags (project-chip#3902)

* Implement Level Control Cluster (project-chip#3806)

* New seekbar in Android CHIPTool
* Sample usage in lighting-app/nrfconnect

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

* Fix Rendezvous over BLE after recent changes (project-chip#4012)

PR project-chip#3704 introduced a change that the BLE transport in
RendezvousSession is only initialized when PeerAddress
in RendezvousParams is of type BLE. However, PeerAddress
isn't initialized anywhere. As a result Rendezvous over BLE
stopped working between Android CHIPTool and accessories.

Btw, remove an assert related to the storage delegate
as it seems an optional member of the device controller.

* [thread] fix invalid configuration of active dataset (project-chip#4008)

* Fix data loss or crash in TCPEndPoint with LwIP (project-chip#4022)

* Fix data loss or crash in TCPEndPoint with LwIP

#### Problem

Under the configuration CHIP_SYSTEM_CONFIG_USE_LWIP, in some cases where
the data size exceeds the TCP window size, TCPEndPoint can either die or
lose data when accounting of un-acked data falls out of sync.

#### Summary of Changes

Imported fix from Weave:

* This change removes separate accounting of the unsent
  data position and replaces it with simple counting of
  sent-but-not-acked data and a skip-loop at the start
  of DriveSending().

Fixes project-chip#4013 - Data loss or crash in TCPEndPoint with LwIP

* Restyled by clang-format

Co-authored-by: Restyled.io <[email protected]>

* Update lighting-app gen/ folder with ZAP generated content (project-chip#4010)

* Fix segmentation fault error in response echo message (project-chip#3984)

* Add back Android default build coverage & fix the build (project-chip#3966)

mDNS doesn't build with no device layer. Remove it from the build and
add back the coverage that would catch this that was lost in project-chip#3340.

* Update all-clusters-app gen/ folder with ZAP generated content (project-chip#3963)

* Move src/inet/tests to auto-test-driver generation (project-chip#3997)

* Rename TestUtils to UnitTestRegistration. (project-chip#4021)

Looking to remove usage of 'Utils' unless we have really no choice.
'UnitTestRegistration' seems clearer in what it does compared to
'TestUtils'.

* Update src/lib/core/tests to auto-test-driver generation (project-chip#3991)

* Cleanup zap chip-helper.js (project-chip#3973)

* Cleanup zap chip-helper.js

* Restyled by clang-format

Co-authored-by: Restyled.io <[email protected]>

* Move src/transport/tests to auto-test-driver generation (project-chip#3999)

* Move src/transport/tests to auto-test-driver generation

* Add relevant libraries (and more test-capable libs) to nrf.

* Refactor inet test helpers (to not include actual inet tests), try to make qemu allow better linkage but still failed for transport tests so disabled for now

* Added more tests on esp32 qemu

* Restyle fixes

* Fix cast errors in InetCommon

* Disable raw tests from zephyr: somehow they fail running out of endpoints

* Disable DNS test on zephyr

* Remove inet endpoint test from zephyr

* Remove inet endpoint test from zephyr - fix again

* Modify gitignore

* Restyle fixes

* Use CHIPDeviceController instead of CHIPDeviceController_deprecated (project-chip#3979)

* Implement the missing part of Exchange Header in Transport layer (project-chip#4017)

* Implement the missing part of Exchange Header in Transport layer

* Revert comment 'if' back to 'iff'("if and only if")

* Remove duplicated send flag defines and put ExchangeMgr/ExchangeConte… (project-chip#3994)

* Remove duplicated send flag defines and put ExchangeMgr/ExchangeContext under the same namespace as CRMP

* Rename kSendFlag_Default to kSendFlag_None

* Move src/lib/asn1/tests and src/ble/tests to auto-test-driver generation (project-chip#3998)

* Move src/lib/asn1/tests and src/ble/tests to auto-test-driver generation

* Remove one more unused file

* Attempt to enable asn1 and ble tests in esp32 - see if they pass or not

* Fix merge error

* Update include header for ASN1 test

* Include  ASN1 in libCHIP

* Some conversions to use PacketBufferHandle (project-chip#4011)

* Some conversions to use PacketBufferHandle

#### Problem

Code should use `PacketBufferHandle` rather than `PacketBuffer *`.

#### Summary of Changes

- Converts remaining receive path in //src/inet and //src/transport.
- Converts most of //src/ble.
- Introduces Handle versions of the `AddToEnd`/`DetachTail` pair.

Part of issue project-chip#2707 - Figure out a way to express PacketBuffer ownership in the type system

* Restyled by clang-format

* review

* revive BtpEngine::Clear[TR]xPacket()
* simplify conditional
* (void) message.DetachTail() → message.FreeHead()
* remove ExchangeContext::kSendFlag_RetainBuffer
* missed pBuf.IsNull()
* DetachHead() → PopTail()
* typos

Co-authored-by: Restyled.io <[email protected]>

* Move src/system/tests to auto-test-driver generation (project-chip#4000)

* Move src/system/tests to auto-test-driver generation

* Remove a TCP/IP init call that was killing qemu

* Remove explicit "all" target from root build file (project-chip#3967)

The "all" target exists implicitly and contains everything. We don't
need to specify one, and it's misleading to do so specifying deps has no
effect.

* Make src/setup_payload compile with -Werror=conversion (project-chip#4032)

* Add SSID and password to chip-tool pairing (project-chip#4054)

* Get temperature-measurement and all-clusters-app to use examples/common/chip-app-server (project-chip#4039)

#### Problem

PR project-chip#3704 introduced a change where a `PeerAddress` is now required in order to start `RendezvousSession`.
Sadly the multiple code paths bootstrapping `RendezvousSession` has not been updated.

PR project-chip#4012 add a fix for some of the `examples/` but not for the `all-clusters-app` nor the `temperature-measurement-app`.

To avoid such situation, this PR merge `examples/common/chip-app-server` and the custom code from `all-clusters-app` and `temperature-measurement-app`.

One of the more discutable change of this PR (imo) is the code that moves the custom `Echo` mechanism from the `all-clusters-app` to `chip-app-server`. I was hoping to get rid of it before doing this change but the `all-clusters-app` and the `temperature-measurement-app` are broken since project-chip#3704 and this PR should fix that.
Also I have a PR (mostly) ready once project-chip#3979 lands to get rid of this `Echo` specific code and replace it by a manufacturer specific `ping` command.

 #### Summary of Changes
 * Remove `EchoServer.cpp`, `RendezvousDeviceDelegate.cpp` and `include/RendezvousDeviceDelegate.h` from `all-clusters-app`
 * Remove `ResponseServer.cpp`, `RendezvousDeviceDelegate.cpp` and `include/RendezvousDeviceDelegate.h` from `temperature-measurement-app`
 * Introduce `chip-app-server/include/AppDelegate.h` in order to keep the behavior the `all-clusters-app` that turns on/off leds on different events. Maybe it should be converted to some types of `ChipDeviceEvent` or `CHIPCallback` at some point.
 * Fix `chip-app-server` to accomodate for the specifics of `all-clusters-app`

* Add all Thread ULA addresses to the lwip interface (project-chip#4053)

ULA prefixes will used for CHIP network so we need to add all these
addresses to the interface.

* Remove src/lib/message. (project-chip#4055)

* Remove src/lib/message.

Updated messaging implementation lives in src/messaging and the
src/lib/message is not currently compiled or linked in.

This saves us from looking at this code when some refactoring is needed
(e.g. the SystemPacketBuffer changes).

* Remove one more unused file

* [ChipTool] Add Payload Parse Command (project-chip#3696)

* [ChipTool] Add Payload Parse Command

* [ChipTool] Add Payload Parse Command

* [ChipTool] Restyle issues resolved

* Restyled by whitespace

* Resolve build errors caused by Command.h schema change

Co-authored-by: lijayaku <[email protected]>
Co-authored-by: Restyled.io <[email protected]>

* rename ParseCommand to QRCodeParseCommand

* adding AdditionalDataParseCommand version 0

* Adding parsing logic + logging

* adding another parsing method

* Basic Parsing is DONE

* fixing memory issue

* removing some logs

* removing more logs

* minor update

* Add RotatingDeviceId to DNS-SD

* Revert "Merge pull request #4 from hnnajh/rotating-id-test"

This reverts commit 0235d05, reversing
changes made to 3e1a4b9.

* Storing RI in Octet String + Adding Binary format for BLE

* Fixing rotating id parser + adding unittests

* restyling

* refactoring rotating id unit tests

* Added more unit tests for Rotating Device Id

* updated styling

* refactor RI tests

* Added RI Unittest + more validation

* applying restyling

* Fix CI

* update styling

* Fix CI

* Update Styling

* Fix CI

* Restyling

* Fixing nits

* Using MutableByteSpan in RI generation

* Fixing nits

Co-authored-by: Kevin Schoedel <[email protected]>
Co-authored-by: Vivien Nicolas <[email protected]>
Co-authored-by: Markus Becker <[email protected]>
Co-authored-by: Damian Królik <[email protected]>
Co-authored-by: Łukasz Duda <[email protected]>
Co-authored-by: Restyled.io <[email protected]>
Co-authored-by: Yufeng Wang <[email protected]>
Co-authored-by: Michael Spang <[email protected]>
Co-authored-by: Andrei Litvin <[email protected]>
Co-authored-by: jepenven-silabs <[email protected]>
Co-authored-by: Boris Zbarsky <[email protected]>
Co-authored-by: Jiacheng Guo <[email protected]>
Co-authored-by: Liju Jayakumar <[email protected]>
Co-authored-by: lijayaku <[email protected]>
andy31415 added a commit that referenced this pull request Jan 20, 2022
* RotatingId: version0

* RotatingId: version1

* RotatingId: version0

* RotatingId: version1

* Fix Darwin host build (#3990)

#### Problem

Some conversions to use PacketBufferHandle (#3909) broke Darwin builds,
which aren't currently run in CI.

#### Summary of Changes

Fix src/platform/Darwin/BleConnectionDelegateImpl.mm to match the API
change in #3909.

* Add '-Wextra' to compiler flags (#3902)

* Implement Level Control Cluster (#3806)

* New seekbar in Android CHIPTool
* Sample usage in lighting-app/nrfconnect

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

* Fix Rendezvous over BLE after recent changes (#4012)

PR #3704 introduced a change that the BLE transport in
RendezvousSession is only initialized when PeerAddress
in RendezvousParams is of type BLE. However, PeerAddress
isn't initialized anywhere. As a result Rendezvous over BLE
stopped working between Android CHIPTool and accessories.

Btw, remove an assert related to the storage delegate
as it seems an optional member of the device controller.

* [thread] fix invalid configuration of active dataset (#4008)

* Fix data loss or crash in TCPEndPoint with LwIP (#4022)

* Fix data loss or crash in TCPEndPoint with LwIP

#### Problem

Under the configuration CHIP_SYSTEM_CONFIG_USE_LWIP, in some cases where
the data size exceeds the TCP window size, TCPEndPoint can either die or
lose data when accounting of un-acked data falls out of sync.

#### Summary of Changes

Imported fix from Weave:

* This change removes separate accounting of the unsent
  data position and replaces it with simple counting of
  sent-but-not-acked data and a skip-loop at the start
  of DriveSending().

Fixes #4013 - Data loss or crash in TCPEndPoint with LwIP

* Restyled by clang-format

Co-authored-by: Restyled.io <[email protected]>

* Update lighting-app gen/ folder with ZAP generated content (#4010)

* Fix segmentation fault error in response echo message (#3984)

* Add back Android default build coverage & fix the build (#3966)

mDNS doesn't build with no device layer. Remove it from the build and
add back the coverage that would catch this that was lost in #3340.

* Update all-clusters-app gen/ folder with ZAP generated content (#3963)

* Move src/inet/tests to auto-test-driver generation (#3997)

* Rename TestUtils to UnitTestRegistration. (#4021)

Looking to remove usage of 'Utils' unless we have really no choice.
'UnitTestRegistration' seems clearer in what it does compared to
'TestUtils'.

* Update src/lib/core/tests to auto-test-driver generation (#3991)

* Cleanup zap chip-helper.js (#3973)

* Cleanup zap chip-helper.js

* Restyled by clang-format

Co-authored-by: Restyled.io <[email protected]>

* Move src/transport/tests to auto-test-driver generation (#3999)

* Move src/transport/tests to auto-test-driver generation

* Add relevant libraries (and more test-capable libs) to nrf.

* Refactor inet test helpers (to not include actual inet tests), try to make qemu allow better linkage but still failed for transport tests so disabled for now

* Added more tests on esp32 qemu

* Restyle fixes

* Fix cast errors in InetCommon

* Disable raw tests from zephyr: somehow they fail running out of endpoints

* Disable DNS test on zephyr

* Remove inet endpoint test from zephyr

* Remove inet endpoint test from zephyr - fix again

* Modify gitignore

* Restyle fixes

* Use CHIPDeviceController instead of CHIPDeviceController_deprecated (#3979)

* Implement the missing part of Exchange Header in Transport layer (#4017)

* Implement the missing part of Exchange Header in Transport layer

* Revert comment 'if' back to 'iff'("if and only if")

* Remove duplicated send flag defines and put ExchangeMgr/ExchangeConte… (#3994)

* Remove duplicated send flag defines and put ExchangeMgr/ExchangeContext under the same namespace as CRMP

* Rename kSendFlag_Default to kSendFlag_None

* Move src/lib/asn1/tests and src/ble/tests to auto-test-driver generation (#3998)

* Move src/lib/asn1/tests and src/ble/tests to auto-test-driver generation

* Remove one more unused file

* Attempt to enable asn1 and ble tests in esp32 - see if they pass or not

* Fix merge error

* Update include header for ASN1 test

* Include  ASN1 in libCHIP

* Some conversions to use PacketBufferHandle (#4011)

* Some conversions to use PacketBufferHandle

#### Problem

Code should use `PacketBufferHandle` rather than `PacketBuffer *`.

#### Summary of Changes

- Converts remaining receive path in //src/inet and //src/transport.
- Converts most of //src/ble.
- Introduces Handle versions of the `AddToEnd`/`DetachTail` pair.

Part of issue #2707 - Figure out a way to express PacketBuffer ownership in the type system

* Restyled by clang-format

* review

* revive BtpEngine::Clear[TR]xPacket()
* simplify conditional
* (void) message.DetachTail() → message.FreeHead()
* remove ExchangeContext::kSendFlag_RetainBuffer
* missed pBuf.IsNull()
* DetachHead() → PopTail()
* typos

Co-authored-by: Restyled.io <[email protected]>

* Move src/system/tests to auto-test-driver generation (#4000)

* Move src/system/tests to auto-test-driver generation

* Remove a TCP/IP init call that was killing qemu

* Remove explicit "all" target from root build file (#3967)

The "all" target exists implicitly and contains everything. We don't
need to specify one, and it's misleading to do so specifying deps has no
effect.

* Make src/setup_payload compile with -Werror=conversion (#4032)

* Add SSID and password to chip-tool pairing (#4054)

* Get temperature-measurement and all-clusters-app to use examples/common/chip-app-server (#4039)

#### Problem

PR #3704 introduced a change where a `PeerAddress` is now required in order to start `RendezvousSession`.
Sadly the multiple code paths bootstrapping `RendezvousSession` has not been updated.

PR #4012 add a fix for some of the `examples/` but not for the `all-clusters-app` nor the `temperature-measurement-app`.

To avoid such situation, this PR merge `examples/common/chip-app-server` and the custom code from `all-clusters-app` and `temperature-measurement-app`.

One of the more discutable change of this PR (imo) is the code that moves the custom `Echo` mechanism from the `all-clusters-app` to `chip-app-server`. I was hoping to get rid of it before doing this change but the `all-clusters-app` and the `temperature-measurement-app` are broken since #3704 and this PR should fix that.
Also I have a PR (mostly) ready once #3979 lands to get rid of this `Echo` specific code and replace it by a manufacturer specific `ping` command.

 #### Summary of Changes
 * Remove `EchoServer.cpp`, `RendezvousDeviceDelegate.cpp` and `include/RendezvousDeviceDelegate.h` from `all-clusters-app`
 * Remove `ResponseServer.cpp`, `RendezvousDeviceDelegate.cpp` and `include/RendezvousDeviceDelegate.h` from `temperature-measurement-app`
 * Introduce `chip-app-server/include/AppDelegate.h` in order to keep the behavior the `all-clusters-app` that turns on/off leds on different events. Maybe it should be converted to some types of `ChipDeviceEvent` or `CHIPCallback` at some point.
 * Fix `chip-app-server` to accomodate for the specifics of `all-clusters-app`

* Add all Thread ULA addresses to the lwip interface (#4053)

ULA prefixes will used for CHIP network so we need to add all these
addresses to the interface.

* Remove src/lib/message. (#4055)

* Remove src/lib/message.

Updated messaging implementation lives in src/messaging and the
src/lib/message is not currently compiled or linked in.

This saves us from looking at this code when some refactoring is needed
(e.g. the SystemPacketBuffer changes).

* Remove one more unused file

* [ChipTool] Add Payload Parse Command (#3696)

* [ChipTool] Add Payload Parse Command

* [ChipTool] Add Payload Parse Command

* [ChipTool] Restyle issues resolved

* Restyled by whitespace

* Resolve build errors caused by Command.h schema change

Co-authored-by: lijayaku <[email protected]>
Co-authored-by: Restyled.io <[email protected]>

* rename ParseCommand to QRCodeParseCommand

* adding AdditionalDataParseCommand version 0

* Adding parsing logic + logging

* adding another parsing method

* Basic Parsing is DONE

* fixing memory issue

* removing some logs

* removing more logs

* minor update

* Add RotatingDeviceId to DNS-SD

* Revert "Merge pull request #4 from hnnajh/rotating-id-test"

This reverts commit 0235d05, reversing
changes made to 3e1a4b9.

* increment lifetime counter

* Incrementing lifetime counter at each BLE/MDNS advertisement

* address comments

* Update src/include/platform/ConfigurationManager.h

Co-authored-by: Boris Zbarsky <[email protected]>

* removing unnecessary lines

* nit

* Update src/app/server/Dnssd.cpp

Co-authored-by: chrisdecenzo <[email protected]>

* restyling

* Update src/app/server/Dnssd.cpp

Co-authored-by: chrisdecenzo <[email protected]>

* Update src/app/server/Dnssd.cpp

Co-authored-by: chrisdecenzo <[email protected]>

* fix comments

* incrementing lifetimecounter once

* remove unnecessary include

Co-authored-by: Kevin Schoedel <[email protected]>
Co-authored-by: Vivien Nicolas <[email protected]>
Co-authored-by: Markus Becker <[email protected]>
Co-authored-by: Damian Królik <[email protected]>
Co-authored-by: Łukasz Duda <[email protected]>
Co-authored-by: Restyled.io <[email protected]>
Co-authored-by: Yufeng Wang <[email protected]>
Co-authored-by: Michael Spang <[email protected]>
Co-authored-by: Andrei Litvin <[email protected]>
Co-authored-by: jepenven-silabs <[email protected]>
Co-authored-by: Boris Zbarsky <[email protected]>
Co-authored-by: Jiacheng Guo <[email protected]>
Co-authored-by: Liju Jayakumar <[email protected]>
Co-authored-by: lijayaku <[email protected]>
Co-authored-by: chrisdecenzo <[email protected]>
selissia pushed a commit to selissia/connectedhomeip that referenced this pull request Jan 28, 2022
* RotatingId: version0

* RotatingId: version1

* RotatingId: version0

* RotatingId: version1

* Fix Darwin host build (project-chip#3990)

#### Problem

Some conversions to use PacketBufferHandle (project-chip#3909) broke Darwin builds,
which aren't currently run in CI.

#### Summary of Changes

Fix src/platform/Darwin/BleConnectionDelegateImpl.mm to match the API
change in project-chip#3909.

* Add '-Wextra' to compiler flags (project-chip#3902)

* Implement Level Control Cluster (project-chip#3806)

* New seekbar in Android CHIPTool
* Sample usage in lighting-app/nrfconnect

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

* Fix Rendezvous over BLE after recent changes (project-chip#4012)

PR project-chip#3704 introduced a change that the BLE transport in
RendezvousSession is only initialized when PeerAddress
in RendezvousParams is of type BLE. However, PeerAddress
isn't initialized anywhere. As a result Rendezvous over BLE
stopped working between Android CHIPTool and accessories.

Btw, remove an assert related to the storage delegate
as it seems an optional member of the device controller.

* [thread] fix invalid configuration of active dataset (project-chip#4008)

* Fix data loss or crash in TCPEndPoint with LwIP (project-chip#4022)

* Fix data loss or crash in TCPEndPoint with LwIP

#### Problem

Under the configuration CHIP_SYSTEM_CONFIG_USE_LWIP, in some cases where
the data size exceeds the TCP window size, TCPEndPoint can either die or
lose data when accounting of un-acked data falls out of sync.

#### Summary of Changes

Imported fix from Weave:

* This change removes separate accounting of the unsent
  data position and replaces it with simple counting of
  sent-but-not-acked data and a skip-loop at the start
  of DriveSending().

Fixes project-chip#4013 - Data loss or crash in TCPEndPoint with LwIP

* Restyled by clang-format

Co-authored-by: Restyled.io <[email protected]>

* Update lighting-app gen/ folder with ZAP generated content (project-chip#4010)

* Fix segmentation fault error in response echo message (project-chip#3984)

* Add back Android default build coverage & fix the build (project-chip#3966)

mDNS doesn't build with no device layer. Remove it from the build and
add back the coverage that would catch this that was lost in project-chip#3340.

* Update all-clusters-app gen/ folder with ZAP generated content (project-chip#3963)

* Move src/inet/tests to auto-test-driver generation (project-chip#3997)

* Rename TestUtils to UnitTestRegistration. (project-chip#4021)

Looking to remove usage of 'Utils' unless we have really no choice.
'UnitTestRegistration' seems clearer in what it does compared to
'TestUtils'.

* Update src/lib/core/tests to auto-test-driver generation (project-chip#3991)

* Cleanup zap chip-helper.js (project-chip#3973)

* Cleanup zap chip-helper.js

* Restyled by clang-format

Co-authored-by: Restyled.io <[email protected]>

* Move src/transport/tests to auto-test-driver generation (project-chip#3999)

* Move src/transport/tests to auto-test-driver generation

* Add relevant libraries (and more test-capable libs) to nrf.

* Refactor inet test helpers (to not include actual inet tests), try to make qemu allow better linkage but still failed for transport tests so disabled for now

* Added more tests on esp32 qemu

* Restyle fixes

* Fix cast errors in InetCommon

* Disable raw tests from zephyr: somehow they fail running out of endpoints

* Disable DNS test on zephyr

* Remove inet endpoint test from zephyr

* Remove inet endpoint test from zephyr - fix again

* Modify gitignore

* Restyle fixes

* Use CHIPDeviceController instead of CHIPDeviceController_deprecated (project-chip#3979)

* Implement the missing part of Exchange Header in Transport layer (project-chip#4017)

* Implement the missing part of Exchange Header in Transport layer

* Revert comment 'if' back to 'iff'("if and only if")

* Remove duplicated send flag defines and put ExchangeMgr/ExchangeConte… (project-chip#3994)

* Remove duplicated send flag defines and put ExchangeMgr/ExchangeContext under the same namespace as CRMP

* Rename kSendFlag_Default to kSendFlag_None

* Move src/lib/asn1/tests and src/ble/tests to auto-test-driver generation (project-chip#3998)

* Move src/lib/asn1/tests and src/ble/tests to auto-test-driver generation

* Remove one more unused file

* Attempt to enable asn1 and ble tests in esp32 - see if they pass or not

* Fix merge error

* Update include header for ASN1 test

* Include  ASN1 in libCHIP

* Some conversions to use PacketBufferHandle (project-chip#4011)

* Some conversions to use PacketBufferHandle

#### Problem

Code should use `PacketBufferHandle` rather than `PacketBuffer *`.

#### Summary of Changes

- Converts remaining receive path in //src/inet and //src/transport.
- Converts most of //src/ble.
- Introduces Handle versions of the `AddToEnd`/`DetachTail` pair.

Part of issue project-chip#2707 - Figure out a way to express PacketBuffer ownership in the type system

* Restyled by clang-format

* review

* revive BtpEngine::Clear[TR]xPacket()
* simplify conditional
* (void) message.DetachTail() → message.FreeHead()
* remove ExchangeContext::kSendFlag_RetainBuffer
* missed pBuf.IsNull()
* DetachHead() → PopTail()
* typos

Co-authored-by: Restyled.io <[email protected]>

* Move src/system/tests to auto-test-driver generation (project-chip#4000)

* Move src/system/tests to auto-test-driver generation

* Remove a TCP/IP init call that was killing qemu

* Remove explicit "all" target from root build file (project-chip#3967)

The "all" target exists implicitly and contains everything. We don't
need to specify one, and it's misleading to do so specifying deps has no
effect.

* Make src/setup_payload compile with -Werror=conversion (project-chip#4032)

* Add SSID and password to chip-tool pairing (project-chip#4054)

* Get temperature-measurement and all-clusters-app to use examples/common/chip-app-server (project-chip#4039)

#### Problem

PR project-chip#3704 introduced a change where a `PeerAddress` is now required in order to start `RendezvousSession`.
Sadly the multiple code paths bootstrapping `RendezvousSession` has not been updated.

PR project-chip#4012 add a fix for some of the `examples/` but not for the `all-clusters-app` nor the `temperature-measurement-app`.

To avoid such situation, this PR merge `examples/common/chip-app-server` and the custom code from `all-clusters-app` and `temperature-measurement-app`.

One of the more discutable change of this PR (imo) is the code that moves the custom `Echo` mechanism from the `all-clusters-app` to `chip-app-server`. I was hoping to get rid of it before doing this change but the `all-clusters-app` and the `temperature-measurement-app` are broken since project-chip#3704 and this PR should fix that.
Also I have a PR (mostly) ready once project-chip#3979 lands to get rid of this `Echo` specific code and replace it by a manufacturer specific `ping` command.

 #### Summary of Changes
 * Remove `EchoServer.cpp`, `RendezvousDeviceDelegate.cpp` and `include/RendezvousDeviceDelegate.h` from `all-clusters-app`
 * Remove `ResponseServer.cpp`, `RendezvousDeviceDelegate.cpp` and `include/RendezvousDeviceDelegate.h` from `temperature-measurement-app`
 * Introduce `chip-app-server/include/AppDelegate.h` in order to keep the behavior the `all-clusters-app` that turns on/off leds on different events. Maybe it should be converted to some types of `ChipDeviceEvent` or `CHIPCallback` at some point.
 * Fix `chip-app-server` to accomodate for the specifics of `all-clusters-app`

* Add all Thread ULA addresses to the lwip interface (project-chip#4053)

ULA prefixes will used for CHIP network so we need to add all these
addresses to the interface.

* Remove src/lib/message. (project-chip#4055)

* Remove src/lib/message.

Updated messaging implementation lives in src/messaging and the
src/lib/message is not currently compiled or linked in.

This saves us from looking at this code when some refactoring is needed
(e.g. the SystemPacketBuffer changes).

* Remove one more unused file

* [ChipTool] Add Payload Parse Command (project-chip#3696)

* [ChipTool] Add Payload Parse Command

* [ChipTool] Add Payload Parse Command

* [ChipTool] Restyle issues resolved

* Restyled by whitespace

* Resolve build errors caused by Command.h schema change

Co-authored-by: lijayaku <[email protected]>
Co-authored-by: Restyled.io <[email protected]>

* rename ParseCommand to QRCodeParseCommand

* adding AdditionalDataParseCommand version 0

* Adding parsing logic + logging

* adding another parsing method

* Basic Parsing is DONE

* fixing memory issue

* removing some logs

* removing more logs

* minor update

* Add RotatingDeviceId to DNS-SD

* Revert "Merge pull request #4 from hnnajh/rotating-id-test"

This reverts commit 0235d05, reversing
changes made to 3e1a4b9.

* increment lifetime counter

* Incrementing lifetime counter at each BLE/MDNS advertisement

* address comments

* Update src/include/platform/ConfigurationManager.h

Co-authored-by: Boris Zbarsky <[email protected]>

* removing unnecessary lines

* nit

* Update src/app/server/Dnssd.cpp

Co-authored-by: chrisdecenzo <[email protected]>

* restyling

* Update src/app/server/Dnssd.cpp

Co-authored-by: chrisdecenzo <[email protected]>

* Update src/app/server/Dnssd.cpp

Co-authored-by: chrisdecenzo <[email protected]>

* fix comments

* incrementing lifetimecounter once

* remove unnecessary include

Co-authored-by: Kevin Schoedel <[email protected]>
Co-authored-by: Vivien Nicolas <[email protected]>
Co-authored-by: Markus Becker <[email protected]>
Co-authored-by: Damian Królik <[email protected]>
Co-authored-by: Łukasz Duda <[email protected]>
Co-authored-by: Restyled.io <[email protected]>
Co-authored-by: Yufeng Wang <[email protected]>
Co-authored-by: Michael Spang <[email protected]>
Co-authored-by: Andrei Litvin <[email protected]>
Co-authored-by: jepenven-silabs <[email protected]>
Co-authored-by: Boris Zbarsky <[email protected]>
Co-authored-by: Jiacheng Guo <[email protected]>
Co-authored-by: Liju Jayakumar <[email protected]>
Co-authored-by: lijayaku <[email protected]>
Co-authored-by: chrisdecenzo <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants