[radio] send radio command to the region (#5999)

Some radio region has further limit over max power table. We need to
send the region code the radio driver as well.
This commit is contained in:
Jiacheng Guo
2020-12-22 22:51:03 -08:00
committed by GitHub
parent 677e2f01ec
commit b306cb0bbe
18 changed files with 295 additions and 6 deletions
+4 -1
View File
@@ -83,7 +83,7 @@ check()
# Cover setting a valid network interface name.
readonly VALID_NETIF_NAME="wan$(date +%H%M%S)"
RADIO_URL="spinel+hdlc+uart://${CORE_PTY}?max-power-table=11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26"
RADIO_URL="spinel+hdlc+uart://${CORE_PTY}?region=US&max-power-table=11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26"
if [[ ${DAEMON} == 1 ]]; then
sudo "$PWD/output/posix/bin/ot-daemon" -I "${VALID_NETIF_NAME}" "${RADIO_URL}" &
@@ -113,6 +113,9 @@ spawn ${OT_CLI_CMD}
send "radiourl\r\n"
expect "${RADIO_URL}"
expect "Done"
send "region\r\n"
expect "US"
expect "Done"
send "panid 0xface\r\n"
expect "Done"
send "ifconfig up\r\n"