You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: TESTS/network/emac/README.md
+70Lines changed: 70 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,76 @@ This document describes how to run EMAC tests. The EMAC test cases are made usin
6
6
7
7
To configure a device to be a CTP echo server, you need to enable the `echo-server` setting in the `json` file of the test environment application. When a device is configured to be a CTP echo server, it starts to forward CTP messages automatically when it is switched on and continues to do so until it is switched off.
8
8
9
+
## Other configuration options
10
+
11
+
Default configuration files included with tests are configured for ethernet. For Wifi, set `test-ethernet` to 0 and `test-wifi` to 1. Also Wifi SSID and security options need to be configured to the configuration file.
12
+
13
+
## Example commands
14
+
15
+
### CTP echo server
16
+
17
+
You can use following command to build CTP echo server:
Replace TARGET with the target device. After building, flash the binary to the CTP echo server device.
22
+
23
+
You can verify that the CTP echo server has been started properly by making terminal connection to the device, resetting it and verifying that `echo server started successfully` is printed on the terminal. Host tests can be run when the CTP echo server is running on the Ethernet segment.
24
+
25
+
For Wifi tests the CTP echo server can be also running of ethernet side as long as network configuration is such that Ethernet frames are routed between Wifi and Ethernet.
26
+
27
+
CTP echo server is sending 100 bytes long broadcast CTP Ethernet frame every 60 seconds to inform the network of its presence.
Test cases have different trace levels based on how much tracing can be done without affecting the performance of the test case. Tracing is configured using `SET\_TRACE\_LEVEL' macro.
40
+
41
+
For example `EMAC broadcast` test enables send, input CTP frame, success and failure traces:
Here is an example trace about a message that has been send to broadcast address `ff:ff:ff:ff:ff:ff` and is answered by echo server:
46
+
47
+
```
48
+
49
+
message sent ff:ff:ff:ff:ff:ff
50
+
51
+
response: receipt number 24 LENGTH OK DATA OK BROADCAST
52
+
53
+
```
54
+
55
+
Here is an example trace about a message that has been send to broadcast address `ff:ff:ff:ff:ff:ff` and is not answered by echo server:
56
+
57
+
```
58
+
59
+
message sent ff:ff:ff:ff:ff:ff
60
+
61
+
NO RESPONSE: receipt number 25
62
+
63
+
```
64
+
65
+
Here is an example about input message trace, message hex dump contains the first 32 bytes of the received Ethernet frame.
66
+
67
+
```
68
+
69
+
INP> LEN 100
70
+
71
+
INP> 000000 ff ff ff ff ff ff ba 42 ed 79 11 8a 90 00
72
+
73
+
INP> 00000e 00 00 02 00 ba 42 ed 79 11 8a 01 00 01 00
74
+
75
+
```
76
+
77
+
If you like to verify whether the echo server is receiving CTP Ethernet frames you can enable `echo-server-trace` option in the echo server configuration file. This can be used for debugging purposes. Do not run performance test like `EMAC unicast burst` with tracing enabled, since tracing affects the echo server performance.
0 commit comments