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 can I correctly read/use the parameters in partition zb_fct written by esp_zb_mfg_tool.py tool? (TZ-1235) #458

Open
josthlee opened this issue Oct 21, 2024 · 0 comments
Labels

Comments

@josthlee
Copy link

Question

According to the document mfg_tool:

  1. Generate bin
python3 esp_zb_mfg_tool.py -i 966b9f3ef98ae6059708 -m 0BE961FEFFBD4D74 -c 0x8000 -mn XXXX -mc 0x1111

Created NVS binary: ===> /Workspace/esp-zigbee-sdk/tools/mfg_tool/bin/0BE961FEFFBD4D74.bin

Files generated in /Workspace/esp-zigbee-sdk/tools/mfg_tool/ ...
  1. Flash memory
esptool.py -p  /dev/cu.usbmodem14214401 write_flash 0xf5000 bin/0BE961FEFFBD4D74.bin
esptool.py v4.8.dev5
Serial port /dev/cu.usbmodem14214401
Connecting...
Detecting chip type... ESP32-H2
Chip is ESP32-H2 (revision v0.1)
Features: BLE, IEEE802.15.4
Crystal is 32MHz
MAC: 74:4d:bd:ff:fe:61:e9:0b
BASE MAC: 74:4d:bd:61:e9:0b
MAC_EXT: ff:fe
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Flash will be erased from 0x000f5000 to 0x000f5fff...
Compressed 204 bytes to 58...
Wrote 204 bytes (58 compressed) at 0x000f5000 in 0.0 seconds (effective 47.7 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...
  1. Try to check if the zb_cft is correct
esptool.py -p /dev/cu.usbmodem14214401  read_flash 0xf5000 204 zb_fct.txt
esptool.py v4.8.dev5
Serial port /dev/cu.usbmodem14214401
Connecting...
Detecting chip type... ESP32-H2
Chip is ESP32-H2 (revision v0.1)
Features: BLE, IEEE802.15.4
Crystal is 32MHz
MAC: 74:4d:bd:ff:fe:61:e9:0b
BASE MAC: 74:4d:bd:61:e9:0b
MAC_EXT: ff:fe
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
204 (100 %)
204 (100 %)
Read 204 bytes at 0x000f5000 in 0.0 seconds (944.4 kbit/s)...
Hard resetting via RTS pin...

diff bin/0BE961FEFFBD4D74.bin zb_fct.txt 
Binary files bin/0BE961FEFFBD4D74.bin and zb_fct.txt differ

It is pretty straightforward and make the all things done. However, I try to esp_zb_secur_ic_get after esp_zb_init:

...
 esp_zb_init(&zb_nwk_cfg);
 esp_zb_secur_ic_type_t ic_type = ESP_ZB_IC_TYPE_64;
 uint8_t *ic = esp_zb_secur_ic_get((uint8_t *)&ic_type);
...

The returned ic (install code) pointer is still NULL.

My questions are:

  1. Is the zb_fct I flashed will be loaded by esp_zb_init?
  2. What is the correct way to load the parameters I flashed? Install code, manufacturer name and code etc. ...?
  3. I know I can manually set install code (manually) on the fly as well as manufacturer name and code by set attr, but how can I do with the pre flashed data?

Additional context.

No response

@github-actions github-actions bot changed the title How can I correctly read/use the parameters in partition zb_fct written by esp_zb_mfg_tool.py tool? How can I correctly read/use the parameters in partition zb_fct written by esp_zb_mfg_tool.py tool? (TZ-1235) Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant