-
Notifications
You must be signed in to change notification settings - Fork 36
How to compile the OTGW firmware
Thanks to @DaveDavenport and @hvxl for making it work on Linux based machine.
sudo apt update
sudo apt install build-essential make git
Install arduino-cli following instructions from https://arduino.github.io/arduino-cli/0.19/installation/
git clone https://github.com/rvdbreemen/OTGW-firmware
cd OTGW-firmware
make
make filesystem
When you do this, you will find the results in the build directory. You should find littlefs.bin and OTGW-firmware.ino.bin.
- At an administrator command prompt type
wsl --install -d ubuntu - Start Ubuntu App (press start, and just type ubuntu, and start it)
- Create a username and password
Then follow the instructions above to build the binary files.
To compile the OTGW firmware there are several things you will need.
-
Install Arduino IDE
-
Unzip the source into a local folder on your PC called
OTGW-firmware -
Open Arduino IDE then use File -> Open to load OTGW-firmware.ino
-
Use Tools -> Manage Libraries to obtain these additional libraries:
| TYPE | NAME | VERSION | REPO | COMMIT |
|---|---|---|---|---|
| package | ESP8266 board | v3.0.2 | esp8266/Arduino@2843a5ac | |
| library | ArduinoJson | v6.17.2 | https://arduinojson.org/ | bblanchon/ArduinoJson@1360b6a396e096365c917a5518cf29aeac6c9444 |
| library | pubsubclient | v2.8.0 | https://github.com/knolleary/pubsubclient | knolleary/pubsubclient@2d228f2f862a95846c65a8518c79f48dfc8f188c |
| library | WiFiManager | 2.0.15-rc.1 | https://github.com/tzapu/WiFiManager | tzapu/WiFiManager@16bd0f4f3cf63f495b6e4fc14a7a5867eab328a1 |
| library | TelnetStream | v1.2.2 | https://github.com/jandrassy/TelnetStream | jandrassy/TelnetStream@16c07e97ee83f2a094706044d1e24d7fdb1c6265 |
| library | Acetime | v2.0.1 | https://github.com/bxparks/AceTime | bxparks/AceTime@5ad947f3df2af87508772a2157a5d8c52ab3ebf6 |
| library | OneWire | v2.3.6 | https://github.com/PaulStoffregen/OneWire | PaulStoffregen/OneWire@c61ed2389f7b748cda056053da8accbbc580218a |
| library | DallasTemperature | v3.9.0 | https://github.com/milesburton/Arduino-Temperature-Control-Library | milesburton/Arduino-Temperature-Control-Library@d66fec48c33f58af816abe5299863bc444078d6a |
-
Add ESP8266 to Arduino IDE: https://randomnerdtutorials.com/how-to-install-esp8266-board-arduino-ide/
-
Compile the project using Sketch -> Verify
-
If the ESP8266 isn't already running, connect it to your computer with a MicroUSB lead then upload using Sketch -> Upload. Subsequent software updates can be performed by entering FSexplorer and selecting Update Firmware.
-
After uploading the code you need to upload the files in the data directory. How to upload files to LittleFS
-
Once you have Arduino working you might wish to install Visual Studio Code and the Arduino extension.
If you want to autogenerate the build numbers (like I do in my IDE). Then add you can find out how I auto increment my projects using some handy scripting. Just check out my other repo on that: https://github.com/rvdbreemen/autoinc-semver