blob: 4d74d722738882a9c08e7993b2381f6e3c614a1e [file] [log] [blame]
#!/bin/bash
# Copyright 2019 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
set -e
#### CATEGORY=Run, inspect and debug
### start an overnet host-pipe to target device
source "$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"/../lib/vars.sh || exit $?
fx-config-read
onet="$FUCHSIA_BUILD_DIR/host-tools/onet"
if ! echo 'conntest' | socat - /tmp/ascendd; then
fx-error "ascendd may not be running, overnet connection may fail"
fx-error "Run \`fx ascendd\` to start ascendd"
fi
socat EXEC:"$onet host-pipe" EXEC:"$FUCHSIA_DIR/scripts/fx shell onet host-pipe"