Feedback
Feedback

If you are having issues with the exercises, please create a ticket on DevZone: devzone.nordicsemi.com
Click or drag files to this area to upload. You can upload up to 2 files.

Exercise 1

Provisioning a Wi-Fi device over the phone

Provisioning refers to the process of initializing and configuring a new device to be added to an existing network. In this exercise, we will learn how to provision your nRF70 series device to be added to an existing and operational Wi-Fi network.

We will do this by using the Wi-Fi Provisioning Service sample, which is a sample available in the nRF Connect SDK. This sample uses a smartphone as the provisioner device. The smartphone will use an app called “nRF Wi-Fi Provisioner” to connect to your Wi-Fi device via Bluetooth Low Energy. By using this app, you will be able to choose the Wi-Fi network you wish to connect to and enter the credentials for your local AP.

Wi-Fi Provisioning Service sample architecture

Note

This course builds on the nRF Connect SDK Fundamentals course and focuses on Wi-Fi. You need to read Lesson 1 in the nRF Connect SDK Fundamentals to learn how to install nRF Connect SDK on your machine and build applications. Furthermore, completing the nRF Connect SDK Fundamentals course is strongly advised as it provides a comprehensive understanding of the nRF Connect SDK.
The exercises in this course assume you have a basic understanding of the nRF Connect SDK.

Exercise steps

1. Flash the sample to your board.

1.1 Clone the GitHub repository for this course.

Copy the link to the repository and use VS Code’s Command Palette to clone the repository.

Clone the course’s GitHub repository in VS Code

1.2 In nRF Connect for Desktop, install and launch the Programmer application.

1.3 In the upper left-hand corner, click Select Device and select your board.

Make sure your board is connected to your computer and switched on.

1.4 Go to Add file and Browse… and navigate to the GitHub repository for this course. In lesson1/wififund_less1_exer1, select the .hex file that corresponds to the board you are using, then click Open.

1.5 Select Erase & write to flash the sample to your board.

Note

Make sure jumpers P22 and P23 are installed on your board or you will get an error while building.

2. View the terminal output

2.1 In VS Code, in the nRF Connect Extension window, go to Connected Devices and connect to the COM port of your board by clicking the electric plug icon as shown in the image below. Then choose the default COM port settings 115200 8n1 rtscts:off.

Note

Since the nRF5340 is a dual-core SoC, there will be two COM ports available. Select one and if there is no log output, try the other.

2.2 If this was successful, you should see the following message printed on your serial terminal.

Note down your device’s address, shown in the red box here, as we will need that information later on. Your Wi-Fi device is now advertising its presence and readiness to connect over Bluetooth LE.

3. Download and launch nRF Wi-Fi Provisioner.

3.1 Download nRF Wi-Fi Provisioner from your app store.

3.2 Make sure Bluetooth is enabled on your smartphone.

3.3 Launch the app on your smartphone, and grant the app permission to use Bluetooth when prompted.

4. Find your device on the Scanner page.

Now your smart phone will start scanning for devices advertising using Bluetooth, such as your nRF70 series DK. You should now see your device appear on the Scanner page in the app.

You can make sure the device appearing on your nRF Provisioning app is actually your nRF70 series DK by verifying the address that was printed in step 2.2

Android
iOS

5. Pair the device with the app.

Select the device, and when asked if you wish to pair via Bluetooth, select Yes.

6. Select and enter the credentials for your Wi-Fi network.

Android

6.1 Select Start Provisioning

6.2 Select the Wi-Fi network you want your board to connect to and enter the password for that network. Then press Provision.

iOS

6.1 Click on Access Point, and the app will scan and display all Wi-Fi networks in your vicinity.

6.2 Select the Wi-Fi network you want your board to connect to.

6.3 Select whichever channel you want to use. This generally does not matter.

6.4 Under Access Point, enter the password for your Wi-Fi network and deselect Volatile Memory to ensure the credentials are stored on the device.

6.6 Finally, click Set Configuration.

7. You have successfully provisioned your Wi-Fi device to the network.

Upon successful provisioning, you should be able to see a similar view to the picture shown below.

Android
iOS

We have now provisioned the board to a Wi-Fi network over Bluetooth LE, and the device is now connected to that network. The credentials are stored on the device, to be retrieved for future connections in the rest of the exercises in the course.

Register an account
Already have an account? Log in
(All fields are required unless specified optional)

  • 8 or more characters
  • Upper and lower case letters
  • At least one number or special character

Forgot your password?
Enter the email associated with your account, and we will send you a link to reset your password.