One problem less

Sudden memory increase

A sudden memory increase yesterday morning made me aware that there was something wrong in my system. Memory usage was increasing fast, while the memory count wasn’t. So probably no memory leak, but a static buffer that kept on growing bigger and bigger. Reviewing the logs indicated the ZigBee Coordinator was constantly receiving packets with bad checksums:

09:50:32 ZigBee: Rcvd Frame:97 01 00 13 A2 00 40 33 1F 7B 31 D7 44 42 00 7E
09:50:32 ZigBee: Invalid Checksum !! (Rcvd=00,Calc=66)
09:50:32 ZigBee: Rcvd Frame:97 01 00 13 A2 00 40 33 1F 7B 31 D7 44 42 00 7E
09:50:32 ZigBee: Invalid Checksum !! (Rcvd=00,Calc=66)
09:50:35 ZigBee: Rcvd Frame:97 01 00 13 A2 00 40 33 1F 7B 31 D7 44 42 00 7E
09:50:35 ZigBee: Invalid Checksum !! (Rcvd=00,Calc=66)

Strange; it looks like always the same packet is being received. That can’t be right! I removed the batteries from the XBee that seemed to be constantly sending these bad packets, but they kept on coming in; yeah right, without batteries 🙂

So there must be a problem with the read buffer in the ZigBee API. Looking at the code, i saw it right away… i forgot to skip a byte, resulting in always the same bad packet being spotted in the buffer! And that buffer kept on growing and growing. The fix was easy:

Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *