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: add documentation framework and basic docs #239

Merged
merged 6 commits into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/workflows/zoomin-publish-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Publish documentation to Zoomin dev

on:
push:
branches:
- main
paths:
- doc/docs
workflow_dispatch:

jobs:
create-zoomin-bundle:
name: Create Zoomin bundle
uses: './.github/workflows/zoomin.yml'
publish-zoomin-bundle:
name: Publish Zoomin bundle to dev
needs: create-zoomin-bundle
runs-on: ubuntu-latest
steps:
- name: Get bundle
uses: actions/download-artifact@v3
with:
name: nrf-connect-rssi-viewer
- name: Upload documentation
run: |
# trust server
mkdir -p ~/.ssh
ssh-keyscan upload-v1.zoominsoftware.io >> ~/.ssh/known_hosts

# prepare key
echo "${{ secrets.ZOOMIN_KEY }}" > zoomin_key
chmod 600 zoomin_key

# upload bundle:
sftp -v -i zoomin_key [email protected] <<EOF
cd /nordic-be-dev.zoominsoftware.io/markdown/incoming
put nrf-connect-rssi-viewer.zip
quit
EOF
34 changes: 34 additions & 0 deletions .github/workflows/zoomin-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Publish documentation to Zoomin prod

on:
workflow_dispatch:

jobs:
create-zoomin-bundle:
name: Create Zoomin bundle
uses: './.github/workflows/zoomin.yml'
publish-zoomin-bundle:
name: Publish Zoomin bundle
needs: create-zoomin-bundle
runs-on: ubuntu-latest
steps:
- name: Get bundle
uses: actions/download-artifact@v3
with:
name: nrf-connect-rssi-viewer
- name: Upload documentation
run: |
# trust server
mkdir -p ~/.ssh
ssh-keyscan upload-v1.zoominsoftware.io >> ~/.ssh/known_hosts

# prepare key
echo "${{ secrets.ZOOMIN_KEY }}" > zoomin_key
chmod 600 zoomin_key

# upload bundle:
sftp -v -i zoomin_key [email protected] <<EOF
cd /docs-be.nordicsemi.com/markdown/incoming
put nrf-connect-rssi-viewer.zip
quit
EOF
34 changes: 34 additions & 0 deletions .github/workflows/zoomin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Create Zoomin bundle

on:
pull_request:
types: [synchronize, opened, reopened]
paths:
- '.github/workflows/zoomin.yml'
workflow_dispatch:
workflow_call:

jobs:
create-zoomin-bundle:
name: Create Zoomin bundle
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Copy zoomin properties
run: |
cp doc/zoomin/custom.properties doc/ \
&& cp doc/zoomin/tags.yml doc/

- name: Create zip file
run: |
cd doc/ \
&& zip -r ../nrf-connect-rssi-viewer.zip \
docs/* mkdocs.yml custom.properties tags.yml

- name: Upload documentation artifact
uses: actions/upload-artifact@v3
with:
name: nrf-connect-rssi-viewer
path: nrf-connect-rssi-viewer.zip
retention-days: 7
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,18 @@
[![Build Status](https://dev.azure.com/NordicSemiconductor/Wayland/_apis/build/status/NordicSemiconductor.pc-nrfconnect-rssi?branchName=main)](https://dev.azure.com/NordicSemiconductor/Wayland/_build/latest?definitionId=9&branchName=main)
[![License](https://img.shields.io/badge/license-Modified%20BSD%20License-blue.svg)](LICENSE)

_nRF Connect RSSI Viewer_ is a tool that shows dBm per frequency in the
2400-2480 MHz range, and allows the user to tweak settings like sweep delay and
nRF Connect RSSI Viewer is a tool that shows dBm per frequency in the
2400-2480 MHz range, and allows you to tweak settings like sweep delay and
Copy link
Contributor

Choose a reason for hiding this comment

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

To fix the linter issue:

Suggested change
nRF Connect RSSI Viewer is a tool that shows dBm per frequency in the
2400-2480 MHz range, and allows you to tweak settings like sweep delay and
nRF Connect RSSI Viewer is a tool that shows dBm per frequency in the 2400-2480
MHz range, and allows you to tweak settings like sweep delay and animation
duration.

animation duration.

![screenshot](resources/screenshot.gif)

## Installation

See the
[InfoCenter](https://infocenter.nordicsemi.com/index.jsp?topic=%2Fstruct_nrftools%2Fstruct%2Fnrftools_nrfconnect.html)
pages for information on how to install the application.
nRF Connect RSSI Viewer is installed from nRF Connect from Desktop. For detailed
steps, see
[Installing nRF Connect for Desktop apps](https://docs.nordicsemi.com/bundle/nrf-connect-desktop/page/installing_apps.html)
in the nRF Connect from Desktop documentation.

## Development

Expand All @@ -29,7 +30,7 @@ Please report issues on the [DevZone](https://devzone.nordicsemi.com) portal.
## Contributing

See the
[infos on contributing](https://nordicsemiconductor.github.io/pc-nrfconnect-docs/contributing)
[information on contributing](https://nordicsemiconductor.github.io/pc-nrfconnect-docs/contributing)
for details.

## License
Expand Down
12 changes: 12 additions & 0 deletions doc/docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# nRF Connect RSSI Viewer

nRF Connect RSSI Viewer is a cross-platform tool that shows dBm per frequency in the 2.4 GHz range. It scans the 2400-2480 MHz range, records signal level on particular frequencies, and presents combined results in several ways.
Copy link
Contributor

Choose a reason for hiding this comment

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

“particular frequencies” and “combined results in several ways” seems a bit wishy-washy to me. How about:

Suggested change
nRF Connect RSSI Viewer is a cross-platform tool that shows dBm per frequency in the 2.4 GHz range. It scans the 2400-2480 MHz range, records signal level on particular frequencies, and presents combined results in several ways.
nRF Connect RSSI Viewer is a cross-platform tool that shows dBm per frequency in the 2.4 GHz range. It scans the 2400-2480 MHz range, records signal level on the Bluetooth Low Energy channel frequencies, and presents the results.


You can use the tool with a sniffer device to look for interferers, check how channels are used, and to tweak settings like sweep delay and animation duration.

RSSI Viewer is installed and updated using [nRF Connect for Desktop](https://docs.nordicsemi.com/bundle/nrf-connect-desktop/page/index.html).

## Supported devices

Any of the nRF52 Series boards can be used as the sniffer with the RSSI Viewer application.
When you [select the device](overview.md#select-device), the tool will reprogram the connected board to act as the sniffer.
3 changes: 3 additions & 0 deletions doc/docs/installing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Installing RSSI Viewer app

For installation instructions, see [Installing nRF Connect for Desktop apps](https://docs.nordicsemi.com/bundle/nrf-connect-desktop/page/installing_apps.html) in the nRF Connect for Desktop documentation.
64 changes: 64 additions & 0 deletions doc/docs/overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Overview and user interface

After starting RSSI Viewer, the main application window is displayed.

![RSSI Viewer application window](./screenshots/rssi_overview.png "RSSI Viewer application window")

The available options and information change after you **Select Device**.

## Before selection

Before a device is selected, the side panel contains the following buttons:

### Select Device

Dropdown to list the devices attached to the computer. When you select a [supported device](index.md#supported-devices), the app programs the device with the sniffer firmware, and then connects to one of the available serial ports. Sniffing starts automatically.

## After selection

When a device is selected, sniffing in the 2.4 GHz range starts automatically and the side panel options become available.

![RSSI Viewer application window after selecting a device](./screenshots/rssi_viewer_working.gif "RSSI Viewer application window after selecting a device")

### Controls

This side panel area contains buttons that control the sniffing process:

- **Start** and **Pause** - Lets you start or pause the sniffing process.
- **Reset** - Lets you reset the sniffing output.

### Sweep Scan

This option lets you control the frequency with which the sniffing scan are run and with which the results are updated in the **RSSI Viewer** tab.

### Channel Details

The options in this area refer to the Bluetooth Low Energy channels displayed in the **RSSI Viewer** tab.

### Filters

The options in this area allows you to filter out specific Bluetooth LE channels and dBm values in the **RSSI Viewer** tab.
Once you select the values, the sniffing will be performed only within your custom range.

### Device

The **Toggle LED** button lets you toggle the LED on the connected device.

## RSSI Viewer tab

This is the main area of the application where the sniffing results are displayed. Changing the side panel option settings is automatically reflected on the sniffing results when the sniffing is ongoing.

![Chaning RSSI Viewer options during sniffing](./screenshots/rssi_viewer_showcase.gif "Chaning RSSI Viewer options during sniffing")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Needs review, @kylebonnici . Please answer my questions on chat.


## Log

The Log panel allows you to view the most important log events, tagged with a timestamp. Each time you open the app, a new session log file is created. You can find the Log panel and its controls, below the main application Window.

- When troubleshooting, to view more detailed information than shown in the Log panel, use **Open log file** to open the current log file in a text editor.
- To clear the information currently displayed in the Log panel, use **Clear Log**. The contents of the log file are not affected.
- To hide or display the Log panel in the user interface, use **Show Log**.
- To freeze Log panel scrolling, use **Autoscroll Log**.

## About tab

You can view application information, restore defaults, access source code and documentation. You also can find information on the selected device, access support tools, send feedback, and enable verbose logging.
Binary file added doc/docs/screenshots/rssi_overview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/docs/screenshots/rssi_viewer_showcase.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/docs/screenshots/rssi_viewer_working.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
63 changes: 63 additions & 0 deletions doc/mkdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
site_name: nRF Connect RSSI Viewer documentation
site_url:
use_directory_urls: false

theme:
name: material
palette:
- scheme: custom-blue
toggle:
icon: material/lightbulb-outline
name: Switch to dark mode
- scheme: custom-blue-dark
toggle:
icon: material/lightbulb
name: Switch to light mode
# logo: assets/logo.png
# favicon: assets/logo.png
features:
- content.code.annotate
- content.tooltips
- content.tabs.link
- navigation.indexes
- navigation.top
- navigation.tracking
- search.highlight
- toc.follow


extra_css:
- stylesheets/style.css

copyright:
Copyright &copy; 2023

markdown_extensions:
- abbr
- admonition
- attr_list
- md_in_html
- meta
- pymdownx.details
- pymdownx.keys
- pymdownx.tabbed
- pymdownx.superfences
- pymdownx.emoji:
emoji_index: !!python/name:materialx.emoji.twemoji
emoji_generator: !!python/name:materialx.emoji.to_svg
- toc:
permalink: true
toc_depth: 4

plugins:
- macros
- search


extra:
test: This is a test abbreviation snippet

nav:
- Home: index.md
- Installing RSSI Viewer app: installing.md
- Overview and user interface: overview.md
3 changes: 3 additions & 0 deletions doc/zoomin/custom.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
manual.name=nrf-connect-rssi-viewer
booktitle=nRF Connect RSSI Viewer
shortdesc=Documentation for the nRF Connect RSSI Viewer application.
10 changes: 10 additions & 0 deletions doc/zoomin/tags.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Document tags for Zoomin.

# Tags for all topics:
mapping_global:
- nrf-connect-rssi-viewer

# Tags for individual topics:
#mapping_topics:
# - filename.md: ["tag1","tag2"]

Loading