openthread / silk

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Issue following "Testing a Thread Network with Visualization" codelab

purvisb opened this issue · comments

Following this codelab.

On page 6 the instructions are sparse. I got a test to run but I'm getting an EM copied below.

I don't have a j-link device, and I'm not sure where to find the DUTserial for hwconfig.ini. Are either of those two missing requirements causing this issue? Or is there something else im missing? I don't see anywhere to define a port. I do see clusters.conf but I'm not sure what to put for the port in that.

purvisb@purvisb-linux:/opt/openthread_test$ sudo python3 ~/git/silk/silk/unit_tests/silk_run_test.py 
Setting results dir to /opt/openthread_test/results/silk_run_10-31/test_run_on_10-31-21:50/
Setting OTNS server host to localhost
Found 5 test cases.
Running tests...
[2021-10-31 21:50:04,791] [silk] [INFO] Log dest: /opt/openthread_test/results/silk_run_10-31/test_run_on_10-31-21:50/2021-10-31_21.50.04_TestFormNetwork
[2021-10-31 21:50:04,791] [silk] [INFO] SET UP CLASS TestFormNetwork
[2021-10-31 21:50:04,791] [silk.otnsManager.gRPCClient] [DEBUG] Starting gRPC client with address localhost:8999
[2021-10-31 21:50:04,792] [silk.otnsManager] [INFO] OTNS manager created, connect 192.168.0.3 to localhost.
[2021-10-31 21:50:04,792] [silk.otnsManager.gRPCClient] [INFO] Sending cmd: title "TestFormNetwork.set_up" x 0 y 20 fs 20
[2021-10-31 21:50:04,804] [silk.otnsManager.gRPCClient] [INFO] Sent cmd: title "TestFormNetwork.set_up" x 0 y 20 fs 20, resp: output: "Done"
[2021-10-31 21:50:04,804] [silk.otnsManager.gRPCClient] [INFO] Sending cmd: speed 1.0
[2021-10-31 21:50:04,815] [silk.otnsManager.gRPCClient] [INFO] Sent cmd: speed 1.0, resp: output: "Done"
[2021-10-31 21:50:04,896] [silk] [INFO] ########## List all available dev boards ##########
[2021-10-31 21:50:04,897] [silk] [INFO] 1915:cafe Nordic_Semiconductor             nRF528xx_OpenThread_Device          ECCFCD37CB31                                         /dev/bus/usb/005/022
1915:cafe Nordic_Semiconductor             nRF528xx_OpenThread_Device          ECCFCD37CB31                                     01  /dev/ttyACM3

Failed to add Dev-8A7D
Failed to add Dev-8A7D
[2021-10-31 21:50:04,932] [silk] [ERROR]   File "/usr/local/lib/python3.8/dist-packages/silk-1.0.0-py3.8.egg/silk/tests/testcase.py", line 250, in wrapper
[2021-10-31 21:50:04,932] [silk] [ERROR]     func(*args, **kwargs)
[2021-10-31 21:50:04,932] [silk] [ERROR]   File "/opt/openthread_test/ot_test_form_network.py", line 52, in setUpClass
[2021-10-31 21:50:04,932] [silk] [ERROR]     cls.hardware_select()
[2021-10-31 21:50:04,932] [silk] [ERROR]   File "/opt/openthread_test/ot_test_form_network.py", line 34, in hardware_select
[2021-10-31 21:50:04,932] [silk] [ERROR]     cls.router = ffdb.ThreadDevBoard()
[2021-10-31 21:50:04,932] [silk] [ERROR]   File "/usr/local/lib/python3.8/dist-packages/silk-1.0.0-py3.8.egg/silk/node/fifteen_four_dev_board.py", line 142, in __init__
[2021-10-31 21:50:04,932] [silk] [ERROR]     self.get_device(sw_version=sw_version)
[2021-10-31 21:50:04,932] [silk] [ERROR]   File "/usr/local/lib/python3.8/dist-packages/silk-1.0.0-py3.8.egg/silk/node/fifteen_four_dev_board.py", line 626, in get_device
[2021-10-31 21:50:04,932] [silk] [ERROR]     self.device_path = self.device.port()
[2021-10-31 21:50:04,932] [silk] [ERROR] Hardware Configuration Error !!!
[2021-10-31 21:50:04,932] [silk] [INFO] ======================================================================
[2021-10-31 21:50:04,932] [silk] [INFO] ==================== CHECK HARDWARE CONFIGURATION ===================
[2021-10-31 21:50:04,932] [silk] [INFO] ======================================================================
[2021-10-31 21:50:04,932] [silk] [INFO] TestFormNetwork....................................FAILED SETUPCLASS
[2021-10-31 21:50:04,932] [silk] [INFO] ======================================================================


========================================================================
===================== HARDWARE TEST SET-UP ERRORS ======================
========================================================================
setUpClass (ot_test_form_network.TestFormNetwork)
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/silk-1.0.0-py3.8.egg/silk/tests/testcase.py", line 250, in wrapper
    func(*args, **kwargs)
  File "/opt/openthread_test/ot_test_form_network.py", line 52, in setUpClass
    cls.hardware_select()
  File "/opt/openthread_test/ot_test_form_network.py", line 34, in hardware_select
    cls.router = ffdb.ThreadDevBoard()
  File "/usr/local/lib/python3.8/dist-packages/silk-1.0.0-py3.8.egg/silk/node/fifteen_four_dev_board.py", line 142, in __init__
    self.get_device(sw_version=sw_version)
  File "/usr/local/lib/python3.8/dist-packages/silk-1.0.0-py3.8.egg/silk/node/fifteen_four_dev_board.py", line 626, in get_device
    self.device_path = self.device.port()
AttributeError: 'NoneType' object has no attribute 'port'



========================================================================
========================== TEST RESULTS RECAP ==========================
========================================================================
========================================================================


========================================================================
=============================== SUMMARY ================================
========================================================================
Start time:     Sun Oct 31 21:50:04 2021
End time:       Sun Oct 31 21:50:04 2021
Execution time: 00:00:00
Tests skipped:  0
Tests errors:   1
Tests run:      0
Tests passed:   0
Tests failed:   0

I don't have a j-link device, and I'm not sure where to find the DUTserial for hwconfig.ini. Are either of those two missing requirements causing this issue? Or is there something else im missing? I don't see anywhere to define a port. I do see clusters.conf but I'm not sure what to put for the port in that.

The nRF52840 DK includes an onboard SEGGER J-Link debugger.

You can use J-Link Commander's ShowEmuList command to discover the serial number of an attached J-Link device.

I have an nRF52840 MDK. I don't believe this has an onboard SEGGER J-Link debugger. Let me know if the mdk model does have that.

Are there any other options available for me?

I have an nRF52840 MDK. I don't believe this has an onboard SEGGER J-Link debugger. Let me know if the mdk model does have that.

Are there any other options available for me?

Silk currently requires the SEGGER J-Link debugger.

Understood, Thanks!