JN5168 Router Mac visibility problem

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

JN5168 Router Mac visibility problem

3,002件の閲覧回数
ffonck
Contributor II

I was developing a Zigbee 3.0 network. I've never used the router in my system, but know i need to use it to increase the coverage of the signal. When the SleepingEndDevices sends data to the coordinator they exhibits macs 0x0000000000000000. The Serial of the Coordinator is the following:

 

(11:12:53.380) APP: APP_taskEndPoint: ZPS_EVENT_AF_DATA_INDICATION<CR>
(11:12:53.380)     Data Indication:<CR><CR>
(11:12:53.380)         Profile :101<CR><CR>
(11:12:53.380)         Status  :0<CR><CR>
(11:12:53.380)         Cluster :ffff<CR><CR>
(11:12:53.380)         EndPoint:1<CR><CR>
(11:12:53.380)         LQI     : 57<CR>
(11:12:53.380)         MAC Address: 0000000000000000 (4853)<CR>
(11:12:53.380) APP: byteCount  = 1 - idByte = *<CR>
(11:12:53.380) <CR>APP: payloadSize  = 803<CR>
(11:12:53.380) <CR>    Payload:<CR>
(11:12:53.380) 723,0,3360,36,...

 

The Serial from the Router is the following:

 

APP: Network discovery failed with error 234
APP: Exhausted channels to scan
APP: No event to process!
APP: Network discovery complete
APP: Found 1 networks
APP: Unscanned channels 00000000
	APP: Ext PAN ID = 00158d000230996e
	APP: Channel = 11
	APP: Stack Profile = 2
	APP: Zigbee Version = 2
	APP: Permit Joining = 1
	APP: Router Capacity = 1
	APP: End Device Capacity = 1
APP: Trying Joining network
APP: Joining network
APP: No event to process!
APP: Node joined network with Addr 0x50f4
APP: No event to process!
APP: vCheckStackEvent: vCheckStackEvent: ZPS_EVENT_NEW_NODE_HAS_JOINED, Nwk Addr=0xeb46 External Address=00158d0000554c7c
APP: No event to process!
APP: vCheckStackEvent: ZPS_EVENT_AF_DATA_INDICATION
        Profile :0
        Cluster :13
        EndPoint:0
        LQI     : 30
        MAC Address: 00158d0000554c7c (eb46)
APP: No event to process!
APP: vCheckStackEvent: vCheckStackEvent: ZPS_EVENT_NEW_NODE_HAS_JOINED, Nwk Addr=0xf41c External Address=00158d0000554c44
APP: No event to process!
APP: vCheckStackEvent: ZPS_EVENT_AF_DATA_INDICATION
        Profile :0
        Cluster :13
        EndPoint:0
        LQI     : 33
        MAC Address: 00158d0000554c44 (f41c)
APP: No event to process!
APP: vCheckStackEvent: ZPS_EVENT_AF_DATA_INDICATION
        Profile :0
        Cluster :13
        EndPoint:0
        LQI     : 30
        MAC Address: 00158d0000554c9e (4853)
APP: No event to process!
APP: vCheckStackEvent: vCheckStackEvent: ZPS_EVENT_NEW_NODE_HAS_JOINED, Nwk Addr=0x4853 External Address=00158d0000554c9e
APP: No event to process!
APP: vCheckStackEvent: ZPS_EVENT_AF_DATA_INDICATION
        Profile :0
        Cluster :13
        EndPoint:0
        LQI     : 30
        MAC Address: 00158d0000554c9e (4853)

 

 I want to know why is happening this issue with the MAC visibility. What gives?

0 件の賞賛
返信
15 返答(返信)

2,935件の閲覧回数
luis_maravilla
NXP Employee
NXP Employee

Hello

Could you please provide more information about your situation?

What Kit or module are you using as a base? How are you testing this? What SDK version are you using? 

0 件の賞賛
返信

2,919件の閲覧回数
ffonck
Contributor II
Hi Luis. Im using the JN5168-001-M06 embedded in a custom board.SDK: JN-SW-4170.

The application i'm running is a customization of the JN-AN-1229 example provided by NXP. Let me know if you need more information.
0 件の賞賛
返信

2,888件の閲覧回数
luis_maravilla
NXP Employee
NXP Employee

Hi Thanks for the information, I would need to confirm the following.

In the JN-AN-1229 example how are you using your JN5168-001-M06? Coordinator, Router or Sleeping End device? What other devices are on your network?

 

Also, I would Recommend the [JN-AN-1229-ZBPro-Application-Template.pdf] Application notes file in JN-AN-1229/Doc Folder for more information about this Application Code.

Regards Luis

0 件の賞賛
返信

2,843件の閲覧回数
ffonck
Contributor II
Hi Luis!

I'm using that microcontroller as Coordinator, Router and SED (Sleeping End Device). I have a simple network of 1 Coordinator, 1 Router and 1 SED deployed in my home.

I make sure that SED and Coordinator aren't in line of sight, so i can make sure that the messages go through the Router. When i use the Router as a bridge, the problems pops.

What do you mean about the pdf file? Which chapter should i look at?

Regards, Francisco
0 件の賞賛
返信

2,833件の閲覧回数
luis_maravilla
NXP Employee
NXP Employee

Hi Francisco

 

For the use of JN-Modules you need to establish a new MAC Address to set the Initial number, [please notice that this procedure is  only one-time programmable] , to do this you will need JN-SW-4107.exe [JN-SW-4107 Flash Programmer]and change the MAC Address for your module.

 

Please refer to User guide JN-UG-3099 JN51xx Production Flash Programmer User Guide

Chapter 1.2 Installing Tool

Chapter 3.5 Set MAC Address of JN51xx Device

 

This will change the MAC Address for your device and see a different data from the [0x0000000000000000].

As for The Application Note Guide, is just a recommendation to see the Application Functions for Coordinator, endpoint and Router, please refer to Chapter 4 in JN-AN-1229-ZBPro-Application-Template.pdf

 

Regards

Luis

0 件の賞賛
返信

2,804件の閲覧回数
ffonck96
Contributor II
Hi Luis. The SED has a different MAC than 0x0000000000000000. The problem is particularly thing, despite the mac being different the coordinator reports data of a 0x000... device.
0 件の賞賛
返信

2,746件の閲覧回数
luis_maravilla
NXP Employee
NXP Employee

Hi Francisco

Could you help us running this command on Flash programming tool to see what the MAC Address response is:

 

JN51xxProgrammer.exe -s COMxx [Enter the COM value for the JN Module]

 

You should see a MAC Address in the terminal like the following example:

JN51xx Device Programmer Example.png

 

[If you need help using the FlashProgramming refer to JN51xx Production Flash Programmer User Guide]

 

Additional to this test, could you provide your sniffer loggers for your application results please.

 

Best Regards

Luis

0 件の賞賛
返信

2,736件の閲覧回数
ffonck
Contributor II

Hi Luis!

I ran the command u sent me, the following image has the output prompted:

 
 

Captura de pantalla 2025-02-27 155711.png

 

The sniffer you are talking about is another device or you're referring to just the output messages?

Regards, Francisco

0 件の賞賛
返信

2,689件の閲覧回数
luis_maravilla
NXP Employee
NXP Employee

Hi Francisco

For sniffer I am referring to a tool; [A sniffer, also known as a packet analyzer or network analyzer, is a tool used to capture and analyze network traffic. It can be either a software or hardware tool that intercepts and records data packets transmitted between computers or devices on a network]

this is to see your specifications about connections between your devices.

How are you implementing the function about Reading the MAC Address? "ZPS_u64AplZdoGetIeeeAddr()"

Please refer to *ZigBee PRO Stack User Guide Chapter 5.2.3.1 [Obtaining IEEE/MAC Address]

 

Best Regards

Luis

0 件の賞賛
返信

2,639件の閲覧回数
ffonck96
Contributor II

Hi Luis.

Thanks for clarification. I do not have a sniffer device with me, however, i do have more JN5168 devices that can be programmed with some firmware that i dont have.

About the function call, i forgot to share that segment of the code. This is from the coordinator side:

case ZPS_EVENT_APS_DATA_INDICATION:
			{
				DBG_vPrintf(TRACE_APP, "APP: APP_taskEndPoint: ZPS_EVENT_AF_DATA_INDICATION\n");

				/* Process incoming cluster messages for this endpoint... */
				DBG_vPrintf(TRACE_APP, "    Data Indication:\r\n");
				DBG_vPrintf(TRACE_APP, "        Profile :%x\r\n",sStackEvent.uEvent.sApsDataIndEvent.u16ProfileId);
				DBG_vPrintf(TRACE_APP, "        Status  :%x\r\n",sStackEvent.uEvent.sApsDataIndEvent.eStatus);
				DBG_vPrintf(TRACE_APP, "        Cluster :%x\r\n",sStackEvent.uEvent.sApsDataIndEvent.u16ClusterId);
				DBG_vPrintf(TRACE_APP, "        EndPoint:%x\r\n",sStackEvent.uEvent.sApsDataIndEvent.u8DstEndpoint);

				uint8 lqi = sStackEvent.uEvent.sApsDataIndEvent.u8LinkQuality;
				DBG_vPrintf(TRACE_APP, "        LQI     : %d\n", lqi);

				uint64 macAddress = ZPS_u64AplZdoLookupIeeeAddr(sStackEvent.uEvent.sApsDataIndEvent.uSrcAddress.u16Addr);
				DBG_vPrintf(TRACE_APP, "        MAC Address: %08x%08x (%04x)\n",
						(uint32 )(macAddress >> 32), (uint32 )macAddress,
						sStackEvent.uEvent.sApsDataIndEvent.uSrcAddress.u16Addr);

				uint8 idByte = 0;
				uint16 payloadSize, byteCount;
				byteCount = PDUM_u16APduInstanceReadNBO(sStackEvent.uEvent.sApsDataIndEvent.hAPduInst, 0, "b", &idByte);
				payloadSize = PDUM_u16APduInstanceGetPayloadSize(sStackEvent.uEvent.sApsDataIndEvent.hAPduInst);
				DBG_vPrintf(TRACE_APP, "APP: byteCount  = %d - idByte = %c\n\r", byteCount, idByte);
				DBG_vPrintf(TRACE_APP, "APP: payloadSize  = %d\n\r", payloadSize);
...

For obtaining the MAC Address, i use the function ZPS_u64AplZdoLookupIeeeAddr(). Is there a difference between using ZPS_u64AplZdoGetIeeeAddr and ZPS_u64AplZdoLookupIeeeAddr() besides the indications of ZigBee PRO Stack User Guide?

 

Best Regards!

0 件の賞賛
返信

2,519件の閲覧回数
luis_maravilla
NXP Employee
NXP Employee

Hi Francisco

 

The ZPS_u64AplZdoLookupIeeeAddr search for a direction in local Address Map table and I want to confirm something from your side.

 

Could you help us try changing from ZPS_u64AplZdoLookupIeeeAddr to ZPS_u64AplZdoGetIeeeAddr?

 

Let me know you results

 

Best Regards

Luis

-----------------------------------------------------------

ZPS_u64AplZdoGetIeeeAddr

This function obtains the 64-bit IEEE (MAC) address of the local node.

Returns: 64-bit IEEE/MAC address obtained

------------------------------------------------------------

0 件の賞賛
返信

2,473件の閲覧回数
ffonck
Contributor II

Maybe there is a misunderstood.

With the "ZPS_u64AplZdoLookupIeeeAddr" function i want to be able to get de 64bit MAC Address from the node in the Coordinator. If i use "ZPS_u64AplZdoGetIeeeAddr" as you suggested im getting the same mac of the host device.

What im looking for is getting the 64bit Mac Address of the node sending data to the coordinator, so i can parse into serial. The thing is, sometimes that function "ZPS_u64AplZdoLookupIeeeAddr" gets MAC 0x0000000000000000 for no apparent reason.

Let me know if you need more insight, regards.

0 件の賞賛
返信

2,417件の閲覧回数
luis_maravilla
NXP Employee
NXP Employee

Hi Francisco

I apologize for the misunderstanding.

I would like to confirm, could you please help us test this:

When you are using the "uSrcAddress.u16Addr"can you check if this has the right correct short Address before sending it to ZPS_u64AplZdoLookupIeeeAddr.?

Also, as a side test what is your response if you function call also sends the long Address using "uSrcAddress.u64Addr"?

0 件の賞賛
返信

1,804件の閲覧回数
ffonck
Contributor II

Hi @luis_maravilla. I been working on this still. I have made some research and it seems the table of addresses hasn't been correctly saved.

I use a lookup function to check what is the 64 bit mac address, because this parameters is the one im sending to the client by doing:

macAddress = ZPS_u64AplZdoLookupIeeeAddr(u16SrcAddr);

I tried a lot of things, and the one i think could work is by asking to the node the 64 bit address directly and forzing a ZPS_eAplZdoAddAddrMapEntry(u16nwkAddress, u64IeeeAddress)

DBG_vPrintf(TRACE_APP, "APP: Lookup FAILED for 0x%04x! Need ZDP.\n", u16SrcAddr);
// Allocate APDU instance
PDUM_thAPduInstance hAPduInst = PDUM_hAPduAllocateAPduInstance(apduZDP);
if (hAPduInst == PDUM_INVALID_HANDLE) {
    DBG_vPrintf(TRACE_APP, "Failed to allocate APDU instance\n");
    return;
}

// Prepare IEEE address request
ZPS_tsAplZdpIeeeAddrReq sIeeeAddrReq = {
    .u16NwkAddrOfInterest = u16SrcAddr,  // Network address we want to lookup
    .u8RequestType = 0,                  // 0 = single response, 1 = extended response
    .u8StartIndex = 0                    // Start index for extended responses
};

// Create destination address (typically coordinator at 0x0000)
ZPS_tuAddress uDstAddr;
uDstAddr.u16Addr = 0x0000;  // Coordinator address

// Maintain a sequence number (should be declared at module scope)
uint8 u8SeqNumber = 0;

// Send the request
ZPS_teStatus status = ZPS_eAplZdpIeeeAddrRequest(
    hAPduInst,              // PDU Instance
    uDstAddr,               // Destination address (coordinator)
    FALSE,                  // FALSE = 16-bit network address (not IEEE)
    &u8SeqNumber,           // Sequence number
    &sIeeeAddrReq           // The actual request structure
);

if (status != ZPS_E_SUCCESS) {
    DBG_vPrintf(TRACE_APP, "64bit Addr Request failed: %d\n", status);
    PDUM_eAPduFreeAPduInstance(hAPduInst); // Free if failed
    return;
} else DBG_vPrintf(TRACE_APP, "Succesfully Retrieve \n", status);

 

But this is response in the cluster 8001 for Address response:

(19:09:07.990) APP: vCheckStackEvent: ZPS_EVENT_AF_DATA_INDICATION
(19:09:07.990) Profile :0
(19:09:07.990) Cluster :8001
(19:09:07.990) EndPoint:0
(19:09:07.990) IEEE Addr Response len: 12 > 24
(19:09:07.990) IEEE Addr Response NULL: 0
(19:09:07.990) Raw Response Data (12 bytes): 41 81 ff ff ff ff ff ff ff ff 4a e4 

Im failing in asking the address to the node. Somehow im getting MAC 0xFFFFFFFFFFFFFFF. (I'm pretty sure that is not the MAC, actually is 0x00158d0000554be0

Can you help with this? Also, @EduardoZamora @mario_castaneda i count on you guys. T_T

タグ(3)
0 件の賞賛
返信

2,994件の閲覧回数
ffonck
Contributor II
0 件の賞賛
返信