You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2018/04/20 11:42:55 UTC

[GitHub] andrzej-kaczmarek opened a new pull request #57: nimble/phy: Fix starting late RX

andrzej-kaczmarek opened a new pull request #57: nimble/phy: Fix starting late RX
URL: https://github.com/apache/mynewt-nimble/pull/57
 
 
   Since c33701ae we can properly receive packets event if scanning was
   started on late RX. However, the problem is that radio is started
   manually there so phy_start_cputime is not correctly and, what's even
   worse, TIMER0 is not running thus we cannot properly calculate RX start
   time when PDU is received.
   
   This does not cause any major problem with legacy adveritising (we may
   just miss sending CONNECT_REQ or SCAN_REQ once) but if we schedule scan
   for AUX in extended advertising, the result of invalid calculations is
   stored in scheduler item. In particular, due to TIMER0 being stopped,
   our usecs reference time for EVENT_ADDRESS is 0 and calculation of an
   actual PDU start time wraps it around so the scan is scheduled far far
   in the future, which in turn quickly leads to exhaustion of mempool for
   auxscan items and we basically stop extended scanning (until any of
   incorrectly scheduled items executes).
   
   To fix this, on late RX we just setup RTC0 and TIMER0 to start as soon
   as possible taking limitations of both timer into account (see comments
   in code).

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services