Hi,
Recently, I encountered a problem about.. Arduino freezing.
Actually, I'm coding a class to use friendly the Zigbee protocol in API mode.
This class is called ZigbeeStack but implement some additionnal fields in the protocol for specifics needs.
The problem is the following:
I try to run a simple program running the ZigbeeStack class to test it but when using sending process, the arduino freez after few packets sent ( about 60). The previous packets are correctly sent and receive by other Zigbee modules.
It seems there is a memory overflow or segfault but I'm not able to find any code that can cause this kind of problem.
Here is my class and main Arduino program in attachment.
I've some debugg Serial instruction and here is the output of Serial just before freezing:
Break Point 4
Break Point 5
Break Point 6
Break Point 2
Break Point 3
Sous Break Point 1
Sous Break Point 2
Sous Break Point 3
Sous Break Point 4
Sous Break Point 5
Sous Break Point 6
Sous Break Point 7
1
Break Point 4
Break Point 5
Break Point 6
Break Point 2
Break Point 3
Sous Break Point 1
Sous Break Point 2
Sous Break Point 3
Sous Break Point 4
Sous Break Point 5
Sous Break Point 6
Sous Break Point 7
1
It seems the problem comes from the end of the constructPacket function, any idea? ![]()
I tried to see the free memory with severial class and method proposed on arduino playground but those returns strange results (-31 ...).
Thanks in advance!
ZigbeeStack.cpp (10.2 KB)
ZigbeeStack.h (5.97 KB)
zigbee_test.ino (806 Bytes)