Can I modify nrf52840 manufacturer ID and model ID by using "flash write" command in shell sample?

Hello,

I am looking to conduct a test to simulate a Zigbee device using nrf52840 in the Zigbee:shell sample. This involves modifying the manufacturer ID and model ID. If it is possible to modify them using the "flash write" command in the shell example? If yes, how to input the parameters of the command?

uart:~$ flash --help
flash - Flash shell commands
Subcommands:
erase :[<device>] <page address> [<size>]
read :[<device>] <address> [<Dword count>]
test :[<device>] <address> <size> <repeat count>
write :[<device>] <address> <dword> [<dword>...]

Thank you.

Parents
  • Hi jostar,

    The Shell sample only has the mandatory attributes of the Basic cluster (ZB_ZCL_DECLARE_BASIC_ATTRIB_LIST and not ZB_ZCL_DECLARE_BASIC_ATTRIB_LIST_EXT).
    ManufacturerName and ModelIdentifier attributes are optional and only included if you use the extended list, so you will have to modify the Shell sample.

    Using flash write would be tricky because you will have to find where these attributes are stored. It's much easier just to modify it in the code itself (from the light bulb sample):

    ZB_ZCL_SET_STRING_VAL(
         dev_ctx.basic_attr.mf_name,
         BULB_INIT_BASIC_MANUF_NAME,
         ZB_ZCL_STRING_CONST_SIZE(BULB_INIT_BASIC_MANUF_NAME));

    ZB_ZCL_SET_STRING_VAL(
         dev_ctx.basic_attr.model_id,
         BULB_INIT_BASIC_MODEL_ID,
         ZB_ZCL_STRING_CONST_SIZE(BULB_INIT_BASIC_MODEL_ID));

  • Hi Hieu,

        Thanks for your help, if there exist any way to modify the ManufacturerName and ModelIdentifier attributes without rebuild the src code and flash to the nrf52840?

    Best regard~

Reply Children
Related