doc: checkin

This commit is contained in:
decentclock
2022-10-31 14:36:41 -04:00
parent 043262c231
commit fe67f24062
2 changed files with 44 additions and 4 deletions

39
monitor.sh Executable file
View File

@@ -0,0 +1,39 @@
check_exists() {
command -v "$1" > /dev/null
}
check_port() {
cargo espflash board-info "$1" &> /dev/null
}
if ! check_exists esptool.py
then
echo "esptool.py not installed!"
echo "install with this command: pip install esptool"
exit 1
fi
if ! check_exists ldproxy
then
echo "ldproxy not installed!"
echo "install with this command: cargo install ldproxy"
exit 1
fi
if ! check_exists cargo-espflash
then
echo "cargo-espflash not installed!"
echo "install with this command: cargo install cargo-espflash"
exit 1
fi
for FILE in /dev/tty.*
do
if check_port $FILE
then
PORT=$FILE
break
fi
done
if [ -z "$PORT" ]
then
echo "ESP likely not connected! Exiting now."
echo "Make sure the ESP is connected with a data USB cable, and try again."
exit 1
fi
cargo espflash serial-monitor $PORT

View File

@@ -32,11 +32,11 @@ cargo install cargo-espflash ldproxy
- In the `~/sphinx-key/tester` directory, create a file `.env` with the settings shown below: - In the `~/sphinx-key/tester` directory, create a file `.env` with the settings shown below:
``` ```
SSID="name of your home wifi - signer will use that to connect to the internet and ping the remote node" SSID="foo" # name of your home wifi - signer will use that to connect to the internet and ping the remote node
PASS="password of your home wifi" PASS="bar" # password of your home wifi
BROKER="xx.xx.xx.xx:xxxx" # IP address and port your broker is listening on on your remote server. BROKER="00.00.00.00:0000" # IP address and port your broker is listening on on your remote server.
NETWORK="regtest" NETWORK="regtest"
SEED=c7629e0f2edf1be66f01c0824022c5d30756ffa0f17213d2be463a458d200803 # You can use the script at ~/sphinx-key/sphinx-key/newseed.sh to generate a fresh seed. SEED=c7629e0f2edf1be66f01c0824022c5d30756ffa0f17213d2be463a458d200803 # you can use the script at ~/sphinx-key/sphinx-key/newseed.sh to generate a fresh seed.
``` ```
- Connect to the very first wifi network you specified above, enter the password, and then in `~/sphinx-key/tester` run `cargo run --bin config`. - Connect to the very first wifi network you specified above, enter the password, and then in `~/sphinx-key/tester` run `cargo run --bin config`.
@@ -49,6 +49,7 @@ SEED=c7629e0f2edf1be66f01c0824022c5d30756ffa0f17213d2be463a458d200803 # You can
- On the logs, you should see `BROKER IP AND PORT` and `LED STATUS: ConnectingToMqtt` - On the logs, you should see `BROKER IP AND PORT` and `LED STATUS: ConnectingToMqtt`
- Now that the signer is configured, and pinging for the node, we'll proceed with setting up the node on the remote server. - Now that the signer is configured, and pinging for the node, we'll proceed with setting up the node on the remote server.
- You can take a break here if you want, just unplug and plug the signer back in - all the settings you configured up until now are written to non-volatile flash memory. - You can take a break here if you want, just unplug and plug the signer back in - all the settings you configured up until now are written to non-volatile flash memory.
- After you plug the signer back in, launch `cd ~/sphinx-key && ./monitor.sh` to print the logs to your screen once again.
### Remote Node Setup ### Remote Node Setup