Xbee retrieving Node Identifier with API

Hello

I've this config :

-One Xbee S2B API2 Coordinator mode plugged on a Stalker v2.3
-Two Xbee S2B API2 End device mode connected to a arduino mini to collect temp from a DS1820 and sending to the Stalker

I want to have more than 2 sensors. So it would be great if i can name each one. I think a good solution was to give a name to each End Device Xbee by the Node Identifier parameter.

My question :
How can i retrieve the Node Identifier in the API Frame (and decoding it) when the xbee transmit the temp payload ?

Thanks

Here are my 2 sketches and my 2 xbee config files

SatlkerTempCentraleDS3232sms.ino (11 KB)

ArduinoMini_DS18B20_PowerDown.ino (4.56 KB)

I want to have more than 2 sensors. So it would be great if i can name each one. I think a good solution was to give a name to each End Device Xbee by the Node Identifier parameter.

Each XBee already has a unique address, and the address IS already part of an API packet. Why add another name/value that is not standard?

Here are my 2 sketches and my 2 xbee config files

Two out of 4 ain't bad.

Yes, it is. That's 50% - a failing grade.

Thans for your replie

Each XBee already has a unique address, and the address IS already part of an API packet. Why add another name/value that is not standard?

My Stalker bas station is connected to a lcd screen. So i want to know the name of the Sensor (eg : Kitchen, room....) and print it on the screen.

The solution was to create an array with each address of xbee and the corresponding name. So when the api frame is receive, search the name in the array.

But if i add a new sensor i want to retrieve all information (temp, name,...) without modifying and uploading the code on my Stalker base station. Do you have a solution for that ?

Do you have a solution for that ?

Store the information about the XBees in a file on an SD card. Add an SD card reader to the base station. Modify the code one time to read the data from the SD card.

Then, adding a new node simply means popping the SD card out, modifying the file, putting it back, and resetting the base station.

Just dropping a quick reply to this old question since I chanced upon it looking for a solution:

You can make use of the AtCommandRequest API call for APNI, this will cause the remote XBee to execute the "APNI" command, which will return you its Node Identifier.

Also, PaulS, no need to be snarky, he had a perfectly legitimate reason for wanting to retrieve the NI, as did I.