Add note about maximum length for WebREPL password; hide password in make output

This commit is contained in:
Lexi / Zoe 2024-01-27 01:05:46 +01:00
parent 722abc3056
commit 2acda0229c
Signed by: binaryDiv
GPG Key ID: F8D4956E224DA232
3 changed files with 8 additions and 4 deletions

View File

@ -3,7 +3,7 @@ LIGHTBAR_HOST = 192.168.13.12
LIGHTBAR_URL = http://$(LIGHTBAR_HOST)
WEBREPL_CLI = webrepl_cli.py
WEBREPL_HOST = $(LIGHTBAR_HOST)
WEBREPL_PASSWORD = ultra-secret-webrepl-password
WEBREPL_PASSWORD = secret-pw
REPL_TTY_PATH = /dev/ttyUSB0
# Include local config
@ -19,6 +19,9 @@ LIB_UPLOAD_TARGETS := $(patsubst %.py,$(UPLOAD_CACHE_DIR)/%.py.timestamp,$(wildc
# Default target
.DEFAULT_GOAL := upload-reboot
# Make password variable available to the environment so that it doesn't appear in the output
export WEBREPL_PASSWORD
# -- Device control
# Reboot the ESP32 via REST API
@ -46,7 +49,7 @@ upload-reboot: upload-all reboot
# Pattern rules for uploading files to the ESP32 via WebREPL if they were changed since the last upload
$(UPLOAD_CACHE_DIR)/%.py.timestamp :: %.py
$(WEBREPL_CLI) -p $(WEBREPL_PASSWORD) $*.py $(WEBREPL_HOST):/$(subst src/,,$*).py >/dev/null
$(WEBREPL_CLI) -p $$WEBREPL_PASSWORD $*.py $(WEBREPL_HOST):/$(subst src/,,$*).py >/dev/null
@mkdir -p $(@D) && touch $@
# Create necessary directories on the ESP32 filesystem via REPL (not WebREPL!)

View File

@ -5,7 +5,7 @@
LIGHTBAR_HOST := 192.168.13.12
# Password for WebREPL as set in webrepl_cfg.py (used to transfer files to the ESP32)
WEBREPL_PASSWORD := ultra-secret-webrepl-password
WEBREPL_PASSWORD := secret-pw
# Device path to the serial port of the ESP32 when connected via USB
REPL_TTY_PATH := /dev/ttyUSB0

View File

@ -1,4 +1,5 @@
# Example file for WebREPL configuration. Copy to src/webrepl_cfg.py, adjust and upload to the board.
# Define the password for WebREPL here
PASS = 'ultra-secret-webrepl-password'
# IMPORTANT: For *some reason* WebREPL only allows passwords with a maximum length of 9 characters!
PASS = 'secret-pw'