diff --git a/tools/remoteFlash.sh b/tools/remoteFlash.sh index 4aaaaeb..fa8e440 100755 --- a/tools/remoteFlash.sh +++ b/tools/remoteFlash.sh @@ -26,7 +26,8 @@ if [ $? -ne 0 ]; then fi echo "Upgrading $IP" -echo "stopWordclock()" | nc $IP 80 +echo "stopWordclock()" > /tmp/wordClockCMD.txt +$FLASHTOOL -f /tmp/wordClockCMD.txt -t $IP -v FILES="displayword.lua main.lua timecore.lua webpage.html webserver.lua wordclock.lua init.lua" diff --git a/tools/tcpFlash.py b/tools/tcpFlash.py index 5a82873..6059719 100755 --- a/tools/tcpFlash.py +++ b/tools/tcpFlash.py @@ -112,7 +112,7 @@ def main(nodeip, luafile, volatile=None): sys.exit(4) # Check if the file exists: - if (not sendRecv(s, "=file.open(\"" + luafile + "\")", "true")): + if (not sendRecv(s, "=file.exists(\"" + luafile + "\")", "true")): print("Cannot send " + luafile + " to the ESP") sys.exit(4) else: