• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..--

Makefile.amD11-Mar-20241.8 KiB398

OpenThread.pngD11-Mar-20244.6 KiB

OpenThread.pyD11-Mar-2024116.7 KiB3,5562,813

OpenThread_BR.pngD11-Mar-20244.6 KiB

OpenThread_BR.pyD11-Mar-202418.2 KiB589428

OpenThread_WpanCtl.pngD11-Mar-20249.1 KiB

OpenThread_WpanCtl.pyD11-Mar-2024102.1 KiB2,7392,191

README.mdD11-Mar-20244.1 KiB6935

deviceInputFields.xmlD11-Mar-20244.4 KiB132113

README.md

1# THCI & Test Environment Setup
2
3THCI (Thread Host Controller Interface) is an implementation of the Python abstract class template "IThci", which is used by the Thread Test Harness Software to control OpenThread-based reference devices according to each test scenario.
4
5Currently, there are two THCI implementations for OpenThread:
6
7- OpenThread CLI — Based on the CC2538 example platform, which is included in the current Thread Test Harness Software release.
8- OpenThread `wpanctl` — Based on `wpantund` running on a Linux host (for example, a Raspberry Pi 3B) working with a Network Co-Processor (NCP) (for example, a Nordic Semiconductor nRF52840) running an OpenThread NCP image.
9
10Platform developers should modify the THCI implementation directly to match their platform (for example, serial baud rate). Alternatively, platform developers may follow the instructions below to add a new THCI implementation to the Test Harness.
11
12## OpenThread Environment Setup
13
141. Copy "OpenThread.png" to `C:\GRL\Thread1.1\Web\images`.
15
162. Copy "deviceInputFields.xml" to `C:\GRL\Thread1.1\Web\data`.
17
183. Copy "OpenThread.py" to `C:GRL\Thread1.1\Thread_Harness\THCI`.
19
204. Connect the DUT (Device Under Test), a sniffer, and CC2538DK (or other hardware running OpenThread, as the reference device) to the Host PC.
21
225. Launch the Thread Test Harness Software, modify the default configuration if needed, and select **Start**.
23
246. Drag the "OpenThread: TI CC2538DK" reference device to the **Test Bed** section with the desired number.
25
267. Select one or more test cases to execute.
27
28## OpenThread WpanCtl Environment Setup
29
301. Copy "OpenThread_WpanCtl.png" to `C:\GRL\Thread1.1\Web\images`.
31
322. Copy "deviceInputFields.xml" to `C:\GRL\Thread1.1\Web\data`.
33
343. Copy "OpenThread_WpanCtl.py" to `C:\GRL\Thread1.1\Thread_Harness\THCI`.
35
364. Connect the NCP board (nRF52840) to the Raspberry Pi's USB port and verify that the `wpanctl` command works.
37
385. Connect the Raspberry Pi's GPIOs (for Raspberry Pi 3B, link Pin8 as TXD, Pin10 as RXD, and Pin14 as GND) with a UART2USB adapter.
39
406. Connect the DUT (with Step 5's adapter), sniffer, and other golden devices (as reference devices) to the Host PC.
41
427. Get the DUT serial port hardware identifier and add a new platform group named OpenThread_WpanCtl in `C:\GRL\Thread1.1\Config\Configuration.ini`. See https://openthread.io/certification/automation-setup#acting_as_a_new_reference_platform for more information.
43
448. Launch the Thread Test Harness Software, modify the default configuration if needed, and select **Start**.
45
469. Drag the "OpenThread_WpanCtl: Wpantund + NCP" reference device to the **Test Bed** section with the desired number.
47
4810. Select one or more test cases to execute.
49
50The above is for the serial connection mode between the DUT and the Host PC. The ssh connection mode is also supported for OpenThread WpanCtl, but it can not be auto-discovered and only can be used via ‘Drag and Add’ way in the ‘Configure Test Bed’ Page of Test Harness. The configuration is as following:
51
521. Make Raspberry Pi and Host PC in the same LAN.
53
542. Login Raspberry Pi, sudo raspi-config, then -> interfacing options -> enable ssh.
55
563. Install python paramiko package to `C:\GRL\Pyton2.7`
57
584. Copy "OpenThread_WpanCtl.png" to `C:\GRL\Thread1.1\Web\images`.
59
605. Modify the Device section "forParam" values referring to the following indication then Copy "deviceInputFields.xml" to `C:\GRL\Thread1.1\Web\data`. TelnetIP : device's IP address Param5 : 'ip' for SSH login Param6 : SSH username Param7 : SSH password Param8 : comma separated CLI prompt, Wpan command prefix, Wpan interface Param9 : comma separated device's setting commands before test
61
626. Copy "OpenThread_WpanCtl.py" to `C:\GRL\Thread1.1\Thread_Harness\THCI`.
63
647. Launch the Thread Test Harness Software, modify the default configuration if needed, and select **Start**.
65
668. Drag the "OpenThread_WpanCtl: Wpantund + NCP (SSH)" reference device to the **Test Bed** section with the desired number. Then fill in the Raspberry Pi IPv4 address and port and click `connect` icon button to get the NCP version.
67
689. Select one or more test cases to execute.
69