1628 views|1 replies

6062

Posts

4

Resources
The OP
 

[SparkFun MGM240P Thing Plus Matter Review] +thread Experiment 1 [Copy link]

This post was last edited by damiaa on 2023-6-5 10:25

[SparkFun MGM240P Thing Plus Matter Review] +thread Experiment 1

There was only one MGM240P board, so it was not easy to do this experiment. But after looking through the boards at the bottom of the box, I found nrf52840 usb-dongle and nrf 52840dk boards. So I started.

First, use nrf52840 usb-dongle to burn nrfttm hex and download a nrfttmwin32x640130 to monitor

To burn nrf52840 usb-dongle, you need to download and install the burning tool in nrfconnect-setup-4.1.1-x64.

When burning, plug the nrf52840 usb-dongle into the USB port and press the reset button to enter the burning state, select the device and file to burn. The file is nrf52840_xxaa_mbr_pca10059_usb.hex in the directory...\nrfttmwin32x640130\nRF_TTM-win32-x64\hex

At this time, if you use nRF_TTM-win32-x64 scan, you can find the started thread device.

Second, burn a thread device started by serial port control on the nrf 52840dk board

This is explained in the previous post [Development Kit for nRF52840] + Review 5 thread trial .

3. Prepare the thread device for starting the serial port control of MGM240P

1. Open the installed Simplicity Studio v5, select Welcome, connect and start MGM240G, and select EXAMPLE PROJECTS DEMOS

There is a project in it, one is a demo and the other is an example as follows:

You can't use the create example below directly, because it doesn't have a bootloader , so you can only use the direct RUN above first. But you can also use the RUN above and then use the create example below.

2. After RUN, create the example as follows, compile, then debug, and the program is burned in. But it seems that there is a problem with debugging. Regardless of it, the compilation is fine and the program is burned in.

Fourth, close Simplicity Studio V5 and connect the three boards to the USB port

nrf52840 usb-dongle

NRF 52840DK board

MGM240P

Open nrfttm and connect the serial port of nrf52840 usb-dongle, then scan and you will find a leader node. On the right you can see its channel and network key, which will be used by the subsequent nodes to join.

Open putty and connect to the serial port of nrf 52840dk board. Set the serial port parameters to 115200 n 8 1

Open putty and connect to the serial port of MGM240P board. Set the serial port parameters to 115200 n 8 1

Use putty to connect to nrf 52840dk, and then start thread with command. You can see that a child is started, and then two devices can be scanned.

panid 0xabcd The same panid is 0xabcd This is the leader parameter on the right side of the above picture.
Channel 0x11 The same channel is 0x11 Remember to keep it the same. Otherwise, you can't connect.
ifconfig up starts the network configuration The corresponding command is ifconfig down
thread start to start the thread network. You can use state to check the child device

nrf 52840dk Do not enter the networkkey program by default.

The operation in the lower right corner of the above picture allows a sub-device to join. Because there is no dataset networkkey operation command in the upper right corner, a network is generated by itself (it will join the network after the subsequent operation changes).

Operate putty connected to MGM240P, and then use the command to start the thread. You can see that a child is started, and then three devices can be scanned.

Dataset panid 0xabcd The same panid is 0xabcd This is the leader parameter you see on the right side of the above figure.
Dataset channel 0x11 The same channel is 0x11 Remember to keep it the same. Otherwise, you can't connect.

dataset networkkey 00112233445566778899aabbccddeeff Set network key

dataset commit active Submit activation parameters
ifconfig up Start network configuration The corresponding command is ifconfig down
thread start Start thread network. Later, you can use state to check the child device



This is how it works. Thank you for watching.

This post is from RF/Wirelessly

Latest reply

It seems that the program is burned in. But it seems that there is a problem with debugging Not a big problem   Details Published on 2023-6-6 07:47
 

6555

Posts

0

Resources
2
 

It seems that the program is burned in. But it seems that there is a problem with debugging

Not a big problem

This post is from RF/Wirelessly
 
 

Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

快速回复 返回顶部 Return list