Skip to content

Commit 8dfec63

Browse files
committed
Nesso N1 user manual docs Thread update
1 parent a774dab commit 8dfec63

File tree

1 file changed

+166
-25
lines changed
  • content/hardware/09.kits/maker/nesso-n1/tutorials/user-manual

1 file changed

+166
-25
lines changed

content/hardware/09.kits/maker/nesso-n1/tutorials/user-manual/content.md

Lines changed: 166 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@ tags:
77
- User Manual
88
- Cheat sheet
99
- ESP32-C6
10-
- Bluetooth
11-
- Wi-Fi 6
12-
- LoRa
10+
- Bluetooth®
11+
- Wi-Fi® 6
12+
- LoRa®
13+
- Thread
1314
- Zigbee®
1415
- Matter
1516
author: 'Ernesto Voltaggio'
@@ -22,7 +23,7 @@ software:
2223
- web-editor
2324
---
2425

25-
The **Arduino® Nesso N1** is an all-in-one enclosed development board. Based on the ESP32-C6 System on Chip (SoC), it integrates a suite of communication protocols, including 2.4 GHz Wi-Fi® 6, Bluetooth® 5.3 LE, 802.15.4 (Zigbee®), and long-range LoRa®. It also includes a 1.14" color touchscreen, buttons, and a built-in LiPo battery for immediate user interaction in portable applications.
26+
The **Arduino® Nesso N1** is an all-in-one enclosed development board. Based on the ESP32-C6 System on Chip (SoC), it integrates a suite of communication protocols, including 2.4 GHz Wi-Fi® 6, Bluetooth® 5.3 LE, 802.15.4 (Thread/Zigbee®), and long-range LoRa®. It also includes a 1.14" color touchscreen, buttons, and a built-in LiPo battery for immediate user interaction in portable applications.
2627

2728
This document serves as a comprehensive user manual for the Nesso N1, providing technical specifications, set up guides, and detailed explanations of its features to help you bring your projects to life.
2829

@@ -46,7 +47,7 @@ The Nesso N1 packs a rich set of features into a compact and portable form facto
4647

4748
### Product Architecture
4849

49-
- **ESP32-C6 SoC**: A powerful single-core RISC-V microcontroller with integrated Wi-Fi® 6, Bluetooth® 5.3 LE, and an 802.15.4 radio supporting Zigbee® for low-power mesh networking.
50+
- **ESP32-C6 SoC**: A powerful single-core RISC-V microcontroller with integrated Wi-Fi® 6, Bluetooth® 5.3 LE, and an 802.15.4 radio supporting Thread and Zigbee® for low-power mesh networking.
5051
- **SX1262 LoRa® Module**: A long-range, low-power LoRa® transceiver for communication in remote or challenging environments.
5152
- **1.14" Color Touchscreen**: An intuitive IPS display for user interaction and data visualization.
5253
- **BMI270 IMU**: A 6-axis Inertial Measurement Unit for precise motion and orientation sensing.
@@ -141,7 +142,7 @@ The ESP32-C6 features a comprehensive set of connectivity options:
141142

142143
- 2.4 GHz Wi-Fi® 6 (802.11ax).
143144
- Bluetooth® 5.3 Low Energy.
144-
- 802.15.4 radio and Zigbee® protocols.
145+
- 802.15.4 radio for Thread and Zigbee® protocols.
145146
- Support for the Matter protocol.
146147

147148
***WARNING: All GPIO pins are 3.3 V logic only and are not 5 V tolerant.***
@@ -749,6 +750,121 @@ void loop() {
749750
}
750751
```
751752

753+
### Thread
754+
755+
**Thread** is a low-power, secure, and self-healing mesh networking protocol based on IPv6. Two Nesso N1 boards can form a minimal Thread network on their own, without needing an external border router. One device will automatically become the "Router" for the network, and the other will join as a "Child".
756+
757+
This test is performed by interacting directly with the OpenThread Command Line Interface (CLI) via the Serial Monitor.
758+
759+
#### Thread CLI Sketch (Upload to Both Boards)
760+
761+
This sketch simply starts the OpenThread stack and opens a console on the Serial Monitor, giving you direct access to the CLI. Upload this exact same sketch to **both** of your Nesso N1 boards.
762+
763+
```arduino
764+
#include "OThreadCLI.h"
765+
void setup() {
766+
Serial.begin(115200);
767+
// Initialize the OpenThread stack but do not autostart the network interface.
768+
// This gives us manual control via the CLI.
769+
OThreadCLI.begin(false);
770+
Serial.println("OpenThread CLI started. Type 'help' for a list of commands.");
771+
// Start the console to pass Serial input directly to the CLI
772+
OThreadCLI.startConsole(Serial);
773+
}
774+
void loop() {
775+
// The console handles all the work. The loop can be empty.
776+
}
777+
```
778+
779+
#### How to Test Manually via CLI
780+
781+
You will need two separate Serial Monitor windows, one for each Nesso N1.
782+
783+
1. **Prepare:** Upload the sketch above to both boards. Connect both boards to your computer and open a Serial Monitor for each one.
784+
785+
2. **Form a Network (Board 1):** In the Serial Monitor for your first board, create a new Thread network.
786+
787+
```
788+
dataset init new
789+
```
790+
791+
The board should respond with `Done`. Then, commit the new network settings:
792+
793+
```
794+
dataset commit active
795+
```
796+
797+
It will respond with `Done`.
798+
799+
3. **Get the Network Key (Board 1):** Get the key for the network you just created.
800+
801+
```
802+
networkkey
803+
```
804+
805+
It will print a 32-character hexadecimal string. **Copy this key.**
806+
807+
4. **Start the Network (Board 1):** Enable the radio and start the Thread protocol.
808+
809+
```
810+
ifconfig up
811+
thread start
812+
```
813+
814+
After a few seconds, this board will become the network leader. You can verify this by typing `state`, which should return `leader`.
815+
816+
5. **Join the Network (Board 2):** In the Serial Monitor for your second board, use the key you copied from Board 1.
817+
818+
```
819+
dataset networkkey <paste-the-32-char-key-here>
820+
```
821+
822+
Replace `<paste-the-32-char-key-here>` with the key. It should respond with `Done`. Then, commit the settings:
823+
824+
```
825+
dataset commit active
826+
```
827+
828+
6. **Start the Network (Board 2):** Enable the radio and start the Thread protocol.
829+
830+
```
831+
ifconfig up
832+
thread start
833+
```
834+
835+
After a few seconds, this board will join the network. You can verify this by typing `state`, which should return `child`.
836+
837+
7. **Set up the Server (Board 1):** In the Serial Monitor for your first board, set up a UDP listener on port `1234`.
838+
839+
```
840+
udp open
841+
udp bind :: 1234
842+
```
843+
844+
Both commands should respond with `Done`. This board is now listening for messages.
845+
846+
8. **Send a Message (Board 2):** In the Serial Monitor for your second board, you must also open a UDP socket before you can send.
847+
848+
```
849+
udp open
850+
```
851+
852+
Once it responds with `Done`, send a UDP message to all devices on the Thread network.
853+
854+
```
855+
udp send ff03::1 1234 Hello!
856+
```
857+
858+
`ff03::1` is a multicast address that means "all Thread devices here.".
859+
860+
9. **Verify Communication:**
861+
862+
The Serial Monitor for **Board 2** (the client) should respond with `Done`.
863+
864+
The Serial Monitor for **Board 1** (the server) should print a message showing it received the packet, for example: `8 bytes from fdde:ad00:beef:0:35e3:3c2f:273f:9442 Hello!`.
865+
866+
You have now successfully sent and received a message over a peer-to-peer Thread network.
867+
752868
### Zigbee®
753869
754870
The Nesso N1's 802.15.4 radio allows it to act as a **Zigbee® End Device**, enabling it to join existing Zigbee® mesh networks. This is ideal for creating low-power devices like sensors or light controllers that integrate with popular smart home hubs.
@@ -821,22 +937,33 @@ void loop() {
821937
5. The hub should discover a new light bulb named "Arduino Nesso-Light".
822938
6. Once paired, you can add the device to a room and control the Nesso N1's built-in LED by toggling the light on and off in the app.
823939

824-
### Matter over Wi-Fi®
940+
### Matter
941+
942+
**Matter** is a smart home connectivity standard that aims to unify the ecosystem, allowing devices from different brands to work together seamlessly. The Nesso N1 supports Matter communication over both **Wi-Fi®** and **Thread**.
825943

826-
**Matter** is a smart home connectivity standard that unifies the ecosystem, allowing devices from different brands to work together seamlessly. The Nesso N1 can act as a Matter device over its Wi-Fi® connection.
944+
The choice of transport is determined by **compile-time definitions** you add at the top of your sketch.
827945

828946
#### Matter On/Off Light Example
829947

830-
This example turns your Nesso N1 into a simple On/Off light device. After commissioning it into your smart home network, you can control the Nesso N1's built-in LED from your preferred smart home app (e.g., Google Home, Apple Home).
948+
This example turns your Nesso N1 into a simple On/Off light bulb. The same code works for both Matter over Wi-Fi® and Matter over Thread. After commissioning, you can control the Nesso N1's built-in LED from your smart home app.
831949

832950
```arduino
833951
#include <Matter.h>
952+
// Include WiFi.h only if you plan to use Matter over Wi-Fi
834953
#include <WiFi.h>
835954
836-
// --- Wi-Fi Configuration ---
955+
// --- Transport Layer Configuration ---
956+
// To use Matter over Thread, include the three defines below.
957+
// To use Matter over Wi-Fi, comment out or remove these three defines.
958+
#define CONFIG_ENABLE_CHIPOBLE 1 // Enables BLE for commissioning
959+
#define CHIP_DEVICE_CONFIG_ENABLE_THREAD 1 // Enables the Thread stack
960+
#define CHIP_DEVICE_CONFIG_ENABLE_WIFI 0 // CRITICAL: Disables the Wi-Fi stack
961+
// -------------------------------------
962+
963+
// --- For Matter over Wi-Fi only ---
837964
const char* ssid = "YOUR_SSID";
838965
const char* password = "YOUR_PASSWORD";
839-
// ---------------------------
966+
// ------------------------------------
840967
841968
// Create an On/Off Light Endpoint
842969
MatterOnOffLight OnOffLight;
@@ -857,14 +984,17 @@ void setup() {
857984
Serial.begin(115200);
858985
delay(1000);
859986
860-
// Connect to Wi-Fi
861-
Serial.printf("Connecting to %s ", ssid);
862-
WiFi.begin(ssid, password);
863-
while (WiFi.status() != WL_CONNECTED) {
864-
delay(500);
865-
Serial.print(".");
987+
// --- For Matter over Wi-Fi only ---
988+
if (!CHIP_DEVICE_CONFIG_ENABLE_THREAD) {
989+
Serial.printf("Connecting to %s ", ssid);
990+
WiFi.begin(ssid, password);
991+
while (WiFi.status() != WL_CONNECTED) {
992+
delay(500);
993+
Serial.print(".");
994+
}
995+
Serial.println(" Connected");
866996
}
867-
Serial.println(" Connected");
997+
// ------------------------------------
868998
869999
// Initialize the OnOffLight endpoint with an initial state of OFF
8701000
OnOffLight.begin(false);
@@ -899,14 +1029,25 @@ void loop() {
8991029
}
9001030
```
9011031

902-
#### How to Test Your Matter Device
1032+
#### How to Configure and Test Your Matter Device
1033+
1034+
The same sketch can be used for both Matter over Wi-Fi® and Matter over Thread. The behavior is controlled by **compile-time flags** at the top of the code.
1035+
1036+
**1. To Run as Matter over Wi-Fi®:**
1037+
* **Action:** In the sketch, **comment out or delete** the three `#define` flags related to Thread. Fill in your Wi-Fi® credentials in the `ssid` and `password` variables.
1038+
* **Requirements:** Your Nesso N1 and Matter Controller (e.g., smartphone) must be on the same Wi-Fi® network.
1039+
1040+
**2. To Run as Matter over Thread:**
1041+
* **Action:** In the sketch, ensure the three `#define` flags for Thread are **active and not commented out**.
1042+
* **Requirements:** You must have a **Thread Border Router** (e.g., a compatible Google Nest Hub or Apple HomePod) active on your network.
1043+
1044+
**3. Commissioning the Device:**
1045+
After uploading the correctly configured sketch:
1046+
1. Open the Serial Monitor. A manual pairing code will be printed every few seconds.
1047+
2. Open your Matter Controller app (e.g., Google Home, Apple Home) and choose to add a new device.
1048+
3. When prompted, enter the manual pairing code from the Serial Monitor to complete the setup.
9031049

904-
1. **Configure Wi-Fi® Credentials:** In the sketch, replace `"YOUR_SSID"` and `"YOUR_PASSWORD"` with your Wi-Fi® network details.
905-
2. **Upload the Sketch:** Connect your Nesso N1 to your computer and upload the sketch using the Arduino IDE.
906-
3. **Get the Pairing Code:** Open the Serial Monitor (**Tools > Serial Monitor**) and set the baud rate to **115200**. After connecting to Wi-Fi®, a manual pairing code will be printed every few seconds.
907-
4. **Start Commissioning:** Open your Matter Controller app (e.g., Google Home, Apple Home) and choose to add a new device.
908-
5. **Enter Pairing Code:** When prompted, enter the manual pairing code from the Serial Monitor to complete the setup. Your Nesso N1 and your smartphone must be on the same Wi-Fi® network.
909-
6. **Control the Device:** Once commissioned, a new "On/Off light" device will appear in your app. You can now toggle it to control the Nesso N1's built-in green LED.
1050+
**4. Control the Device:** Once commissioned, a new light bulb device will appear in your app or be controllable via the command line tool. You can now toggle it on and off to control the Nesso N1's built-in LED.
9101051

9111052
### LoRa®
9121053

0 commit comments

Comments
 (0)