I have found 2 issues in the gateway. They occur maybe once a day.
1. I mentioned this one before. Gateway reset.
I have the following code to catch exception:
static void sampleGwSysException(void){
T_debug_except_code = T_evtExcept[0]; //evt
T_debug_except_line = T_evtExcept[1]; //line;
app_exception_save();
// SYSTEM_RESET();
while(1){
gpio_toggle(LED_POWER);
WaitMs(200);
}
}
T_evtExcept[] is defined in ev.c
When exception occurs I have:
T_evtExcept[0] = 0x56 line
T_evtExcept[1] = 0x13 evt
Exception 0x13, according to ev.h is SYS_EXCEPTTION_ZB_BUFFER_EXCEPTION.
Line, doesn t really tell me anything. I don t know where it is. Is it in the .lst file?
2. ZigBee stops sending and receiving messages.
- BLE advertising/scanning is working.
- No report messages received from any device.
- When I try to send a message I get the following response message ZBHCI_CMD_DATA_CONFIRM
55 8200 0009F6 02 19B7 01 11 0006 D0 17AA
In this message the status is 0xD0. The only file I could find this status is nvk.h, which gives me NWK_STATUS_ROUTE_DISCOVERY_FAILED = 0xD0
This doesn't explain why I don t receive any reports?
What is the problem here - not receiving any report messages and not being able to send messages
Edit:
Today I noticed that that with the issue #2, when I sent a message (like to switch device on) the device receives the message. But the gateway don't receive a status report - or I should say - the gateway doesn't process this on any other reports.
No related topics |
Hi,
1.Either the protocol stack or the application layer can throw this exception,and what is your SDK version,
2.you can debug in rx/tx(in mac_phy.c)RF interrupt signal is trigger or not,if cant recive packet,check whether there is an ack response based on packet capture,also how many nodes in your network,and whether there are two zigbee network in same space?
Hi,
1. I am using Zigbee_BLE_Concurrent_SDK2.2.
Since my first post I had 12 restarts due to the exception.
Last exception was again 0x13.
Previous 2, were 0x35, which according to ev.h is SYS_EXCEPTTION_ZB_NWK_LINK_STA_MEM_ALLOC_FAIL
2. I don't think that there is another zigbee network.
I currently have only 15 devices on the network so it is not too many.
I will have a look at debugging as you suggested. It will take me sometime to do it, because I have to finish other things.
As I wrote before, when I try to send a message I get 0x8200 response with status 0xD0
But this is really annoying, because it is happening every day. Luckily I can connect to the gateway via BLE and restart it.
1.check the ev_buf_vs whether full,that will lead alloc to fail,
2.Please analyze it together with packet capture and debugging. Debugging alone cannot accurately locate issue
Hi,
1. I will check it.
I have also changed SDK to the latest 2.3 and will see if there is any difference.
Hi,
1. There is no exception 0x13 SYS_EXCEPTTION_ZB_BUFFER_EXCEPTION in ev_buffer.c. So where is this exception triggered?
So what is a fix for exception 0x35 SYS_EXCEPTTION_ZB_NWK_LINK_STA_MEM_ALLOC_FAIL? It is in none of the available source files.
After changing to latest SDK the problem still exists.
How can I debug anything if there is no source files available to see where exception is triggered?
Only Telink can do that!
2. I can t analyze it with packet capture because I can t capture packets.
I don t think there is anything wrong with incoming packets. The Gateway stops receiving reports msg. 0x8104. Another devices which are bound, still receive those reports. And just restart of the gateway fixes it, so all devices still send the same 0x8104 packets.
It is a gateway code issue. Is is a part of the source code that is in the SDK or is it precompiled libraries that are provided with the SDK?