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

doc: nrf: Adding documentation support for IEEE 802.11 sniffer #13490

Closed

Conversation

VivekUppunda
Copy link
Contributor

This commit brings in documentation support for IEEE 802.11 sniffer operation, This is an early version document and will be updated in the future.

@github-actions github-actions bot added changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. doc-required PR must not be merged without tech writer approval. labels Dec 21, 2023
@NordicBuilder
Copy link
Contributor

You can find the documentation preview for this PR at this link. It will be updated about 10 minutes after the documentation build succeeds.

Note: This comment is automatically posted by the Documentation Publishing GitHub Action.

@ioannisg ioannisg self-requested a review December 21, 2023 08:01
Copy link
Contributor

@ioannisg ioannisg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some initial comments on the first doc part :)

Copy link
Contributor

@richabp richabp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some initial comments; a more detailed review will follow.

  • Changelog entry is required.
  • Image needs to be recreated to follow the Style guide.

@VivekUppunda
Copy link
Contributor Author

VivekUppunda commented Dec 22, 2023

sdk

hi Richa,
Added the changelog entry.
Thanks and regards
Vivek

@VivekUppunda VivekUppunda force-pushed the documentation_monitor_mode branch 2 times, most recently from 6833985 to 085dd25 Compare December 22, 2023 01:39
@github-actions github-actions bot removed the changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. label Dec 22, 2023
@NordicBuilder
Copy link
Contributor

Test specification

CI/Jenkins/NRF

  • Skipped

CI/Jenkins/integration

  • Skipped

Note: This message is automatically posted and updated by the CI

Copy link
Contributor

@ioannisg ioannisg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for applying my comments @VivekUppunda
Some more comments, now, on the second part.

Enabling Monitor mode
*********************

To use the monitor mode sniffer feature in your applications, you must enable the :kconfig:option:`CONFIG_NRF700X_RAW_DATA_RX` Kconfig option in the project configuration.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
To use the monitor mode sniffer feature in your applications, you must enable the :kconfig:option:`CONFIG_NRF700X_RAW_DATA_RX` Kconfig option in the project configuration.
To be able to use the Monitor mode in your application, you need to enable the :kconfig:option:`CONFIG_NRF700X_RAW_DATA_RX` Kconfig option in the project configuration.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Side comment: perhaps the Kconfig options should be renamed, to include the MONITOR in-fix? Just for ease of understanding.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let me reword this accordingly

To enable the Monitor mode of operation, you can use the ``NET_REQUEST_WIFI_MODE`` network management runtime API.
This API can be used to disable Monitor mode in the driver when IEEE 802.11 packet reception is not required by the sniffer application.

If the nRF70 device is configured to operate in Monitor mode, Station mode connection is not permitted and the nRF70 Series device operates in a pure sniffer mode.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
If the nRF70 device is configured to operate in Monitor mode, Station mode connection is not permitted and the nRF70 Series device operates in a pure sniffer mode.
When the nRF70 device is configured to operate in Monitor mode, simultaneous connected Station operation is not permitted (the nRF70 Series device operates exclusively as a Wi-Fi sniffer).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is also important to clarify whether the Monitor mode may be used at the same time with TX Injection Mode.
If so we need to mention that here. Ideally, we need to mention that in the Raw TX mode documentation as well (e.g. comment that in Non-Connected mode a user can enable both Monitor and TX Injection...)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Monitor mode can be enabled with TX-Injection mode, but if Monitor mode is enabled, connection establishment is not possible. yes - you are correct, non-connected mode , user can enable Monitor and TX-Injection

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Yes, this should be explained in the guide, so user can know what combinations are possible.

This channel will be used as the default channel on which the nRF70 device captures 802.11 packets.
When the device operates in Monitor mode, all 802.11 packets received on the configured channel will be sent up the stack by the nRF70 Series device and the Wi-Fi driver.

To set the desired channel for 802.11 packet reception, you can use the ``NET_REQUEST_WIFI_CHANNEL`` network management API.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
To set the desired channel for 802.11 packet reception, you can use the ``NET_REQUEST_WIFI_CHANNEL`` network management API.
To set the desired channel for 802.11 packet reception, use the ``NET_REQUEST_WIFI_CHANNEL`` runtime NET-management API.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is important to clarify, also

  • whether the channel configure API can be used at any time, or whether there are restrictions (e.g. when Monitor mode is not yet enabled, etc.)
  • whether there needs to be a certain sequence (ENABLE, SET_CHANNEL commands) or not

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will update this table. The set channel command is not restricted to the situation wherein Monitor mode is not enabled. However, I will run this comment by the UMAC team to confirm the operation

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ioannisg - Not sure why i wrote that comment that way. I myself found it hard to fathom what I had written.

Set channel has to be invoked when either TX-Injection mode (station non-connected) or Monitor mode is enabled. the channel configured will be the channel on which packets are sniffed for Monitor mode and is the channel on which RAW packets are transmitted when station is not connected. Let me think how to re-word this.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. IMHO it is valuable to clarify whether the channel can simply change in runtime, with the respective API call, independent of other configuration, or whether there needs to be a specific command sequence. This helps the users understand the steps they need to take.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we simplify the colors here? For example

  • the boxes can be the same color (see in the Raw Tx mode). Since we have titles (Device, Driver, Application) a different color is not needed
    Also
  • we do not need to duplicate the packet data format on the Driver and Application boxes. IMHO it is enough if we just add the new header in the Driver layer, and then "remove" it in the Application layer
  • On the driver layer maybe we should add the "action" the driver does, ie. appending the radio receive parameter header

Question? Is the FCS presented to the application as well?

Copy link
Contributor Author

@VivekUppunda VivekUppunda Jan 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The FCS is provided by the lower layer and we will send the entire packet up the stack. The driver is a passthrough and it will pass the 802.11 packet sent to the driver up till the application layer while appending a receive parameter header.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks - this clarifies it for me.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That said - what kind of validations are performed, before the packet is presented to the application layer?
Related to that: does the incoming packet need to be 802.11 conformant (so the FW or the driver does not drop it)?

It would be nice if the guide (and the figure) adds some information about this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ioannisg - the driver does not validate the 802.11 packet at all. It is assumed that all 802.11 packets are sent up. I believe it is similar to a wireshark capture wherein all captured packets ( whether FCS is correct or not) are sent up the stack. Wireshark shows them as malformed packets. It is another way of finding if something wrong is happening in the system.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright - i get it. Then, please, add this explanation somewhere in the guide - I think it is useful.
In the figure maybe you can add a brief note that no 802.11 conformity is validated (but that's a minor comment, anyway..)

This commit brings in documentation support for IEEE 802.11 sniffer
operation

Signed-off-by: Vivekananda Uppunda <[email protected]>
@VivekUppunda VivekUppunda force-pushed the documentation_monitor_mode branch 3 times, most recently from c8e7582 to 47456e2 Compare January 30, 2024 05:18
@VivekUppunda
Copy link
Contributor Author

It seems that Wi-Fi specific documentation has been moved to nrf/doc/nrf/protocols/wifi and is no longer present in doc/nrf/device_guides/working_with_nrf/nrf70/developing/ folder. I will raise a new PR with all the review comments taken in from this PR into the new PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc-required PR must not be merged without tech writer approval.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants