├── .github ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md └── workflows │ └── documentation.yml ├── .gitignore ├── LICENSE ├── README.md ├── docs ├── .overrides │ ├── .icons │ │ ├── logo.svg │ │ └── nordic-chip.svg │ ├── article.html │ ├── blog.html │ ├── home.html │ ├── main.html │ └── partials │ │ └── actions.html ├── CONTRIBUTING.md ├── LICENSE.md ├── assets │ ├── attachments │ │ ├── EU_DoC.pdf │ │ ├── FCC_SDoC.pdf │ │ ├── RoHS_and_REACH_DoC.pdf │ │ ├── nrf52840-connect-kit-3d-cad-step-models.zip │ │ ├── nrf52840-connect-kit-schematic-v1.0.pdf │ │ └── nrf52840-connectkit-quick-start-guide.pdf │ ├── favicon.png │ ├── images │ │ ├── 2.4g_antennas.png │ │ ├── about_wireshark.png │ │ ├── appstore.png │ │ ├── ble_advertising_setup.png │ │ ├── blinky_demo.gif │ │ ├── circuitpy_ble_keyboard.png │ │ ├── circuitpy_ble_mouse.png │ │ ├── circuitpython_ble_adv.png │ │ ├── connect-the-board.png │ │ ├── current_uf2_info.png │ │ ├── daplink_drag_n_drop.png │ │ ├── daplink_wiring_boards.png │ │ ├── establishing_ble_connections.png │ │ ├── feed_vsys_directly.png │ │ ├── google-play-badge.png │ │ ├── gpio_pinout.png │ │ ├── lbs_adv.png │ │ ├── lbs_button.png │ │ ├── lbs_led.png │ │ ├── lbs_service.png │ │ ├── makerdiary-store.png │ │ ├── mechanical_specification.png │ │ ├── mu-editor.png │ │ ├── mu-edittor-plotter-adc.png │ │ ├── mu_editor_serial.png │ │ ├── nfc_circuitry.png │ │ ├── nrf-sniffer-sw-interface.png │ │ ├── nrf52840_connectkit_hero.png │ │ ├── nrf_connect_ble_app.gif │ │ ├── nrf_connect_for_mobile.png │ │ ├── nrf_toolbox_circuitpy_commands.png │ │ ├── nrf_toolbox_circuitpy_connect.png │ │ ├── nrf_toolbox_circuitpy_create_cmd.png │ │ ├── nrf_toolbox_circuitpy_uart.png │ │ ├── nrf_toolbox_coap_conf.png │ │ ├── nrf_toolbox_coap_connect.png │ │ ├── nrf_toolbox_coap_ui.png │ │ ├── nrf_toolbox_switch_conf.png │ │ ├── nrf_toolbox_uart.png │ │ ├── nrf_toolbox_uart_connect.png │ │ ├── nrf_toolbox_zigbee_switch_ui.png │ │ ├── pc_nrfconnect_ble_app.png │ │ ├── peripheral_adv.png │ │ ├── peripheral_services.png │ │ ├── pinout.png │ │ ├── pitayalink_drag_n_drop.png │ │ ├── pitayalink_wiring_boards.png │ │ ├── power_supply_circuitry.png │ │ ├── power_via_usb_c.png │ │ ├── putty-settings.png │ │ ├── running_circuitpython.png │ │ ├── sample_beacon.png │ │ ├── taobao-store.png │ │ ├── tindie-store.png │ │ ├── uf2boot_volume.png │ │ ├── using_charger.png │ │ ├── viewing_service.png │ │ ├── voltage_meas_circuitry.png │ │ ├── vsys_via_diode.png │ │ ├── vsys_via_pmos.png │ │ ├── web_device_cli_nus.png │ │ ├── wireshark_802154_apply_column.png │ │ ├── wireshark_802154_captured_data.png │ │ ├── wireshark_802154_custom_options.png │ │ ├── wireshark_802154_display_filter.png │ │ ├── wireshark_802154_filter_expression.png │ │ ├── wireshark_802154_start.png │ │ ├── wireshark_capture_screen.png │ │ ├── wireshark_capture_screen_labled.png │ │ ├── wireshark_captured_data.png │ │ ├── wireshark_configuration_profiles.png │ │ ├── wireshark_copy_extcap.png │ │ ├── wireshark_decodeas_udp.png │ │ ├── wireshark_decryption_key_for_thread.png │ │ ├── wireshark_disable_protocols.png │ │ ├── wireshark_display_filter.png │ │ ├── wireshark_filter_column.png │ │ ├── wireshark_hardware_802154.png │ │ ├── wireshark_hardware_setup.png │ │ ├── wireshark_interface_identifier.png │ │ ├── wireshark_interface_options.png │ │ ├── wireshark_nrf802154_sniffer.png │ │ ├── wireshark_person_extcap_path.png │ │ ├── wireshark_preferences_6lowpan.png │ │ ├── wireshark_preferences_coap.png │ │ ├── wireshark_preferences_protocols.png │ │ ├── wireshark_preferences_zigbee.png │ │ ├── wireshark_rssi_filter.png │ │ ├── wireshark_select_multiple_interfaces.png │ │ ├── wireshark_zigbee_pc_keys.png │ │ └── wiring_nfc_ant.png │ └── stylesheets │ │ └── extra.css ├── blog │ ├── .authors.yml │ ├── index.md │ └── posts │ │ ├── introducing-circuitpython │ │ ├── cover.png │ │ └── index.md │ │ ├── introducing-nrf-connect-sdk │ │ ├── cover.png │ │ ├── index.md │ │ ├── ncs-arch.png │ │ ├── ncs_app_build_process.png │ │ └── ncs_build_process.png │ │ └── nrf52840-connect-kit-is-here │ │ ├── cover.png │ │ └── index.md ├── guides │ ├── ble-sniffer │ │ ├── actions.md │ │ ├── index.md │ │ ├── installation.md │ │ ├── running-sniffer.md │ │ └── usage.md │ ├── ncs │ │ ├── building.md │ │ ├── index.md │ │ ├── samples │ │ │ ├── adc.md │ │ │ ├── ble │ │ │ │ ├── beacon.md │ │ │ │ ├── observer.md │ │ │ │ ├── peripheral.md │ │ │ │ ├── peripheral_hids_keyboard.md │ │ │ │ ├── peripheral_hids_mouse.md │ │ │ │ ├── peripheral_lbs.md │ │ │ │ └── shell_bt_nus.md │ │ │ ├── blinky.md │ │ │ ├── button.md │ │ │ ├── hello_world.md │ │ │ ├── nfc │ │ │ │ ├── launch_app.md │ │ │ │ ├── text_record.md │ │ │ │ ├── uri_record.md │ │ │ │ └── writable_ndef_msg.md │ │ │ ├── qspi_flash.md │ │ │ ├── thread │ │ │ │ ├── cli.md │ │ │ │ ├── coap.md │ │ │ │ └── coprocessor.md │ │ │ ├── usb │ │ │ │ ├── hid_mouse.md │ │ │ │ └── mass.md │ │ │ ├── voltage_measurement.md │ │ │ └── zigbee │ │ │ │ ├── lighting.md │ │ │ │ ├── ncp.md │ │ │ │ └── shell.md │ │ └── setup.md │ ├── nrf802154-sniffer │ │ ├── capturing.md │ │ ├── configuring.md │ │ ├── index.md │ │ ├── inspecting-data.md │ │ └── installation.md │ └── python │ │ ├── getting-started.md │ │ ├── index.md │ │ ├── reference.md │ │ └── samples │ │ ├── adc.md │ │ ├── ble │ │ ├── advertising.md │ │ ├── hid_keyboard.md │ │ ├── hid_mouse.md │ │ └── nus.md │ │ ├── blinky.md │ │ ├── button.md │ │ ├── pwm.md │ │ └── usb │ │ ├── hid_keyboard.md │ │ └── hid_mouse.md ├── hardware.md ├── index.md ├── introduction.md ├── out-of-box-experience.md ├── programming │ ├── daplink.md │ ├── index.md │ ├── pitaya-link.md │ └── uf2boot.md ├── purchase.md ├── resources.md └── revision-history.md ├── firmware ├── ble_connectivity │ ├── connectivity_4.1.4_usb_with_s132_5.1.0.hex │ └── connectivity_4.1.4_usb_with_s132_5.1.0.uf2 ├── ble_sniffer │ └── nrf_sniffer_for_bluetooth_le_v4.1.1.uf2 ├── circuitpython │ ├── circuitpython-nrf52840_connectkit-en_US-8.1.0-rtm.hex │ └── circuitpython-nrf52840_connectkit-en_US-8.1.0-rtm.uf2 ├── daplink │ ├── daplink-nrf52840_connectkit-v0257.uf2 │ └── daplink-nrf52840_connectkit-v0258.uf2 ├── nrf802154_sniffer │ └── nrf802154_sniffer_v0.7.2.uf2 └── uf2_bootloader │ ├── nrf52840_connectkit-uf2_bootloader-0.7.0-rtm-nosd.hex │ └── update-nrf52840_connectkit-uf2_bootloader-0.7.0-rtm-nosd.uf2 ├── mkdocs.yml ├── requirements-docs.txt └── tools ├── ble_sniffer ├── Profile_nRF_Sniffer_Bluetooth_LE │ ├── preferences │ └── recent └── extcap │ ├── SnifferAPI │ ├── CaptureFiles.py │ ├── Devices.py │ ├── Exceptions.py │ ├── Filelock.py │ ├── Logger.py │ ├── Notifications.py │ ├── Packet.py │ ├── Pcap.py │ ├── Sniffer.py │ ├── SnifferCollector.py │ ├── Types.py │ ├── UART.py │ ├── __init__.py │ └── version.py │ ├── nrf_sniffer_ble.bat │ ├── nrf_sniffer_ble.py │ ├── nrf_sniffer_ble.sh │ └── requirements.txt └── nrf802154_sniffer ├── nrf802154_sniffer ├── __init__.py ├── nrf802154_sniffer.bat ├── nrf802154_sniffer.py └── nrf802154_sniffer.sh ├── requirements.txt └── setup.py /.github/CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as 6 | contributors and maintainers pledge to make participation in our project and 7 | our community a harassment-free experience for everyone, regardless of age, body 8 | size, disability, ethnicity, sex characteristics, gender identity and expression, 9 | level of experience, education, socio-economic status, nationality, personal 10 | appearance, race, religion, or sexual identity and orientation. 11 | 12 | ## Our Standards 13 | 14 | Examples of behavior that contributes to creating a positive environment 15 | include: 16 | 17 | * Using welcoming and inclusive language 18 | * Being respectful of differing viewpoints and experiences 19 | * Gracefully accepting constructive criticism 20 | * Focusing on what is best for the community 21 | * Showing empathy towards other community members 22 | 23 | Examples of unacceptable behavior by participants include: 24 | 25 | * The use of sexualized language or imagery and unwelcome sexual attention or 26 | advances 27 | * Trolling, insulting/derogatory comments, and personal or political attacks 28 | * Public or private harassment 29 | * Publishing others' private information, such as a physical or electronic 30 | address, without explicit permission 31 | * Other conduct which could reasonably be considered inappropriate in a 32 | professional setting 33 | 34 | ## Our Responsibilities 35 | 36 | Project maintainers are responsible for clarifying the standards of acceptable 37 | behavior and are expected to take appropriate and fair corrective action in 38 | response to any instances of unacceptable behavior. 39 | 40 | Project maintainers have the right and responsibility to remove, edit, or 41 | reject comments, commits, code, wiki edits, issues, and other contributions 42 | that are not aligned to this Code of Conduct, or to ban temporarily or 43 | permanently any contributor for other behaviors that they deem inappropriate, 44 | threatening, offensive, or harmful. 45 | 46 | ## Scope 47 | 48 | This Code of Conduct applies within all project spaces, and it also applies when 49 | an individual is representing the project or its community in public spaces. 50 | Examples of representing a project or community include using an official 51 | project e-mail address, posting via an official social media account, or acting 52 | as an appointed representative at an online or offline event. Representation of 53 | a project may be further defined and clarified by project maintainers. 54 | 55 | ## Enforcement 56 | 57 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 58 | reported by contacting the project team at . All 59 | complaints will be reviewed and investigated and will result in a response that 60 | is deemed necessary and appropriate to the circumstances. The project team is 61 | obligated to maintain confidentiality with regard to the reporter of an incident. 62 | Further details of specific enforcement policies may be posted separately. 63 | 64 | Project maintainers who do not follow or enforce the Code of Conduct in good 65 | faith may face temporary or permanent repercussions as determined by other 66 | members of the project's leadership. 67 | 68 | ## Attribution 69 | 70 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, 71 | available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html 72 | 73 | [homepage]: https://www.contributor-covenant.org 74 | 75 | For answers to common questions about this code of conduct, see 76 | https://www.contributor-covenant.org/faq -------------------------------------------------------------------------------- /.github/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | We're really glad you're reading this, because we would love to have more developers contribute to this project! If you're passionate about making this project better, you're in the right place. 4 | 5 | ## Before contributing 6 | 7 | If you encounter a bug or think of a useful feature, please [create a new issue](https://github.com/makerdiary/nrf52840-connectkit/issues/new). Creating an issue before jumping into code ensures we can discuss it and determine whether it aligns with the direction of this project. 8 | 9 | If you want to contribute to the project, regardless of whether it's a small bug fix or correcting a typo, please feel free to do so. Any help goes a long way! Also, contributions aren't necessarily all code related. Other contributions can be in the form of issues, pull requests, discussions, etc. 10 | 11 | ## Got a question or problem? 12 | 13 | For quick questions there's no need to open an issue as you can reach us on [GitHub Discussions](https://github.com/makerdiary/nrf52840-connectkit/discussions). 14 | 15 | ## Reporting a bug 16 | 17 | Bugs are tracked as [GitHub issues](https://github.com/makerdiary/nrf52840-connectkit/issues). Search open issues to see if someone else has reported a similar bug. If it's something new, [open an issue](https://github.com/makerdiary/nrf52840-connectkit/issues/new). We'll use the issue to have a conversation about the problem you want to fix. 18 | 19 | When creating a new issue, please ensure the issue is clear and include additional details to help maintainers reproduce it: 20 | 21 | * **Use a clear and descriptive title** for the issue to identify the problem. 22 | * **Describe the exact steps which reproduce the problem** in as many details as possible. 23 | * **Provide specific examples to demonstrate the steps.** Include links to files, or copy/pasteable snippets. If you're providing snippets in the issue, use Markdown code blocks. 24 | * **Describe the behavior you observed** after following the steps and point out what exactly is the problem with that behavior. 25 | * **Explain which behavior you expected to see** instead and why. 26 | * **Include screenshots and animated GIFs** where possible. 27 | 28 | ## Sign-off your commits 29 | 30 | A sign-off message in the following format is required on each commit in the pull request: 31 | 32 | ``` { .text .no-copy linenums="1" } 33 | This is my commit message 34 | 35 | Signed-off-by: First_Name Last_Name 36 | ``` 37 | 38 | The text can either be manually added to your commit body, or you can add either `-s` or `--signoff` to your usual git commit commands. 39 | 40 | ### Creating your signoff 41 | 42 | Git has a `-s | --signoff` command-line option to append this automatically to your commit message: 43 | 44 | ``` bash linenums="1" 45 | git commit --signoff --message 'This is my commit message' 46 | ``` 47 | 48 | or 49 | 50 | ``` bash linenums="1" 51 | git commit -s -m "This is my commit message" 52 | ``` 53 | 54 | This will use your default git configuration which is found in `.git/config` and usually, it is the `username systemaddress` of the machine which you are using. 55 | 56 | To change this, you can use the following commands (Note these only change the current repo settings, you will need to add `--global` for these commands to change the installation default). 57 | 58 | Your name: 59 | 60 | ``` bash linenums="1" 61 | git config user.name "First_Name Last_Name" 62 | ``` 63 | 64 | Your email: 65 | 66 | ``` bash linenums="1" 67 | git config user.email "My_Name@example.com" 68 | ``` 69 | 70 | ### How to amend a sign-off 71 | 72 | If you have authored a commit that is missing the signed-off-by line, you can amend your commits and push them to GitHub 73 | 74 | ``` bash linenums="1" 75 | git commit --amend --signoff 76 | ``` 77 | 78 | If you've pushed your changes to GitHub already you'll need to force push your branch after this with `git push -f`. 79 | -------------------------------------------------------------------------------- /.github/workflows/documentation.yml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2016-2023 Makerdiary 2 | 3 | # Permission is hereby granted, free of charge, to any person obtaining a copy 4 | # of this software and associated documentation files (the "Software"), to 5 | # deal in the Software without restriction, including without limitation the 6 | # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 7 | # sell copies of the Software, and to permit persons to whom the Software is 8 | # furnished to do so, subject to the following conditions: 9 | 10 | # The above copyright notice and this permission notice shall be included in 11 | # all copies or substantial portions of the Software. 12 | 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | # FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE 16 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | # IN THE SOFTWARE. 20 | 21 | name: documentation 22 | on: 23 | push: 24 | branches: 25 | - main 26 | 27 | env: 28 | PYTHON_VERSION: 3.x 29 | 30 | permissions: 31 | contents: write 32 | 33 | jobs: 34 | documentation: 35 | name: Build documentation 36 | runs-on: ubuntu-latest 37 | steps: 38 | 39 | - name: Checkout repository 40 | uses: actions/checkout@v3 41 | with: 42 | fetch-depth: 0 43 | 44 | - name: Set up Python runtime 45 | uses: actions/setup-python@v4 46 | with: 47 | python-version: ${{ env.PYTHON_VERSION }} 48 | 49 | - name: Set the date environmental variable 50 | run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV 51 | 52 | - name: Set up build cache 53 | uses: actions/cache@v3 54 | id: cache 55 | with: 56 | key: mkdocs-material-${{ env.cache_id }} 57 | path: .cache 58 | restore-keys: | 59 | mkdocs-material- 60 | 61 | - name: Install dependencies 62 | run: sudo apt-get install pngquant 63 | 64 | - name: Install Python dependencies 65 | run: | 66 | python3 -m pip install --upgrade pip 67 | python3 -m pip install wheel 68 | python3 -m pip install -r requirements-docs.txt 69 | 70 | - name: Build site 71 | run: mkdocs build 72 | 73 | - name: Deploy documentation 74 | env: 75 | GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} 76 | GOOGLE_ANALYTICS_KEY: ${{ vars.GOOGLE_ANALYTICS_KEY }} 77 | run: | 78 | mkdocs gh-deploy --force 79 | mkdocs --version 80 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # editors 2 | *.swp 3 | *~ 4 | 5 | # python 6 | .venv 7 | __pycache__ 8 | *.egg-info 9 | dist 10 | 11 | # build 12 | build 13 | build-* 14 | build_* 15 | 16 | # mkdocs 17 | site 18 | 19 | # macOS internals 20 | .DS_Store -------------------------------------------------------------------------------- /docs/.overrides/.icons/logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /docs/.overrides/.icons/nordic-chip.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /docs/.overrides/article.html: -------------------------------------------------------------------------------- 1 | 19 | 20 | {% extends "main.html" %} 21 | 22 | 23 | {% block content %} 24 | {{ super() }} 25 | {% if config.extra.giscus %} 26 | 27 |

{{ lang.t("meta.comments") }}

28 | 43 | 44 | 45 | 72 | {% endif %} 73 | {% endblock %} 74 | -------------------------------------------------------------------------------- /docs/.overrides/main.html: -------------------------------------------------------------------------------- 1 | 23 | 24 | {% extends "base.html" %} 25 | 26 | {% block extrahead %} 27 | {% if config.theme.announcement %} 28 | 53 | {% else %} 54 | 59 | {% endif %} 60 | 77 | {% endblock %} 78 | 79 | 80 | {% block announce %} 81 | 84 | {{ config.theme.announcement }} 85 | 105 | {% endblock %} 106 | -------------------------------------------------------------------------------- /docs/.overrides/partials/actions.html: -------------------------------------------------------------------------------- 1 | 22 | 23 | 24 | {% if page.edit_url %} 25 | {% set edit = "https://github.com/makerdiary/nrf52840-connectkit/edit" %} 26 | {% set view = "https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit" %} 27 | 32 | {% include ".icons/material/file-edit-outline.svg" %} 33 | 34 | 39 | {% include ".icons/material/file-eye-outline.svg" %} 40 | 41 | {% endif %} 42 | -------------------------------------------------------------------------------- /docs/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | We're really glad you're reading this, because we would love to have more developers contribute to this project! If you're passionate about making this project better, you're in the right place. 4 | 5 | ## Before contributing 6 | 7 | If you encounter a bug or think of a useful feature, please [create a new issue](https://github.com/makerdiary/nrf52840-connectkit/issues/new). Creating an issue before jumping into code ensures we can discuss it and determine whether it aligns with the direction of this project. 8 | 9 | If you want to contribute to the project, regardless of whether it's a small bug fix or correcting a typo, please feel free to do so. Any help goes a long way! Also, contributions aren't necessarily all code related. Other contributions can be in the form of issues, pull requests, discussions, etc. 10 | 11 | ## Got a question or problem? 12 | 13 | For quick questions there's no need to open an issue as you can reach us on [GitHub Discussions](https://github.com/makerdiary/nrf52840-connectkit/discussions). 14 | 15 | ## Reporting a bug 16 | 17 | Bugs are tracked as [GitHub issues](https://github.com/makerdiary/nrf52840-connectkit/issues). Search open issues to see if someone else has reported a similar bug. If it's something new, [open an issue](https://github.com/makerdiary/nrf52840-connectkit/issues/new). We'll use the issue to have a conversation about the problem you want to fix. 18 | 19 | When creating a new issue, please ensure the issue is clear and include additional details to help maintainers reproduce it: 20 | 21 | * **Use a clear and descriptive title** for the issue to identify the problem. 22 | * **Describe the exact steps which reproduce the problem** in as many details as possible. 23 | * **Provide specific examples to demonstrate the steps.** Include links to files, or copy/pasteable snippets. If you're providing snippets in the issue, use Markdown code blocks. 24 | * **Describe the behavior you observed** after following the steps and point out what exactly is the problem with that behavior. 25 | * **Explain which behavior you expected to see** instead and why. 26 | * **Include screenshots and animated GIFs** where possible. 27 | 28 | ## Sign-off your commits 29 | 30 | A sign-off message in the following format is required on each commit in the pull request: 31 | 32 | ``` { .text .no-copy linenums="1" } 33 | This is my commit message 34 | 35 | Signed-off-by: First_Name Last_Name 36 | ``` 37 | 38 | The text can either be manually added to your commit body, or you can add either `-s` or `--signoff` to your usual git commit commands. 39 | 40 | ### Creating your signoff 41 | 42 | Git has a `-s | --signoff` command-line option to append this automatically to your commit message: 43 | 44 | ``` bash linenums="1" 45 | git commit --signoff --message 'This is my commit message' 46 | ``` 47 | 48 | or 49 | 50 | ``` bash linenums="1" 51 | git commit -s -m "This is my commit message" 52 | ``` 53 | 54 | This will use your default git configuration which is found in `.git/config` and usually, it is the `username systemaddress` of the machine which you are using. 55 | 56 | To change this, you can use the following commands (Note these only change the current repo settings, you will need to add `--global` for these commands to change the installation default). 57 | 58 | Your name: 59 | 60 | ``` bash linenums="1" 61 | git config user.name "First_Name Last_Name" 62 | ``` 63 | 64 | Your email: 65 | 66 | ``` bash linenums="1" 67 | git config user.email "My_Name@example.com" 68 | ``` 69 | 70 | ### How to amend a sign-off 71 | 72 | If you have authored a commit that is missing the signed-off-by line, you can amend your commits and push them to GitHub 73 | 74 | ``` bash linenums="1" 75 | git commit --amend --signoff 76 | ``` 77 | 78 | If you've pushed your changes to GitHub already you'll need to force push your branch after this with `git push -f`. 79 | -------------------------------------------------------------------------------- /docs/assets/attachments/EU_DoC.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/attachments/EU_DoC.pdf -------------------------------------------------------------------------------- /docs/assets/attachments/FCC_SDoC.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/attachments/FCC_SDoC.pdf -------------------------------------------------------------------------------- /docs/assets/attachments/RoHS_and_REACH_DoC.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/attachments/RoHS_and_REACH_DoC.pdf -------------------------------------------------------------------------------- /docs/assets/attachments/nrf52840-connect-kit-3d-cad-step-models.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/attachments/nrf52840-connect-kit-3d-cad-step-models.zip -------------------------------------------------------------------------------- /docs/assets/attachments/nrf52840-connect-kit-schematic-v1.0.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/attachments/nrf52840-connect-kit-schematic-v1.0.pdf -------------------------------------------------------------------------------- /docs/assets/attachments/nrf52840-connectkit-quick-start-guide.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/attachments/nrf52840-connectkit-quick-start-guide.pdf -------------------------------------------------------------------------------- /docs/assets/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/favicon.png -------------------------------------------------------------------------------- /docs/assets/images/2.4g_antennas.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/2.4g_antennas.png -------------------------------------------------------------------------------- /docs/assets/images/about_wireshark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/about_wireshark.png -------------------------------------------------------------------------------- /docs/assets/images/appstore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/appstore.png -------------------------------------------------------------------------------- /docs/assets/images/ble_advertising_setup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/ble_advertising_setup.png -------------------------------------------------------------------------------- /docs/assets/images/blinky_demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/blinky_demo.gif -------------------------------------------------------------------------------- /docs/assets/images/circuitpy_ble_keyboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/circuitpy_ble_keyboard.png -------------------------------------------------------------------------------- /docs/assets/images/circuitpy_ble_mouse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/circuitpy_ble_mouse.png -------------------------------------------------------------------------------- /docs/assets/images/circuitpython_ble_adv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/circuitpython_ble_adv.png -------------------------------------------------------------------------------- /docs/assets/images/connect-the-board.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/connect-the-board.png -------------------------------------------------------------------------------- /docs/assets/images/current_uf2_info.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/current_uf2_info.png -------------------------------------------------------------------------------- /docs/assets/images/daplink_drag_n_drop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/daplink_drag_n_drop.png -------------------------------------------------------------------------------- /docs/assets/images/daplink_wiring_boards.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/daplink_wiring_boards.png -------------------------------------------------------------------------------- /docs/assets/images/establishing_ble_connections.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/establishing_ble_connections.png -------------------------------------------------------------------------------- /docs/assets/images/feed_vsys_directly.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/feed_vsys_directly.png -------------------------------------------------------------------------------- /docs/assets/images/google-play-badge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/google-play-badge.png -------------------------------------------------------------------------------- /docs/assets/images/gpio_pinout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/gpio_pinout.png -------------------------------------------------------------------------------- /docs/assets/images/lbs_adv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/lbs_adv.png -------------------------------------------------------------------------------- /docs/assets/images/lbs_button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/lbs_button.png -------------------------------------------------------------------------------- /docs/assets/images/lbs_led.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/lbs_led.png -------------------------------------------------------------------------------- /docs/assets/images/lbs_service.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/lbs_service.png -------------------------------------------------------------------------------- /docs/assets/images/makerdiary-store.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/makerdiary-store.png -------------------------------------------------------------------------------- /docs/assets/images/mechanical_specification.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/mechanical_specification.png -------------------------------------------------------------------------------- /docs/assets/images/mu-editor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/mu-editor.png -------------------------------------------------------------------------------- /docs/assets/images/mu-edittor-plotter-adc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/mu-edittor-plotter-adc.png -------------------------------------------------------------------------------- /docs/assets/images/mu_editor_serial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/mu_editor_serial.png -------------------------------------------------------------------------------- /docs/assets/images/nfc_circuitry.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/nfc_circuitry.png -------------------------------------------------------------------------------- /docs/assets/images/nrf-sniffer-sw-interface.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/nrf-sniffer-sw-interface.png -------------------------------------------------------------------------------- /docs/assets/images/nrf52840_connectkit_hero.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/nrf52840_connectkit_hero.png -------------------------------------------------------------------------------- /docs/assets/images/nrf_connect_ble_app.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/nrf_connect_ble_app.gif -------------------------------------------------------------------------------- /docs/assets/images/nrf_connect_for_mobile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/nrf_connect_for_mobile.png -------------------------------------------------------------------------------- /docs/assets/images/nrf_toolbox_circuitpy_commands.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/nrf_toolbox_circuitpy_commands.png -------------------------------------------------------------------------------- /docs/assets/images/nrf_toolbox_circuitpy_connect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/nrf_toolbox_circuitpy_connect.png -------------------------------------------------------------------------------- /docs/assets/images/nrf_toolbox_circuitpy_create_cmd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/nrf_toolbox_circuitpy_create_cmd.png -------------------------------------------------------------------------------- /docs/assets/images/nrf_toolbox_circuitpy_uart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/nrf_toolbox_circuitpy_uart.png -------------------------------------------------------------------------------- /docs/assets/images/nrf_toolbox_coap_conf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/nrf_toolbox_coap_conf.png -------------------------------------------------------------------------------- /docs/assets/images/nrf_toolbox_coap_connect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/nrf_toolbox_coap_connect.png -------------------------------------------------------------------------------- /docs/assets/images/nrf_toolbox_coap_ui.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/nrf_toolbox_coap_ui.png -------------------------------------------------------------------------------- /docs/assets/images/nrf_toolbox_switch_conf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/nrf_toolbox_switch_conf.png -------------------------------------------------------------------------------- /docs/assets/images/nrf_toolbox_uart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/nrf_toolbox_uart.png -------------------------------------------------------------------------------- /docs/assets/images/nrf_toolbox_uart_connect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/nrf_toolbox_uart_connect.png -------------------------------------------------------------------------------- /docs/assets/images/nrf_toolbox_zigbee_switch_ui.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/nrf_toolbox_zigbee_switch_ui.png -------------------------------------------------------------------------------- /docs/assets/images/pc_nrfconnect_ble_app.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/pc_nrfconnect_ble_app.png -------------------------------------------------------------------------------- /docs/assets/images/peripheral_adv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/peripheral_adv.png -------------------------------------------------------------------------------- /docs/assets/images/peripheral_services.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/peripheral_services.png -------------------------------------------------------------------------------- /docs/assets/images/pinout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/pinout.png -------------------------------------------------------------------------------- /docs/assets/images/pitayalink_drag_n_drop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/pitayalink_drag_n_drop.png -------------------------------------------------------------------------------- /docs/assets/images/pitayalink_wiring_boards.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/pitayalink_wiring_boards.png -------------------------------------------------------------------------------- /docs/assets/images/power_supply_circuitry.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/power_supply_circuitry.png -------------------------------------------------------------------------------- /docs/assets/images/power_via_usb_c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/power_via_usb_c.png -------------------------------------------------------------------------------- /docs/assets/images/putty-settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/putty-settings.png -------------------------------------------------------------------------------- /docs/assets/images/running_circuitpython.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/running_circuitpython.png -------------------------------------------------------------------------------- /docs/assets/images/sample_beacon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/sample_beacon.png -------------------------------------------------------------------------------- /docs/assets/images/taobao-store.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/taobao-store.png -------------------------------------------------------------------------------- /docs/assets/images/tindie-store.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/tindie-store.png -------------------------------------------------------------------------------- /docs/assets/images/uf2boot_volume.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/uf2boot_volume.png -------------------------------------------------------------------------------- /docs/assets/images/using_charger.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/using_charger.png -------------------------------------------------------------------------------- /docs/assets/images/viewing_service.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/viewing_service.png -------------------------------------------------------------------------------- /docs/assets/images/voltage_meas_circuitry.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/voltage_meas_circuitry.png -------------------------------------------------------------------------------- /docs/assets/images/vsys_via_diode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/vsys_via_diode.png -------------------------------------------------------------------------------- /docs/assets/images/vsys_via_pmos.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/vsys_via_pmos.png -------------------------------------------------------------------------------- /docs/assets/images/web_device_cli_nus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/web_device_cli_nus.png -------------------------------------------------------------------------------- /docs/assets/images/wireshark_802154_apply_column.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/wireshark_802154_apply_column.png -------------------------------------------------------------------------------- /docs/assets/images/wireshark_802154_captured_data.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/wireshark_802154_captured_data.png -------------------------------------------------------------------------------- /docs/assets/images/wireshark_802154_custom_options.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/wireshark_802154_custom_options.png -------------------------------------------------------------------------------- /docs/assets/images/wireshark_802154_display_filter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/wireshark_802154_display_filter.png -------------------------------------------------------------------------------- /docs/assets/images/wireshark_802154_filter_expression.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/wireshark_802154_filter_expression.png -------------------------------------------------------------------------------- /docs/assets/images/wireshark_802154_start.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/wireshark_802154_start.png -------------------------------------------------------------------------------- /docs/assets/images/wireshark_capture_screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/wireshark_capture_screen.png -------------------------------------------------------------------------------- /docs/assets/images/wireshark_capture_screen_labled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/wireshark_capture_screen_labled.png -------------------------------------------------------------------------------- /docs/assets/images/wireshark_captured_data.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/wireshark_captured_data.png -------------------------------------------------------------------------------- /docs/assets/images/wireshark_configuration_profiles.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/wireshark_configuration_profiles.png -------------------------------------------------------------------------------- /docs/assets/images/wireshark_copy_extcap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/wireshark_copy_extcap.png -------------------------------------------------------------------------------- /docs/assets/images/wireshark_decodeas_udp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/wireshark_decodeas_udp.png -------------------------------------------------------------------------------- /docs/assets/images/wireshark_decryption_key_for_thread.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/wireshark_decryption_key_for_thread.png -------------------------------------------------------------------------------- /docs/assets/images/wireshark_disable_protocols.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/wireshark_disable_protocols.png -------------------------------------------------------------------------------- /docs/assets/images/wireshark_display_filter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/wireshark_display_filter.png -------------------------------------------------------------------------------- /docs/assets/images/wireshark_filter_column.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/wireshark_filter_column.png -------------------------------------------------------------------------------- /docs/assets/images/wireshark_hardware_802154.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/wireshark_hardware_802154.png -------------------------------------------------------------------------------- /docs/assets/images/wireshark_hardware_setup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/wireshark_hardware_setup.png -------------------------------------------------------------------------------- /docs/assets/images/wireshark_interface_identifier.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/wireshark_interface_identifier.png -------------------------------------------------------------------------------- /docs/assets/images/wireshark_interface_options.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/wireshark_interface_options.png -------------------------------------------------------------------------------- /docs/assets/images/wireshark_nrf802154_sniffer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/wireshark_nrf802154_sniffer.png -------------------------------------------------------------------------------- /docs/assets/images/wireshark_person_extcap_path.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/wireshark_person_extcap_path.png -------------------------------------------------------------------------------- /docs/assets/images/wireshark_preferences_6lowpan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/wireshark_preferences_6lowpan.png -------------------------------------------------------------------------------- /docs/assets/images/wireshark_preferences_coap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/wireshark_preferences_coap.png -------------------------------------------------------------------------------- /docs/assets/images/wireshark_preferences_protocols.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/wireshark_preferences_protocols.png -------------------------------------------------------------------------------- /docs/assets/images/wireshark_preferences_zigbee.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/wireshark_preferences_zigbee.png -------------------------------------------------------------------------------- /docs/assets/images/wireshark_rssi_filter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/wireshark_rssi_filter.png -------------------------------------------------------------------------------- /docs/assets/images/wireshark_select_multiple_interfaces.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/wireshark_select_multiple_interfaces.png -------------------------------------------------------------------------------- /docs/assets/images/wireshark_zigbee_pc_keys.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/wireshark_zigbee_pc_keys.png -------------------------------------------------------------------------------- /docs/assets/images/wiring_nfc_ant.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/assets/images/wiring_nfc_ant.png -------------------------------------------------------------------------------- /docs/assets/stylesheets/extra.css: -------------------------------------------------------------------------------- 1 | :root > * { 2 | --md-primary-fg-color: #AC2E45; 3 | --md-primary-fg-color--light: #D84B61; 4 | --md-primary-fg-color--dark: #982942; 5 | --md-accent-fg-color: #C13349; 6 | --md-accent-fg-color--transparent: #F3BAC5; 7 | } 8 | 9 | [data-md-color-scheme="slate"] { 10 | --md-hue: 210; /* [0, 360] */ 11 | --md-primary-fg-color: #AC2E45; 12 | --md-primary-fg-color--light: #D84B61; 13 | --md-primary-fg-color--dark: #982942; 14 | --md-accent-fg-color: #C13349; 15 | --md-accent-fg-color--transparent: #EB8F9F; 16 | } 17 | 18 | .md-header__button.md-logo :-webkit-any(img,svg) { 19 | height: 36px; 20 | } 21 | 22 | .nordic { 23 | color: #00a9ce; 24 | } 25 | 26 | .red-wire { 27 | color: #ef5552; 28 | } 29 | 30 | .gray-wire { 31 | color: #757575; 32 | } 33 | 34 | .amber-wire { 35 | color: #ffc105; 36 | } 37 | 38 | .light-green-wire { 39 | color: #8bc34b; 40 | } 41 | 42 | .light-blue-wire { 43 | color: #02a6f2; 44 | } 45 | 46 | /* 47 | .md-typeset table:not([class]) { 48 | border: unset; 49 | border-collapse: collapse; 50 | } 51 | 52 | .md-typeset table:not([class]) tr:nth-child(2n) { 53 | background-color: rgba(0, 0, 0, 0.035); 54 | } 55 | 56 | .md-typeset table:not([class]) tbody tr:hover { 57 | background-color: var(--md-typeset-table-color); 58 | box-shadow: unset; 59 | } 60 | 61 | .md-typeset table:not([class]) th { 62 | min-width: 5.0rem; 63 | } 64 | 65 | .md-typeset table:not([class]) td, 66 | .md-typeset table:not([class]) th { 67 | padding: 0.625em 0.625em 68 | } 69 | 70 | .md-typeset table:not([class]) td, 71 | .md-typeset table:not([class]) th, 72 | .md-typeset table:not([class]) tr { 73 | border-top: unset; 74 | border: 1px solid var(--md-typeset-table-color); 75 | } 76 | */ 77 | -------------------------------------------------------------------------------- /docs/blog/.authors.yml: -------------------------------------------------------------------------------- 1 | authors: 2 | makerdiary: 3 | name: makerdiary 4 | description: Official 5 | avatar: https://github.com/makerdiary.png 6 | Zelin: 7 | name: Zelin 8 | description: Editor 9 | avatar: https://github.com/caizelin.png -------------------------------------------------------------------------------- /docs/blog/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | template: blog.html 3 | title: Latest posts 4 | hide: 5 | - navigation 6 | - toc 7 | --- 8 | 9 | # Latest posts -------------------------------------------------------------------------------- /docs/blog/posts/introducing-circuitpython/cover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/blog/posts/introducing-circuitpython/cover.png -------------------------------------------------------------------------------- /docs/blog/posts/introducing-circuitpython/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Introducing CircuitPython 3 | date: 2023-06-26 4 | authors: 5 | - makerdiary 6 | cover: cover.png 7 | description: > 8 | CircuitPython is an implementation of Python for microcontrollers. Once you get your board set up, open any text editor, and start editing code. 9 | --- 10 | 11 | ![](cover.png){ loading=lazy } 12 | 13 | # Introducing CircuitPython 14 | 15 | ## What is CircuitPython? 16 | 17 | CircuitPython is a programming language designed to simplify experimenting and learning to program on low-cost microcontroller boards. It makes getting started easier than ever with no upfront desktop downloads needed. Once you get your board set up, open any text editor, and get started editing code. It's that simple. 18 | 19 | CircuitPython is an implementation of Python, which is a high-level programming language which means it's designed to be easier to read, write and maintain. It supports modules and packages which means it's easy to reuse your code for other projects. It has a built in interpreter which means there are no extra steps, like compiling, to get your code to work. And of course, it is Open Source Software which means it's free for anyone to use, modify or improve upon. 20 | 21 | ## Why CircuitPython? 22 | 23 | CircuitPython is a fork of [MicroPython](https://micropython.org/), and offers unified Python core APIs and a growing list of 300+ device libraries and drivers that work with it. You can see [differences from MicroPython](https://github.com/adafruit/circuitpython#differences-from-micropython). 24 | 25 | Here is some reasons to use CircuitPython: 26 | 27 | - __You want to get up and running quickly.__ Create a file, edit your code, save the file, and it runs immediately. There is no compiling, no downloading and no uploading needed. 28 | - __You're new to programming.__ CircuitPython is designed with education in mind. It's easy to start learning how to program and you get immediate feedback from the board. 29 | - __Easily update your code.__ Since your code lives on the disk drive, you can edit it whenever you like, you can also keep multiple files around for easy experimentation. 30 | - __The serial console and REPL.__ These allow for live feedback from your code and interactive programming. 31 | File storage. The internal storage for CircuitPython makes it great for data-logging, playing audio clips, and otherwise interacting with files. 32 | - __Strong hardware support.__ CircuitPython has builtin support for microcontroller hardware features like digital I/O pins, hardware buses (UART, I2C, SPI), audio I/O, and other capabilities. There are also many libraries and drivers for sensors, breakout boards and other external components. 33 | - __It's Python!__ Python is the fastest-growing programming language. It's taught in schools and universities. CircuitPython is almost-completely compatible with Python. It simply adds hardware support. 34 | 35 | ## How to get started? 36 | 37 | To use CircuitPython, you need to choose a microcontroller board well supported by CircuitPython. There are [300+ boards](https://circuitpython.org/downloads) that can run CircuitPython. 38 | 39 | Here we have ported CircuitPython to our nRF52840 Connect Kit and offer an extensive set of documentation and samples to help you get started quickly: 40 | 41 | [Getting Started with CircuitPython](../../../guides/python/index.md){ .md-button .md-button--primary } 42 | -------------------------------------------------------------------------------- /docs/blog/posts/introducing-nrf-connect-sdk/cover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/blog/posts/introducing-nrf-connect-sdk/cover.png -------------------------------------------------------------------------------- /docs/blog/posts/introducing-nrf-connect-sdk/ncs-arch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/blog/posts/introducing-nrf-connect-sdk/ncs-arch.png -------------------------------------------------------------------------------- /docs/blog/posts/introducing-nrf-connect-sdk/ncs_app_build_process.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/blog/posts/introducing-nrf-connect-sdk/ncs_app_build_process.png -------------------------------------------------------------------------------- /docs/blog/posts/introducing-nrf-connect-sdk/ncs_build_process.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/blog/posts/introducing-nrf-connect-sdk/ncs_build_process.png -------------------------------------------------------------------------------- /docs/blog/posts/nrf52840-connect-kit-is-here/cover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/docs/blog/posts/nrf52840-connect-kit-is-here/cover.png -------------------------------------------------------------------------------- /docs/blog/posts/nrf52840-connect-kit-is-here/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: nRF52840 Connect Kit is Here! 3 | date: 2023-06-25 4 | authors: 5 | - makerdiary 6 | cover: cover.png 7 | description: > 8 | We are excited to announce the nRF52840 Connect Kit! It comes with a more mainstream form factor, USB-C, 64 Mbit QSPI flash, flexible power management and a rich set of features. 9 | --- 10 | 11 | ![](cover.png){ loading=lazy } 12 | 13 | # nRF52840 Connect Kit is Here! 14 | 15 | We are excited to announce that nRF52840 Connect Kit is now available! It's a new member of our nRF52840-based prototyping kit family. It comes in a more mainstream form factor with USB-C and 40 pin DIP/SMT type. A new power architecture is introduced to support various options for easily powering the unit from USB, external supplies or batteries. We will also offer Chip antenna or U.FL receptacle option for selection. 16 | 17 | ![](../../../assets/images/nrf52840_connectkit_hero.png){ loading=lazy } 18 | 19 | With nRF52840 Connect Kit you can quickly and easily build your next connected project supporting Bluetooth LE, Bluetooth mesh, NFC, Thread, Zigbee, 802.15.4, ANT and 2.4 GHz proprietary stacks. Easy-to-use form factor, USB-C, 64 Mbit QSPI flash, flexible power management and a rich set of features enable designs to meet a wide range of applications. 20 | 21 | !!! Tip "About nRF52840" 22 | 23 | The nRF52840 SoC is the most advanced member of the nRF52 Series. It meets the challenges of sophisticated applications that need protocol concurrency and a rich and varied set of peripherals and features. It offers generous memory availability for both Flash and RAM, which are prerequisites for such demanding applications. 24 | 25 | The nRF52840 is fully multiprotocol capable with full protocol concurrency. It has protocol support for Bluetooth LE, Bluetooth mesh, Thread, Zigbee, 802.15.4, ANT and 2.4 GHz proprietary stacks. 26 | 27 | nRF52840 Connect Kit has support for Nordic Semi's nRF Connect SDK, which integrates the Zephyr RTOS, protocol stacks, samples, hardware drivers and much more. We also offer Python support, allowing you access hardware-specific functionality and peripherals with Python programming language. 28 | 29 | In addition, we offer an extensive set of documentation such as out of box experience, getting started and developer guides, which can help you save big by reducing development effort. 30 | 31 | Interested in our brand new nRF52840 Connect Kit? You can get it from [the official store](https://makerdiary.com/products/nrf52840-connectkit) or refer to our [wiki page](../../../index.md) for more technical resources. 32 | -------------------------------------------------------------------------------- /docs/guides/ble-sniffer/index.md: -------------------------------------------------------------------------------- 1 | # nRF Sniffer for Bluetooth LE 2 | 3 | ## Introduction 4 | 5 | nRF Sniffer for Bluetooth LE is a useful tool for debugging and learning about Bluetooth Low Energy applications. 6 | 7 | The nRF Sniffer for Bluetooth LE allows near real-time display of Bluetooth LE packets. This helps the developer to identify and fix issues by allowing a view of what is happening on-air. 8 | 9 | ## Requirements 10 | 11 | Before you start, check that you have the required hardware and software: 12 | 13 | * 1x [nRF52840 Connect Kit] 14 | * Supported operating systems: 15 | - Windows 10 16 | - 64-bit OS X/macOS 10.6 or later 17 | - Linux (check the [Wireshark] prerequisites for version compatibility) 18 | * [Wireshark] v3.4.7 or later 19 | * [Python] v3.6 or later 20 | 21 | ## Get Involved 22 | 23 | The following sections explain how to set up the nRF Sniffer for Bluetooth LE and help you get moving with sniffing: 24 | 25 | - [Installation](./installation.md) 26 | - [Running the nRF Sniffer](./running-sniffer.md) 27 | - [nRF Sniffer usage](./usage.md) 28 | - [Common sniffing actions](./actions.md) 29 | 30 | 31 | ## Reference 32 | 33 | * [nRF Sniffer for Bluetooth LE User Guide v4.1.x](https://infocenter.nordicsemi.com/pdf/nRF_Sniffer_BLE_UG_v4.1.x.pdf) 34 | * [Wireshark website](https://www.wireshark.org/) 35 | 36 | [nRF52840 Connect Kit]: https://makerdiary.com/products/nrf52840-connectkit 37 | [Wireshark]: https://www.wireshark.org/ 38 | [Python]: https://www.python.org/downloads/ 39 | -------------------------------------------------------------------------------- /docs/guides/ble-sniffer/running-sniffer.md: -------------------------------------------------------------------------------- 1 | # Running the nRF Sniffer 2 | 3 | To start sniffing, place the nRF52840 Connect Kit that runs the nRF Sniffer for Bluetooth LE firmware between the two devices that are communicating. Then open Wireshark and start recording packets. 4 | 5 | ## Setting up hardware 6 | 7 | Connect the nRF52840 Connect Kit to your computer. Then place it between the Central and Peripheral device that you want to sniff. 8 | 9 | ![Hardware setup](../../assets/images/wireshark_hardware_setup.png) 10 | 11 | ## Wireshark capture setup 12 | 13 | When you open Wireshark, the Wireshark capture screen is displayed. It includes the Wireshark interface for managing packets that are captured, the nRF Sniffer toolbar, and the hardware interfaces connected to the nRF Sniffer. 14 | 15 | !!! tip 16 | If the nRF Sniffer toolbar is not visible, select __View__ > __Interface Toolbars__ > __nRF Sniffer for Bluetooth LE__. 17 | 18 | ![Wireshark Capture Screen](../../assets/images/wireshark_capture_screen_labled.png) 19 | 20 | The following options are available from the capture screen in Wireshark: 21 | 22 | __`RSSI filter`__ 23 | 24 | : You can apply a *RSSI* filter on the packets that are being received. Only packets that match the filter are displayed. 25 | 26 | You must set the capture filter in the capture screen by using the keyword `rssi`. For example, the filter `rssi >= -70` only captures packets that have an *RSSI* greater than or equal to `-70 dBm`. 27 | 28 | ![Wireshark RSSI Filter](../../assets/images/wireshark_rssi_filter.png) 29 | 30 | __`Interface options`__ 31 | 32 | : Click :fontawesome-solid-gear: next to the interface to configure additional options for the nRF Sniffer for Bluetooth LE. 33 | 34 | ![Wireshark Interface Options](../../assets/images/wireshark_interface_options.png) 35 | 36 | The following options are available: 37 | 38 | _`Only advertising packets`_ 39 | 40 | : Sniff only the advertising packets of the given device. When a new connection is established, the nRF Sniffer ignores it. 41 | 42 | _`Only legacy advertising packets`_ 43 | 44 | : Sniff only the legacy advertising packets of the given device. The nRF Sniffer does not look for the advertiser's device address in extended advertising packets in the auxiliary advertising packets. 45 | 46 | _`Find scan response data`_ 47 | 48 | : Follow scan requests and scan responses when sniffing all advertising devices. This option is useful for finding the advertiser's name in the scan response data. You need an active scanner to generate the scan requests to follow. 49 | 50 | _`Find auxiliary pointer data`_ 51 | 52 | : Follow the auxiliary pointer for additional data when sniffing all advertising devices. This option is useful for finding the advertiser's address and name in the auxiliary advertising data. 53 | 54 | _`Scan and follow devices on LE Coded PHY`_ 55 | 56 | : Sniff on the LE Coded PHY when sniffing all advertising devices and a specific device. The nRF Sniffer follows the connection on any PHY it uses. To sniff on both LE 1M PHY and LE Coded PHY at the same time, use multiple sniffers. 57 | 58 | -------------------------------------------------------------------------------- /docs/guides/ncs/building.md: -------------------------------------------------------------------------------- 1 | # Building and running the first sample 2 | 3 | This guide explains how to build and run the first sample (for example, [Blinky]). 4 | 5 | Before you start building, remember to [set up the environment](./setup.md) first. 6 | 7 | ## Build the Blinky sample 8 | 9 | After completing the environment setup, use the following steps to build the [Blinky] sample on the command line. 10 | 11 | 1. Open a terminal window. 12 | 13 | 2. Go to `my-workspace/ncs-playground` directory created in the [Setting up the environment](./setup.md#get-the-code) section. 14 | 15 | ``` bash linenums="1" 16 | cd my-workspace/ncs-playground 17 | ``` 18 | 19 | 3. Build the sample using the `west` command, specifying the board (following the `-b` option) as `connectkit_nrf52840`: 20 | 21 | ``` bash linenums="1" 22 | west build -p always -b connectkit_nrf52840 samples/blinky 23 | ``` 24 | 25 | !!! Tip 26 | The `-p always` option forces a pristine build, and is recommended for new users. Users may also use the `-p auto` option, which will use heuristics to determine if a pristine build is required, such as when building another sample. 27 | 28 | 4. After running the `west build` command, the build files can be found in `build/zephyr`. 29 | 30 | ## Flash and run the sample 31 | 32 | The sample is designed to work with the UF2 Bootloader, so that you can easily flash the sample [using the UF2 Bootloader](../../programming/uf2boot.md). The firmware can be found in `build/zephyr` with the name `zephyr.uf2`. 33 | 34 | To flash the firmware, complete the following steps: 35 | 36 | 1. Push and hold the __USER__ button and plug your board into the USB port of your computer. Release the __USER__ button after your board is connected. The RGB LED turns green. 37 | 38 | 2. It will mount as a Mass Storage Device called __UF2BOOT__. 39 | 40 | 3. Drag and drop `zephyr.uf2` onto the __UF2BOOT__ volume. The RGB LED blinks red fast during flashing. 41 | 42 | 4. Reset the board and the Green LED will start to blink. 43 | 44 | ![](../../assets/images/blinky_demo.gif) 45 | 46 | ## Next steps 47 | 48 | Try more samples on nRF52840 Connect Kit: 49 | 50 | * [Hello World](./samples/hello_world.md) 51 | * [Blinky](./samples/blinky.md) 52 | * [Button](./samples/button.md) 53 | * [ADC](./samples/adc.md) 54 | * [Voltage Measurement](./samples/voltage_measurement.md) 55 | * [QSPI NOR Flash](./samples/qspi_flash.md) 56 | * [USB HID Mouse](./samples/usb/hid_mouse.md) 57 | * [USB Mass Storage](./samples/usb/mass.md) 58 | * [NFC Launch App](./samples/nfc/launch_app.md) 59 | * [NFC Text record](./samples/nfc/text_record.md) 60 | * [NFC URI record](./samples/nfc/uri_record.md) 61 | * [NFC Writable NDEF message](./samples/nfc/writable_ndef_msg.md) 62 | * [BLE Beacon](./samples/ble/beacon.md) 63 | * [BLE Observer](./samples/ble/observer.md) 64 | * [BLE Peripheral](./samples/ble/peripheral.md) 65 | * [BLE Peripheral LBS](./samples/ble/peripheral_lbs.md) 66 | * [BLE Peripheral HIDS keyboard](./samples/ble/peripheral_hids_keyboard.md) 67 | * [BLE Peripheral HIDS mouse](./samples/ble/peripheral_hids_mouse.md) 68 | * [BLE NUS shell transport](./samples/ble/shell_bt_nus.md) 69 | * [Thread CLI](./samples/thread/cli.md) 70 | * [Thread CoAP](./samples/thread/coap.md) 71 | * [Thread Co-processor](./samples/thread/coprocessor.md) 72 | * [Zigbee Lighting](./samples/zigbee/lighting.md) 73 | * [Zigbee NCP](./samples/zigbee/ncp.md) 74 | * [Zigbee Shell](./samples/zigbee/shell.md) 75 | 76 | nRF Connect SDK and Zephyr also provide a variety of application samples and demos. Documentation for those is available in: 77 | 78 | - [Zephyr's Samples and Demos](https://docs.zephyrproject.org/latest/samples/index.html#samples-and-demos) 79 | - [nRF Connect SDK's Samples](https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples.html) 80 | - [nRF Connect SDK's Applications](https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/applications.html) 81 | 82 | 83 | [Blinky]: ./samples/blinky.md -------------------------------------------------------------------------------- /docs/guides/ncs/index.md: -------------------------------------------------------------------------------- 1 | # nRF Connect SDK 2 | 3 | ## Introduction 4 | 5 | The nRF Connect SDK is a scalable and unified software development kit for building low-power wireless applications based on the Nordic Semiconductor nRF52, nRF53, and nRF91 Series wireless devices. It offers an extensible framework for building size-optimized software for memory-constrained devices as well as powerful and complex software for more advanced devices and applications. 6 | 7 | It integrates the Zephyr™ real-time operating system (RTOS), a wide range of complete applications, samples, and protocol stacks such as Bluetooth® Low Energy, Bluetooth mesh, Matter, Thread/Zigbee and LTE-M/NB-IoT/GPS, TCP/IP. It also includes middleware such as CoAP, MQTT, LwM2M, various libraries, hardware drivers, Trusted Firmware-M for security, and a secure bootloader (MCUboot). 8 | 9 | ## Get Involved 10 | 11 | We think the best way to learn is by doing. The following sections take you through the basics of nRF Connect SDK development and show you how to implement typical use cases with Nordic Semiconductor libraries and drivers on nRF52840 Connect Kit. 12 | 13 | - [Setting up the environment](./setup.md) 14 | - [Building and running the first sample](./building.md) 15 | - Samples 16 | * [Hello World](./samples/hello_world.md) 17 | * [Blinky](./samples/blinky.md) 18 | * [Button](./samples/button.md) 19 | * [ADC](./samples/adc.md) 20 | * [Voltage Measurement](./samples/voltage_measurement.md) 21 | * [QSPI NOR Flash](./samples/qspi_flash.md) 22 | * [USB HID Mouse](./samples/usb/hid_mouse.md) 23 | * [USB Mass Storage](./samples/usb/mass.md) 24 | * [NFC Launch App](./samples/nfc/launch_app.md) 25 | * [NFC Text record](./samples/nfc/text_record.md) 26 | * [NFC URI record](./samples/nfc/uri_record.md) 27 | * [NFC Writable NDEF message](./samples/nfc/writable_ndef_msg.md) 28 | * [BLE Beacon](./samples/ble/beacon.md) 29 | * [BLE Observer](./samples/ble/observer.md) 30 | * [BLE Peripheral](./samples/ble/peripheral.md) 31 | * [BLE Peripheral LBS](./samples/ble/peripheral_lbs.md) 32 | * [BLE Peripheral HIDS keyboard](./samples/ble/peripheral_hids_keyboard.md) 33 | * [BLE Peripheral HIDS mouse](./samples/ble/peripheral_hids_mouse.md) 34 | * [BLE NUS shell transport](./samples/ble/shell_bt_nus.md) 35 | * [Thread CLI](./samples/thread/cli.md) 36 | * [Thread CoAP](./samples/thread/coap.md) 37 | * [Thread Co-processor](./samples/thread/coprocessor.md) 38 | * [Zigbee Lighting](./samples/zigbee/lighting.md) 39 | * [Zigbee NCP](./samples/zigbee/ncp.md) 40 | * [Zigbee Shell](./samples/zigbee/shell.md) 41 | 42 | ## Reference 43 | 44 | - [nRF Connect SDK Documentation](https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/index.html) 45 | - [Zephyr Project Documentation](https://docs.zephyrproject.org/latest/index.html) 46 | 47 | -------------------------------------------------------------------------------- /docs/guides/ncs/samples/adc.md: -------------------------------------------------------------------------------- 1 | # ADC 2 | 3 | ## Overview 4 | 5 | This sample demonstrates how to use the ADC driver API. It reads ADC samples from one or more channels and prints the readings on the console. If voltage of the used reference can be obtained, the raw readings are converted to millivolts. 6 | 7 | ## Requirements 8 | 9 | Before you start, check that you have the required hardware and software: 10 | 11 | - 1x [nRF52840 Connect Kit](https://makerdiary.com/products/nrf52840-connectkit) 12 | - 1x USB-C Cable 13 | - A computer running macOS, Linux, or Windows 7 or newer 14 | 15 | ## Building the sample 16 | 17 | Before you start building, remember to [set up the environment](../setup.md) first. 18 | 19 | Use the following steps to build the [ADC] sample on the command line. 20 | 21 | 1. Open a terminal window. 22 | 23 | 2. Go to `my-workspace/ncs-playground` directory created in the [Setting up the environment](../setup.md#get-the-code) section. 24 | 25 | ``` bash linenums="1" 26 | cd my-workspace/ncs-playground 27 | ``` 28 | 29 | 3. Build the sample using the `west` command, specifying the board (following the `-b` option) as `connectkit_nrf52840`: 30 | 31 | ``` bash linenums="1" 32 | west build -p always -b connectkit_nrf52840 samples/adc 33 | ``` 34 | 35 | !!! Tip 36 | The `-p always` option forces a pristine build, and is recommended for new users. Users may also use the `-p auto` option, which will use heuristics to determine if a pristine build is required, such as when building another sample. 37 | 38 | 4. After running the `west build` command, the build files can be found in `build/zephyr`. 39 | 40 | ## Flashing the firmware 41 | 42 | The sample is designed to work with the UF2 Bootloader, so that you can easily flash the sample [using the UF2 Bootloader](../../../programming/uf2boot.md). The firmware can be found in `build/zephyr` with the name `zephyr.uf2`. 43 | 44 | To flash the firmware, complete the following steps: 45 | 46 | 1. Push and hold the __USER__ button and plug your board into the USB port of your computer. Release the __USER__ button after your board is connected. The RGB LED turns green. 47 | 48 | 2. It will mount as a Mass Storage Device called __UF2BOOT__. 49 | 50 | 3. Drag and drop `zephyr.uf2` onto the __UF2BOOT__ volume. The RGB LED blinks red fast during flashing. 51 | 52 | 4. Reset the board and the sample will start running. 53 | 54 | ## Testing 55 | 56 | After flashing the firmware to your board, complete the following steps to test it: 57 | 58 | 1. Connect nRF52840 Connect Kit to your computer using the USB-C Cable. 59 | 2. Open up a serial terminal, specifying the correct serial port that your computer uses to communicate with the board: 60 | 61 | === "macOS/Linux" 62 | 63 | Open up a terminal and run: 64 | 65 | ``` bash linenums="1" 66 | screen 115200 67 | ``` 68 | 69 | === "Windows" 70 | 71 | 1. Start [PuTTY]. 72 | 2. Configure the correct serial port and click __Open__: 73 | 74 | ![](../../../assets/images/putty-settings.png) 75 | 76 | 3. Observe the output of the terminal. You should see the output, similar to what is shown in the following: 77 | 78 | ``` { .bash .no-copy linenums="1" } 79 | ADC reading[1]: 80 | - adc@40007000, channel 0: 507 = 297 mV 81 | - adc@40007000, channel 1: 15117 = 3321 mV 82 | ADC reading[2]: 83 | - adc@40007000, channel 0: 507 = 297 mV 84 | - adc@40007000, channel 1: 15114 = 3320 mV 85 | ADC reading[3]: 86 | - adc@40007000, channel 0: 511 = 299 mV 87 | - adc@40007000, channel 1: 15117 = 3321 mV 88 | ... 89 | ``` 90 | 91 | [ADC]: https://github.com/makerdiary/ncs-playground/tree/main/samples/adc 92 | [PuTTY]: https://apps.microsoft.com/store/detail/putty/XPFNZKSKLBP7RJ -------------------------------------------------------------------------------- /docs/guides/ncs/samples/ble/beacon.md: -------------------------------------------------------------------------------- 1 | # Bluetooth Low Energy: Beacon 2 | 3 | ## Overview 4 | 5 | The BLE Beacon sample demonstrates the BLE Broadcaster role functionality by advertising an Eddystone URL "https://makerdiary.com". 6 | 7 | The following Eddystone specifications describe the Advertisement data: 8 | 9 | - [Eddystone Protocol Specification] 10 | - [Eddystone-URL] 11 | 12 | ## Requirements 13 | 14 | Before you start, check that you have the required hardware and software: 15 | 16 | - 1x [nRF52840 Connect Kit](https://makerdiary.com/products/nrf52840-connectkit) 17 | - 1x USB-C Cable 18 | - A smartphone or a tablet with [nRF Connect for Mobile] installed 19 | - A computer running macOS, Linux, or Windows 7 or newer 20 | 21 | ## Building the sample 22 | 23 | Before you start building, remember to [set up the environment](../../setup.md) first. 24 | 25 | Use the following steps to build the [BLE Beacon] sample on the command line. 26 | 27 | 1. Open a terminal window. 28 | 29 | 2. Go to `my-workspace/ncs-playground` directory created in the [Setting up the environment](../../setup.md#get-the-code) section. 30 | 31 | ``` bash linenums="1" 32 | cd my-workspace/ncs-playground 33 | ``` 34 | 35 | 3. Build the sample using the `west` command, specifying the board (following the `-b` option) as `connectkit_nrf52840`: 36 | 37 | ``` bash linenums="1" 38 | west build -p always -b connectkit_nrf52840 samples/ble/beacon 39 | ``` 40 | 41 | !!! Tip 42 | The `-p always` option forces a pristine build, and is recommended for new users. Users may also use the `-p auto` option, which will use heuristics to determine if a pristine build is required, such as when building another sample. 43 | 44 | 4. After running the `west build` command, the build files can be found in `build/zephyr`. 45 | 46 | ## Flashing the firmware 47 | 48 | The sample is designed to work with the UF2 Bootloader, so that you can easily flash the sample [using the UF2 Bootloader](../../../../programming/uf2boot.md). The firmware can be found in `build/zephyr` with the name `zephyr.uf2`. 49 | 50 | To flash the firmware, complete the following steps: 51 | 52 | 1. Push and hold the __USER__ button and plug your board into the USB port of your computer. Release the __USER__ button after your board is connected. The RGB LED turns green. 53 | 54 | 2. It will mount as a Mass Storage Device called __UF2BOOT__. 55 | 56 | 3. Drag and drop `zephyr.uf2` onto the __UF2BOOT__ volume. The RGB LED blinks red fast during flashing. 57 | 58 | 4. Reset the board and the sample will start running. 59 | 60 | ## Testing 61 | 62 | After flashing the firmware to your board, complete the following steps to test it: 63 | 64 | 1. Power up nRF52840 Connect Kit by using the USB-C Cable. 65 | 66 | 2. Start the [nRF Connect for Mobile] app, scan the device and observe that the beacon is advertising an Eddystone URL (https://makerdiary.com) with the Device Name __`Test beacon`__. 67 | 68 | ![](../../../../assets/images/sample_beacon.png){ width='250' } 69 | 70 | [Eddystone Protocol Specification]: https://github.com/google/eddystone/blob/master/protocol-specification.md 71 | [Eddystone-URL]: https://github.com/google/eddystone/tree/master/eddystone-url 72 | [nRF Connect for Mobile]: https://www.nordicsemi.com/Products/Development-tools/nRF-Connect-for-mobile 73 | [BLE Beacon]: https://github.com/makerdiary/ncs-playground/tree/main/samples/ble/beacon 74 | -------------------------------------------------------------------------------- /docs/guides/ncs/samples/ble/peripheral.md: -------------------------------------------------------------------------------- 1 | # Bluetooth Low Energy: Peripheral 2 | 3 | ## Overview 4 | 5 | The BLE Peripheral sample demonstrates the BLE Peripheral role. It has several well-known and vendor-specific GATT services that it exposes. 6 | 7 | ## Requirements 8 | 9 | Before you start, check that you have the required hardware and software: 10 | 11 | - 1x [nRF52840 Connect Kit](https://makerdiary.com/products/nrf52840-connectkit) 12 | - 1x USB-C Cable 13 | - A smartphone or a tablet with [nRF Connect for Mobile] installed 14 | - A computer running macOS, Linux, or Windows 7 or newer 15 | 16 | ## Building the sample 17 | 18 | Before you start building, remember to [set up the environment](../../setup.md) first. 19 | 20 | Use the following steps to build the [BLE Peripheral] sample on the command line. 21 | 22 | 1. Open a terminal window. 23 | 24 | 2. Go to `my-workspace/ncs-playground` directory created in the [Setting up the environment](../../setup.md#get-the-code) section. 25 | 26 | ``` bash linenums="1" 27 | cd my-workspace/ncs-playground 28 | ``` 29 | 30 | 3. Build the sample using the `west` command, specifying the board (following the `-b` option) as `connectkit_nrf52840`: 31 | 32 | ``` bash linenums="1" 33 | west build -p always -b connectkit_nrf52840 samples/ble/peripheral 34 | ``` 35 | 36 | !!! Tip 37 | The `-p always` option forces a pristine build, and is recommended for new users. Users may also use the `-p auto` option, which will use heuristics to determine if a pristine build is required, such as when building another sample. 38 | 39 | 4. After running the `west build` command, the build files can be found in `build/zephyr`. 40 | 41 | ## Flashing the firmware 42 | 43 | The sample is designed to work with the UF2 Bootloader, so that you can easily flash the sample [using the UF2 Bootloader](../../../../programming/uf2boot.md). The firmware can be found in `build/zephyr` with the name `zephyr.uf2`. 44 | 45 | To flash the firmware, complete the following steps: 46 | 47 | 1. Push and hold the __USER__ button and plug your board into the USB port of your computer. Release the __USER__ button after your board is connected. The RGB LED turns green. 48 | 49 | 2. It will mount as a Mass Storage Device called __UF2BOOT__. 50 | 51 | 3. Drag and drop `zephyr.uf2` onto the __UF2BOOT__ volume. The RGB LED blinks red fast during flashing. 52 | 53 | 4. Reset the board and the sample will start running. 54 | 55 | ## Testing 56 | 57 | After flashing the firmware to your board, complete the following steps to test it: 58 | 59 | 1. Power up nRF52840 Connect Kit by using the USB-C Cable. 60 | 2. Start the [nRF Connect for Mobile] app, scan the device and observe that the device is advertising with the Device Name __`Zephyr Peripheral Sample Long Name`__. 61 | 3. Connect to the device from the nRF Connect for Mobile app. The services of the connected device are shown in the __Client__ tab. 62 | 63 | ![](../../../../assets/images/peripheral_adv.png){ width='250' } 64 | ![](../../../../assets/images/peripheral_services.png){ width='250' } 65 | 66 | 67 | [nRF Connect for Mobile]: https://www.nordicsemi.com/Products/Development-tools/nRF-Connect-for-mobile 68 | [BLE Peripheral]: https://github.com/makerdiary/ncs-playground/tree/main/samples/ble/peripheral 69 | -------------------------------------------------------------------------------- /docs/guides/ncs/samples/ble/peripheral_hids_keyboard.md: -------------------------------------------------------------------------------- 1 | # Bluetooth Low Energy: Peripheral HIDS keyboard 2 | 3 | ## Overview 4 | 5 | The BLE Peripheral HIDS keyboard sample demonstrates how to use the [GATT Human Interface Device (HID) Service](https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/libraries/bluetooth_services/services/hids.html#hids-readme) to implement a keyboard input device that you can connect to your computer. 6 | 7 | ## Requirements 8 | 9 | Before you start, check that you have the required hardware and software: 10 | 11 | - 1x [nRF52840 Connect Kit](https://makerdiary.com/products/nrf52840-connectkit) 12 | - 1x USB-C Cable 13 | - A computer running macOS, Linux, or Windows 7 or newer, with Bluetooth LE supported 14 | 15 | ## Building the sample 16 | 17 | Before you start building, remember to [set up the environment](../../setup.md) first. 18 | 19 | Use the following steps to build the [BLE Peripheral HIDS keyboard] sample on the command line. 20 | 21 | 1. Open a terminal window. 22 | 23 | 2. Go to `my-workspace/ncs-playground` directory created in the [Setting up the environment](../../setup.md#get-the-code) section. 24 | 25 | ``` bash linenums="1" 26 | cd my-workspace/ncs-playground 27 | ``` 28 | 29 | 3. Build the sample using the `west` command, specifying the board (following the `-b` option) as `connectkit_nrf52840`: 30 | 31 | ``` bash linenums="1" 32 | west build -p always -b connectkit_nrf52840 samples/ble/peripheral_hids_keyboard 33 | ``` 34 | 35 | !!! Tip 36 | The `-p always` option forces a pristine build, and is recommended for new users. Users may also use the `-p auto` option, which will use heuristics to determine if a pristine build is required, such as when building another sample. 37 | 38 | 4. After running the `west build` command, the build files can be found in `build/zephyr`. 39 | 40 | ## Flashing the firmware 41 | 42 | The sample is designed to work with the UF2 Bootloader, so that you can easily flash the sample [using the UF2 Bootloader](../../../../programming/uf2boot.md). The firmware can be found in `build/zephyr` with the name `zephyr.uf2`. 43 | 44 | To flash the firmware, complete the following steps: 45 | 46 | 1. Push and hold the __USER__ button and plug your board into the USB port of your computer. Release the __USER__ button after your board is connected. The RGB LED turns green. 47 | 48 | 2. It will mount as a Mass Storage Device called __UF2BOOT__. 49 | 50 | 3. Drag and drop `zephyr.uf2` onto the __UF2BOOT__ volume. The RGB LED blinks red fast during flashing. 51 | 52 | 4. Reset the board and the sample will start running. 53 | 54 | ## Testing 55 | 56 | After flashing the firmware to your board, complete the following steps to test it: 57 | 58 | 1. Power up nRF52840 Connect Kit by using the USB-C Cable. 59 | 2. On your computer, search for Bluetooth devices and connect to the device named __`Nordic_HIDS_keyboard`__. 60 | 3. When pairing, press __USER__ button to confirm the passkey value. 61 | 4. Open a text editor, repeatedly press __USER__ button on the board. Every button press sends one character of the test message `hello` (the test message includes a carriage return) to the computer, and this will be displayed in the text editor. 62 | 63 | [BLE Peripheral HIDS keyboard]: https://github.com/makerdiary/ncs-playground/tree/main/samples/ble/peripheral_hids_keyboard -------------------------------------------------------------------------------- /docs/guides/ncs/samples/ble/peripheral_hids_mouse.md: -------------------------------------------------------------------------------- 1 | # Bluetooth Low Energy: Peripheral HIDS mouse 2 | 3 | ## Overview 4 | The BLE Peripheral HIDS mouse sample demonstrates how to use the [GATT Human Interface Device (HID) Service] to implement a mouse input device that you can connect to your computer. This sample also shows how to perform directed advertising. 5 | 6 | ## Requirements 7 | 8 | Before you start, check that you have the required hardware and software: 9 | 10 | - 1x [nRF52840 Connect Kit](https://makerdiary.com/products/nrf52840-connectkit) 11 | - 1x USB-C Cable 12 | - A computer running macOS, Linux, or Windows 7 or newer, with Bluetooth LE supported 13 | 14 | ## Building the sample 15 | 16 | Before you start building, remember to [set up the environment](../../setup.md) first. 17 | 18 | Use the following steps to build the [BLE Peripheral HIDS mouse] sample on the command line. 19 | 20 | 1. Open a terminal window. 21 | 22 | 2. Go to `my-workspace/ncs-playground` directory created in the [Setting up the environment](../../setup.md#get-the-code) section. 23 | 24 | ``` bash linenums="1" 25 | cd my-workspace/ncs-playground 26 | ``` 27 | 28 | 3. Build the sample using the `west` command, specifying the board (following the `-b` option) as `connectkit_nrf52840`: 29 | 30 | ``` bash linenums="1" 31 | west build -p always -b connectkit_nrf52840 samples/ble/peripheral_hids_mouse 32 | ``` 33 | 34 | !!! Tip 35 | The `-p always` option forces a pristine build, and is recommended for new users. Users may also use the `-p auto` option, which will use heuristics to determine if a pristine build is required, such as when building another sample. 36 | 37 | 4. After running the `west build` command, the build files can be found in `build/zephyr`. 38 | 39 | ## Flashing the firmware 40 | 41 | The sample is designed to work with the UF2 Bootloader, so that you can easily flash the sample [using the UF2 Bootloader](../../../../programming/uf2boot.md). The firmware can be found in `build/zephyr` with the name `zephyr.uf2`. 42 | 43 | To flash the firmware, complete the following steps: 44 | 45 | 1. Push and hold the __USER__ button and plug your board into the USB port of your computer. Release the __USER__ button after your board is connected. The RGB LED turns green. 46 | 47 | 2. It will mount as a Mass Storage Device called __UF2BOOT__. 48 | 49 | 3. Drag and drop `zephyr.uf2` onto the __UF2BOOT__ volume. The RGB LED blinks red fast during flashing. 50 | 51 | 4. Reset the board and the sample will start running. 52 | 53 | ## Testing 54 | 55 | After flashing the firmware to your board, complete the following steps to test it: 56 | 57 | 1. Power up nRF52840 Connect Kit by using the USB-C Cable. 58 | 2. On your computer, search for Bluetooth devices and connect to the device named __`Nordic_HIDS_mouse`__. 59 | 3. When pairing, press __USER__ button to confirm the passkey value. 60 | 4. Push __USER__ button on the board. Observe that the mouse pointer on the computer moves to the left. 61 | 62 | [GATT Human Interface Device (HID) Service]: https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/libraries/bluetooth_services/services/hids.html#hids-readme 63 | [BLE Peripheral HIDS mouse]: https://github.com/makerdiary/ncs-playground/tree/main/samples/ble/peripheral_hids_mouse -------------------------------------------------------------------------------- /docs/guides/ncs/samples/ble/shell_bt_nus.md: -------------------------------------------------------------------------------- 1 | # Bluetooth Low Energy: NUS shell transport 2 | 3 | ## Overview 4 | 5 | The Nordic UART Service (NUS) shell transport sample demonstrates how to use the [Nordic UART Service (NUS) shell transport] to receive shell commands from a remote device over Bluetooth®. 6 | 7 | When the connection is established, you can connect to the sample through the [Nordic UART Service (NUS)] by using [Web Device CLI]. You can then send shell commands that are executed on the device running the sample. 8 | 9 | ## Requirements 10 | 11 | Before you start, check that you have the required hardware and software: 12 | 13 | - 1x [nRF52840 Connect Kit](https://makerdiary.com/products/nrf52840-connectkit) 14 | - 1x USB-C Cable 15 | - Chrome 56+ browser with [Web Bluetooth supported] 16 | - A computer running macOS, Linux, or Windows 7 or newer 17 | 18 | ## Building the sample 19 | 20 | Before you start building, remember to [set up the environment](../../setup.md) first. 21 | 22 | Use the following steps to build the [NUS shell transport] sample on the command line. 23 | 24 | 1. Open a terminal window. 25 | 26 | 2. Go to `my-workspace/ncs-playground` directory created in the [Setting up the environment](../../setup.md#get-the-code) section. 27 | 28 | ``` bash linenums="1" 29 | cd my-workspace/ncs-playground 30 | ``` 31 | 32 | 3. Build the sample using the `west` command, specifying the board (following the `-b` option) as `connectkit_nrf52840`: 33 | 34 | ``` bash linenums="1" 35 | west build -p always -b connectkit_nrf52840 samples/ble/shell_bt_nus 36 | ``` 37 | 38 | !!! Tip 39 | The `-p always` option forces a pristine build, and is recommended for new users. Users may also use the `-p auto` option, which will use heuristics to determine if a pristine build is required, such as when building another sample. 40 | 41 | 4. After running the `west build` command, the build files can be found in `build/zephyr`. 42 | 43 | ## Flashing the firmware 44 | 45 | The sample is designed to work with the UF2 Bootloader, so that you can easily flash the sample [using the UF2 Bootloader](../../../../programming/uf2boot.md). The firmware can be found in `build/zephyr` with the name `zephyr.uf2`. 46 | 47 | To flash the firmware, complete the following steps: 48 | 49 | 1. Push and hold the __USER__ button and plug your board into the USB port of your computer. Release the __USER__ button after your board is connected. The RGB LED turns green. 50 | 51 | 2. It will mount as a Mass Storage Device called __UF2BOOT__. 52 | 53 | 3. Drag and drop `zephyr.uf2` onto the __UF2BOOT__ volume. The RGB LED blinks red fast during flashing. 54 | 55 | 4. Reset the board and the sample will start running. 56 | 57 | ## Testing 58 | 59 | After flashing the firmware to your board, complete the following steps to test it: 60 | 61 | 1. Power up nRF52840 Connect Kit using the USB-C Cable. 62 | 2. Open the [Web Device CLI] page in the Chrome brower: 63 | 64 | [:material-console: Web Device CLI](https://wiki.makerdiary.com/web-device-cli/){ .md-button } 65 | 66 | 3. Click **Connect** to scan devices. 67 | 4. Pair __`BT_NUS_shell`__ discovered in the list. 68 | 5. Run `help` to print the help message. 69 | 70 | ![](../../../../assets/images/web_device_cli_nus.png) 71 | 72 | [Nordic UART Service (NUS) shell transport]: https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/libraries/shell/shell_bt_nus.html#shell-bt-nus-readme 73 | [Nordic UART Service (NUS)]: https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/libraries/bluetooth_services/services/nus.html#nus-service-readme 74 | [Web Device CLI]: https://wiki.makerdiary.com/web-device-cli/ 75 | [Web Bluetooth supported]: https://github.com/WebBluetoothCG/web-bluetooth/blob/main/implementation-status.md 76 | [NUS shell transport]: https://github.com/makerdiary/ncs-playground/tree/main/samples/ble/shell_bt_nus -------------------------------------------------------------------------------- /docs/guides/ncs/samples/blinky.md: -------------------------------------------------------------------------------- 1 | # Blinky 2 | 3 | ## Overview 4 | 5 | The Blinky sample blinks an LED forever using the GPIO API. 6 | 7 | The source code shows how to: 8 | 9 | 1. Get a pin specification from the devicetree as a `gpio_dt_spec` 10 | 11 | 2. Configure the GPIO pin as an output 12 | 13 | 3. Toggle the pin forever 14 | 15 | ## Requirements 16 | 17 | Before you start, check that you have the required hardware and software: 18 | 19 | - 1x [nRF52840 Connect Kit](https://makerdiary.com/products/nrf52840-connectkit) 20 | - 1x USB-C Cable 21 | - A computer running macOS, Linux, or Windows 7 or newer 22 | 23 | ## Building the sample 24 | 25 | Before you start building, remember to [set up the environment](../setup.md) first. 26 | 27 | Use the following steps to build the [Blinky] sample on the command line. 28 | 29 | 1. Open a terminal window. 30 | 31 | 2. Go to `my-workspace/ncs-playground` directory created in the [Setting up the environment](../setup.md#get-the-code) section. 32 | 33 | ``` bash linenums="1" 34 | cd my-workspace/ncs-playground 35 | ``` 36 | 37 | 3. Build the sample using the `west` command, specifying the board (following the `-b` option) as `connectkit_nrf52840`: 38 | 39 | ``` bash linenums="1" 40 | west build -p always -b connectkit_nrf52840 samples/blinky 41 | ``` 42 | 43 | !!! Tip 44 | The `-p always` option forces a pristine build, and is recommended for new users. Users may also use the `-p auto` option, which will use heuristics to determine if a pristine build is required, such as when building another sample. 45 | 46 | 4. After running the `west build` command, the build files can be found in `build/zephyr`. 47 | 48 | ## Flashing the firmware 49 | 50 | The sample is designed to work with the UF2 Bootloader, so that you can easily flash the sample [using the UF2 Bootloader](../../../programming/uf2boot.md). The firmware can be found in `build/zephyr` with the name `zephyr.uf2`. 51 | 52 | To flash the firmware, complete the following steps: 53 | 54 | 1. Push and hold the __USER__ button and plug your board into the USB port of your computer. Release the __USER__ button after your board is connected. The RGB LED turns green. 55 | 56 | 2. It will mount as a Mass Storage Device called __UF2BOOT__. 57 | 58 | 3. Drag and drop `zephyr.uf2` onto the __UF2BOOT__ volume. The RGB LED blinks red fast during flashing. 59 | 60 | 4. Reset the board and the sample will start running. 61 | 62 | ## Testing 63 | 64 | After flashing the firmware to your board, the Green LED starts to blink. 65 | 66 | ![](../../../assets/images/blinky_demo.gif) 67 | 68 | [Blinky]: https://github.com/makerdiary/ncs-playground/tree/main/samples/blinky 69 | -------------------------------------------------------------------------------- /docs/guides/ncs/samples/button.md: -------------------------------------------------------------------------------- 1 | # Button 2 | 3 | ## Overview 4 | 5 | A simple button sample demonstrates the use of GPIO input with interrupts. The sample prints a message to the console each time a button is pressed. 6 | 7 | ## Requirements 8 | 9 | Before you start, check that you have the required hardware and software: 10 | 11 | - 1x [nRF52840 Connect Kit](https://makerdiary.com/products/nrf52840-connectkit) 12 | - 1x USB-C Cable 13 | - A computer running macOS, Linux, or Windows 7 or newer 14 | 15 | ## Building the sample 16 | 17 | Before you start building, remember to [set up the environment](../setup.md) first. 18 | 19 | Use the following steps to build the [Button] sample on the command line. 20 | 21 | 1. Open a terminal window. 22 | 23 | 2. Go to `my-workspace/ncs-playground` directory created in the [Setting up the environment](../setup.md#get-the-code) section. 24 | 25 | ``` bash linenums="1" 26 | cd my-workspace/ncs-playground 27 | ``` 28 | 29 | 3. Build the sample using the `west` command, specifying the board (following the `-b` option) as `connectkit_nrf52840`: 30 | 31 | ``` bash linenums="1" 32 | west build -p always -b connectkit_nrf52840 samples/button 33 | ``` 34 | 35 | !!! Tip 36 | The `-p always` option forces a pristine build, and is recommended for new users. Users may also use the `-p auto` option, which will use heuristics to determine if a pristine build is required, such as when building another sample. 37 | 38 | 4. After running the `west build` command, the build files can be found in `build/zephyr`. 39 | 40 | ## Flashing the firmware 41 | 42 | The sample is designed to work with the UF2 Bootloader, so that you can easily flash the sample [using the UF2 Bootloader](../../../programming/uf2boot.md). The firmware can be found in `build/zephyr` with the name `zephyr.uf2`. 43 | 44 | To flash the firmware, complete the following steps: 45 | 46 | 1. Push and hold the __USER__ button and plug your board into the USB port of your computer. Release the __USER__ button after your board is connected. The RGB LED turns green. 47 | 48 | 2. It will mount as a Mass Storage Device called __UF2BOOT__. 49 | 50 | 3. Drag and drop `zephyr.uf2` onto the __UF2BOOT__ volume. The RGB LED blinks red fast during flashing. 51 | 52 | 4. Reset the board and the sample will start running. 53 | 54 | ## Testing 55 | 56 | After flashing the firmware to your board, complete the following steps to test it: 57 | 58 | 1. Connect nRF52840 Connect Kit to your computer using the USB-C Cable. 59 | 2. Open up a serial terminal, specifying the correct serial port that your computer uses to communicate with the board: 60 | 61 | === "macOS/Linux" 62 | 63 | Open up a terminal and run: 64 | 65 | ``` bash linenums="1" 66 | screen 115200 67 | ``` 68 | 69 | === "Windows" 70 | 71 | 1. Start [PuTTY]. 72 | 2. Configure the correct serial port and click __Open__: 73 | 74 | ![](../../../assets/images/putty-settings.png) 75 | 76 | 3. Observe the output of the terminal and press the __USER__ button. You should see the output, similar to what is shown in the following: 77 | 78 | ``` { .bash .no-copy linenums="1" } 79 | Set up button at GPIO_1 pin 0 80 | Set up LED at GPIO_1 pin 15 81 | Press the button 82 | Button pressed at 281102 83 | Button pressed at 310379 84 | Button pressed at 341776 85 | ... 86 | ``` 87 | 88 | [Button]: https://github.com/makerdiary/ncs-playground/tree/main/samples/button 89 | [PuTTY]: https://apps.microsoft.com/store/detail/putty/XPFNZKSKLBP7RJ 90 | -------------------------------------------------------------------------------- /docs/guides/ncs/samples/hello_world.md: -------------------------------------------------------------------------------- 1 | # Hello World 2 | 3 | ## Overview 4 | 5 | The Hello World sample can be used as a start point of nRF Connect SDK application development. This sample is quite simple and just prints `Hello World` to the console over USB serial console. 6 | 7 | ## Requirements 8 | 9 | Before you start, check that you have the required hardware and software: 10 | 11 | - 1x [nRF52840 Connect Kit](https://makerdiary.com/products/nrf52840-connectkit) 12 | - 1x USB-C Cable 13 | - A computer running macOS, Linux, or Windows 7 or newer 14 | 15 | ## Building the sample 16 | 17 | Before you start building, remember to [set up the environment](../setup.md) first. 18 | 19 | Use the following steps to build the [Hello World] sample on the command line. 20 | 21 | 1. Open a terminal window. 22 | 23 | 2. Go to `my-workspace/ncs-playground` directory created in the [Setting up the environment](../setup.md#get-the-code) section. 24 | 25 | ``` bash linenums="1" 26 | cd my-workspace/ncs-playground 27 | ``` 28 | 29 | 3. Build the sample using the `west` command, specifying the board (following the `-b` option) as `connectkit_nrf52840`: 30 | 31 | ``` bash linenums="1" 32 | west build -p always -b connectkit_nrf52840 samples/hello_world 33 | ``` 34 | 35 | !!! Tip 36 | The `-p always` option forces a pristine build, and is recommended for new users. Users may also use the `-p auto` option, which will use heuristics to determine if a pristine build is required, such as when building another sample. 37 | 38 | 4. After running the `west build` command, the build files can be found in `build/zephyr`. 39 | 40 | ## Flashing the firmware 41 | 42 | The sample is designed to work with the UF2 Bootloader, so that you can easily flash the sample [using the UF2 Bootloader](../../../programming/uf2boot.md). The firmware can be found in `build/zephyr` with the name `zephyr.uf2`. 43 | 44 | To flash the firmware, complete the following steps: 45 | 46 | 1. Push and hold the __USER__ button and plug your board into the USB port of your computer. Release the __USER__ button after your board is connected. The RGB LED turns green. 47 | 48 | 2. It will mount as a Mass Storage Device called __UF2BOOT__. 49 | 50 | 3. Drag and drop `zephyr.uf2` onto the __UF2BOOT__ volume. The RGB LED blinks red fast during flashing. 51 | 52 | 4. Reset the board and the sample will start running. 53 | 54 | ## Testing 55 | 56 | After flashing the firmware to your board, complete the following steps to test it: 57 | 58 | 1. Connect nRF52840 Connect Kit to your computer using the USB-C Cable. 59 | 2. Open up a serial terminal, specifying the correct serial port that your computer uses to communicate with the board: 60 | 61 | === "macOS/Linux" 62 | 63 | Open up a terminal and run: 64 | 65 | ``` bash linenums="1" 66 | screen 115200 67 | ``` 68 | 69 | === "Windows" 70 | 71 | 1. Start [PuTTY]. 72 | 2. Configure the correct serial port and click __Open__: 73 | 74 | ![](../../../assets/images/putty-settings.png) 75 | 76 | 3. Observe the output of the terminal. You should see the output, similar to what is shown in the following: 77 | 78 | ``` { .bash .no-copy linenums="1" } 79 | Hello World! connectkit_nrf52840 80 | Hello World! connectkit_nrf52840 81 | Hello World! connectkit_nrf52840 82 | ... 83 | ``` 84 | 85 | [Hello World]: https://github.com/makerdiary/ncs-playground/tree/main/samples/hello_world 86 | [PuTTY]: https://apps.microsoft.com/store/detail/putty/XPFNZKSKLBP7RJ 87 | -------------------------------------------------------------------------------- /docs/guides/ncs/samples/nfc/launch_app.md: -------------------------------------------------------------------------------- 1 | # NFC Launch App 2 | 3 | ## Overview 4 | 5 | The NFC Launch App sample shows how to use the NFC tag to launch an app on the polling smartphone. It uses the [NFC Data Exchange Format (NDEF)] library. 6 | 7 | When the sample starts, it initializes the NFC tag and generates an NDEF message with two records that contain the app Universal Link and Android Application Record. Then it sets up the NFC library to use the generated message and sense the external NFC field. 8 | 9 | The only events handled by the application are the NFC events. The Green LED turns on when an NFC field is present. 10 | 11 | ## Requirements 12 | 13 | Before you start, check that you have the required hardware and software: 14 | 15 | - 1x [nRF52840 Connect Kit](https://makerdiary.com/products/nrf52840-connectkit) 16 | - A 13.56MHz NFC Antenna 17 | - 1x USB-C Cable 18 | - A smartphone or a tablet with NFC support 19 | - A computer running macOS, Linux, or Windows 7 or newer 20 | 21 | ## Wiring the NFC antenna 22 | 23 | ![](../../../../assets/images/wiring_nfc_ant.png) 24 | 25 | ## Building the sample 26 | 27 | Before you start building, remember to [set up the environment](../../setup.md) first. 28 | 29 | Use the following steps to build the [NFC Launch App] sample on the command line. 30 | 31 | 1. Open a terminal window. 32 | 33 | 2. Go to `my-workspace/ncs-playground` directory created in the [Setting up the environment](../../setup.md#get-the-code) section. 34 | 35 | ``` bash linenums="1" 36 | cd my-workspace/ncs-playground 37 | ``` 38 | 39 | 3. Build the sample using the `west` command, specifying the board (following the `-b` option) as `connectkit_nrf52840`: 40 | 41 | ``` bash linenums="1" 42 | west build -p always -b connectkit_nrf52840 samples/nfc/record_launch_app 43 | ``` 44 | 45 | !!! Tip 46 | The `-p always` option forces a pristine build, and is recommended for new users. Users may also use the `-p auto` option, which will use heuristics to determine if a pristine build is required, such as when building another sample. 47 | 48 | 4. After running the `west build` command, the build files can be found in `build/zephyr`. 49 | 50 | ## Flashing the firmware 51 | 52 | The sample is designed to work with the UF2 Bootloader, so that you can easily flash the sample [using the UF2 Bootloader](../../../../programming/uf2boot.md). The firmware can be found in `build/zephyr` with the name `zephyr.uf2`. 53 | 54 | To flash the firmware, complete the following steps: 55 | 56 | 1. Push and hold the __USER__ button and plug your board into the USB port of your computer. Release the __USER__ button after your board is connected. The RGB LED turns green. 57 | 58 | 2. It will mount as a Mass Storage Device called __UF2BOOT__. 59 | 60 | 3. Drag and drop `zephyr.uf2` onto the __UF2BOOT__ volume. The RGB LED blinks red fast during flashing. 61 | 62 | 4. Reset the board and the sample will start running. 63 | 64 | ## Testing 65 | 66 | After flashing the firmware to your board, complete the following steps to test it: 67 | 68 | 1. Power up nRF52840 Connect Kit by using the USB-C Cable. 69 | 2. Touch the NFC antenna with the smartphone or tablet and observe that Green LED is lit. 70 | 3. Observe that the smartphone or tablet launches the [nRF Toolbox] application. 71 | 4. Move the smartphone or tablet away from the NFC antenna and observe that Green LED turns off. 72 | 73 | !!! Note 74 | 75 | Devices running iOS require the [nRF Toolbox] app to be installed before testing the sample. Devices running Android open Google Play when the application is not installed. 76 | 77 | [NFC Data Exchange Format (NDEF)]: https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/libraries/nfc/ndef/index.html#lib-nfc-ndef 78 | [NFC Launch App]: https://github.com/makerdiary/ncs-playground/tree/main/samples/nfc/record_launch_app 79 | [nRF Toolbox]: https://www.nordicsemi.com/Software-and-Tools/Development-Tools/nRF-Toolbox -------------------------------------------------------------------------------- /docs/guides/ncs/samples/nfc/text_record.md: -------------------------------------------------------------------------------- 1 | # NFC Text record 2 | 3 | ## Overview 4 | 5 | The NFC Text record sample shows how to use the NFC tag to expose a text record to NFC polling devices. It uses the [NFC Data Exchange Format (NDEF)]. 6 | 7 | When the sample starts, it initializes the NFC tag and generates an NDEF message with three text records that contain the text “Hello World!” in three languages. Then it sets up the NFC library to use the generated message and sense the external NFC field. 8 | 9 | The only events handled by the application are the NFC events. The Green LED turns on when an NFC field is present. 10 | 11 | ## Requirements 12 | 13 | Before you start, check that you have the required hardware and software: 14 | 15 | - 1x [nRF52840 Connect Kit](https://makerdiary.com/products/nrf52840-connectkit) 16 | - A 13.56MHz NFC Antenna 17 | - 1x USB-C Cable 18 | - A smartphone or a tablet with NFC support 19 | - A computer running macOS, Linux, or Windows 7 or newer 20 | 21 | ## Wiring the NFC antenna 22 | 23 | ![](../../../../assets/images/wiring_nfc_ant.png) 24 | 25 | ## Building the sample 26 | 27 | Before you start building, remember to [set up the environment](../../setup.md) first. 28 | 29 | Use the following steps to build the [NFC Text record] sample on the command line. 30 | 31 | 1. Open a terminal window. 32 | 33 | 2. Go to `my-workspace/ncs-playground` directory created in the [Setting up the environment](../../setup.md#get-the-code) section. 34 | 35 | ``` bash linenums="1" 36 | cd my-workspace/ncs-playground 37 | ``` 38 | 39 | 3. Build the sample using the `west` command, specifying the board (following the `-b` option) as `connectkit_nrf52840`: 40 | 41 | ``` bash linenums="1" 42 | west build -p always -b connectkit_nrf52840 samples/nfc/record_text 43 | ``` 44 | 45 | !!! Tip 46 | The `-p always` option forces a pristine build, and is recommended for new users. Users may also use the `-p auto` option, which will use heuristics to determine if a pristine build is required, such as when building another sample. 47 | 48 | 4. After running the `west build` command, the build files can be found in `build/zephyr`. 49 | 50 | ## Flashing the firmware 51 | 52 | The sample is designed to work with the UF2 Bootloader, so that you can easily flash the sample [using the UF2 Bootloader](../../../../programming/uf2boot.md). The firmware can be found in `build/zephyr` with the name `zephyr.uf2`. 53 | 54 | To flash the firmware, complete the following steps: 55 | 56 | 1. Push and hold the __USER__ button and plug your board into the USB port of your computer. Release the __USER__ button after your board is connected. The RGB LED turns green. 57 | 58 | 2. It will mount as a Mass Storage Device called __UF2BOOT__. 59 | 60 | 3. Drag and drop `zephyr.uf2` onto the __UF2BOOT__ volume. The RGB LED blinks red fast during flashing. 61 | 62 | 4. Reset the board and the sample will start running. 63 | 64 | ## Testing 65 | 66 | After flashing the firmware to your board, complete the following steps to test it: 67 | 68 | 1. Power up nRF52840 Connect Kit by using the USB-C Cable. 69 | 2. Touch the NFC antenna with the smartphone or tablet and observe that Green LED is lit. 70 | 3. Observe that the smartphone or tablet displays the encoded text (in the most suitable language). 71 | 4. Move the smartphone or tablet away from the NFC antenna and observe that Green LED turns off. 72 | 73 | [NFC Data Exchange Format (NDEF)]: https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/libraries/nfc/ndef/index.html#lib-nfc-ndef 74 | [NFC Text record]: https://github.com/makerdiary/ncs-playground/tree/main/samples/nfc/record_text -------------------------------------------------------------------------------- /docs/guides/ncs/samples/nfc/uri_record.md: -------------------------------------------------------------------------------- 1 | # NFC URI record 2 | 3 | ## Overview 4 | 5 | The NFC URI record sample shows how to use the NFC tag to expose a URL record to NFC polling devices. It uses the [NFC Data Exchange Format (NDEF)]. 6 | 7 | When the sample starts, it initializes the NFC tag and generates a URI message with a URI record containing the URL "https://makerdiary.com". Then it sets up the NFC library to use the generated message and sense the external NFC field. 8 | 9 | The only events handled by the application are the NFC events. The Green LED turns on when an NFC field is present. 10 | 11 | ## Requirements 12 | 13 | Before you start, check that you have the required hardware and software: 14 | 15 | - 1x [nRF52840 Connect Kit](https://makerdiary.com/products/nrf52840-connectkit) 16 | - A 13.56MHz NFC Antenna 17 | - 1x USB-C Cable 18 | - A smartphone or a tablet with NFC support 19 | - A computer running macOS, Linux, or Windows 7 or newer 20 | 21 | ## Wiring the NFC antenna 22 | 23 | ![](../../../../assets/images/wiring_nfc_ant.png) 24 | 25 | ## Building the sample 26 | 27 | Before you start building, remember to [set up the environment](../../setup.md) first. 28 | 29 | Use the following steps to build the [NFC URI record] sample on the command line. 30 | 31 | 1. Open a terminal window. 32 | 33 | 2. Go to `my-workspace/ncs-playground` directory created in the [Setting up the environment](../../setup.md#get-the-code) section. 34 | 35 | ``` bash linenums="1" 36 | cd my-workspace/ncs-playground 37 | ``` 38 | 39 | 3. Build the sample using the `west` command, specifying the board (following the `-b` option) as `connectkit_nrf52840`: 40 | 41 | ``` bash linenums="1" 42 | west build -p always -b connectkit_nrf52840 samples/nfc/record_uri 43 | ``` 44 | 45 | !!! Tip 46 | The `-p always` option forces a pristine build, and is recommended for new users. Users may also use the `-p auto` option, which will use heuristics to determine if a pristine build is required, such as when building another sample. 47 | 48 | 4. After running the `west build` command, the build files can be found in `build/zephyr`. 49 | 50 | ## Flashing the firmware 51 | 52 | The sample is designed to work with the UF2 Bootloader, so that you can easily flash the sample [using the UF2 Bootloader](../../../../programming/uf2boot.md). The firmware can be found in `build/zephyr` with the name `zephyr.uf2`. 53 | 54 | To flash the firmware, complete the following steps: 55 | 56 | 1. Push and hold the __USER__ button and plug your board into the USB port of your computer. Release the __USER__ button after your board is connected. The RGB LED turns green. 57 | 58 | 2. It will mount as a Mass Storage Device called __UF2BOOT__. 59 | 60 | 3. Drag and drop `zephyr.uf2` onto the __UF2BOOT__ volume. The RGB LED blinks red fast during flashing. 61 | 62 | 4. Reset the board and the sample will start running. 63 | 64 | ## Testing 65 | 66 | After flashing the firmware to your board, complete the following steps to test it: 67 | 68 | 1. Power up nRF52840 Connect Kit by using the USB-C Cable. 69 | 2. Touch the NFC antenna with the smartphone or tablet and observe that Green LED is lit. 70 | 3. Observe that the smartphone or tablet tries to open the URL "https://makerdiary.com" in a web browser. 71 | 4. Move the smartphone or tablet away from the NFC antenna and observe that Green LED turns off. 72 | 73 | [NFC Data Exchange Format (NDEF)]: https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/libraries/nfc/ndef/index.html#lib-nfc-ndef 74 | [NFC URI record]: https://github.com/makerdiary/ncs-playground/tree/main/samples/nfc/record_uri -------------------------------------------------------------------------------- /docs/guides/ncs/samples/nfc/writable_ndef_msg.md: -------------------------------------------------------------------------------- 1 | # NFC Writable NDEF message 2 | 3 | ## Overview 4 | 5 | The Writable NDEF message sample shows how to use the NFC tag to expose an NDEF message that can be overwritten with any other NDEF message by an NFC device. It uses the [NFC Data Exchange Format (NDEF)]. 6 | 7 | When the sample starts, it initializes the NFC tag and loads the NDEF message from the file in flash memory. If the NDEF message file does not exist, a default message is generated. It is a URI message with a URI record containing the URL “https://makerdiary.com”. The sample then sets up the NFC library for the Type 4 Tag platform, which uses the NDEF message and senses the external NFC field. 8 | 9 | The library works in Read-Write emulation mode. In this mode, procedures for reading and updating an NDEF message are handled internally by the NFC library. Any changes to the NDEF message update the NDEF message file stored in flash memory. 10 | 11 | ## Requirements 12 | 13 | Before you start, check that you have the required hardware and software: 14 | 15 | - 1x [nRF52840 Connect Kit](https://makerdiary.com/products/nrf52840-connectkit) 16 | - A 13.56MHz NFC Antenna 17 | - 1x USB-C Cable 18 | - A smartphone or a tablet with NFC support 19 | - A computer running macOS, Linux, or Windows 7 or newer 20 | 21 | ## Installing NFC Tools App 22 | 23 | NFC Tools App can read and write your NFC tags with a simple and lightweight user interface. 24 | 25 | [![App Store](../../../../assets/images/appstore.png){ width='128' display='inline' }](hhttps://apps.apple.com/us/app/nfc-tools/id1252962749) 26 | [![Google Play](../../../../assets/images/google-play-badge.png){ width='148' display='inline' }](https://play.google.com/store/apps/details?id=com.wakdev.wdnfc) 27 | 28 | ## Wiring the NFC antenna 29 | 30 | ![](../../../../assets/images/wiring_nfc_ant.png) 31 | 32 | ## Building the sample 33 | 34 | Before you start building, remember to [set up the environment](../../setup.md) first. 35 | 36 | Use the following steps to build the [Writable NDEF message] sample on the command line. 37 | 38 | 1. Open a terminal window. 39 | 40 | 2. Go to `my-workspace/ncs-playground` directory created in the [Setting up the environment](../../setup.md#get-the-code) section. 41 | 42 | ``` bash linenums="1" 43 | cd my-workspace/ncs-playground 44 | ``` 45 | 46 | 3. Build the sample using the `west` command, specifying the board (following the `-b` option) as `connectkit_nrf52840`: 47 | 48 | ``` bash linenums="1" 49 | west build -p always -b connectkit_nrf52840 samples/nfc/writable_ndef_msg 50 | ``` 51 | 52 | !!! Tip 53 | The `-p always` option forces a pristine build, and is recommended for new users. Users may also use the `-p auto` option, which will use heuristics to determine if a pristine build is required, such as when building another sample. 54 | 55 | 4. After running the `west build` command, the build files can be found in `build/zephyr`. 56 | 57 | ## Flashing the firmware 58 | 59 | The sample is designed to work with the UF2 Bootloader, so that you can easily flash the sample [using the UF2 Bootloader](../../../../programming/uf2boot.md). The firmware can be found in `build/zephyr` with the name `zephyr.uf2`. 60 | 61 | To flash the firmware, complete the following steps: 62 | 63 | 1. Push and hold the __USER__ button and plug your board into the USB port of your computer. Release the __USER__ button after your board is connected. The RGB LED turns green. 64 | 65 | 2. It will mount as a Mass Storage Device called __UF2BOOT__. 66 | 67 | 3. Drag and drop `zephyr.uf2` onto the __UF2BOOT__ volume. The RGB LED blinks red fast during flashing. 68 | 69 | 4. Reset the board and the sample will start running. 70 | 71 | ## Testing 72 | 73 | After flashing the firmware to your board, complete the following steps to test it: 74 | 75 | 1. Power up nRF52840 Connect Kit by using the USB-C Cable. 76 | 2. Touch the NFC antenna with the smartphone or tablet and observe that Green LED is lit. 77 | 3. Observe that the smartphone or tablet tries to open the URL "https://makerdiary.com" in a web browser. 78 | 4. Use [NFC Tools](#installing-nfc-tools-app) to overwrite the existing NDEF message with your own message. 79 | 4. Restart your board and touch the antenna again. Observe that the new message is displayed. 80 | 81 | [NFC Data Exchange Format (NDEF)]: https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/libraries/nfc/ndef/index.html#lib-nfc-ndef 82 | [Writable NDEF message]: https://github.com/makerdiary/ncs-playground/tree/main/samples/nfc/writable_ndef_msg 83 | -------------------------------------------------------------------------------- /docs/guides/ncs/samples/qspi_flash.md: -------------------------------------------------------------------------------- 1 | # QSPI NOR Flash 2 | 3 | ## Overview 4 | 5 | The QSPI NOR Flash sample demonstrates using the flash API on a QSPI NOR serial flash memory device. While trivial it is an example of direct access and allows confirmation that the flash is working and that automatic power savings is correctly implemented. 6 | 7 | The QSPI NOR flash is connected to the nRF52840 chip over a QSPI bus. The table below shows the connections of each pin of QSPI flash: 8 | 9 | | QSPI Flash Pin | nRF52840 Pin | 10 | |----------------|--------------| 11 | | __`CS#`__ | __`P0.17`__ | 12 | | __`SCLK`__ | __`P0.19`__ | 13 | | __`SIO0`__ | __`P0.20`__ | 14 | | __`SIO1`__ | __`P0.21`__ | 15 | | __`SIO2`__ | __`P0.22`__ | 16 | | __`SIO3`__ | __`P0.23`__ | 17 | 18 | ## Requirements 19 | 20 | Before you start, check that you have the required hardware and software: 21 | 22 | - 1x [nRF52840 Connect Kit](https://makerdiary.com/products/nrf52840-connectkit) 23 | - 1x USB-C Cable 24 | - A computer running macOS, Linux, or Windows 7 or newer 25 | 26 | ## Building the sample 27 | 28 | Before you start building, remember to [set up the environment](../setup.md) first. 29 | 30 | Use the following steps to build the [QSPI NOR Flash] sample on the command line. 31 | 32 | 1. Open a terminal window. 33 | 34 | 2. Go to `my-workspace/ncs-playground` directory created in the [Setting up the environment](../setup.md#get-the-code) section. 35 | 36 | ``` bash linenums="1" 37 | cd my-workspace/ncs-playground 38 | ``` 39 | 40 | 3. Build the sample using the `west` command, specifying the board (following the `-b` option) as `connectkit_nrf52840`: 41 | 42 | ``` bash linenums="1" 43 | west build -p always -b connectkit_nrf52840 samples/qspi_flash 44 | ``` 45 | 46 | !!! Tip 47 | The `-p always` option forces a pristine build, and is recommended for new users. Users may also use the `-p auto` option, which will use heuristics to determine if a pristine build is required, such as when building another sample. 48 | 49 | 4. After running the `west build` command, the build files can be found in `build/zephyr`. 50 | 51 | ## Flashing the firmware 52 | 53 | The sample is designed to work with the UF2 Bootloader, so that you can easily flash the sample [using the UF2 Bootloader](../../../programming/uf2boot.md). The firmware can be found in `build/zephyr` with the name `zephyr.uf2`. 54 | 55 | To flash the firmware, complete the following steps: 56 | 57 | 1. Push and hold the __USER__ button and plug your board into the USB port of your computer. Release the __USER__ button after your board is connected. The RGB LED turns green. 58 | 59 | 2. It will mount as a Mass Storage Device called __UF2BOOT__. 60 | 61 | 3. Drag and drop `zephyr.uf2` onto the __UF2BOOT__ volume. The RGB LED blinks red fast during flashing. 62 | 63 | 4. Reset the board and the sample will start running. 64 | 65 | ## Testing 66 | 67 | After flashing the firmware to your board, complete the following steps to test it: 68 | 69 | 1. Connect nRF52840 Connect Kit to your computer using the USB-C Cable. 70 | 2. Open up a serial terminal, specifying the correct serial port that your computer uses to communicate with the board: 71 | 72 | === "macOS/Linux" 73 | 74 | Open up a terminal and run: 75 | 76 | ``` bash linenums="1" 77 | screen 115200 78 | ``` 79 | 80 | === "Windows" 81 | 82 | 1. Start [PuTTY]. 83 | 2. Configure the correct serial port and click __Open__: 84 | 85 | ![](../../../assets/images/putty-settings.png) 86 | 87 | 3. Observe the output of the terminal. You should see the output, similar to what is shown in the following: 88 | 89 | ``` { .bash .no-copy linenums="1" } 90 | 91 | mx25r6435f@0 QSPI flash testing 92 | ========================== 93 | 94 | Test 1: Flash erase 95 | Flash erase succeeded! 96 | 97 | Test 2: Flash write 98 | Attempting to write 4 bytes 99 | Data read matches data written. Good!! 100 | ``` 101 | 102 | [QSPI NOR Flash]: https://github.com/makerdiary/ncs-playground/tree/main/samples/qspi_flash 103 | [PuTTY]: https://apps.microsoft.com/store/detail/putty/XPFNZKSKLBP7RJ -------------------------------------------------------------------------------- /docs/guides/ncs/samples/usb/hid_mouse.md: -------------------------------------------------------------------------------- 1 | # USB HID Mouse 2 | 3 | ## Overview 4 | 5 | The USB HID Mouse sample demonstrates the use of a USB Human Interface Device (HID) driver by the Zephyr project. This very simple driver enumerates a board with a button into a mouse that has a left mouse button and optionally (depending on the number of buttons on the board) a right mouse button, X-axis movement, and Y-axis movement. If the USB peripheral driver supports remote wakeup feature, wakeup request will be performed on every button click if the bus is in suspended state. 6 | 7 | ## Requirements 8 | 9 | Before you start, check that you have the required hardware and software: 10 | 11 | - 1x [nRF52840 Connect Kit](https://makerdiary.com/products/nrf52840-connectkit) 12 | - 1x USB-C Cable 13 | - A computer running macOS, Linux, or Windows 7 or newer 14 | 15 | ## Building the sample 16 | 17 | Before you start building, remember to [set up the environment](../../setup.md) first. 18 | 19 | Use the following steps to build the [USB HID Mouse] sample on the command line. 20 | 21 | 1. Open a terminal window. 22 | 23 | 2. Go to `my-workspace/ncs-playground` directory created in the [Setting up the environment](../../setup.md#get-the-code) section. 24 | 25 | ``` bash linenums="1" 26 | cd my-workspace/ncs-playground 27 | ``` 28 | 29 | 3. Build the sample using the `west` command, specifying the board (following the `-b` option) as `connectkit_nrf52840`: 30 | 31 | ``` bash linenums="1" 32 | west build -p always -b connectkit_nrf52840 samples/usb/hid-mouse 33 | ``` 34 | 35 | !!! Tip 36 | The `-p always` option forces a pristine build, and is recommended for new users. Users may also use the `-p auto` option, which will use heuristics to determine if a pristine build is required, such as when building another sample. 37 | 38 | 4. After running the `west build` command, the build files can be found in `build/zephyr`. 39 | 40 | ## Flashing the firmware 41 | 42 | The sample is designed to work with the UF2 Bootloader, so that you can easily flash the sample [using the UF2 Bootloader](../../../../programming/uf2boot.md). The firmware can be found in `build/zephyr` with the name `zephyr.uf2`. 43 | 44 | To flash the firmware, complete the following steps: 45 | 46 | 1. Push and hold the __USER__ button and plug your board into the USB port of your computer. Release the __USER__ button after your board is connected. The RGB LED turns green. 47 | 48 | 2. It will mount as a Mass Storage Device called __UF2BOOT__. 49 | 50 | 3. Drag and drop `zephyr.uf2` onto the __UF2BOOT__ volume. The RGB LED blinks red fast during flashing. 51 | 52 | 4. Reset the board and the sample will start running. 53 | 54 | ## Testing 55 | 56 | After flashing the firmware to your board, complete the following steps to test it: 57 | 58 | 1. Connect nRF52840 Connect Kit to your computer using the USB-C Cable. 59 | 2. The board will be detected as a HID mouse named __Zephyr HID mouse sample__. 60 | 3. Press __USER__ button on the board. Observe that a left mouse click is activated. 61 | 62 | 63 | [USB HID Mouse]: https://github.com/makerdiary/ncs-playground/tree/main/samples/usb/hid-mouse 64 | -------------------------------------------------------------------------------- /docs/guides/ncs/samples/usb/mass.md: -------------------------------------------------------------------------------- 1 | # USB Mass Storage 2 | 3 | ## Overview 4 | 5 | The USB Mass Storage sample demonstrates the use of a USB Mass Storage driver by the Zephyr project. This very simple driver enumerates a board with either RAM or FLASH into an USB disk. 6 | 7 | ## Requirements 8 | 9 | Before you start, check that you have the required hardware and software: 10 | 11 | - 1x [nRF52840 Connect Kit](https://makerdiary.com/products/nrf52840-connectkit) 12 | - 1x USB-C Cable 13 | - A computer running macOS, Linux, or Windows 7 or newer 14 | 15 | ## Building the sample 16 | 17 | Before you start building, remember to [set up the environment](../../setup.md) first. 18 | 19 | Use the following steps to build the [USB Mass Storage] sample on the command line. 20 | 21 | 1. Open a terminal window. 22 | 23 | 2. Go to `my-workspace/ncs-playground` directory created in the [Setting up the environment](../../setup.md#get-the-code) section. 24 | 25 | ``` bash linenums="1" 26 | cd my-workspace/ncs-playground 27 | ``` 28 | 29 | 3. Build the sample using the `west` command, specifying the board (following the `-b` option) as `connectkit_nrf52840`. There are multiple configurations can be chosen: 30 | 31 | === "RAM-disk" 32 | 33 | ``` bash linenums="1" 34 | west build -p always -b connectkit_nrf52840 samples/usb/mass 35 | ``` 36 | 37 | === "RAM-disk with FATFS" 38 | 39 | ``` bash linenums="1" 40 | west build -p always -b connectkit_nrf52840 samples/usb/mass -- -DCONFIG_APP_MSC_STORAGE_RAM=y 41 | ``` 42 | 43 | === "FLASH-disk with FATFS" 44 | 45 | ``` bash linenums="1" 46 | west build -p always -b connectkit_nrf52840 samples/usb/mass -- -DCONFIG_APP_MSC_STORAGE_FLASH_FATFS=y 47 | ``` 48 | 49 | === "FLASH-disk with LittleFS" 50 | 51 | ``` bash linenums="1" 52 | west build -p always -b connectkit_nrf52840 samples/usb/mass -- -DCONFIG_APP_MSC_STORAGE_FLASH_LITTLEFS=y 53 | ``` 54 | 55 | !!! Tip 56 | The `-p always` option forces a pristine build, and is recommended for new users. Users may also use the `-p auto` option, which will use heuristics to determine if a pristine build is required, such as when building another sample. 57 | 58 | 4. After running the `west build` command, the build files can be found in `build/zephyr`. 59 | 60 | ## Flashing the firmware 61 | 62 | The sample is designed to work with the UF2 Bootloader, so that you can easily flash the sample [using the UF2 Bootloader](../../../../programming/uf2boot.md). The firmware can be found in `build/zephyr` with the name `zephyr.uf2`. 63 | 64 | To flash the firmware, complete the following steps: 65 | 66 | 1. Push and hold the __USER__ button and plug your board into the USB port of your computer. Release the __USER__ button after your board is connected. The RGB LED turns green. 67 | 68 | 2. It will mount as a Mass Storage Device called __UF2BOOT__. 69 | 70 | 3. Drag and drop `zephyr.uf2` onto the __UF2BOOT__ volume. The RGB LED blinks red fast during flashing. 71 | 72 | 4. Reset the board and the sample will start running. 73 | 74 | ## Testing 75 | 76 | After flashing the firmware to your board, complete the following steps to test it: 77 | 78 | 1. Connect nRF52840 Connect Kit to your computer using the USB-C Cable. 79 | 2. The board will be detected as an USB disk. 80 | 81 | !!! Tip "LittleFS Usage" 82 | 83 | While a FAT-based file system can be mounted by many systems automatically, mounting the littlefs file system on a Linux or FreeBSD system can be accomplished using the [littlefs-fuse] utility. 84 | 85 | [USB Mass Storage]: https://github.com/makerdiary/ncs-playground/tree/main/samples/usb/mass 86 | [littlefs-fuse]: https://github.com/littlefs-project/littlefs-fuse -------------------------------------------------------------------------------- /docs/guides/ncs/samples/voltage_measurement.md: -------------------------------------------------------------------------------- 1 | # Voltage Measurement 2 | 3 | ## Overview 4 | 5 | The Voltage Measurement sample demonstrates using Nordic configurations of the Zephyr ADC infrastructure to measure the voltage of the device power supply. 6 | 7 | The measurement circuit contains a voltage divider made of two resistors. __AIN0__ measures the voltage over the lower resistor and __P1.14__ is used to enable the voltage measurement. The voltage measurement circuitry is shown in the following figure: 8 | 9 | ![](../../../assets/images/voltage_meas_circuitry.png) 10 | 11 | The board devicetree has a `power_vsys_in` node with compatible `voltage-divider`. The voltage is measured using that divider. The devicetree node describing is shown below: 12 | 13 | ``` dts 14 | power_vsys_in { 15 | compatible = "voltage-divider"; 16 | io-channels = <&adc 0>; 17 | output-ohms = <100000>; 18 | full-ohms = <(1000000 + 100000)>; 19 | power-gpios = <&gpio1 14 0>; 20 | }; 21 | ``` 22 | 23 | ## Requirements 24 | 25 | Before you start, check that you have the required hardware and software: 26 | 27 | - 1x [nRF52840 Connect Kit](https://makerdiary.com/products/nrf52840-connectkit) 28 | - 1x USB-C Cable 29 | - A computer running macOS, Linux, or Windows 7 or newer 30 | 31 | ## Building the sample 32 | 33 | Before you start building, remember to [set up the environment](../setup.md) first. 34 | 35 | Use the following steps to build the [Voltage Measurement] sample on the command line. 36 | 37 | 1. Open a terminal window. 38 | 39 | 2. Go to `my-workspace/ncs-playground` directory created in the [Setting up the environment](../setup.md#get-the-code) section. 40 | 41 | ``` bash linenums="1" 42 | cd my-workspace/ncs-playground 43 | ``` 44 | 45 | 3. Build the sample using the `west` command, specifying the board (following the `-b` option) as `connectkit_nrf52840`: 46 | 47 | ``` bash linenums="1" 48 | west build -p always -b connectkit_nrf52840 samples/voltage_measurement 49 | ``` 50 | 51 | !!! Tip 52 | The `-p always` option forces a pristine build, and is recommended for new users. Users may also use the `-p auto` option, which will use heuristics to determine if a pristine build is required, such as when building another sample. 53 | 54 | 4. After running the `west build` command, the build files can be found in `build/zephyr`. 55 | 56 | ## Flashing the firmware 57 | 58 | The sample is designed to work with the UF2 Bootloader, so that you can easily flash the sample [using the UF2 Bootloader](../../../programming/uf2boot.md). The firmware can be found in `build/zephyr` with the name `zephyr.uf2`. 59 | 60 | To flash the firmware, complete the following steps: 61 | 62 | 1. Push and hold the __USER__ button and plug your board into the USB port of your computer. Release the __USER__ button after your board is connected. The RGB LED turns green. 63 | 64 | 2. It will mount as a Mass Storage Device called __UF2BOOT__. 65 | 66 | 3. Drag and drop `zephyr.uf2` onto the __UF2BOOT__ volume. The RGB LED blinks red fast during flashing. 67 | 68 | 4. Reset the board and the sample will start running. 69 | 70 | ## Testing 71 | 72 | After flashing the firmware to your board, complete the following steps to test it: 73 | 74 | 1. Connect nRF52840 Connect Kit to your computer using the USB-C Cable. 75 | 2. Open up a serial terminal, specifying the correct serial port that your computer uses to communicate with the board: 76 | 77 | === "macOS/Linux" 78 | 79 | Open up a terminal and run: 80 | 81 | ``` bash linenums="1" 82 | screen 115200 83 | ``` 84 | 85 | === "Windows" 86 | 87 | 1. Start [PuTTY]. 88 | 2. Configure the correct serial port and click __Open__: 89 | 90 | ![](../../../assets/images/putty-settings.png) 91 | 92 | 3. Observe the output of the terminal. You should see the output, similar to what is shown in the following: 93 | 94 | ``` { .bash .no-copy linenums="1" } 95 | ADC reading: 96 | - adc@40007000, channel 0: 771 = 451 mV, VSYS = 4961 mV 97 | ADC reading: 98 | - adc@40007000, channel 0: 771 = 451 mV, VSYS = 4961 mV 99 | ADC reading: 100 | - adc@40007000, channel 0: 769 = 450 mV, VSYS = 4950 mV 101 | ... 102 | ``` 103 | 104 | [Voltage Measurement]: https://github.com/makerdiary/ncs-playground/tree/main/samples/voltage_measurement 105 | [PuTTY]: https://apps.microsoft.com/store/detail/putty/XPFNZKSKLBP7RJ -------------------------------------------------------------------------------- /docs/guides/nrf802154-sniffer/index.md: -------------------------------------------------------------------------------- 1 | # nRF Sniffer for 802.15.4 2 | 3 | ## Introduction 4 | 5 | The nRF Sniffer for 802.15.4 is a tool for learning about and debugging applications that are using protocols based on IEEE 802.15.4, such as Thread and Zigbee. It provides a near real-time display of 802.15.4 packets that are sent back and forth between devices, even when the link is encrypted. 6 | 7 | When developing a 802.15.4-compatible product, knowing what happens over-the-air between devices can help you identify and fix issues quickly. 8 | 9 | The nRF Sniffer captures packets transmitted by nearby devices on a selected radio channel. You can start the capture manually from Wireshark, a free software tool that captures wireless traffic and reproduces it in a readable format, or using a Python script. Use either of these methods to create packet capture files, from which you can extract data in Wireshark. This data can include destination and source addresses, personal area network identifiers, and packet payloads. 10 | 11 | The nRF Sniffer for 802.15.4 comes with an extcap plugin for capturing packets in Wireshark. This plugin can also be installed as a Python module for use in a script. 12 | 13 | Wireshark is also able to analyze data exchanged over higher-level protocols, such as Thread and Zigbee. You can configure the Sniffer to report out-of-band metadata, such as channel, received signal strength indicator (RSSI), and link quality inidcator (LQI). 14 | 15 | ## Requirements 16 | 17 | Before you start, check that you have the required hardware and software: 18 | 19 | * 1x [nRF52840 Connect Kit] 20 | * Supported operating systems: 21 | - Windows 10 22 | - 64-bit OS X/macOS 10.6 or later 23 | - Linux (check the [Wireshark] prerequisites for version compatibility) 24 | * [Wireshark] v3.4.7 or later 25 | * [Python] v3.7 or later 26 | 27 | ## Get Involved 28 | 29 | The following sections explain how to set up the nRF Sniffer for 802.15.4 and help you get moving with sniffing: 30 | 31 | - [Installation](./installation.md) 32 | - [Configuring Wireshark for nRF Sniffer for 802.15.4](./configuring.md) 33 | - [Capturing data with the nRF Sniffer](./capturing.md) 34 | - [Inspecting captured data](./inspecting-data.md) 35 | 36 | ## Reference 37 | 38 | * [nRF Sniffer for 802.15.4 User Guide v0.7.2](https://infocenter.nordicsemi.com/pdf/nRF_Sniffer_802154_User_Guide_v0.7.2.pdf) 39 | * [Wireshark website](https://www.wireshark.org/) 40 | 41 | [nRF52840 Connect Kit]: https://makerdiary.com/products/nrf52840-connectkit 42 | [Wireshark]: https://www.wireshark.org/ 43 | [Python]: https://www.python.org/downloads/ -------------------------------------------------------------------------------- /docs/guides/nrf802154-sniffer/inspecting-data.md: -------------------------------------------------------------------------------- 1 | # Inspecting captured data 2 | 3 | The nRF Sniffer passes all 802.15.4 packets to Wireshark, where they are wrapped in a header containing useful meta-information not present in the packet itself. Wireshark dissects the packets and separates the actual packet from the meta-information. 4 | 5 | When you browse captured packets, select a packet in the __packet list__ to show the breakdown of that packet in the __packet details pane__. The hexadecimal view of the packet is shown in the __packet bytes pane__. Click a value in the details to highlight it among the bytes, or click on the bytes to highlight it in the details. 6 | 7 | ![Inspecting captured data](../../assets/images/wireshark_802154_captured_data.png) 8 | 9 | ## Using Display Filter Expression 10 | 11 | Use display filters to display a chosen packet subset. To open the filter menu and construct a filter: 12 | 13 | 1. Right-click the filtering bar. 14 | 2. Click __Display Filter Expression...__. 15 | 16 | ![Show Display Filter Expression](../../assets/images/wireshark_802154_display_filter.png) 17 | 18 | Most filters are based on the values of the packets, such as length or access address. The filter expressions use Boolean operators (`&&` `||` `==` `!=` `!`). 19 | 20 | ![Display Filter Expression](../../assets/images/wireshark_802154_filter_expression.png) 21 | 22 | See the following table for some filter examples. 23 | 24 | | Display filter | Description | 25 | |----------------|-------------| 26 | | `wpan` | Filter that displays all IEEE 802.15.4 traffic. | 27 | | `wpan.dst_pan` | Filter that displays IEEE 802.15.4 packets that have a specific destination PAN. | 28 | | `wpan.dst16` | Filter that displays short destination addresses of IEEE 802.15.4 frames. | 29 | | `wpan.dst64` | Filter that displays long destination addresses of IEEE 802.15.4 frames. | 30 | | `wpan.src16` | Filter that displays short source addresses of IEEE 802.15.4 frames. | 31 | | `wpan.src64` | Filter that displays long source addresses of IEEE 802.15.4 frames. | 32 | | `ipv6`, `coap`, `dtls`, `udp` | Examples of filters for packets that can be encountered on Thread and IP networks. | 33 | | `mle` | Protocol filter that displays all Mesh Link Establishment traffic. Used for example by Thread. | 34 | 35 | ## Tips and Tricks 36 | 37 | The following tips can help when inspecting your data: 38 | 39 | - Turn any field in the __packet details pane__ into a column. To do so: 40 | 41 | 1. Right-click the value in the packet details. 42 | 2. Click __Apply as Column__. 43 | 44 | ![Apply as Column](../../assets/images/wireshark_802154_apply_column.png) 45 | 46 | - Apply a value as a filter to, for example, see only operations affecting a particular handle. To filter packets that have a specific value for some field: 47 | 48 | 1. Right-click the value in the packet details. 49 | 2. Click __Apply as Filter__. 50 | 3. Click __Selected__. 51 | 52 | - Save a set of captured packets to be able to look at them later. To do so: 53 | 54 | 1. Click the __Stop__ button to stop capturing packets. 55 | 2. Click __File__ > __Save As__ to save all packets, or click __File__ > __Export Specified Packets__ to save a selection of packets. 56 | 57 | - Clear the packet list and restart a capture by clicking the __Restart__ button. 58 | 59 | See the documentation on the [Wireshark] website for more information. 60 | 61 | [Wireshark]: https://www.wireshark.org/ -------------------------------------------------------------------------------- /docs/guides/python/index.md: -------------------------------------------------------------------------------- 1 | # Code in Python 2 | 3 | ## Introduction 4 | 5 | Python is a high-level programming language which means it's designed to be easier to read, write and maintain. It has a built-in interpreter which means there are no extra steps, like compiling, to get your code to work. 6 | 7 | nRF52840 Connect Kit can run [CircuitPython] which allows you to access hardware-specific functionality and peripherals with Python programming language. With CircuitPython, there are no upfront desktop downloads needed. Once you get your board set up, open any text editor, and start editing code. It's that simple. 8 | 9 | !!! question "Why CircuitPython?" 10 | CircuitPython is based on [MicroPython] and features unified Python core APIs and a growing list of 300+ device libraries and drivers that work with it. See [differences from MicroPython](https://github.com/adafruit/circuitpython#differences-from-micropython). 11 | 12 | ## Get Involved 13 | 14 | We think the best way to learn is by doing. And to help you get started, we have provided an extensive set of documentation. Find the details below: 15 | 16 | - [Getting started with CircuitPython](./getting-started.md) 17 | - Samples 18 | * [Blinky](./samples/blinky.md) 19 | * [Button](./samples/button.md) 20 | * [ADC](./samples/adc.md) 21 | * [PWM](./samples/pwm.md) 22 | * [USB HID Keyboard](./samples/usb/hid_keyboard.md) 23 | * [USB HID Mouse](./samples/usb/hid_mouse.md) 24 | * [BLE Advertising](./samples/ble/advertising.md) 25 | * [BLE Nordic UART Service](./samples/ble/nus.md) 26 | * [BLE HID Keyboard](./samples/ble/hid_mouse.md) 27 | * [BLE HID Mouse](./samples/ble/hid_mouse.md) 28 | - [Reference](./reference.md) 29 | 30 | [CircuitPython]: https://circuitpython.org/ 31 | [MicroPython]: https://micropython.org/ -------------------------------------------------------------------------------- /docs/guides/python/samples/adc.md: -------------------------------------------------------------------------------- 1 | # ADC 2 | 3 | The ADC sample demonstrates using the `analogio` module to measure the voltage of the device power supply. 4 | 5 | The measurement circuit contains a voltage divider made of two resistors. __AIN0__ (alias __A0__) measures the voltage over the lower resistor and __P1.14__ (alias __MEAS_EN__) is used to enable the voltage measurement. The voltage measurement circuitry is shown in the following figure: 6 | 7 | ![](../../../assets/images/voltage_meas_circuitry.png) 8 | 9 | ## Requirements 10 | 11 | Before you start, check that you have the required hardware and software: 12 | 13 | - [nRF52840 Connect Kit](https://makerdiary.com/products/nrf52840-connectkit) running the [CircuitPython] firmware 14 | - 1x USB-C Cable 15 | - [Mu Editor] 16 | - A computer running macOS, Linux, or Windows 7 or newer 17 | 18 | ## Running the code 19 | 20 | To run the code, complete the following steps: 21 | 22 | 1. Connect nRF52840 Connect Kit to your computer using the USB-C Cable. 23 | 2. Start Mu Editor, click __Load__ to open `code.py` in the __CIRCUITPY__ drive. 24 | 3. Copy and paste the following code into `code.py` and click __Save__: 25 | 26 | 27 | ``` python linenums="1" title="CIRCUITPY/code.py" 28 | 29 | import time 30 | import board 31 | import digitalio 32 | from analogio import AnalogIn 33 | 34 | # Enable measurement 35 | meas_en = digitalio.DigitalInOut(board.MEAS_EN) 36 | meas_en.direction=digitalio.Direction.OUTPUT 37 | meas_en.value = True 38 | 39 | # Analog In 40 | analog_in = AnalogIn(board.A0) 41 | 42 | # Measure the voltage of VSYS 43 | def get_voltage(ain): 44 | return ((ain.value * 3.3) / 65536) * (1000 + 100) / 100 45 | 46 | while True: 47 | print((get_voltage(analog_in),)) 48 | time.sleep(0.1) 49 | 50 | ``` 51 | 52 | 4. Your code will run as soon as the file is done saving. Click __Serial__ on Mu Editor's Top Menu to open a serial console. You should see the console output, similar to what is shown in the following: 53 | 54 | ``` { .bash .no-copy linenums="1"} 55 | Code stopped by auto-reload. Reloading soon. 56 | 57 | Auto-reload is on. Simply save files over USB to run them or enter REPL to disable. 58 | code.py output: 59 | (5.149,) 60 | (5.30852,) 61 | (5.10468,) 62 | (5.09582,) 63 | (5.11355,) 64 | (5.37942,) 65 | (5.4769,) 66 | (5.18444,) 67 | (5.11355,) 68 | ... 69 | ``` 70 | 71 | 5. You can also use the plotter for data inspection. Click __Plotter__ on Mu Editor's Top Menu to open up a plotter pane: 72 | 73 | ![](../../../assets/images/mu-edittor-plotter-adc.png) 74 | 75 | 76 | [Mu Editor]: ../getting-started.md#coding-with-mu-editor 77 | [CircuitPython]: ../getting-started.md#installing-circuitpython 78 | -------------------------------------------------------------------------------- /docs/guides/python/samples/ble/advertising.md: -------------------------------------------------------------------------------- 1 | # BLE Advertising 2 | 3 | ## Overview 4 | 5 | The BLE Advertising sample demonstrates the BLE Advertising functionality using the `adafruit_ble` module. 6 | 7 | When the code starts, nRF52840 Connect Kit will advertise with its name. 8 | 9 | !!! Tip 10 | `adafruit_ble` is pre-built into [CircuitPython] as a frozen module, so that it can be imported in the code directly. 11 | 12 | ## Requirements 13 | 14 | Before you start, check that you have the required hardware and software: 15 | 16 | - [nRF52840 Connect Kit](https://makerdiary.com/products/nrf52840-connectkit) running the [CircuitPython] firmware 17 | - 1x USB-C Cable 18 | - A smartphone or a tablet with [nRF Connect for Mobile] installed 19 | - [Mu Editor] 20 | - A computer running macOS, Linux, or Windows 7 or newer 21 | 22 | ## Running the code 23 | 24 | To run the code, complete the following steps: 25 | 26 | 1. Connect nRF52840 Connect Kit to your computer using the USB-C Cable. 27 | 2. Start Mu Editor, click __Load__ to open `code.py` in the __CIRCUITPY__ drive. 28 | 3. Copy and paste the following code into `code.py` and click __Save__: 29 | 30 | ``` python linenums="1" title="CIRCUITPY/code.py" 31 | from adafruit_ble import BLERadio 32 | from adafruit_ble.advertising import Advertisement 33 | 34 | ble = BLERadio() 35 | ble.name = "nRF52840 Connect Kit" 36 | advertisement = Advertisement() 37 | advertisement.complete_name = ble.name 38 | advertisement.connectable = True 39 | 40 | while True: 41 | print(advertisement) 42 | ble.start_advertising(advertisement) 43 | while not ble.connected: 44 | pass 45 | print("connected") 46 | while ble.connected: 47 | pass 48 | print("disconnected") 49 | ``` 50 | 51 | 4. Your code will run as soon as the file is done saving. Start the [nRF Connect for Mobile] app, scan the device and observe that the board is advertising with the Device Name __`nRF52840 Connect Kit`__. 52 | 53 | ![](../../../../assets/images/circuitpython_ble_adv.png){ width='250' } 54 | 55 | [nRF Connect for Mobile]: https://www.nordicsemi.com/Products/Development-tools/nRF-Connect-for-mobile 56 | [Mu Editor]: ../../getting-started.md#coding-with-mu-editor 57 | [CircuitPython]: ../../getting-started.md#installing-circuitpython 58 | -------------------------------------------------------------------------------- /docs/guides/python/samples/ble/hid_keyboard.md: -------------------------------------------------------------------------------- 1 | # BLE HID Keyboard 2 | 3 | ## Overview 4 | 5 | The BLE HID Keyboard sample demonstrates how to use the GATT Human Interface Device (HID) Service to implement a keyboard input device that you can connect to your computer. 6 | 7 | This sample code enumerates the nRF52840 Connect Kit into a BLE HID keyboard that has an A key connected to the __USER__ button. 8 | 9 | !!! Tip 10 | `adafruit_ble` and `adafruit_hid` are pre-built into [CircuitPython] as frozen modules, so that they can be imported in the code directly. 11 | 12 | ## Requirements 13 | 14 | Before you start, check that you have the required hardware and software: 15 | 16 | - [nRF52840 Connect Kit](https://makerdiary.com/products/nrf52840-connectkit) running the [CircuitPython] firmware 17 | - 1x USB-C Cable 18 | - [Mu Editor] 19 | - A computer running macOS, Linux, or Windows 7 or newer, with Bluetooth LE supported 20 | 21 | ## Running the code 22 | 23 | To run the code, complete the following steps: 24 | 25 | 1. Connect nRF52840 Connect Kit to your computer using the USB-C Cable. 26 | 2. Start Mu Editor, click __Load__ to open `code.py` in the __CIRCUITPY__ drive. 27 | 3. Copy and paste the following code into `code.py` and click __Save__: 28 | 29 | ``` python linenums="1" title="CIRCUITPY/code.py" 30 | import board 31 | import digitalio 32 | 33 | from adafruit_hid.keyboard import Keyboard 34 | from adafruit_hid.keyboard_layout_us import KeyboardLayoutUS 35 | from adafruit_hid.keycode import Keycode 36 | 37 | import adafruit_ble 38 | from adafruit_ble.advertising import Advertisement 39 | from adafruit_ble.advertising.standard import ProvideServicesAdvertisement 40 | from adafruit_ble.services.standard.hid import HIDService 41 | from adafruit_ble.services.standard.device_info import DeviceInfoService 42 | 43 | # USER button acts as A key on a keyboard 44 | key_a = digitalio.DigitalInOut(board.USER) 45 | key_a.direction = digitalio.Direction.INPUT 46 | key_a.pull = digitalio.Pull.UP 47 | 48 | # LED0 indicates A key is pressed 49 | led = digitalio.DigitalInOut(board.LED0) 50 | led.direction = digitalio.Direction.OUTPUT 51 | led.value = True 52 | 53 | # Use default HID descriptor 54 | hid = HIDService() 55 | device_info = DeviceInfoService( 56 | software_revision=adafruit_ble.__version__, manufacturer="Makerdiary" 57 | ) 58 | ble = adafruit_ble.BLERadio() 59 | ble.name = 'CIRCUITPY KEYBOARD' 60 | advertisement = ProvideServicesAdvertisement(hid) 61 | advertisement.complete_name = ble.name 62 | advertisement.appearance = 961 63 | scan_response = Advertisement() 64 | 65 | if ble.connected: 66 | for c in ble.connections: 67 | c.disconnect() 68 | 69 | print("advertising") 70 | ble.start_advertising(advertisement, scan_response) 71 | 72 | keyboard = Keyboard(hid.devices) 73 | 74 | while True: 75 | while not ble.connected: 76 | pass 77 | while ble.connected: 78 | if not key_a.value: 79 | print("Key A pressed!") 80 | 81 | # Turn on LED0 82 | led.value = False 83 | 84 | while not key_a.value: 85 | pass # Wait for key A released 86 | 87 | # Type keycode `Shift+A` 88 | keyboard.press(Keycode.SHIFT, Keycode.A) 89 | keyboard.release_all() 90 | 91 | # Turn off LED0 92 | led.value = True 93 | ble.start_advertising(advertisement) 94 | 95 | ``` 96 | 97 | 4. Your code will run as soon as the file is done saving. A Bluetooth keyboard with the name __`CIRCUITPY KEYBOARD`__ can be discovered by your computer. Connect to the keyboard. 98 | 99 | ![](../../../../assets/images/circuitpy_ble_keyboard.png) 100 | 101 | 5. Open a text editor and press __USER__ button on the board. Every button press sends a character __`A`__ to your computer, and this will be displayed in the text editor. 102 | 103 | [Mu Editor]: ../../getting-started.md#coding-with-mu-editor 104 | [CircuitPython]: ../../getting-started.md#installing-circuitpython 105 | -------------------------------------------------------------------------------- /docs/guides/python/samples/ble/hid_mouse.md: -------------------------------------------------------------------------------- 1 | # BLE HID Mouse 2 | 3 | ## Overview 4 | 5 | The BLE HID Mouse sample demonstrates how to use the GATT Human Interface Device (HID) Service to implement a mouse input device that you can connect to your computer. 6 | 7 | This sample code enumerates the nRF52840 Connect Kit into a BLE HID mouse that has a left button connected to the __USER__ button. 8 | 9 | !!! Tip 10 | `adafruit_ble` and `adafruit_hid` are pre-built into [CircuitPython] as frozen modules, so that they can be imported in the code directly. 11 | 12 | ## Requirements 13 | 14 | Before you start, check that you have the required hardware and software: 15 | 16 | - [nRF52840 Connect Kit](https://makerdiary.com/products/nrf52840-connectkit) running the [CircuitPython] firmware 17 | - 1x USB-C Cable 18 | - [Mu Editor] 19 | - A computer running macOS, Linux, or Windows 7 or newer, with Bluetooth LE supported 20 | 21 | ## Running the code 22 | 23 | To run the code, complete the following steps: 24 | 25 | 1. Connect nRF52840 Connect Kit to your computer using the USB-C Cable. 26 | 2. Start Mu Editor, click __Load__ to open `code.py` in the __CIRCUITPY__ drive. 27 | 3. Copy and paste the following code into `code.py` and click __Save__: 28 | 29 | ``` python linenums="1" title="CIRCUITPY/code.py" 30 | import time 31 | import board 32 | import digitalio 33 | 34 | from adafruit_hid.mouse import Mouse 35 | 36 | import adafruit_ble 37 | from adafruit_ble.advertising import Advertisement 38 | from adafruit_ble.advertising.standard import ProvideServicesAdvertisement 39 | from adafruit_ble.services.standard.hid import HIDService 40 | from adafruit_ble.services.standard.device_info import DeviceInfoService 41 | 42 | left_button = digitalio.DigitalInOut(board.USER) 43 | left_button.direction = digitalio.Direction.INPUT 44 | left_button.pull = digitalio.Pull.UP 45 | 46 | # Use default HID descriptor 47 | hid = HIDService() 48 | device_info = DeviceInfoService( 49 | software_revision=adafruit_ble.__version__, manufacturer="Makerdiary" 50 | ) 51 | ble = adafruit_ble.BLERadio() 52 | ble.name = 'CIRCUITPY MOUSE' 53 | advertisement = ProvideServicesAdvertisement(hid) 54 | advertisement.complete_name = ble.name 55 | advertisement.appearance = 962 56 | scan_response = Advertisement() 57 | 58 | if ble.connected: 59 | for c in ble.connections: 60 | c.disconnect() 61 | 62 | print("advertising") 63 | ble.start_advertising(advertisement, scan_response) 64 | 65 | mouse = Mouse(hid.devices) 66 | 67 | while True: 68 | while not ble.connected: 69 | pass 70 | while ble.connected: 71 | if left_button.value is False: 72 | mouse.click(Mouse.LEFT_BUTTON) 73 | time.sleep(0.2) # Debounce delay 74 | 75 | ble.start_advertising(advertisement) 76 | 77 | ``` 78 | 79 | 4. Your code will run as soon as the file is done saving. A Bluetooth mouse with the name __`CIRCUITPY MOUSE`__ can be discovered by your computer. Connect to the mouse. 80 | 81 | ![](../../../../assets/images/circuitpy_ble_mouse.png) 82 | 83 | 5. Press __USER__ button on the board, and observe that a left mouse click is activated. 84 | 85 | [Mu Editor]: ../../getting-started.md#coding-with-mu-editor 86 | [CircuitPython]: ../../getting-started.md#installing-circuitpython 87 | -------------------------------------------------------------------------------- /docs/guides/python/samples/ble/nus.md: -------------------------------------------------------------------------------- 1 | # BLE Nordic UART Service 2 | 3 | ## Overview 4 | 5 | The BLE Nordic UART Service sample demonstrates using Nordic UART Service to control the RGB LED on nRF52840 Connect Kit over Bluetooth Low Energy. 6 | 7 | !!! Tip 8 | `adafruit_ble` is pre-built into [CircuitPython] as a frozen module, so that it can be imported in the code directly. 9 | 10 | ## Requirements 11 | 12 | Before you start, check that you have the required hardware and software: 13 | 14 | - [nRF52840 Connect Kit](https://makerdiary.com/products/nrf52840-connectkit) running the [CircuitPython] firmware 15 | - 1x USB-C Cable 16 | - A smartphone or a tablet with [nRF Toolbox] installed 17 | - [Mu Editor] 18 | - A computer running macOS, Linux, or Windows 7 or newer 19 | 20 | ## Running the code 21 | 22 | To run the code, complete the following steps: 23 | 24 | 1. Connect nRF52840 Connect Kit to your computer using the USB-C Cable. 25 | 2. Start Mu Editor, click __Load__ to open `code.py` in the __CIRCUITPY__ drive. 26 | 3. Copy and paste the following code into `code.py` and click __Save__: 27 | 28 | ``` python linenums="1" title="CIRCUITPY/code.py" 29 | import digitalio 30 | import board 31 | from adafruit_ble import BLERadio 32 | from adafruit_ble.advertising.standard import ProvideServicesAdvertisement 33 | from adafruit_ble.services.nordic import UARTService 34 | 35 | red_led = digitalio.DigitalInOut(board.RED_LED) 36 | red_led.direction = digitalio.Direction.OUTPUT 37 | red_led.value = True 38 | green_led = digitalio.DigitalInOut(board.GREEN_LED) 39 | green_led.direction = digitalio.Direction.OUTPUT 40 | green_led.value = True 41 | blue_led = digitalio.DigitalInOut(board.BLUE_LED) 42 | blue_led.direction = digitalio.Direction.OUTPUT 43 | blue_led.value = True 44 | 45 | ble = BLERadio() 46 | ble.name = "CIRCUITPY NUS" 47 | uart = UARTService() 48 | advertisement = ProvideServicesAdvertisement(uart) 49 | 50 | while True: 51 | ble.start_advertising(advertisement) 52 | while not ble.connected: 53 | pass 54 | while ble.connected: 55 | # Returns b'' if nothing was read. 56 | one_byte = uart.read(1) 57 | if one_byte == b'1': 58 | red_led.value = not red_led.value 59 | elif one_byte == b'2': 60 | green_led.value = not green_led.value 61 | elif one_byte == b'3': 62 | blue_led.value = not blue_led.value 63 | ``` 64 | 65 | 4. Your code will run as soon as the file is done saving. Start the [nRF Toolbox] app, tap UART to open the UART application. 66 | 5. Connect to the device with the name __`CIRCUITPY NUS`__ discovered in the UART application. 67 | 6. Tap the blank buttons to create new commands. The following command assignments are configured with __EOL__ set to LF : 68 | 69 | * :material-numeric-1-circle-outline:{ .nordic } - Send `1` to toggle the __RED LED__. 70 | * :material-numeric-2-circle-outline:{ .nordic } - Send `2` to toggle the __GREEN LED__. 71 | * :material-numeric-3-circle-outline:{ .nordic } - Send `3` to toggle the __BLUE LED__. 72 | 73 | ![](../../../../assets/images/nrf_toolbox_circuitpy_uart.png){ width='160' } 74 | ![](../../../../assets/images/nrf_toolbox_circuitpy_connect.png){ width='160' } 75 | ![](../../../../assets/images/nrf_toolbox_circuitpy_create_cmd.png){ width='160' } 76 | ![](../../../../assets/images/nrf_toolbox_circuitpy_commands.png){ width='160' } 77 | 78 | 7. Tap :material-numeric-1-circle-outline:{ .nordic } :material-numeric-2-circle-outline:{ .nordic } :material-numeric-3-circle-outline:{ .nordic } to toggle the RGB LED. Observe that the RGB LED on the board turns on or off. 79 | 80 | [nRF Toolbox]: https://www.nordicsemi.com/Software-and-Tools/Development-Tools/nRF-Toolbox 81 | [Mu Editor]: ../../getting-started.md#coding-with-mu-editor 82 | [CircuitPython]: ../../getting-started.md#installing-circuitpython -------------------------------------------------------------------------------- /docs/guides/python/samples/blinky.md: -------------------------------------------------------------------------------- 1 | # Blinky 2 | 3 | ## Overview 4 | 5 | The Blinky sample is a simple application which blinks an LED forever using the `digitalio` module. The source code shows how to configure the LED, then turn it on and off. 6 | 7 | The table below shows the available LEDs on the nRF52840 Connect Kit: 8 | 9 | | LED | Alias | 10 | |-----------------|-----------------------| 11 | | Green LED | `LED0` | 12 | | RGB LED - Red | `LED1` or `RED_LED` | 13 | | RGB LED - Green | `LED2` or `GREEN_LED` | 14 | | RGB LED - Blue | `LED3` or `BLUE_LED` | 15 | 16 | ## Requirements 17 | 18 | Before you start, check that you have the required hardware and software: 19 | 20 | - [nRF52840 Connect Kit](https://makerdiary.com/products/nrf52840-connectkit) running the [CircuitPython] firmware 21 | - 1x USB-C Cable 22 | - [Mu Editor] 23 | - A computer running macOS, Linux, or Windows 7 or newer 24 | 25 | ## Running the code 26 | 27 | To run the code, complete the following steps: 28 | 29 | 1. Connect nRF52840 Connect Kit to your computer using the USB-C Cable. 30 | 2. Start Mu Editor, click __Load__ to open `code.py` in the __CIRCUITPY__ drive. 31 | 3. Copy and paste the following code into `code.py` and click __Save__: 32 | 33 | ``` python linenums="1" title="CIRCUITPY/code.py" 34 | import time 35 | import digitalio 36 | import board 37 | 38 | # Green LED 39 | led = digitalio.DigitalInOut(board.LED0) 40 | led.direction = digitalio.Direction.OUTPUT 41 | while True: 42 | led.value = True 43 | time.sleep(0.1) 44 | led.value = False 45 | time.sleep(0.1) 46 | ``` 47 | 48 | 4. Your code will run as soon as the file is done saving. Observe that the Green LED starts to blink. 49 | 50 | [Mu Editor]: ../getting-started.md#coding-with-mu-editor 51 | [CircuitPython]: ../getting-started.md#installing-circuitpython -------------------------------------------------------------------------------- /docs/guides/python/samples/button.md: -------------------------------------------------------------------------------- 1 | # Button 2 | 3 | ## Overview 4 | 5 | The Button sample demonstrates the use of GPIO input using the `digitalio` module. It prints a message to the console each time the state of the button changes. 6 | 7 | The table below shows the available button on the nRF52840 Connect Kit: 8 | 9 | | Button | Alias | 10 | |-------------|--------| 11 | | USER Button | `USER` | 12 | 13 | ## Requirements 14 | 15 | Before you start, check that you have the required hardware and software: 16 | 17 | - [nRF52840 Connect Kit](https://makerdiary.com/products/nrf52840-connectkit) running the [CircuitPython] firmware 18 | - 1x USB-C Cable 19 | - [Mu Editor] 20 | - A computer running macOS, Linux, or Windows 7 or newer 21 | 22 | ## Running the code 23 | 24 | To run the code, complete the following steps: 25 | 26 | 1. Connect nRF52840 Connect Kit to your computer using the USB-C Cable. 27 | 2. Start Mu Editor, click __Load__ to open `code.py` in the __CIRCUITPY__ drive. 28 | 3. Copy and paste the following code into `code.py` and click __Save__: 29 | 30 | ``` python linenums="1" title="CIRCUITPY/code.py" 31 | import board 32 | import digitalio 33 | 34 | # User Button 35 | button = digitalio.DigitalInOut(board.USER) 36 | button.direction = digitalio.Direction.INPUT 37 | button.pull = digitalio.Pull.UP 38 | 39 | last_value = button.value 40 | 41 | while True: 42 | if last_value != button.value: 43 | last_value = button.value 44 | print('Button is ' + ('released' if button.value else 'pressed')) 45 | ``` 46 | 47 | 4. Your code will run as soon as the file is done saving. Click __Serial__ on Mu Editor's Top Menu to open a serial console. Observe the output of the console and press the __USER__ button. You should see the output, similar to what is shown in the following: 48 | 49 | ``` { .bash .no-copy linenums="1"} 50 | Code stopped by auto-reload. Reloading soon. 51 | 52 | Auto-reload is on. Simply save files over USB to run them or enter REPL to disable. 53 | code.py output: 54 | Button is pressed 55 | Button is released 56 | Button is pressed 57 | Button is released 58 | ... 59 | ``` 60 | 61 | [Mu Editor]: ../getting-started.md#coding-with-mu-editor 62 | [CircuitPython]: ../getting-started.md#installing-circuitpython -------------------------------------------------------------------------------- /docs/guides/python/samples/pwm.md: -------------------------------------------------------------------------------- 1 | # PWM 2 | 3 | ## Overview 4 | 5 | The PWM sample demonstrates using the `pwmio` module to fade the __Green LED__ (alias __LED0__) on nRF52840 Connect Kit. 6 | 7 | ## Requirements 8 | 9 | Before you start, check that you have the required hardware and software: 10 | 11 | - [nRF52840 Connect Kit](https://makerdiary.com/products/nrf52840-connectkit) running the [CircuitPython] firmware 12 | - 1x USB-C Cable 13 | - [Mu Editor] 14 | - A computer running macOS, Linux, or Windows 7 or newer 15 | 16 | ## Running the code 17 | 18 | To run the code, complete the following steps: 19 | 20 | 1. Connect nRF52840 Connect Kit to your computer using the USB-C Cable. 21 | 2. Start Mu Editor, click __Load__ to open `code.py` in the __CIRCUITPY__ drive. 22 | 3. Copy and paste the following code into `code.py` and click __Save__: 23 | 24 | ``` python linenums="1" title="CIRCUITPY/code.py" 25 | import time 26 | import board 27 | import pwmio 28 | 29 | # Connect LED0 to PWMOut 30 | led = pwmio.PWMOut(board.LED0, frequency=5000, duty_cycle=0) 31 | 32 | while True: 33 | for i in range(100): 34 | # PWM LED up and down 35 | if i < 50: 36 | led.duty_cycle = int(i * 2 * 65535 / 100) # Up 37 | else: 38 | led.duty_cycle = 65535 - int((i - 50) * 2 * 65535 / 100) # Down 39 | time.sleep(0.01) 40 | ``` 41 | 42 | 4. Your code will run as soon as the file is done saving. Observe that the Green LED starts off increases its brightness until it is fully on and then decreases until the LED is off, completing on fade cycle. 43 | 44 | [Mu Editor]: ../getting-started.md#coding-with-mu-editor 45 | [CircuitPython]: ../getting-started.md#installing-circuitpython -------------------------------------------------------------------------------- /docs/guides/python/samples/usb/hid_keyboard.md: -------------------------------------------------------------------------------- 1 | # USB HID Keyboard 2 | 3 | ## Overview 4 | 5 | The USB HID Keyboard sample demonstrates using the USB Human Interface Device (HID) module to implement a keyboard input device that you can connect to your computer. 6 | 7 | This sample code enumerates the nRF52840 Connect Kit into a HID keyboard that has an A key connected to the __USER__ button. 8 | 9 | !!! Tip 10 | `adafruit_hid` is pre-built into [CircuitPython] as a frozen module, so that it can be imported in the code directly. 11 | 12 | ## Requirements 13 | 14 | Before you start, check that you have the required hardware and software: 15 | 16 | - [nRF52840 Connect Kit](https://makerdiary.com/products/nrf52840-connectkit) running the [CircuitPython] firmware 17 | - 1x USB-C Cable 18 | - [Mu Editor] 19 | - A computer running macOS, Linux, or Windows 7 or newer 20 | 21 | ## Running the code 22 | 23 | To run the code, complete the following steps: 24 | 25 | 1. Connect nRF52840 Connect Kit to your computer using the USB-C Cable. 26 | 2. Start Mu Editor, click __Load__ to open `code.py` in the __CIRCUITPY__ drive. 27 | 3. Copy and paste the following code into `code.py` and click __Save__: 28 | 29 | ``` python linenums="1" title="CIRCUITPY/code.py" 30 | import time 31 | import board 32 | import digitalio 33 | import usb_hid 34 | from adafruit_hid.keyboard import Keyboard 35 | from adafruit_hid.keyboard_layout_us import KeyboardLayoutUS 36 | from adafruit_hid.keycode import Keycode 37 | 38 | # USER button acts as A key on a keyboard 39 | key_a = digitalio.DigitalInOut(board.USER) 40 | key_a.direction = digitalio.Direction.INPUT 41 | key_a.pull = digitalio.Pull.UP 42 | 43 | # LED0 indicates A key is pressed 44 | led = digitalio.DigitalInOut(board.LED0) 45 | led.direction = digitalio.Direction.OUTPUT 46 | 47 | # The keyboard object! 48 | time.sleep(1) # Sleep for a bit to avoid a race condition on some systems 49 | keyboard = Keyboard(usb_hid.devices) 50 | keyboard_layout = KeyboardLayoutUS(keyboard) 51 | 52 | print("Waiting for key pin...") 53 | 54 | while True: 55 | if not key_a.value: 56 | print("Key A pressed!") 57 | 58 | # Turn on LED0 59 | led.value = False 60 | 61 | while not key_a.value: 62 | pass # Wait for key A released 63 | 64 | # Type keycode `Shift+A` 65 | keyboard.press(Keycode.SHIFT, Keycode.A) 66 | keyboard.release_all() 67 | 68 | # Turn off LED0 69 | led.value = True 70 | 71 | time.sleep(0.01) 72 | ``` 73 | 74 | 4. Your code will run as soon as the file is done saving. The board will enumerate as a HID keyboard. Click __Serial__ on Mu Editor's Top Menu to open a serial console. You should see the console output, similar to what is shown in the following: 75 | 76 | ``` { .bash .no-copy linenums="1"} 77 | Auto-reload is on. Simply save files over USB to run them or enter REPL to disable. 78 | code.py output: 79 | Waiting for key pin... 80 | ``` 81 | 82 | 5. Open a text editor and press __USER__ button on the board. Every button press sends a character __`A`__ to the computer, and this will be displayed in the text editor. 83 | 84 | [Mu Editor]: ../../getting-started.md#coding-with-mu-editor 85 | [CircuitPython]: ../../getting-started.md#installing-circuitpython 86 | -------------------------------------------------------------------------------- /docs/guides/python/samples/usb/hid_mouse.md: -------------------------------------------------------------------------------- 1 | # USB HID Mouse 2 | 3 | ## Overview 4 | 5 | The USB HID Mouse sample demonstrates using the USB Human Interface Device (HID) module to implement a mouse input device that you can connect to your computer. 6 | 7 | This sample code enumerates the nRF52840 Connect Kit into a HID mouse that has a left button connected to the __USER__ button. 8 | 9 | !!! Tip 10 | `adafruit_hid` is pre-built into [CircuitPython] as a frozen module, so that it can be imported in the code directly. 11 | 12 | ## Requirements 13 | 14 | Before you start, check that you have the required hardware and software: 15 | 16 | - [nRF52840 Connect Kit](https://makerdiary.com/products/nrf52840-connectkit) running the [CircuitPython] firmware 17 | - 1x USB-C Cable 18 | - [Mu Editor] 19 | - A computer running macOS, Linux, or Windows 7 or newer 20 | 21 | ## Running the code 22 | 23 | To run the code, complete the following steps: 24 | 25 | 1. Connect nRF52840 Connect Kit to your computer using the USB-C Cable. 26 | 2. Start Mu Editor, click __Load__ to open `code.py` in the __CIRCUITPY__ drive. 27 | 3. Copy and paste the following code into `code.py` and click __Save__: 28 | 29 | ``` python linenums="1" title="CIRCUITPY/code.py" 30 | import time 31 | import board 32 | import digitalio 33 | import usb_hid 34 | from adafruit_hid.mouse import Mouse 35 | 36 | mouse = Mouse(usb_hid.devices) 37 | 38 | left_button = digitalio.DigitalInOut(board.USER) 39 | left_button.direction = digitalio.Direction.INPUT 40 | left_button.pull = digitalio.Pull.UP 41 | 42 | while True: 43 | if left_button.value is False: 44 | mouse.click(Mouse.LEFT_BUTTON) 45 | time.sleep(0.2) # Debounce delay 46 | ``` 47 | 48 | 4. Your code will run as soon as the file is done saving. The board will enumerate as a HID mouse. Press __USER__ button on the board, and observe that a left mouse click is activated. 49 | 50 | [Mu Editor]: ../../getting-started.md#coding-with-mu-editor 51 | [CircuitPython]: ../../getting-started.md#installing-circuitpython -------------------------------------------------------------------------------- /docs/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | template: home.html 3 | title: Home 4 | hide: 5 | - navigation 6 | - toc 7 | --- 8 | -------------------------------------------------------------------------------- /docs/introduction.md: -------------------------------------------------------------------------------- 1 | # nRF52840 Connect Kit
Rapid prototyping kit for your next connected projects 2 | 3 | ## Description 4 | 5 | nRF52840 Connect Kit is an open-source prototyping kit designed for connected projects. It is built using the nRF52840 SoC, which has protocol support for Bluetooth LE, Bluetooth mesh, Thread, Zigbee, 802.15.4, ANT and 2.4 GHz proprietary stacks. It provides Arm TrustZone® CryptoCell cryptographic unit as well as numerous peripherals such as USB 2.0, NFC-A, GPIO, UART, SPI, TWI, PDM, I2S, QSPI, PWM, ADC, QDEC to support a wide range of applications. 6 | 7 | The design is available in an easy-to-use form factor with USB-C and 40 pin DIP/SMT type, including up to 32 multi-function GPIO pins (7 can be used as ADC inputs) and Serial Wire Debug (SWD) port. It features RGB LED, Buttons, external 64 Mbit QSPI flash and flexible power management with various options for easily powering the unit from USB-C, external supplies or batteries, and also has Chip antenna and U.FL receptacle options to support various wireless scenarios. 8 | 9 | nRF52840 Connect Kit supports [nRF Connect SDK](guides/ncs/index.md), which integrates the Zephyr RTOS, protocol stacks, samples, hardware drivers and much more. We also offer [Python](guides/python/index.md) support, allowing you access hardware-specific functionality and peripherals with Python programming language. 10 | 11 | ![product hero](assets/images/nrf52840_connectkit_hero.png) 12 | 13 | ## Key Features 14 | 15 | * Nordic Semiconductor nRF52840 SoC 16 | 17 | - 64 MHz Arm® Cortex-M4 with FPU 18 | - 1 MB Flash + 256 KB RAM 19 | - Bluetooth LE, Bluetooth mesh, Thread, Zigbee, 802.15.4, ANT and 2.4 GHz proprietary 20 | - Arm TrustZone® Cryptocell 310 Security Subsystem 21 | - 2.4 GHz Transceiver with +8 dBm TX Power 22 | - GPIO, UART, SPI, TWI(I2C), PDM, I2S, QSPI, PWM, QDEC, 12-bit ADC support 23 | - Integrated USB 2.0 Full-speed Controller 24 | - Integrated NFC-A Tag 25 | 26 | * Ultra low power 64 Mbit QSPI flash memory 27 | * User programmable RBG LED and Buttons 28 | * Up to 32 multi-function General Purpose IOs (7 can be used as ADC inputs) 29 | * Arm Serial Wire Debug (SWD) port via edge pins 30 | * Flexible power management with various options for easily powering the unit 31 | * Wide input voltage range: 1.8 V to 5.5 V, output 3.3V and up to 2A when Input ≥ 2.3 V 32 | * 3.3V IO Operating Voltage 33 | * Reversible USB-C connector 34 | * Available in Chip antenna and U.FL receptacle options 35 | * 40 pin 55.88mm x 20.32mm (2.2" x 0.8") DIP/SMT form factor 36 | * Shipped with UF2 Bootloader supporting Drag-and-drop programming over USB drive 37 | * Built on open source, supporting nRF Connect SDK, Zephyr RTOS, Python, etc. 38 | 39 | ## What's in the box 40 | 41 | |Part |Quantity | 42 | |-------------------------------|---------| 43 | |nRF52840 Connect Kit board |1 | 44 | |2.4 GHz Cabled PCB Antenna[^1] |1 | 45 | |20 Pin 2.54mm THT Pin Header |2 | 46 | 47 | [^1]: This part is only available for U.FL receptacle option 48 | -------------------------------------------------------------------------------- /docs/programming/index.md: -------------------------------------------------------------------------------- 1 | # How to program the nRF52840 Connect Kit 2 | 3 | nRF52840 Connect Kit is shipped with the UF2 Bootloader, which is an easy-to-use and self-upgradable bootloader that can be used to update the firmware by just copying the `.uf2`-format images to the flash drive. 4 | 5 | Alternatively, you can update the firmware by using DAPLink on another nRF52840 Connect Kit or using Pitaya-Link debug probe. 6 | 7 | * [Using the UF2 Bootloader](./uf2boot.md) 8 | * [Using DAPLink Firmware](./daplink.md) 9 | * [Using Pitaya-Link Debug Probe](./pitaya-link.md) 10 | -------------------------------------------------------------------------------- /docs/programming/pitaya-link.md: -------------------------------------------------------------------------------- 1 | # Using Pitaya-Link Debug Probe 2 | 3 | Pitaya-Link is a low-cost debug probe based on the CMSIS-DAP (also known as DAPLink) protocol standard. It can be used to program and debug the application software running on Arm Cortex Microcontrollers. 4 | 5 | This section details how to program the nRF52840 Connect Kit using Pitaya-Link debug probe. Refer to the [Pitaya-Link User's Guide](https://wiki.makerdiary.com/pitaya-link/) for more details. 6 | 7 | ## Requirements 8 | 9 | Before you start, check that you have the required hardware and software: 10 | 11 | - 1x [nRF52840 Connect Kit](https://makerdiary.com/products/nrf52840-connectkit) 12 | - 1x [Pitaya-Link debug probe](https://makerdiary.com/products/pitaya-link) 13 | - 1x USB-C Cable 14 | - Several jumper wires 15 | - A computer running macOS, Linux, or Windows 7 or newer 16 | - [Python](https://www.python.org/downloads/) 3.6.0 or later 17 | - [pyOCD](https://github.com/pyocd/pyOCD) - Python based tool and API for debugging, programming, and exploring Arm Cortex microcontrollers. 18 | 19 | ## Installing pyOCD 20 | 21 | The latest stable version of pyOCD may be installed via [pip](https://pip.pypa.io/en/stable/index.html). Open up a terminal and run: 22 | 23 | === "Windows" 24 | 25 | ``` bash linenums="1" 26 | py -3 -m pip install -U pyocd 27 | ``` 28 | 29 | === "Linux/macOS" 30 | 31 | ``` bash linenums="1" 32 | python3 -m pip install -U pyocd 33 | ``` 34 | 35 | ## Wiring the boards 36 | 37 | Perform the following steps to connect the boards: 38 | 39 | 1. Connect Pitaya-Link to the target board using the jumper wires. 40 | 2. Connect Pitaya-Link to the PC using the USB-C Cable. 41 | 42 | ![](../assets/images/pitayalink_wiring_boards.png) 43 | 44 | The following table shows the signals between Pitaya-Link and nRF52840 Connect Kit: 45 | 46 | | Pitaya-Link | Wire | nRF52840 Connect Kit | 47 | |:------------:|:---------------------------------------------------------:|:--------------------:| 48 | | __`3V3`__ | :fontawesome-solid-arrow-right-long:{ .red-wire } | __`VSYS`__ | 49 | | __`GND`__ | :fontawesome-solid-arrow-right-long:{ .gray-wire } | __`GND`__ | 50 | | __`RESET`__ | :fontawesome-solid-arrow-right-long:{ .amber-wire } | __`RESET`__ | 51 | | __`SWDCLK`__ | :fontawesome-solid-arrow-right-long:{ .light-green-wire } | __`SWDCLK`__ | 52 | | __`SWDIO`__ | :fontawesome-solid-arrows-left-right:{ .light-blue-wire } | __`SWDIO`__ | 53 | 54 | ## Drag-and-drop programming 55 | 56 | Drag-and-drop is an optional intuitive programming feature of DAPLink. It allows programming of your target microcontroller in a very simple way: dragging and dropping a file (`.hex`-format) onto the __PITAYA-LINK__ drive. 57 | 58 | ![](../assets/images/pitayalink_drag_n_drop.png) 59 | 60 | ## Using pyOCD 61 | 62 | The `pyocd` command line tool gives you total control over your device with these subcommands: 63 | 64 | - `gdbserver`: GDB remote server allows you to debug using gdb via either the console or [several GUI debugger options](https://pyocd.io/docs/gdb_setup). 65 | - `load`: Program files of various formats into flash or RAM. 66 | - `erase`: Erase part or all of an MCU's flash memory. 67 | - `pack`: Manage [CMSIS Device Family Packs](https://open-cmsis-pack.github.io/Open-CMSIS-Pack-Spec/main/html/index.html) that provide additional target device support. 68 | - `commander`: Interactive REPL control and inspection of the MCU. 69 | - `server`: Share a debug probe with a TCP/IP server. 70 | - `reset`: Hardware or software reset of a device. 71 | - `rtt`: Stream Segger RTT IO with any debug probe. 72 | - `list`: Show connected devices. 73 | 74 | You can get additional help by adding `--help` option. 75 | 76 | To load/erase the nRF52840 Connect Kit target, open up a terminal and run: 77 | 78 | === "Load `.hex`" 79 | 80 | ``` bash linenums="1" 81 | pyocd load -t nrf52840 firmware.hex 82 | ``` 83 | 84 | === "Load `.bin`" 85 | 86 | ``` bash linenums="1" 87 | pyocd load -t nrf52840 --base-address 0x1000 firmware.bin 88 | ``` 89 | 90 | === "Chip Erase" 91 | 92 | ``` bash linenums="1" 93 | pyocd erase -t nrf52840 --chip 94 | ``` 95 | -------------------------------------------------------------------------------- /docs/purchase.md: -------------------------------------------------------------------------------- 1 | # Purchase 2 | 3 | ## Buy Online 4 | 5 | nRF52840 Connect Kit is available on the following channels (click to go directly to the product): 6 | 7 | [![makerdiary store](assets/images/makerdiary-store.png){ width='260' display='inline' }](https://makerdiary.com/products/nrf52840-connectkit) 8 | [![Taobao](assets/images/taobao-store.png){ width='143' display='inline' }](https://item.taobao.com/item.htm?spm=a1z10.5-c.w4002-2992523837.11.2df3715as0Kydn&id=725739500435) 9 | [![Tindie](assets/images/tindie-store.png){ width='128' display='inline' }](https://www.tindie.com/products/makerdiary/nrf52840-connect-kit/) 10 | 11 | 12 | ## Request Large Volume Pricing 13 | 14 | Thank you for your interest in purchasing large volume from Makerdiary. In order to help you more efficiently, please contact our sales: store@makerdiary.com 15 | 16 | [Request Quote](mailto:store@makerdiary.com){ .md-button .md-button--primary } 17 | 18 | ## Design & Customization 19 | 20 | We are ready to customize our hardware and firmware to better meet your solution's needs. Many of our platforms are prepared for customization. 21 | 22 | If you would like to do some serious business, feel free to contact us and we'll reply before you know it: support@makerdiary.com 23 | 24 | [Design Services](mailto:support@makerdiary.com){ .md-button .md-button--primary } 25 | -------------------------------------------------------------------------------- /docs/resources.md: -------------------------------------------------------------------------------- 1 | # Resources 2 | 3 | ## Technical documentation 4 | 5 | * [nRF52840 Connect Kit Product Brief](./introduction.md) 6 | * [nRF52840 Connect Kit Out-of-box Experience](./out-of-box-experience.md) 7 | * [How to program the nRF52840 Connect Kit](./programming/index.md) 8 | * [Develop with nRF Connect SDK & Zephyr RTOS](./guides/ncs/index.md) 9 | * [How to Code in Python](./guides/python/index.md) 10 | * [nRF Sniffer for Bluetooth LE](./guides/ble-sniffer/index.md) 11 | * [nRF Sniffer for 802.15.4](./guides/nrf802154-sniffer/index.md) 12 | 13 | ## Hardware resource 14 | 15 | * [nRF52840 Connect Kit Quick Start Guide](./assets/attachments/nrf52840-connectkit-quick-start-guide.pdf) 16 | * [nRF52840 Connect Kit Hardware Description](./hardware.md) 17 | * [nRF52840 Connect Kit Schematic V1.0](./assets/attachments/nrf52840-connect-kit-schematic-v1.0.pdf) 18 | * [nRF52840 Connect Kit 3D CAD STEP Models](./assets/attachments/nrf52840-connect-kit-3d-cad-step-models.zip) 19 | 20 | ## Regulatory & Compliance 21 | 22 | * [FCC Supplier's Declaration of Conformity (SDoC)](./assets/attachments/FCC_SDoC.pdf) 23 | * [EU Declaration of Conformity (DoC)](./assets/attachments/EU_DoC.pdf) 24 | * [RoHS & REACH Declaration of Conformity](./assets/attachments/RoHS_and_REACH_DoC.pdf) 25 | -------------------------------------------------------------------------------- /docs/revision-history.md: -------------------------------------------------------------------------------- 1 | # Revision history 2 | 3 | ## Hardware 4 | 5 | ### V1.0 April 19, 2022 { id="HW_V1.0" } 6 | 7 | - The first public release 8 | 9 | 10 | ## Documentation 11 | 12 | ### V1.0.0 June 25, 2023 { id="DOC_V1.0.0" } 13 | 14 | - The first public release 15 | -------------------------------------------------------------------------------- /firmware/ble_connectivity/connectivity_4.1.4_usb_with_s132_5.1.0.uf2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/firmware/ble_connectivity/connectivity_4.1.4_usb_with_s132_5.1.0.uf2 -------------------------------------------------------------------------------- /firmware/ble_sniffer/nrf_sniffer_for_bluetooth_le_v4.1.1.uf2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/firmware/ble_sniffer/nrf_sniffer_for_bluetooth_le_v4.1.1.uf2 -------------------------------------------------------------------------------- /firmware/circuitpython/circuitpython-nrf52840_connectkit-en_US-8.1.0-rtm.uf2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/firmware/circuitpython/circuitpython-nrf52840_connectkit-en_US-8.1.0-rtm.uf2 -------------------------------------------------------------------------------- /firmware/daplink/daplink-nrf52840_connectkit-v0257.uf2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/firmware/daplink/daplink-nrf52840_connectkit-v0257.uf2 -------------------------------------------------------------------------------- /firmware/daplink/daplink-nrf52840_connectkit-v0258.uf2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/firmware/daplink/daplink-nrf52840_connectkit-v0258.uf2 -------------------------------------------------------------------------------- /firmware/nrf802154_sniffer/nrf802154_sniffer_v0.7.2.uf2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/firmware/nrf802154_sniffer/nrf802154_sniffer_v0.7.2.uf2 -------------------------------------------------------------------------------- /firmware/uf2_bootloader/update-nrf52840_connectkit-uf2_bootloader-0.7.0-rtm-nosd.uf2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makerdiary/nrf52840-connectkit/690922b40bcfb84df7d17f9f9e82d82868ee5982/firmware/uf2_bootloader/update-nrf52840_connectkit-uf2_bootloader-0.7.0-rtm-nosd.uf2 -------------------------------------------------------------------------------- /requirements-docs.txt: -------------------------------------------------------------------------------- 1 | mkdocs-material==9.2.3 2 | cairosvg>=2.5 3 | mkdocs-git-committers-plugin-2>=1.1.1 4 | mkdocs-git-revision-date-localized-plugin>=1.0 5 | mkdocs-minify-plugin>=0.3 6 | mkdocs-rss-plugin>=1.2 7 | mkdocs-redirects>=1.0 8 | pillow<10 9 | -------------------------------------------------------------------------------- /tools/ble_sniffer/Profile_nRF_Sniffer_Bluetooth_LE/preferences: -------------------------------------------------------------------------------- 1 | # Configuration file for Wireshark for nRF Sniffer. 2 | 3 | # Packet list column format 4 | # Each pair of strings consists of a column title and its format 5 | gui.column.format: 6 | "No.", "%m", 7 | "Time", "%t", 8 | "Source", "%s", 9 | "PHY", "%Cus:nordic_ble.phy:0:R", 10 | "Protocol", "%p", 11 | "Length", "%Cus:btle.length:0:R", 12 | "Delta time (µs end to start)", "%Cus:nordic_ble.delta_time:0:R", 13 | "SN", "%Cus:btle.data_header.sequence_number:0:R", 14 | "NESN", "%Cus:btle.data_header.next_expected_sequence_number:0:R", 15 | "More Data", "%Cus:btle.data_header.more_data:0:R", 16 | "Event counter", "%Cus:nordic_ble.event_counter:0:R", 17 | "Info", "%i" 18 | -------------------------------------------------------------------------------- /tools/ble_sniffer/Profile_nRF_Sniffer_Bluetooth_LE/recent: -------------------------------------------------------------------------------- 1 | # Recent settings file for Wireshark for nRF Sniffer 2 | 3 | # Timestamp display format. 4 | # One of: RELATIVE, ABSOLUTE, ABSOLUTE_WITH_YMD, ABSOLUTE_WITH_YDOY, ABSOLUTE_WITH_DATE, DELTA, DELTA_DIS, EPOCH, UTC, UTC_WITH_YMD, UTC_WITH_YDOY, UTC_WITH_DATE 5 | gui.time_format: RELATIVE 6 | 7 | # Timestamp display precision. 8 | # One of: AUTO, SEC, DSEC, CSEC, MSEC, USEC, NSEC 9 | gui.time_precision: MSEC 10 | 11 | # Seconds display format. 12 | # One of: SECONDS, HOUR_MIN_SEC 13 | gui.seconds_format: SECONDS 14 | 15 | # Packet list column pixel widths. 16 | # Each pair of strings consists of a column format and its pixel width. 17 | column.width: 18 | %m, -1, 19 | %t, -1, 20 | %s, -1, 21 | "%Cus:nordic_ble.phy", -1, 22 | "%Cus:nordic_ble.event_counter", -1, 23 | %p, -1, 24 | "%Cus:btle.length", -1, 25 | "%Cus:nordic_ble.delta_time", -1, 26 | "%Cus:btle.data_header.sequence_number", -1, 27 | "%Cus:btle.data_header.next_expected_sequence_number", -1, 28 | "%Cus:btle.data_header.more_data", -1, 29 | %i, -1 30 | 31 | # Interface Toolbars show. 32 | # List of interface toolbars to show. 33 | gui.interface_toolbar_show: 34 | "nRF Sniffer for Bluetooth LE" 35 | -------------------------------------------------------------------------------- /tools/ble_sniffer/extcap/SnifferAPI/CaptureFiles.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Nordic Semiconductor ASA 2 | # All rights reserved. 3 | # 4 | # Redistribution and use in source and binary forms, with or without modification, 5 | # are permitted provided that the following conditions are met: 6 | # 7 | # 1. Redistributions of source code must retain the above copyright notice, this 8 | # list of conditions and the following disclaimer. 9 | # 10 | # 2. Redistributions in binary form, except as embedded into a Nordic 11 | # Semiconductor ASA integrated circuit in a product or a software update for 12 | # such product, must reproduce the above copyright notice, this list of 13 | # conditions and the following disclaimer in the documentation and/or other 14 | # materials provided with the distribution. 15 | # 16 | # 3. Neither the name of Nordic Semiconductor ASA nor the names of its 17 | # contributors may be used to endorse or promote products derived from this 18 | # software without specific prior written permission. 19 | # 20 | # 4. This software, with or without modification, must only be used with a 21 | # Nordic Semiconductor ASA integrated circuit. 22 | # 23 | # 5. Any software provided in binary form under this license must not be reverse 24 | # engineered, decompiled, modified and/or disassembled. 25 | # 26 | # THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA "AS IS" AND ANY EXPRESS 27 | # OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 28 | # OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE 29 | # DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE 30 | # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 31 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 32 | # GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 | # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 35 | # OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 36 | 37 | 38 | import time, os, logging 39 | from . import Logger 40 | from . import Pcap 41 | 42 | 43 | DEFAULT_CAPTURE_FILE_DIR = Logger.DEFAULT_LOG_FILE_DIR 44 | DEFAULT_CAPTURE_FILE_NAME = "capture.pcap" 45 | 46 | 47 | def get_capture_file_path(capture_file_path=None): 48 | default_path = os.path.join(DEFAULT_CAPTURE_FILE_DIR, DEFAULT_CAPTURE_FILE_NAME) 49 | if capture_file_path is None: 50 | return default_path 51 | if os.path.splitext(capture_file_path)[1] != ".pcap": 52 | return default_path 53 | return os.path.abspath(capture_file_path) 54 | 55 | 56 | class CaptureFileHandler: 57 | def __init__(self, capture_file_path=None, clear=False): 58 | filename = get_capture_file_path(capture_file_path) 59 | if not os.path.isdir(os.path.dirname(filename)): 60 | os.makedirs(os.path.dirname(filename)) 61 | self.filename = filename 62 | self.backupFilename = self.filename+".1" 63 | if not os.path.isfile(self.filename): 64 | self.startNewFile() 65 | elif os.path.getsize(self.filename) > 20000000: 66 | self.doRollover() 67 | if clear: 68 | #clear file 69 | self.startNewFile() 70 | 71 | def startNewFile(self): 72 | with open(self.filename, "wb") as f: 73 | f.write(Pcap.get_global_header()) 74 | 75 | def doRollover(self): 76 | try: 77 | os.remove(self.backupFilename) 78 | except: 79 | logging.exception("capture file rollover remove backup failed") 80 | try: 81 | os.rename(self.filename, self.backupFilename) 82 | self.startNewFile() 83 | except: 84 | logging.exception("capture file rollover failed") 85 | 86 | def writePacket(self, packet): 87 | with open(self.filename, "ab") as f: 88 | packet = Pcap.create_packet( 89 | bytes([packet.boardId] + packet.getList()), 90 | packet.time) 91 | f.write(packet) 92 | -------------------------------------------------------------------------------- /tools/ble_sniffer/extcap/SnifferAPI/Exceptions.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Nordic Semiconductor ASA 2 | # All rights reserved. 3 | # 4 | # Redistribution and use in source and binary forms, with or without modification, 5 | # are permitted provided that the following conditions are met: 6 | # 7 | # 1. Redistributions of source code must retain the above copyright notice, this 8 | # list of conditions and the following disclaimer. 9 | # 10 | # 2. Redistributions in binary form, except as embedded into a Nordic 11 | # Semiconductor ASA integrated circuit in a product or a software update for 12 | # such product, must reproduce the above copyright notice, this list of 13 | # conditions and the following disclaimer in the documentation and/or other 14 | # materials provided with the distribution. 15 | # 16 | # 3. Neither the name of Nordic Semiconductor ASA nor the names of its 17 | # contributors may be used to endorse or promote products derived from this 18 | # software without specific prior written permission. 19 | # 20 | # 4. This software, with or without modification, must only be used with a 21 | # Nordic Semiconductor ASA integrated circuit. 22 | # 23 | # 5. Any software provided in binary form under this license must not be reverse 24 | # engineered, decompiled, modified and/or disassembled. 25 | # 26 | # THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA "AS IS" AND ANY EXPRESS 27 | # OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 28 | # OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE 29 | # DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE 30 | # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 31 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 32 | # GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 | # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 35 | # OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 36 | 37 | 38 | class SnifferTimeout(Exception): 39 | pass 40 | 41 | class UARTPacketError(Exception): 42 | pass 43 | 44 | class LockedException(Exception): 45 | def __init__(self, message): 46 | self.message = message 47 | 48 | class InvalidPacketException(Exception): 49 | pass 50 | 51 | class InvalidAdvChannel(Exception): 52 | pass 53 | 54 | # Internal Use 55 | class SnifferWatchDogTimeout(SnifferTimeout): 56 | pass 57 | 58 | # Internal Use 59 | class ExitCodeException(Exception): 60 | pass 61 | -------------------------------------------------------------------------------- /tools/ble_sniffer/extcap/SnifferAPI/Filelock.py: -------------------------------------------------------------------------------- 1 | import os 2 | import logging 3 | from sys import platform 4 | 5 | if platform == 'linux': 6 | import psutil 7 | 8 | from . import Exceptions 9 | 10 | # Lock file management. 11 | # ref: https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch05s09.html 12 | # 13 | # Stored in /var/lock: 14 | # The naming convention which must be used is "LCK.." followed by the base name of the device. 15 | # For example, to lock /dev/ttyS0 the file "LCK..ttyS0" would be created. 16 | # HDB UUCP lock file format: 17 | # process identifier (PID) as a ten byte ASCII decimal number, with a trailing newline 18 | 19 | def lockpid(lockfile): 20 | if (os.path.isfile(lockfile)): 21 | with open(lockfile) as fd: 22 | lockpid = fd.read() 23 | 24 | try: 25 | return int(lockpid) 26 | except: 27 | logging.info("Lockfile is invalid. Overriding it..") 28 | os.remove(lockfile) 29 | return 0 30 | 31 | return 0 32 | 33 | def lock(port): 34 | if platform != 'linux': 35 | return 36 | 37 | tty = os.path.basename(port) 38 | lockfile = f'/var/lock/LCK..{tty}' 39 | 40 | lockedpid = lockpid(lockfile) 41 | if lockedpid: 42 | if lockedpid == os.getpid(): 43 | return 44 | 45 | if psutil.pid_exists(lockedpid): 46 | raise Exceptions.LockedException(f"Device {port} is locked") 47 | else: 48 | logging.info("Lockfile is stale. Overriding it..") 49 | os.remove(lockfile) 50 | 51 | fd = open(lockfile, 'w') 52 | with open(lockfile, 'w') as fd: 53 | fd.write(f'{os.getpid():10}') 54 | 55 | def unlock(port): 56 | if platform != 'linux': 57 | return 58 | 59 | tty = os.path.basename(port) 60 | lockfile = f'/var/lock/LCK..{tty}' 61 | 62 | lockedpid = lockpid(lockfile) 63 | if lockedpid == os.getpid(): 64 | os.remove(lockfile) 65 | -------------------------------------------------------------------------------- /tools/ble_sniffer/extcap/SnifferAPI/Notifications.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Nordic Semiconductor ASA 2 | # All rights reserved. 3 | # 4 | # Redistribution and use in source and binary forms, with or without modification, 5 | # are permitted provided that the following conditions are met: 6 | # 7 | # 1. Redistributions of source code must retain the above copyright notice, this 8 | # list of conditions and the following disclaimer. 9 | # 10 | # 2. Redistributions in binary form, except as embedded into a Nordic 11 | # Semiconductor ASA integrated circuit in a product or a software update for 12 | # such product, must reproduce the above copyright notice, this list of 13 | # conditions and the following disclaimer in the documentation and/or other 14 | # materials provided with the distribution. 15 | # 16 | # 3. Neither the name of Nordic Semiconductor ASA nor the names of its 17 | # contributors may be used to endorse or promote products derived from this 18 | # software without specific prior written permission. 19 | # 20 | # 4. This software, with or without modification, must only be used with a 21 | # Nordic Semiconductor ASA integrated circuit. 22 | # 23 | # 5. Any software provided in binary form under this license must not be reverse 24 | # engineered, decompiled, modified and/or disassembled. 25 | # 26 | # THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA "AS IS" AND ANY EXPRESS 27 | # OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 28 | # OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE 29 | # DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE 30 | # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 31 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 32 | # GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 | # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 35 | # OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 36 | 37 | 38 | import threading, logging 39 | 40 | class Notification(): 41 | def __init__(self, key, msg = None): 42 | if type(key) is not str: 43 | raise TypeError("Invalid notification key: "+str(key)) 44 | self.key = key 45 | self.msg = msg 46 | 47 | def __repr__(self): 48 | return "Notification (key: %s, msg: %s)" % (str(self.key), str(self.msg)) 49 | 50 | class Notifier(): 51 | def __init__(self, callbacks = [], **kwargs): 52 | self.callbacks = {} 53 | self.callbackLock = threading.RLock() 54 | 55 | for callback in callbacks: 56 | self.subscribe(*callback) 57 | 58 | def clearCallbacks(self): 59 | with self.callbackLock: 60 | self.callbacks.clear() 61 | 62 | def subscribe(self, key, callback): 63 | with self.callbackLock: 64 | if callback not in self.getCallbacks(key): 65 | self.getCallbacks(key).append(callback) 66 | 67 | def unSubscribe(self, key, callback): 68 | with self.callbackLock: 69 | if callback in self.getCallbacks(key): 70 | self.getCallbacks(key).remove(callback) 71 | 72 | def getCallbacks(self, key): 73 | with self.callbackLock: 74 | if key not in self.callbacks: 75 | self.callbacks[key] = [] 76 | return self.callbacks[key] 77 | 78 | def notify(self, key = None, msg = None, notification = None): 79 | with self.callbackLock: 80 | if notification == None: 81 | notification = Notification(key,msg) 82 | 83 | for callback in self.getCallbacks(notification.key): 84 | callback(notification) 85 | 86 | for callback in self.getCallbacks("*"): 87 | callback(notification) 88 | 89 | def passOnNotification(self, notification): 90 | self.notify(notification = notification) 91 | -------------------------------------------------------------------------------- /tools/ble_sniffer/extcap/SnifferAPI/Pcap.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # Copyright (c) Nordic Semiconductor ASA 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without modification, 7 | # are permitted provided that the following conditions are met: 8 | # 9 | # 1. Redistributions of source code must retain the above copyright notice, this 10 | # list of conditions and the following disclaimer. 11 | # 12 | # 2. Redistributions in binary form, except as embedded into a Nordic 13 | # Semiconductor ASA integrated circuit in a product or a software update for 14 | # such product, must reproduce the above copyright notice, this list of 15 | # conditions and the following disclaimer in the documentation and/or other 16 | # materials provided with the distribution. 17 | # 18 | # 3. Neither the name of Nordic Semiconductor ASA nor the names of its 19 | # contributors may be used to endorse or promote products derived from this 20 | # software without specific prior written permission. 21 | # 22 | # 4. This software, with or without modification, must only be used with a 23 | # Nordic Semiconductor ASA integrated circuit. 24 | # 25 | # 5. Any software provided in binary form under this license must not be reverse 26 | # engineered, decompiled, modified and/or disassembled. 27 | # 28 | # THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA "AS IS" AND ANY EXPRESS 29 | # OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 30 | # OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE 31 | # DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE 32 | # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 33 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 34 | # GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 35 | # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 36 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 37 | # OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 38 | 39 | 40 | import struct 41 | 42 | 43 | # See: 44 | # - https://github.com/pcapng/pcapng 45 | # - https://www.tcpdump.org/linktypes/LINKTYPE_NORDIC_BLE.html 46 | PACKET_HEADER = struct.Struct(" NUL 2>&1 13 | if %ERRORLEVEL% EQU 0 ( 14 | py -3 "%NRF_SNIFFER_BLE_PATH%\nrf_sniffer_ble.py" %* 15 | ) else ( 16 | python "%NRF_SNIFFER_BLE_PATH%\nrf_sniffer_ble.py" %* 17 | ) 18 | -------------------------------------------------------------------------------- /tools/ble_sniffer/extcap/nrf_sniffer_ble.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | script_path=$(dirname `which $0`) 4 | 5 | unamestr=`uname` 6 | if [ "$unamestr" = 'Darwin' ]; then 7 | hb_x86_py3="/usr/local/bin/python3" 8 | hb_apple_silicon_py3="/opt/homebrew/bin/python3" 9 | 10 | log_file="/tmp/nrf_sniffer_ble.sh.log" 11 | if [ ! -z "$VIRTUAL_ENV"]; then 12 | py3=`which python` 13 | elif [ -f $hb_x86_py3 ]; then 14 | py3=$hb_x86_py3 15 | elif [ -f $hb_apple_silicon_py3 ]; then 16 | py3=$hb_apple_silicon_py3 17 | else 18 | py3=`which python3` 19 | if [ $? -ne 0 ]; then 20 | echo "No Python 3 found" >&2 21 | exit 1 22 | fi 23 | fi 24 | 25 | echo "Running script with: <$py3> with PATH: <$PATH>" | tee -a $log_file 26 | else 27 | py3=`which python3` 28 | fi 29 | 30 | exec $py3 $script_path/nrf_sniffer_ble.py "$@" 31 | -------------------------------------------------------------------------------- /tools/ble_sniffer/extcap/requirements.txt: -------------------------------------------------------------------------------- 1 | pyserial >= 3.5 2 | psutil 3 | -------------------------------------------------------------------------------- /tools/nrf802154_sniffer/nrf802154_sniffer/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2019, Nordic Semiconductor ASA 2 | # All rights reserved. 3 | # 4 | # Redistribution and use in source and binary forms, with or without modification, 5 | # are permitted provided that the following conditions are met: 6 | # 7 | # 1. Redistributions of source code must retain the above copyright notice, this 8 | # list of conditions and the following disclaimer. 9 | # 10 | # 2. Redistributions in binary form, except as embedded into a Nordic 11 | # Semiconductor ASA integrated circuit in a product or a software update for 12 | # such product, must reproduce the above copyright notice, this list of 13 | # conditions and the following disclaimer in the documentation and/or other 14 | # materials provided with the distribution. 15 | # 16 | # 3. Neither the name of Nordic Semiconductor ASA nor the names of its 17 | # contributors may be used to endorse or promote products derived from this 18 | # software without specific prior written permission. 19 | # 20 | # 4. This software, with or without modification, must only be used with a 21 | # Nordic Semiconductor ASA integrated circuit. 22 | # 23 | # 5. Any software provided in binary form under this license must not be reverse 24 | # engineered, decompiled, modified and/or disassembled. 25 | # 26 | # THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA "AS IS" AND ANY EXPRESS 27 | # OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 28 | # OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE 29 | # DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE 30 | # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 31 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 32 | # GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 | # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 35 | # OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 36 | 37 | from .nrf802154_sniffer import Nrf802154Sniffer -------------------------------------------------------------------------------- /tools/nrf802154_sniffer/nrf802154_sniffer/nrf802154_sniffer.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | python "%~dp0nrf802154_sniffer.py" %* 3 | -------------------------------------------------------------------------------- /tools/nrf802154_sniffer/nrf802154_sniffer/nrf802154_sniffer.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | script_path=$(dirname `which $0`) 4 | 5 | unamestr=`uname` 6 | if [ "$unamestr" = 'Darwin' ]; then 7 | hb_x86_py3="/usr/local/bin/python3" 8 | hb_apple_silicon_py3="/opt/homebrew/bin/python3" 9 | 10 | log_file="/tmp/nrf802154_sniffer.sh.log" 11 | if [ ! -z "$VIRTUAL_ENV"]; then 12 | py3=`which python` 13 | elif [ -f $hb_x86_py3 ]; then 14 | py3=$hb_x86_py3 15 | elif [ -f $hb_apple_silicon_py3 ]; then 16 | py3=$hb_apple_silicon_py3 17 | else 18 | py3=`which python3` 19 | if [ $? -ne 0 ]; then 20 | echo "No Python 3 found" >&2 21 | exit 1 22 | fi 23 | fi 24 | 25 | echo "Running script with: <$py3> with PATH: <$PATH>" | tee -a $log_file 26 | else 27 | py3=`which python3` 28 | fi 29 | 30 | exec $py3 $script_path/nrf802154_sniffer.py "$@" -------------------------------------------------------------------------------- /tools/nrf802154_sniffer/requirements.txt: -------------------------------------------------------------------------------- 1 | pyserial >= 3.5 2 | -------------------------------------------------------------------------------- /tools/nrf802154_sniffer/setup.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2019, Nordic Semiconductor ASA 2 | # All rights reserved. 3 | # 4 | # Redistribution and use in source and binary forms, with or without modification, 5 | # are permitted provided that the following conditions are met: 6 | # 7 | # 1. Redistributions of source code must retain the above copyright notice, this 8 | # list of conditions and the following disclaimer. 9 | # 10 | # 2. Redistributions in binary form, except as embedded into a Nordic 11 | # Semiconductor ASA integrated circuit in a product or a software update for 12 | # such product, must reproduce the above copyright notice, this list of 13 | # conditions and the following disclaimer in the documentation and/or other 14 | # materials provided with the distribution. 15 | # 16 | # 3. Neither the name of Nordic Semiconductor ASA nor the names of its 17 | # contributors may be used to endorse or promote products derived from this 18 | # software without specific prior written permission. 19 | # 20 | # 4. This software, with or without modification, must only be used with a 21 | # Nordic Semiconductor ASA integrated circuit. 22 | # 23 | # 5. Any software provided in binary form under this license must not be reverse 24 | # engineered, decompiled, modified and/or disassembled. 25 | # 26 | # THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA "AS IS" AND ANY EXPRESS 27 | # OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 28 | # OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE 29 | # DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE 30 | # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 31 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 32 | # GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 | # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 35 | # OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 36 | 37 | import setuptools 38 | 39 | DISTRIBUTION_NAME = 'nrf802154_sniffer' 40 | 41 | REQUIREMENTS = [ 42 | 'pyserial' 43 | ] 44 | 45 | setuptools.setup( 46 | name=DISTRIBUTION_NAME, 47 | version='0.7.2', 48 | description='Wireshark extcap for 802.15.4 sniffer.', 49 | author='Nordic Semiconductor', 50 | url='https://github.com/NordicPlayground/nRF-802.15.4-sniffer/', 51 | install_requires=REQUIREMENTS, 52 | include_package_data=False, 53 | packages=['nrf802154_sniffer'] 54 | ) 55 | --------------------------------------------------------------------------------