Quantcast
Channel: Wireless Connectivity
Viewing all articles
Browse latest Browse all 116964

Forum Post: Catch Data Request reception in Routers using Z-Stack (CC2530)

$
0
0

I'm trying to monitor the status of end-nodes by watching for the receptions of Data Request at the MAC level.  It seems like I should be able to detect these by checking for the MAC_MLME_POLL_IND event in MAC_CbackEvent().  This event doesn't seem to happen consistently with every Data Request.

Using the SmartRF Packet Sniffer I can see that Data Requests are being sent by the end node and acknowledged by the router.  However, the counter I added doesn't increment for every one I see in the sniffer.

Could someone with knowledge of the internals of the library shed some light on how/where data requests are handled?  Is there some place that I could detect these reliably?

I've built this on top of the Sensor Demo on the CC2530ZDK.  Code snippet from my change to MAC_CbackEvent() is below:

  //See if we can catch data request messages coming in
  if(event == MAC_MLME_POLL_IND)
  {
    g_nDataRequestCount++;
  }

  // MAC_MCPS_DATA_IND is very special - it is the only event where the MAC does not free *pData.


Viewing all articles
Browse latest Browse all 116964

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>