Home/Support/Support Forum/Node Identification Indicator- 0x95: How to get specific segment of a sent Join Notification frame?

Node Identification Indicator- 0x95: How to get specific segment of a sent Join Notification frame?

0 votes
So I have a coordinator device and multiple router devices in a network. The routers are all going to have Join Notification enabled (JN = 1). So when I plug in a router device it sends a join notification to the coordinator / all the other devices.

So in my python program, how might I grab the MAC address out of that Node Identification Indicator frame that the coordinator receives? The first 4 bytes in the sent frame I don't care about right now, but right after that from byte 5 to byte 12 I want to grab so I can use that in my python program to basically know which device just joined, and give I ta new NI string.
asked Aug 6 in XBee3 ZigBee by edunn106 New to the Community (22 points)

Please log in or register to answer this question.

1 Answer

+1 vote
You will need to parse the data from the frame and discard the bytes you do not want and keep or put into an array or log the bytes you want to keep.
answered Aug 6 by mvut Veteran of the Digi Community (13,094 points)
I like this. Can you point me in the right direction on how to do any of that? Python syntax? I don't even know how to ask the right question here.

where is this information stored once it is received I guess? Do I read from a.. parameter or something? NI?

would I need to register a data reception callback function type setup to so the program catches the sent stuff?
ok cool. so I got the notification to send and then captured it using the:
device.add_packet_received_callback(my_packet_received_callback)

now when I print out the packet, its this weird nested dictionary with 2 keys per spot it seems?

when I print out what the type of the object is it is:

type <class 'digi.xbee.packets.base.UnknownXBeePacket'>


now I can see the bytearray inside the super dictionary thing. but trying to extract it is odd. when I try to index the dictionary it says:

'UnknownXBeePacket' object is not subscriptable

I wont send the whole tri-nested dictionary but here is the first snippet of it:

{<DictKeys.HEADER_BYTE: 'header'>: 126, <DictKeys.LENGTH: 'length'>: 40, <DictKeys.FRAME_SPEC_DATA: 'fr_spec_data'>: { *first nested dict starts here*

see how there are like.. 2 keys and then the item? whattt is this?

lol so close to extracting the dang MAC address, which is in the second nested dictionary that I didn't paste in this post.

have you seen this before? how to uhh, either extract from it or work with the received packet in a different way?

many thanks
...