Forward port 8080 via USB

main
jebba 2022-01-25 16:29:06 -07:00
parent b711b52a5e
commit 6f6facae0f
2 changed files with 18 additions and 0 deletions

View File

@ -24,6 +24,7 @@ Current scripts:
* `pysalx-api-config` --- Get analyzer configuration via API.
* `pysalx-api-id` --- Get analyzer ID via API.
* `pysalx-api-port` --- Forward web port 8080 via USB to localhost.
* `pysalx-api-status` --- Get analyzer status via API.
* `pysalx-api-test` --- Do Analyzer test via API.
* `pysalx-api-wlcalibration` --- Get analyzer wavelength calibration via API.

View File

@ -0,0 +1,17 @@
#!/bin/bash
# The API listens on port 8080 on the device.
# That can be connected to while using the device's
# shell (e.g. `adb shell`), or remotely via the
# DHCP assigned IP or the static IP 192.168.42.129.
#
# This script will allow you to access the device's API,
# when plugged in via USB, on port 8080 of the local
# workstation.
# So, for example after running this, you can hit this
# from the workstation:
# http://127.0.0.1:8080/api/v2/status
set -x
adb forward tcp:8080 tcp:8080