Page 1 of 1

Zigbee re-coding Device name

Posted: Fri Mar 02, 2012 12:05 pm
by Ondra
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

Re: Zigbee re-coding Device name

Posted: Fri Mar 02, 2012 3:19 pm
by Benj
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.

Code: Select all

Send_AT_Command(%a_MX_ZIG_DEVICENAME, %a_MX_ZIG_NLEN);	//Set Device 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.

Code: Select all

Send_AT_Command(FCV_STRING, FCSZ_STRING);	//Set Device Name from Flowcode string variable
You will not be able to use 0 as an ID value as this would incorrectly terminate the string.

Re: Zigbee re-coding Device name

Posted: Fri Mar 02, 2012 3:41 pm
by Ondra
The string is made up of numbers and letter. If there is a 0 in the string will this cause a problem?

Ondra

Re: Zigbee re-coding Device name

Posted: Fri Mar 02, 2012 5:09 pm
by Ondra
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