Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Pastebin Link: https://pastebin.com/7HX7ZAtX
- # Written by lovejoy777 1/2/24
- I'm using Linux with conda python manager with python version 3.11.
- # Using an esp-8266 nodemcu v3 board as a wifi adapter for the Agon Light2 (olimex version).
- Link: esp8266 sdk from the Olimex ESP8266EX-how-to-update-firmware.pdf
- https://www.olimex.com/Products/IoT/_resources/esp8266_nonos_sdk_v1.5.1_16_01_08_0.rar
- # Note:1
- The binary files you want from the above link, copy TO ~/Desktop/firm/ (see below).
- boot_v1.5.bin (found in the /bin/ folder).
- user1.2048.new.5.bin (found in the /bin/AT/1024+1024/ folder).
- user2.2048.new.5.bin (found in the /bin/AT/1024+1024/ folder).
- blank.bin (same file used twice), (found in the /bin/ folder).
- esp_init_data_default.bin (found in the /bin/ folder).
- Activate python version (I use conda TO manage my python versions. I used python 3.11).
- $ conda activate py311
- Install esptool, (esptool.py v4.7.0 AT time of writing)
- $ pip install esptool
- Make a directory TO put your firmware binary's in (& download and copy binary's into it).
- $ mkdir ~/Desktop/firm
- See Note:1 above.
- FLASH files with below CODE 1 file AT a time, make sure your nodemcu resets between flashes.
- Without conda I think the normal location FOR the esptool is .local/lib/pythonx.xx/site-packages/esptool.py.
- /dev/ttyUSB0 is my com port, change it TO what ever com port your nodemcu is connected TO.
- Take a note of the Address's for each .bin file to be flashed to.
- FLASH boot_v1.5.bin.
- $ ~/anaconda3/bin/esptool.py -p /dev/ttyUSB0 write_flash -fm dio -fs 4MB 0x00000 ~/Desktop/firm/boot_v1.5.bin
- FLASH user1.2048.new.5.bin.
- $ ~/anaconda3/bin/esptool.py -p /dev/ttyUSB0 write_flash -fm dio -fs 4MB 0x01000 ~/Desktop/firm/user1.2048.new.5.bin
- FLASH user2.2048.new.5.bin.
- $ ~/anaconda3/bin/esptool.py -p /dev/ttyUSB0 write_flash -fm dio -fs 4MB 0x81000 ~/Desktop/firm/user2.2048.new.5.bin
- FLASH blank.bin.
- $ ~/anaconda3/bin/esptool.py -p /dev/ttyUSB0 write_flash -fm dio -fs 4MB 0x1FE000 ~/Desktop/firm/blank.bin
- FLASH esp_init_data_default.bin.
- $ ~/anaconda3/bin/esptool.py -p /dev/ttyUSB0 write_flash -fm dio -fs 4MB 0x1FC000 ~/Desktop/firm/esp_init_data_default.bin
- FLASH blank.bin.
- $ ~/anaconda3/bin/esptool.py -p /dev/ttyUSB0 write_flash -fm dio -fs 4MB 0x1FE000 ~/Desktop/firm/blank.bin
- # Note:2
- I wanted TO make sure every FLASH went well so I disconnected my nodemcu AND reconnected it in-between each FLASH.
- The nodemcu v3 can be powered by either 5v OR 3v3 on the vin pin.
- ** Warning ** DO NOT power the nodemcu by the micro usb whilst its connected TO your Agon, LET the Agon power it with 3v3.
- # Wiring:
- UEXT pin 1 (3v3) TO nodemcu vin pin.
- UEXT pin 2 (gnd) TO nodemcu grd pin.
- UEXT pin 3 (TX ) TO nodemcu RX pin.
- UEXT pin 4 (RX ) TO nodemcu TX pin.
- LOOKING INTO UEXT PORT
- ------ ------
- | 9 | 7 | 5 | 3 | 1 |
- |-------------------|
- | 10| 8 | 6 | 4 | 2 |
- -------------------
- After installing firmware on your nodemcu AND connecting it up TO your Agon Light2 It's time to set it up and get online.
- Head TO nihirash's github (link below) and grab the following files.
- esp-at-tester/bin/tester.bin
- snail/bin/snail.bin
- * esp-update/bin/esp-update.bin (I updated mine manually with AT commands from the tester.bin program so unsure IF this works).
- * netman didn't work for me so not sure if you want this one.
- Link: nihirash's github.
- https://github.com/nihirash/Agon-MOS-Tools/tree/main/esp8266
- create a folder on your Agons sdcard /internet AND place snail.bin & tester.bin inside.
- Insert the sdcard into your Agon AND power on.
- From the mos prompt (*) LOAD /internet/tester.bin
- hopefully you will get a series of OK statements appear. (IF NOT make sure your Agon RX goes TO nodemcu TX etc).
- Following the instructions on the snail browser github readme from the above link DO the following.
- enter the following lines of CODE one AT a time pressing enter after each.
- AT+CWMODE=1 (Set esp TO mode 1).
- AT+CWJAP="your_wifi_ssid_here","your_wifi_password_here" (Set your wifi creds).
- AT+CIFSR (Connect TO wifi network).
- AT+GMR (Check version info).
- AT+CIUPDATE (Update with ota).
- AT+GMR (Check version info, should now be 1.7.5.0 OR above).
- # Note3:
- I tried using it after the above steps AND it didn't work, I then did the following.
- AT+RST (Resets wifi module).
- AT+RESTORE (Restores back TO factory settings).
- AT+CWMODE=1 (Set esp TO mode 1).
- AT+CWJAP="your_wifi_ssid_here","your_wifi_password_here" (Set your wifi creds).
- AT+CIFSR (Connect TO wifi network).
- BYE (Exits tester program).
- Reboot Agon (probably NOT needed but why NOT).
- From the mos prompt (*).
- LOAD /internet/snail.bin
- Enjoy....
- I take no responsibility IF you see the magic smoke, please be careful when connecting things TO the Agons ports.
- Other useful AT commands.
- AT+CWJAP? (Returns wifi creds).
- AT+CWMODE? (Returns wifi mode).
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement