Good day all.
On the Zigbee properties page you have the option to include a "device name".
I am using serial a numbering method where the serial number is stored in the eeprom
when the device is programmed.
When the device runs. I would like to take this value and use it for the device name.
I can read the number into a variable. How do I pass this name to the zigbee code that
will initialize the Xbee device so that when the code runs the device is initialized with
the Serial number as the device name.
Ondra
Zigbee re-coding Device name
Moderator: Benj
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Zigbee re-coding Device name
Hello Ondra,
If you customise the Zigbee component code and edit the Init_Network function then you will find this line which is responsible for setting up the Zigbee network node name.
If you create a sting in Flowcode and populate it with your node name and the EEPROM data before you call the init network function then you can change the function to look like this. Where FCV_STRING is the C variant of the name of your Flowcode string named string.
You will not be able to use 0 as an ID value as this would incorrectly terminate the string.
If you customise the Zigbee component code and edit the Init_Network function then you will find this line which is responsible for setting up the Zigbee network node name.
Code: Select all
Send_AT_Command(%a_MX_ZIG_DEVICENAME, %a_MX_ZIG_NLEN); //Set Device Name
Code: Select all
Send_AT_Command(FCV_STRING, FCSZ_STRING); //Set Device Name from Flowcode string variable
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: Zigbee re-coding Device name
The string is made up of numbers and letter. If there is a 0 in the string will this cause a problem?
Ondra
Ondra
Re: Zigbee re-coding Device name
Hi Ben when I change the code I can see the values are being written. What I don't see is an Ok Response from the module.
Ondra
Ondra