Lines Matching +full:- +full:r

30 set -e
31 set -x
44 sudo killall ot-ctl || true
45 sudo killall ot-daemon || true
46 sudo killall ot-cli || true
47 sudo killall ot-rcp || true
55 if [[ "$(head -n2 "$SOCAT_OUTPUT" | wc -l | tr -d ' ')" == 2 ]]; then
56 RADIO_PTY=$(head -n1 "$SOCAT_OUTPUT" | grep -o '/dev/.\+')
57 CORE_PTY=$(head -n2 "$SOCAT_OUTPUT" | tail -n1 | grep -o '/dev/.\+')
67 if grep -q leader "$OT_OUTPUT"; then
82 count=$((count - 1))
92 ./script/cmake-build simulation
93 …cript/cmake-build posix -DOT_PLATFORM_NETIF=1 -DOT_PLATFORM_UDP=1 -DOT_UDP_FORWARD=0 -DOT_POSIX_MA…
100 sudo rm -rf tmp
102 SOCAT_OUTPUT=/tmp/ot-socat
103 OT_OUTPUT=/tmp/ot-output
104 socat -d -d pty,raw,echo=0 pty,raw,echo=0 >/dev/null 2>$SOCAT_OUTPUT &
109 RADIO_NCP_PATH="$PWD/build/simulation/examples/apps/ncp/ot-rcp"
118 …RADIO_URL="spinel+hdlc+uart://${CORE_PTY}?region=US&max-power-table=11,12,13,14,15,16,17,18,19,20,…
121 …sudo -E "$PWD/build/posix/src/posix/ot-daemon" -d7 -v -I "${VALID_NETIF_NAME}" "${RADIO_URL}" 2>&1…
124 NETIF_NAME=$(grep -o 'Thread interface: .\+' "${OT_OUTPUT}" | cut -d: -f2 | tr -d ' \r\n')
125 OT_CTL_PATH="$PWD/build/posix/src/posix/ot-ctl"
131 …"${OT_CTL[@]}" -I "${NETIF_NAME}" panid 0xface | grep 'Done' || die 'failed to set panid with ot-c…
133 # verify supports options in OpenThread commands without separator --
134 "${OT_CTL[@]}" -I "${NETIF_NAME}" pskc -p 123456 | grep 'Done' || die 'unable to set pskc'
137 "${OT_CTL[@]}" -I "${NETIF_NAME}" reset
140 "${OT_CTL[@]}" -I "${NETIF_NAME}" factoryreset
146 local -r kMaxStringLength="$((OPENTHREAD_CONFIG_CLI_MAX_LINE_LENGTH - 1))"
150 "${OT_CTL[@]}" -I "${NETIF_NAME}" "$(printf '1%.0s' $(seq 1 "${len}"))"
155 if "${OT_CTL[@]}" -I "${NETIF_NAME}" "$(printf '1%.0s' $(seq 1 "${len}"))"; then
158 OT_CLI_CMD="${OT_CTL[*]} -I ${NETIF_NAME}"
160 OT_CLI="$PWD/build/posix/src/posix/ot-cli"
161 sudo "${OT_CLI}" -I "${VALID_NETIF_NAME}" -n "${RADIO_URL}"
167 sudo "${OT_CLI}" -I "${INVALID_NETIF_NAME}" -n "${RADIO_URL}" || test $? = 2
169 OT_CLI_CMD="$PWD/build/posix/src/posix/ot-cli ${RADIO_URL}"
177 send "region\r\n"
180 send "dataset init new\r\n"
182 send "dataset commit active\r\n"
184 send "routerselectionjitter 1\r\n"
186 send "ifconfig up\r\n"
188 send "thread start\r\n"
191 send "state\r\n"
194 send "extaddr\r\n"
196 send "dataset active\r\n"
198 send "ipaddr\r\n"
200 send "coex\r\n"
202 send "coap start\r\n"
204 send "coap resource TestResource\r\n"
206 send "coap set TestContent\r\n"
208 set timeout -1
220 netstat -an | grep -q 5683 || die 'Application CoAP port is not available!'
222 extaddr=$(grep -ao -A +1 'extaddr' $OT_OUTPUT | tail -n1 | tr -d '\r\n\0')
225 prefix=$(grep -ao 'Mesh Local Prefix: [0-9a-f:]\+' $OT_OUTPUT | cut -d: -f2- | tr -d ' \r\n')
229 [[ $OSTYPE == "linux-gnu"* ]] || return 0
232 sudo killall -9 expect || true
233 sudo killall -9 ot-ctl || true
234 NETIF_INDEX=$(ip link show "${NETIF_NAME}" | cut -f 1 -d ":" | head -n 1)
241 coap_response=$(coap-client -B 5 -m GET "coap://[${LEADER_ALOC}]:5683/TestResource")
252 …coap_response=$(echo -n '120100' | xxd -r -p | coap-client -B 5 -m POST "coap://[${LEADER_ALOC}]:6…
255 if [[ -z ${coap_response} ]]; then