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

How to udate Device specific info in Basic Info Cluster in firmware ? (CON-631) #519

Closed
aggaddam opened this issue Jul 17, 2023 · 8 comments

Comments

@aggaddam
Copy link

I want to update device-specific info in the Basic Info cluster in firmware. Currently, It is updated through the SDK configuration using the menu config. Is it possible we can update the below information in firmware without using Menuconfig as we are storing the below information in firmware during the device provisioning process?

image

@github-actions github-actions bot changed the title How to udate Device specific info in Basic Info Cluster in firmware ? How to udate Device specific info in Basic Info Cluster in firmware ? (CON-631) Jul 17, 2023
@jonsmirl
Copy link
Contributor

@aggaddam
Copy link
Author

@jonsmirl Thanks for the link.

I want to directly update the mfg-specific data received on the UART port in our firmware to NVS instead of generating the mfg factory partition. Is it possible with ESP -Matter SDK?

@shubhamdp
Copy link
Contributor

@aggaddam There is no out of the box provision for what you have have described. But there are APIs which can be used to do this.

I have no idea how the data on the UART would look like, but I'm sure that it will have key and value (eg: Key: "Discriminator" and Value: "2844").

Once you have these, you can map this key one existing ones present here and use the WriteConfig() APIs to write the manufacturing specific data to the factory partition.

On the other hand, you can also use the nvs_set_* APIs as well. For that you can find the NVS keys here.

@aggaddam
Copy link
Author

aggaddam commented Jul 18, 2023

@shubhamdp Thanks for providing the information. I think this will help me to update the configurations that the chip SDK needs from firmware.I will explore more on this

Regarding the mfg tool, it seems there are different tools available. Which one suggested generating the mfg factory partition binary?

  1. First one is under esp-matter/tools/mfg_tool/mfg_tool.py
  2. Second one is located under esp-matter/connectedhomeip/connectedhomeip/scripts/tools/generate_esp32_chip_factory_bin.py

@jonsmirl
Copy link
Contributor

Just write the stuff into the NVS partition yourself using IDF APIs. Look at mfg_tool for what the data looks like.
Scroll down in this issue and you can see a dump of a partition.
#316

@shubhamdp
Copy link
Contributor

@aggaddam Both tools do the same work with some differences.

  1. mfg_tool.py -> generates the partitions along with onboarding codes. Also, this was targeted for mass manufacturing, and can generate more than one partition. It also generates the artefacts that can be used afterwards.

  2. generate_esp32_chip_factory_bin.py -> This only generates one partition and was targeted for testing manufacturing data, and we wanted to have some tool in connectedhomeip repository.

I would suggest you use mfg_tool.py as it generates the our artefacts that can be used later and pretty aligned with Espressif's manufacturing process.

@shubhamdp
Copy link
Contributor

@aggaddam If your queries are answered can you please close the issue?

@dhrishi
Copy link
Collaborator

dhrishi commented Jul 20, 2023

Closing this now

@dhrishi dhrishi closed this as completed Jul 20, 2023
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

No branches or pull requests

4 participants