Initial import
This commit is contained in:
commit
dc99db100c
|
@ -0,0 +1,2 @@
|
|||
freakwan/
|
||||
firmware/
|
|
@ -0,0 +1,26 @@
|
|||
Copyright (c) 2023 Daniele Tricoli <eriol@mornie.org>
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
3. Neither the name of the University nor the names of its contributors
|
||||
may be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGE.
|
|
@ -0,0 +1,4 @@
|
|||
# freakwan-setup
|
||||
|
||||
My personal [freakwan](https://github.com/antirez/freakwan) setup.
|
||||
You need [just](https://just.systems) to use it.
|
|
@ -0,0 +1,58 @@
|
|||
serial := "/dev/ttyACM1"
|
||||
freakwan_repository := "git@github.com:eriol/freakwan.git"
|
||||
|
||||
# Connetct to the ESP32 device using serial
|
||||
shell:
|
||||
minicom -D {{serial}} -b 115200
|
||||
# To use screen comment the line above and uncomment the line
|
||||
# belove:
|
||||
# screen {{serial}} 115200
|
||||
|
||||
rshell:
|
||||
rshell -p {{serial}}
|
||||
|
||||
# Deploy freakwan
|
||||
deploy:
|
||||
ampy -p {{serial}} put freakwan/bt.py
|
||||
ampy -p {{serial}} put freakwan/clictrl.py
|
||||
ampy -p {{serial}} put freakwan/font4x6.py
|
||||
ampy -p {{serial}} put freakwan/main.py
|
||||
ampy -p {{serial}} put freakwan/message.py
|
||||
ampy -p {{serial}} put freakwan/scroller.py
|
||||
ampy -p {{serial}} put freakwan/splash.py
|
||||
ampy -p {{serial}} put freakwan/sx1276.py
|
||||
ampy -p {{serial}} put freakwan/wan_config.py
|
||||
|
||||
# Deploy freakwan's config
|
||||
deploy-conf:
|
||||
ampy -p {{serial}} put freakwan/wan_config.py
|
||||
|
||||
# Set the nick in the freakwan config to NICK
|
||||
set-nick NICK:
|
||||
@sed -i "s/\(\s\)\(#\) \(config\['nick'\]=\"\)mynickname\(\"\)/\1\3{{NICK}}\"/" freakwan/wan_config.py
|
||||
|
||||
# This don't work
|
||||
# reset:
|
||||
# ampy -p {{serial}} reset
|
||||
|
||||
# Erase board memory
|
||||
erase:
|
||||
esptool.py --chip esp32 --port {{serial}} erase_flash
|
||||
|
||||
# Donwload freakwan
|
||||
download-freakwan:
|
||||
git clone {{freakwan_repository}}
|
||||
|
||||
# Donwload the firmware for LILYGO TTGO LoRa32
|
||||
download-firmware:
|
||||
# See https://micropython.org/download/LILYGO_TTGO_LORA32/
|
||||
# for details.
|
||||
mkdir firmware
|
||||
curl https://micropython.org/resources/firmware/LILYGO_TTGO_LORA32-20220618-v1.19.1.bin --output firmware/LILYGO_TTGO_LORA32-20220618-v1.19.1.bin
|
||||
|
||||
# Flash the firmare
|
||||
firmware:
|
||||
esptool.py --chip esp32 --port {{serial}} --baud 460800 write_flash -z 0x1000 firmware/LILYGO_TTGO_LORA32-20220618-v1.19.1.bin
|
||||
|
||||
# Erase borad memory, flash the firmware and deploy freakwan
|
||||
coldstart: erase firmware deploy
|
Loading…
Reference in New Issue