[diag] specify sending frame (#10359)

This commit adds an extra command `diag frame` to specify the frame
used for `diag send` and `diag repeat`, so that we can use this
command to send arbitrary 802.15.4 frames.
This commit is contained in:
Yakun Xu
2024-06-13 07:53:48 -07:00
committed by GitHub
parent cb1220d79b
commit fa71a8afa3
4 changed files with 104 additions and 12 deletions
+29
View File
@@ -126,6 +126,35 @@ expect "start diagnostics mode"
expect "status 0x00"
expect_line "Done"
send_user "input too short test\n"
send "diag frame 11\n"
expect "Error"
send_user "input too long test\n"
send "diag frame 11223344556677889900112233445566778899001122334455667788990011223344556677889900112233445566778899001122334455667788990011223344556677889900112233445566778899001122334455667788990011223344556677889900112233445566778899001122334455667788990011223344556677889900\n"
expect "Error"
send_user "input odd length test\n"
send "diag frame 123\n"
expect "Error"
send_user "shortest frame test\n"
send "diag frame 112233\n"
expect "Done"
send "diag send 1\n"
expect "length 0x3"
expect "Done"
send_user "longest frame test\n"
send "diag frame 11223344556677889900112233445566778899001122334455667788990011223344556677889900112233445566778899001122334455667788990011223344556677889900112233445566778899001122334455667788990011223344556677889900112233445566778899001122334455667788990011223344556677\n"
expect "Done"
send "diag repeat 1\n"
expect "length 0x7f"
expect "Done"
send "diag repeat stop\n"
expect "Done"
send "diag channel 11\n"
expect "set channel to 11"
expect "status 0x00"