In February I had two issues with the Gateway:
1. Exceptions causing restart of the Gateway. This is happening approx. once a day.
2. Gateway stops receiving messages/reports from devices. This was happening every couple of days.
I have contacted Telink support and issue #1 was resolved.
Because issue #2 occurred less often it was never resolved. As a "fix" I restarted Gateway when I haven t received any messages after a certain time.
But I really would like to fix this issue.
So issue #2 was - After a while a Gateway stops receiving report messages (0x8104) from the devices (or any other messages).
Looking in the function rf_rx_irq_handle() in irq_handler.c, I have noticed that when the problem occurs there is no rf rx interrupt.
Here is also capture of T_rfStatusDbg[]:
- when everything is working:
044940: 34 40 24 30 31 32 20 22 20 22 20 22 20 22 34 40
044950: 30 31 32 34 40 24 24 30 31 32 20 21 34 40 22 20
044960: 22 20 22 20 22 34 40 24 30 31 32 34 40 30 31 32
044970: 34 40 30 31 32 20 22 20 22 20 22 20 22 34 40 30
044980: 31 32 34 40 30 31 32 20 22 20 22 20 22 34 40 30
044990: 31 32 20 22 20 22 34 40 30 31 32 20 22 20 22 34
0449a0: 40 30 31 32 34 40 30 31 32 34 40 30 31 32 20 22
0449b0: 20 22 20 22 20 22 34 40 24 30 31 32 20 22 34 40
0449c0: 30 31 32 34 40 30 31 32 20 22 20 22 20 22 20 22
0449d0: 34 40 24 30 31 32 34 40 24 30 31 32 34 40 30 31
0449e0: 32 20 22 20 22 34 40 30 31 32 34 40 30 31 32 34
0449f0: 40 30 31 32 34 40 30 31 32 20 22 20 22 20 22 20
044a00: 22 34 40 30 31 32 34 40 30 31 32 34 40 30 31 32
044a10: 20 22 20 22 20 22 20 22 34 40 30 31 32 34 40 30
044a20: 31 32 34 40 24 24 30 31 32 20 22 20 22 34 40 30
044a30: 31 32 20 22 34 40 24 30 31 32 34 40 24 30 31 32
- when no rf rx interrupt occurs (no messages received)
044940: 40 30 31 32 34 40 30 31 32 34 40 24 30 31 32 34
044950: 40 30 31 32 34 40 30 31 32 34 40 30 31 32 34 40
044960: 30 31 32 34 40 24 30 31 32 34 40 30 31 32 34 40
044970: 30 31 32 34 40 30 31 32 34 40 30 31 32 34 40 30
044980: 31 32 34 40 24 30 31 32 34 40 30 31 32 34 40 24
044990: 30 31 32 34 40 24 30 31 32 34 40 30 31 32 34 40
0449a0: 30 31 32 34 40 30 31 32 34 40 24 30 31 32 34 40
0449b0: 30 31 32 34 40 30 31 32 34 40 30 31 32 34 40 30
0449c0: 31 32 34 40 30 31 32 34 40 30 31 32 34 40 24 30
0449d0: 31 32 34 40 24 30 31 32 34 40 24 30 31 32 34 40
0449e0: 30 31 32 34 40 30 31 32 34 40 30 31 32 34 40 30
0449f0: 31 32 34 40 30 31 32 34 40 30 31 32 34 40 30 31
044a00: 32 34 40 30 31 32 34 40 30 31 32 34 40 30 31 32
044a10: 34 40 24 24 30 31 32 34 40 30 31 32 34 40 24 30
044a20: 31 32 34 40 30 31 32 34 40 30 31 32 20 21 34 40
044a30: 24 30 31 32 34 40 24 30 31 32 34 40 30 31 32 34
- There is no DBG_ZIGBEE_STATUS(0x22) when no messages are received/no rx interrupt
There is a following sequence 30 31 32 34 40. Where 31 is "ready to switch to ZIGBEE mode" and then 34 "ready to switch to BLE mode". It never gets to rf_rx_irq_handle() where DBG_ZIGBEE_STATUS would be 20?
- When I try to send a message there is only 0x20 and 0x21.
- There is no DBG_ZIGBEE_STATUS(0x20) which should happen in this condition - if(CURRENT_SLOT_GET() == DUALMODE_SLOT_ZIGBEE)
Question #1 - Does it mean that CURRENT_SLOT_GET() never changes to - DUALMODE_SLOT_ZIGBEE?
Question #2 - How is rx interrupt flag (FLD_RF_IRQ_RX) set? There is no code available to find this out!
Question #3 - Since it is concurrent Zigbee and BLE, does the rf module switch to Zigbee rf?
When it stops receiving reports, when I try to send a message to any of the devices, 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.
There is no way to find out the reason since it is used in pre-compiled libraries
Question #4 - Why do I get this status? What can cause it? Is it the same as above - i.e. rf module doesn t switch to Zigbee rf?
Some devices send reports to Gateway and another device. And the other device receives reports. This means that Zigbee devices work correctly and send reports.
No related topics |
Hi,
The feedback has been given to the developers. If there is any progress, we will contact you. You can also give feedback to them directly through the previous email
So, basically you are saying if Telink doesn t find anything I won t get any response or answer to my questions?
Sorry, but I don t have much hope that this will be priority for Telink. I asked this question in February.
Especially that it is not something that happens very often. That's why I wanted to know what can cause this issue.
What I wrote then: As I mentioned before exception or stopping of receiving messages occur randomly - once a day (or a couple of hours) - that s why it will be hard for you to track it.
Today, I had first issue with receiving reports. After 4 hours, after restarting the chip.
Maybe you can think of a way to put some code in the precompiled files to enable debugging and send me re-compiled library?
And didn t get anything.
I try to find out by myself, but debugging without a source code is impossible. With Telink debugging tool it is impossible to set any breakpoints to see what is going on in the program.
That s why I asked in my post:
Question #2 - How is rx interrupt flag (FLD_RF_IRQ_RX) set? There is no code available to find this out!
What are the conditions to trigger rf rx interrupt?
Why couldn t you or someone else from Telink provide some information about this? Provide sample code from SDK pre-compiled library? Is the function irq_handler() only called when there is an interrupt?
Question #4 - Why do I get this status (NWK_STATUS_ROUTE_DISCOVERY_FAILED
= 0xD0.)? What can cause it? Is it the same as above - i.e. rf module doesn t switch to Zigbee rf?
Do I get it because there is no response (i.e no rf rx interrupt) from the device? Which would mean that rf rx interrupt is not working?
It was working without issues for 4 days, but today it restarted (due to no received message) 4 times within 3 hours!
Why?
HI,
Q1 via log,It is changed to zigbee slot.
Q2-4 for rx interrupt not triggered,please check reg_rf_irq_mask and reg_irq_mask,when it is abnormal,
restore_zb_rf_context() will set zigbee rf state machine.
Hi,
I will have a look at reg_rf_irq_mask and reg_irq_mask, but what will it tell me. It won t tell me the reason for not interrupt not working?
In reg_irq_mask which bit I should be looking at? It doesn't really tell me when I look at the datasheet.
reg_rf_irq_ (REG_ADDR16(0xf1c)) is not even mentioned in the datasheet?
Obviously, restore_zb_rf_context() which is called from function switch_to_zb_context() every time it switches to ZB, doesn t change anything.
What about question #4?