Other Parts Discussed in Thread: SIMPLICITI
Hi everyone,
I've built up my app on top of the AP HUB example app and the issue with it is that sometimes, after a software reset, AP's RF functionality gets jammed. It stops receiving any packets but everything else works completely fine. (I didn't try if TX still works though.) Anyways, I've concluded that the reason for this is that my main program periodically calls in SMPL_Receive which in turn calls in nwk_retrieve_frame in which nwk_QfindOldest is called. So, in nwk_QfindOldest the function checks if (uType == wPtr->fi_usage) and it fails since there is actually a packet in sInFrameQ (wPtr points towards it) and this packet has 4 in fi_usage. fi_usage flag 4 is FI_INUSE_TRANSITION. This flag ain't supposed to be here anywhere else except between the lines 328 and 391 in this function in nwk_QMgmt.c file. This flag is used to signal that a packet is being processed. at the end of this function fi_usage is always at some point changed to either FI_INUSE_UNTIL_DEL or FI_INUSE_UNTIL_FWD. So, the receiver queue is now full (I'm using a queues of size 1) and it can't be processed since fi_usage is 4 and a new packet can't be received since the queue is full. And I have no idea how 4 ended up here. Anyone has any ideas? Has this ever happened?
Stefan Radunovic