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

[TE9][TC-LC-2.3] UserLabel cannot write a list into the attribute label-list #18317

Closed
jmeg-sfy opened this issue May 11, 2022 · 10 comments · Fixed by #18817
Closed

[TE9][TC-LC-2.3] UserLabel cannot write a list into the attribute label-list #18317

jmeg-sfy opened this issue May 11, 2022 · 10 comments · Fixed by #18817
Assignees
Labels
cert blocker spec Mismatch between spec and implementation V1.0

Comments

@jmeg-sfy
Copy link
Contributor

Problem

<what's wrong or missing, please include any applicable:

  • /chip-tool userlabel write label-list '[{"label":"bedroom","value":"bedroom1"},{"label":"orientation","value":"east"},{"label":"floor","value":"3"},{"label":"direction","value":"down"}]
  • Give back the status = 0x01 (FAILURE),

Proposed Solution

fix the XML and cluster UserLabel

@bzbarsky-apple bzbarsky-apple added V1.0 spec Mismatch between spec and implementation labels May 21, 2022
@bzbarsky-apple
Copy link
Contributor

@jmeg-sfy What platform is the server in this case? user-label is implemented on some platforms but not others.

@andy31415 andy31415 self-assigned this May 25, 2022
@andy31415
Copy link
Contributor

Assigning to myself. I believe as part of changes to #18687 we are pulling in device labelling support as well. I will have to test this and eventually this has to be added to multiple platforms.

@andy31415
Copy link
Contributor

Validated that his currently works in nrf-light using this script:

#!/usr/bin/env bash

set -ex

function finish {
  echo "STATUS: $?"
}

trap finish EXIT

export NODEID=$RANDOM

export THREAD_CRED=hex:0e..... # added my thread credentials here
export CHIP_TOOL="./out/linux-x64-chip-tool-ipv6only/chip-tool"

log_file="run_log_$(date +'%Y-%m-%d_%H-%M-%S').txt"
rm /tmp/chip_*

echo "NODE ID USED: $NODEID" | tee $log_file

echo "=============================================================" >>$log_file
echo $CHIP_TOOL pairing ble-thread $NODEID $THREAD_CRED 20202021 3840 | tee -a $log_file
$CHIP_TOOL pairing ble-thread $NODEID $THREAD_CRED 20202021 3840 >>$log_file 2>&1

echo "=============================================================" >>$log_file
echo $CHIP_TOOL userlabel write label-list '[{"label":"bedroom","value":"bedroom2"},{"label":"orientation","value":"east"},{"label":"floor","value":"3"},{"label":"direction","value":"down"}]' $NODEID 0 | tee -a $log_file
$CHIP_TOOL userlabel write label-list '[{"label":"bedroom","value":"bedroom2"},{"label":"orientation","value":"east"},{"label":"floor","value":"3"},{"label":"direction","value":"down"}]' $NODEID 0 2>&1 | tee -a $log_file | grep -i status

echo "=============================================================" >>$log_file
echo $CHIP_TOOL userlabel read label-list $NODEID 0 | tee -a $log_file
$CHIP_TOOL userlabel read label-list $NODEID 0 2>&1 | tee -a $log_file | grep -A 18 'label list'

@andy31415
Copy link
Contributor

I can also confirm this fails for efr32-brd4161a-light which seems in line with my expectations: using the DeviceInfoProvider enables this, not having it makes it not pass.

I will add this for EFR however for future items I will need platform owners to update their examples.
I was also unable to test with nrf on lock, light or all clusters since they fail to BLE advertise for me.

@jmeg-sfy
Copy link
Contributor Author

Great i do have this implemented on my device right now i basically took the DeviceInfoProviderImpl.cpp from Linux and applied it to EFR
Was not sure why it was not bundle up for all Matter device by default

@jmeg-sfy
Copy link
Contributor Author

@jmeg-sfy What platform is the server in this case? user-label is implemented on some platforms but not others.

It was on EFR32 in my case

@jmeg-sfy
Copy link
Contributor Author

Did a copy of those from src/platform/Linux

src/platform/EFR32/DeviceInfoProviderImpl.cpp
src/platform/EFR32/DeviceInfoProviderImpl.h

@andy31415
Copy link
Contributor

I updated EFR32 light to use the newly moved examples/provides/DeviceInfoProviderImpl.h/cpp however this crashes for me :( Need to debug why.

@andy31415
Copy link
Contributor

I updated EFR32 light to use the newly moved examples/provides/DeviceInfoProviderImpl.h/cpp however this crashes for me :( Need to debug why.

Found that storage has to be initialized (makse sense ... we store the labels). What is unclear is why this was working for me on nrf and linux which do not initialize storage. So I added the storage init to all examples now.

@andy31415
Copy link
Contributor

Likely this is very similar/same as #17604

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cert blocker spec Mismatch between spec and implementation V1.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants