mirror of
https://github.com/espressif/openthread.git
synced 2026-09-01 23:09:53 +00:00
[posix] clean up for radio url (#5027)
* fix max-power-table documentation * rename `baudrate` to `uart-baudrate`, `arg` to `forkpty-arg` * update command line enumeration * update README * remove trailing argument from node.py
This commit is contained in:
@@ -27,7 +27,7 @@
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
spawn $env(OT_COMMAND) "spinel+hdlc+uart://$env(RCP_COMMAND)?arg=1"
|
||||
spawn $env(OT_COMMAND) "spinel+hdlc+uart://$env(RCP_COMMAND)?forkpty-arg=1"
|
||||
set timeout 1
|
||||
expect_after {
|
||||
timeout { exit 1 }
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
#
|
||||
|
||||
# allows 11-25 and forbidden 26
|
||||
spawn $env(OT_COMMAND) "spinel+hdlc+uart://$env(RCP_COMMAND)?max-power-table=11,12,13,14,15,16,17,18,19,20,21,22,23,24,-1,0x7f&arg=1"
|
||||
spawn $env(OT_COMMAND) "spinel+hdlc+uart://$env(RCP_COMMAND)?max-power-table=11,12,13,14,15,16,17,18,19,20,21,22,23,24,-1,0x7f&forkpty-arg=1"
|
||||
set timeout 1
|
||||
expect_after {
|
||||
timeout { exit 1 }
|
||||
@@ -42,7 +42,7 @@ expect "Done"
|
||||
send "\x04"
|
||||
expect eof
|
||||
# allows all channels by default
|
||||
spawn $env(OT_COMMAND) "spinel+hdlc+uart://$env(RCP_COMMAND)?arg=1"
|
||||
spawn $env(OT_COMMAND) "spinel+hdlc+uart://$env(RCP_COMMAND)?forkpty-arg=1"
|
||||
set timeout 1
|
||||
expect_after {
|
||||
timeout { exit 1 }
|
||||
|
||||
@@ -108,8 +108,10 @@ class Node:
|
||||
cmd = '%s/examples/apps/cli/ot-cli-%s' % (srcdir, mode)
|
||||
|
||||
if 'RADIO_DEVICE' in os.environ:
|
||||
cmd += ' -v spinel+hdlc+uart://%s?arg=%d' % (
|
||||
cmd += ' -v spinel+hdlc+uart://%s?forkpty-arg=%d' % (
|
||||
os.environ['RADIO_DEVICE'], nodeid)
|
||||
else:
|
||||
cmd += ' %d' % nodeid
|
||||
|
||||
# Load Thread 1.1 node when testing Thread 1.2 scenarios for interoperability
|
||||
elif self.version == '1.1':
|
||||
@@ -121,10 +123,11 @@ class Node:
|
||||
cmd = '%s/examples/apps/cli/ot-cli-%s' % (srcdir, mode)
|
||||
|
||||
if 'RADIO_DEVICE_1_1' in os.environ:
|
||||
cmd += ' -v spinel+hdlc+uart://%s?arg=%d' % (
|
||||
cmd += ' -v spinel+hdlc+uart://%s?forkpty-arg=%d' % (
|
||||
os.environ['RADIO_DEVICE_1_1'], nodeid)
|
||||
else:
|
||||
cmd += ' %d' % nodeid
|
||||
|
||||
cmd += ' %d' % nodeid
|
||||
print("%s" % cmd)
|
||||
|
||||
self.pexpect = pexpect.popen_spawn.PopenSpawn(cmd, timeout=4)
|
||||
@@ -148,7 +151,7 @@ class Node:
|
||||
# If Thread version of node matches the testing environment version.
|
||||
if self.version == self.env_version:
|
||||
if 'RADIO_DEVICE' in os.environ:
|
||||
args = ' spinel+hdlc+uart://%s?arg=%d' % (
|
||||
args = ' spinel+hdlc+uart://%s?forkpty-arg=%d' % (
|
||||
os.environ['RADIO_DEVICE'], nodeid)
|
||||
else:
|
||||
args = ''
|
||||
@@ -187,7 +190,7 @@ class Node:
|
||||
# Load Thread 1.1 node when testing Thread 1.2 scenarios for interoperability.
|
||||
elif self.version == '1.1':
|
||||
if 'RADIO_DEVICE_1_1' in os.environ:
|
||||
args = ' spinel+hdlc+uart://%s?arg=%d' % (
|
||||
args = ' spinel+hdlc+uart://%s?forkpty-arg=%d' % (
|
||||
os.environ['RADIO_DEVICE_1_1'], nodeid)
|
||||
else:
|
||||
args = ''
|
||||
|
||||
Reference in New Issue
Block a user