Code Monkey home page Code Monkey logo

Comments (20)

tube0013 avatar tube0013 commented on May 31, 2024 1

I will play with it. thanks!

from efr32-fw.

tube0013 avatar tube0013 commented on May 31, 2024 1

I think I'm going to try with the header option at compile time I just need to figure out the right way to define what I want in the header.

from efr32-fw.

MattWestb avatar MattWestb commented on May 31, 2024 1

With one token file like this (attached):

MFG_STRING                    : "IKEA of Sweden"
MFG_BOARD_NAME                : "Billy EZSP by MW"
MFG_MANUF_ID                  : 0x110C

And flashing with commander:

.\commander.exe flash --tokengroup znet --tokenfile .\tokens-MW.txt -d EFR32MG1P132F256IM32
WARNING: The string for token MFG_BOARD_NAME (Billy EZSP by MW) fills all 16 bytes of the token space. The string will not be zero terminated.
Writing 2048 bytes starting at address 0x0fe00000
Comparing range 0x0FE00000 - 0x0FE007FF (2 KB)
Erasing range 0x0FE00000 - 0x0FE007FF (1 sector, 2 KB)
Programming range 0x0FE00000 - 0x0FE001FF (512 Bytes)
Programming range 0x0FE00200 - 0x0FE003FF (512 Bytes)
DONE

I is getting from bellow (have doing one chip erase then was bricking the module and recovering it with simplicity commander so it was not having "my signature"):

Manufacturer: IKEA of Sweden
Board name: Billy EZSP by MW
EmberZNet version: 6.9.0.0 build 178

tokens-MW.txt

You only need changing the token in the file and also the device type (MG2X is different then MG1X) then flashing / covering tokens to one NCP / firmware file.

You is having it in the device in 5 minutes and also in s37 file and its staying in the chip until doing one chip erase also then the user is flashing some other firmware without attached tokens :-)))

For attaching / patching it to the s37 file see #1 (comment)

You also can using MFG_SERIAL_NUMBER : FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF for putting order number or serial number in the chip before shipping the device but bellows is not showing it for the moment but our code master can fixing that is some minutes :-))

Command for flashing one token or token file plus one tocken:

commander flash --tokengroup znet --token TOKEN_MFG_STRING:"IoT Inc"
commander flash --tokengroup znet --tokenfile tokens.txt --token TOKEN_MFG_STRING:”IoT Inc”

from efr32-fw.

MattWestb avatar MattWestb commented on May 31, 2024

So its looks like this ?
MWZBB01

ZCL Cluuster - General - Basic - and on the attribute side all info you need.
I was having adding some extra that was not "fitting" and was writing in other attribute but the standard is working OK.

MWZBB02
(not the same device :)) )

from efr32-fw.

MattWestb avatar MattWestb commented on May 31, 2024

You can also changing the manufacture to one from the "real list" on the upper left on the ZCL Cluster tab (I using IKEA for My IKEA modules).
The OTA image ID that i used for OTA is made in the OTA plugin and the manufacture is from the ZCL cluster tab.

from efr32-fw.

tube0013 avatar tube0013 commented on May 31, 2024

thanks - I'm talking with the coordinator FW. like your Billy. I know you modified it post compile at one point.

from efr32-fw.

MattWestb avatar MattWestb commented on May 31, 2024

Sorry i was not seeing you update.

Its manufacture tokens that is stetted with simplicity commander.

I have hacking the token in the user flash aria so bellows / ZHA is writing "Billy EZSP" as model.

Its described writing the token is in the manual for commander but the token is described is one manufacturing paper.

But i think you also can writing it from EZSP if the command is implanted.

I must looking for the manual i was finding token name and place and reporting back.

from efr32-fw.

MattWestb avatar MattWestb commented on May 31, 2024

https://www.silabs.com/documents/public/application-notes/an961-custom-nodes-efr32.pdf

from efr32-fw.

MattWestb avatar MattWestb commented on May 31, 2024

Here is my bin patched bin file (from one GU10) with my data.

LED1836G9_UD_MW.bin.txt (added .txt for uploading)

You shall using the offset for MG2 devices and then converting it to one format that you can flash to user data aria in the flash.

I think its possible doing TXT file with the token and using commander CLI for flashing it and also EZSP is having the commands.

from efr32-fw.

tube0013 avatar tube0013 commented on May 31, 2024

I see, I'll have to dig into this some more. appreciate pointing me in the direction!

from efr32-fw.

tube0013 avatar tube0013 commented on May 31, 2024

Looks like you can define them in a header... just a matter of what that would look like ;)

image

from efr32-fw.

MattWestb avatar MattWestb commented on May 31, 2024

The easy way is making one bin file and converting it to s37 and flashing to the device.
I think commander is doing the converting OK but must specification the user data aria for bin file so its being written OK.

I think its possible using segger flasher and flashing the "raw bin file" but i have not testing it.

Un patched data files form the new IKEA E2001 dumped with segger flasher that you can using as reference and changing if you like (its one MG21 device) but they have putting little extra data after the normal token.
MG21_UD.zip

If you is patching the EZSP firmware its away if flashing one "other" firmware.

The manufacture token (in user data) is still there also after one debug unlocking and flash erase but not one complete chip erase.

from efr32-fw.

MattWestb avatar MattWestb commented on May 31, 2024

You can reading the user data with segger flasher and editing it in the gui and flashing it back and looking how its working then booting the ncp with bellows and if its OK dumping the user data and exporting it as s37 and you can flashing it with normal simplicity commander then making the "manufacturing".

from efr32-fw.

tube0013 avatar tube0013 commented on May 31, 2024

https://www.silabs.com/community/wireless/proprietary/knowledge-base.entry.html/2020/11/12/creating_custom_manufacturingtokensinconnectba-zaxl

this would be my goal, to just have it compiled in at compile time.

so using this example, I'd need the address where the token goes and the token in hex?

from efr32-fw.

MattWestb avatar MattWestb commented on May 31, 2024

I think that is not the same token as you like to using.
Its more like IKEA is using for overriding the device name and other default firmware parameters in the OTA firmware. Its stored after the "real" manufacture tokens in the user data aria.

In https://www.silabs.com/documents/public/user-guides/ug162-simplicity-commander-reference-guide.pdf 6.4 Token Commands and the token group is znet.

You can also doing the normal NCP firmware and combining it with one file for the user data with your token (Edit: dumped userdata with your token like i was doing in one s37 file for user to flashing) and you is having one s37 file with both for the user to flashing.

Its also possible "patching" with commander = writing data to flash that is not standard but its not easier to do.

from efr32-fw.

MattWestb avatar MattWestb commented on May 31, 2024

If you is getting the manufacturing token in one module you can redeeming them to one file and then adding them to your s37 file with commands 6.5.3 Define Tokens (ug162).

$ commander convert blink.s37 --tokengroup znet --tokenfile tokens.txt --device EFR32MG1P --outfile blink.hex
Converts blink.s37 to hex format, while simultaneously defining the tokens defined in tokens.txt and on the command line.

You can using one output file with s37 and you is having all in your custom s37 file NCP and tokens.

Its command for writing the tokens also to file or chip but i think its easier doing it in one bin file or in segger flasher and flashing it back to user data and redeeming it with commander to one token file.

Then you have making one token file you can using it for all MG2 devices only adding it with the command from 6.5.3.

ug162 = simplicity-commander-reference-guide.pdf

from efr32-fw.

MattWestb avatar MattWestb commented on May 31, 2024

I was trying dumping the token from my billy file but it was not working :-((
But i think you can using it only putting in what you like and deleting what you not need and using "convert" for adding it to our s37 file.

#
# This token file declares what values are programmed for manufacturing
# tokens on the chip. It can be read back by the "flash" or "convert" commands.
#
# Lines are composed of one of the following forms:
#   <token-name> : <data>
#   <token-name> : !ERASE!
#
# Omitted tokens are left untouched and not programmed on the chip.
# Token names are case INsensitive.  All integer values are interpreted as hexadecimal
# numbers in BIG-endian format and must be prefixed with '0x'.  Blank lines and 
# lines beginning with '#' are ignored.
# Byte arrays are given in hexadecimal format, without a leading 0x.
# Specifying !ERASE! for the data sets that token to all F's.
#
#
# The token data can be in one of three main forms: byte-array, integer, or string.
# Byte-arrays are a series of hexadecimal numbers of the required length.
# Integers are BIG endian hexadecimal numbers.
# String data is a quoted set of ASCII characters.
#
# MFG_EMBER_EUI_64              : FFFFFFFFFFFFFFFF
MFG_CUSTOM_VERSION            : 0xFFFF
MFG_CUSTOM_EUI_64             : FFFFFFFFFFFFFFFF
MFG_STRING                    : ""
MFG_BOARD_NAME                : ""
MFG_MANUF_ID                  : 0xFFFF
MFG_PHY_CONFIG                : 0xFFFF
MFG_ZWAVE_COUNTRY_FREQ        : 0xFF
MFG_ZWAVE_HW_VERSION          : 0xFF
MFG_ZWAVE_PSEUDO_RANDOM_NUMBER: FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
MFG_SERIAL_NUMBER             : FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
MFG_SYNTH_FREQ_OFFSET         : 0xFFFF
MFG_CCA_THRESHOLD             : 0xFFFF
MFG_EZSP_STORAGE              : FFFFFFFFFFFFFFFF
MFG_CTUNE                     : 0xFFFF
MFG_XO_TUNE                   : 0xFFFF
MFG_LFXO_TUNE                 : 0xFF
MFG_KIT_SIGNATURE             : FFFFFFFF
MFG_LOCKBITS_CLW0             : 0xFFFFFFFF
MFG_LOCKBITS_MLW              : 0xFFFFFFFF
MFG_LOCKBITS_ULW              : 0xFFFFFFFF
MFG_LOCKBITS_DLW              : 0xFFFFFFFF
MFG_BOOTLOAD_AES_KEY          : FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
MFG_SECURITY_CONFIG           : 0xFFFF
MFG_ZW_PRK                    : FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
MFG_ZW_PUK                    : FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
MFG_ZW_QR_CODE                : ""
MFG_NVM3_CRYPTO_KEY           : FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
MFG_ZW_QR_CODE_EXT            : ""
MFG_ZW_INITIALIZED            : 0xFF

MFG_ASH_CONFIG[0]  : 0xFFFF
MFG_ASH_CONFIG[1]  : 0xFFFF
MFG_ASH_CONFIG[2]  : 0xFFFF
MFG_ASH_CONFIG[3]  : 0xFFFF
MFG_ASH_CONFIG[4]  : 0xFFFF
MFG_ASH_CONFIG[5]  : 0xFFFF
MFG_ASH_CONFIG[6]  : 0xFFFF
MFG_ASH_CONFIG[7]  : 0xFFFF
MFG_ASH_CONFIG[8]  : 0xFFFF
MFG_ASH_CONFIG[9]  : 0xFFFF
MFG_ASH_CONFIG[10] : 0xFFFF
MFG_ASH_CONFIG[11] : 0xFFFF
MFG_ASH_CONFIG[12] : 0xFFFF
MFG_ASH_CONFIG[13] : 0xFFFF
MFG_ASH_CONFIG[14] : 0xFFFF
MFG_ASH_CONFIG[15] : 0xFFFF
MFG_ASH_CONFIG[16] : 0xFFFF
MFG_ASH_CONFIG[17] : 0xFFFF
MFG_ASH_CONFIG[18] : 0xFFFF
MFG_ASH_CONFIG[19] : 0xFFFF

MFG_LOCKBITS_PLW[0] : 0xFFFFFFFF
MFG_LOCKBITS_PLW[1] : 0xFFFFFFFF
MFG_LOCKBITS_PLW[2] : 0xFFFFFFFF
MFG_LOCKBITS_PLW[3] : 0xFFFFFFFF

#'MFG_CBKE_DATA (Smart Energy CBKE)' token group
Device Implicit Cert : FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
CA Public Key        : FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
Device Private Key   : FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
# CBKE Flags           : 0xFF

#'MFG_INSTALLATION_CODE (Smart Energy Install Code)' token group
# Install Code Flags : 0xFFFF
Install Code       : FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
# CRC                : 0xFFFF

#'MFG_SECURE_BOOTLOADER_KEY (Manufacture token space for storing secure bootloader key.)' token group
MFG_SECURE_BOOTLOADER_KEY : FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF

#'MFG_CBKE_283K1_DATA (Smart Energy 1.2 CBKE)' token group
Device Implicit Cert (283k1) : FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
CA Public Key (283k1)        : FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
Device Private Key (283k1)   : FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
# CBKE FLAGS (283k1)           : 0xFF

#'MFG_SIGNED_BOOTLOADER_KEY_X (Manufacture token space for storing ECDSA signed bootloader key (X-point).)' token group
MFG_SIGNED_BOOTLOADER_KEY_X : FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF

#'MFG_SIGNED_BOOTLOADER_KEY_Y (Manufacture token space for storing ECDSA signed bootloader key (Y-point).)' token group
MFG_SIGNED_BOOTLOADER_KEY_Y : FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF

#'MFG_THREAD_JOIN_KEY (This is a token for saving the join key. This is for use with the Silicon Labs Thread stack only.)' token group
Join Key        : ""
# Join Key Length : 0xFFFF

tokens.txt

You is having your token in the file in 5 minutes with this method only editing the file and convert the NCP.s37 file and you is having it !!!

Edit: the

MFG_STRING                    : ""
MFG_BOARD_NAME                : ""

Is normal strings so only putting TubeZigbee in there :-)))

from efr32-fw.

tube0013 avatar tube0013 commented on May 31, 2024

thank you!

2021-06-08 15:07:07 DEBUG (MainThread) [bellows.zigbee.application] APS_UNICAST_MESSAGE_COUNT is set to 64
2021-06-08 15:07:07 DEBUG (MainThread) [bellows.zigbee.application] Ezsp adding endpoint: [<EzspStatus.SUCCESS: 0>]
2021-06-08 15:07:08 INFO (MainThread) [bellows.zigbee.application] EZSP Radio manufacturer: tubesZB
2021-06-08 15:07:08 INFO (MainThread) [bellows.zigbee.application] EZSP Radio board name: Series2
2021-06-08 15:07:08 INFO (MainThread) [bellows.zigbee.application] EmberZNet version: 6.9.2.0 build 256

from efr32-fw.

MattWestb avatar MattWestb commented on May 31, 2024

Looks great !!

I have putting one issue in https://github.com/zha-ng/EZSP-Firmware so they can also patching there firmware if they like.

from efr32-fw.

MattWestb avatar MattWestb commented on May 31, 2024

I was trying patching one s37 NCP image with tokens and flashing it = OK.
Was doing one GBL crate with the same original s37 file but with different tokens and flashing it from the boot loader and it was not loading the tokens (= the old tokens was still there not updated).
So Silab have blocking updating the manufacture tokens with OTA and is only possible flashing one s37 file with token added or one token file direct with SWD.

from efr32-fw.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.