The Oak by Digistump > Oak Support

Digistump / Oak dead ?

<< < (2/2)

exeng:
Chad and Dynek,

I moved my Oaks to the ESP8266 Arduino Core months ago and have not looked back. Works great. I use the FTDI Friend from Adafruit for USB flashing to convert (on a Windows system) but once converted, I use OTA for subsequent flashing. Again, it works great. You just need to make sure your sketches include the requisite OTA code to support OTA flashing.  Also, depending upon the structure of you code, you need to be mindful of the ratio of time spent in "loop" doing whatever your code is written for versus the time (or opportunity) the OTA handler gets to run.  If the OTA handler is blocked for long periods, the OTA update attempt may timeout and require retries.  If the retries required are too many for your liking, you can sprinkle in more opportunities for the OTA handler to run in your sketch loop.

dynek:
I have the USB2Serial Adapter from Arduino: https://store.arduino.cc/arduino-usb-2-serial-micro
I'd guess this would do the trick as well?

Now, does it mean I need to put the Oak/ESP in flash mode, etc.? How do you guys do it?

Also, if I then wanted to flash the device OTA, I just need to add that capability inside of my sketch? Did I get it right? Any example?

Thank you

dynek:
OK P2 -> GND apparently but then I get:


--- Code: ---Executable segment sizes:
IROM   : 227612          - code in flash         (default or ICACHE_FLASH_ATTR)
IRAM   : 26768   / 32768 - code in IRAM          (ICACHE_RAM_ATTR, ISRs...)
DATA   : 1252  )         - initialized variables (global, static) in RAM/HEAP
RODATA : 672   ) / 81920 - constants             (global, static) in RAM/HEAP
BSS    : 24880 )         - zeroed variables      (global, static) in RAM/HEAP
Sketch uses 256304 bytes (24%) of program storage space. Maximum is 1044464 bytes.
Global variables use 26804 bytes (32%) of dynamic memory, leaving 55116 bytes for local variables. Maximum is 81920 bytes.
esptool.py v2.8
Serial port /dev/cu.usbmodem14101
Connecting....
Chip is ESP8266EX
Features: WiFi
Crystal is 26MHz
MAC: 5c:cf:[..]
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
Traceback (most recent call last):
[..]
esptool.FatalError: Timed out waiting for packet header
esptool.FatalError: Timed out waiting for packet header

--- End code ---

dynek:
OK had to lower flashing/upload speed to 115200. Seems to work OK, cool stuff!

dynek:
And finally OTA updates work! Fantastic.

I will still need to keep a way to upload the firmware from scratch, cause I would guess OTA updates could be made unavailable if the sketch has a problem.

Navigation

[0] Message Index

[*] Previous page

Go to full version