Closed nomis closed 8 months ago
Hello,
The esp_zb_mfg_tool.py
provides a method for generating and programming the install code
, MAC address
, and manufacturer code for Zigbee devices. When the device's zb_fct
(functionality) has been configured, it will activate the install code
mode to facilitate network joining.
Based on your explanation, the light example only programs the channel
and MAC address
, omitting the install code
, which would still trigger the install code
mode. In such a scenario, the coordinator must also activate the install code
option. Furthermore, the coordinator needs to utilize the esp_zb_secur_ic_str_add()
function to incorporate the joining device's install code
after the network has been established. Failing to do so might result in the coordinator excluding the device from its network.
To enhance user-friendliness, modifications will be made to the esp_zb_mfg_tool.py
to offer a more user-oriented API.
The correct sequence of steps is as follows:
cd ~/esp/esp-zigbee-sdk/tools/mfg_tool
python esp_zb_mfg_tool.py -i 83FED3407A939723A5C639B26916D505C3B5 -m CAFEBEEF50C0FFED -c 0x07FFF800 -mn Espressif -mc 0x131B
cd ~/esp/esp-zigbee-sdk/examples/esp_zigbee_HA_sample/HA_on_off_light
idf.py -p [PORT] erase-flash
esptool.py -p [PORT] write_flash 0xb7000 ~/esp/esp-zigbee-sdk/tools/mfg_tool/bin/CAFEBEEF50C0FFED.bin
idf.py -p [PORT] flash monitor
// in esp_on_off_switch.h
#define INSTALLCODE_POLICY_ENABLE true
// add the following code after the network formation to esp_on_off_switch.c uint8_t address[] = {0xed, 0xff, 0xc0, 0x50, 0xef, 0xbe, 0xfe, 0xca}; char ic_code[] = "83FED3407A939723A5C639B26916D505C3B5"; esp_zb_secur_ic_str_add(address, ic_code);
To enhance user-friendliness, modifications will be made to the
esp_zb_mfg_tool.py
to offer a more user-oriented API.
The install code needs to be optional on the end device.
That's not the only parameter that has an undesirable default. The channel mask defaults to only allowing one channel when it should default to all channels.
Thank you for your suggestion.
@mallaprashant please create your own issue instead of hijacking this one
Using 0.9.1:
I only get as far as "Starting Interview" trying to add the device. The right MAC address is displayed by the co-ordinator but the end device won't connect:
It works if I erase the
zb_fct
partition: