Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated lower limit of 'inter' when recovering hop interval. #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fO-000
Copy link

@fO-000 fO-000 commented Jan 18, 2019

We expect a complete hop sequence cycle when recovering the hop interval. So the inter should be greater than (HOPSEQ_PERIOD - 1) * MIN_HOPINTER) = 216, which HOPSEQ_PERIOD is 37 and MIN_HOPINTER is 7.5 ms / 1.25 ms = 6.

In any case I would like to hear your opinions. 😊

@virtualabs
Copy link
Owner

I think you are right.

Originally, this check was introduced to avoid errors as our sniffer may receive both packets (TX/IDLE packet) from central and (RX/ACK packet) from peripheral devices. It may be a good idea to update this value to its theoretical minimum (i.e. 216), but since we are performing this test on a unique channel (not reused in the hopping sequence), we would obviously avoid to catch two packets belonging to a single connection event. In my opinion, this fix will also work but will also remove the fact that we are trying to avoid false-positive measures.

I don't see the need to apply this fix, unless it improves the performance of Bltejack. It is more of a cosmetic fix to me (yet correct and motivated fix too, i cannot deny), and I will consider fixing this in the next release of this firmware. Yes, I'm still working on it, but since it implies modifying large parts of this version, I would prefer delay this fix and test it along some other modifications I'm currently working on.

@fO-000
Copy link
Author

fO-000 commented Jan 18, 2019

Did you mean we only receive packets which PDU is empty, like TX/IDEL packets and RX/ACK packets, when recovering hop interval (and channel map, hop increment)?

And this is implemented by configuring NRF_RADIO->PCNF1 in radio_follow_aa() function?

@fO-000
Copy link
Author

fO-000 commented Jan 18, 2019

If so, why we configure MAXLEN field of NRF_RADIO->PCNF1 as 37UL in radio_follow_aa()?

    /* Packet configuration */
    NRF_RADIO->PCNF1 = (
      (((37UL) << RADIO_PCNF1_MAXLEN_Pos) & RADIO_PCNF1_MAXLEN_Msk)   |                      /* Maximum length of payload in bytes [0-255] */
      (((0UL) << RADIO_PCNF1_STATLEN_Pos) & RADIO_PCNF1_STATLEN_Msk)   |                      /* Expand the payload with N bytes in addition to LENGTH [0-255] */
      (((3UL) << RADIO_PCNF1_BALEN_Pos) & RADIO_PCNF1_BALEN_Msk)       |                      /* Base address length in number of bytes. */
      (((RADIO_PCNF1_ENDIAN_Little) << RADIO_PCNF1_ENDIAN_Pos) & RADIO_PCNF1_ENDIAN_Msk) |  /* Endianess of the S0, LENGTH, S1 and PAYLOAD fields. */
      (((1UL) << RADIO_PCNF1_WHITEEN_Pos) & RADIO_PCNF1_WHITEEN_Msk)                         /* Enable packet whitening */
    );

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants