Author Topic: Changing from Oak/Particle to generic ESP8266 code with serial and OTA updates  (Read 37805 times)


  • Sr. Member
  • ****
  • Posts: 454
You have got to be kidding me!.... Grabbed another Oak to de-Particle (since it had failed back to a ready to upload state and was not running the loaded sketch) and just for fun tried to upload the simple LED blink code using Particle. It took about 4 to 5 retires but damn it loaded the sketch. It's just maddening knowing that is probably some stupid but simple bug that is causing it to be unreliable.  Does anyone have a clue?  Erik is probably the best resource but he seems busy with other more profitable things.

UPDATE: Well the successful upload via Particle (after 4 to 5 retries) was just a one time event.  It's back to endless retries with no success, so that's it, time to de-Particle the rest of my Oak's and be done with it.  I'm probably the last one to do this.  I assume most, if not all, Oak owners have already moved on and removed their Oak's from Particle.
« Last Edit: May 11, 2019, 08:46:36 pm by exeng »


  • Sr. Member
  • ****
  • Posts: 454
Just an update: Converted 4 of 5 built Oaks to non-Particle generic ESP8266s and couldn't be happier.  They are all up and running doing their job as monitors for weather, garage door, and an aggregate OLED display of all their feeds through Thingspeak and control via Blynk.  Gone are the fights and failures with Particle OTA. Now I can focus on developing again. The only reason the 5th one has not been converted is I need a temperature probe to complete a pool temp monitor. My old one bit the dust. Also, have 5 more new Oaks looking for something to do.

If you are still fighting Particle, convert. It's not that hard. Be sure to back up your Oaks and keep a record of the device IDs just in case the Particle stuff is fixed down the road.

« Last Edit: May 21, 2019, 07:14:07 pm by exeng »


  • Newbie
  • *
  • Posts: 6
Glad to see that the wiki is still active. I'm about to de-Particle my Oaks and get them to be useful. Thanks to all for the guidance - wish me luck!


  • Hero Member
  • *****
  • Posts: 881
Glad to hear you're liking life post Particle... it is sad that things didn't work out with the Particle integration... but not point dwelling over it. I've not regretted moving mine over to the official ESP8266 Arduino core... get all the bells and whistles that come with all the improvements they've made to their core since Erik forked it for the Oak, and their OTA support is such much better now... and if you want to do remote upload you can still do that if you want.


  • Newbie
  • *
  • Posts: 1
Is this still valid in 2020? I bought few oaks in kickstarter struggled at the beginning so they went in a box and now I have found them again and wanted to put them to good use.


  • Newbie
  • *
  • Posts: 6
Yep, still valid for the most part.  Once you move away from the broken Particle environment, the Oak is basically just an ESP-12F module plus power supply regulation, and with a quasi-Digispark-compatible pin layout.  The ESP8266 Arduino core now supports Oak directly so you don't need to use the special core here - you just need a 3.3v serial interface to flash code into it.  Have fun!


  • Newbie
  • *
  • Posts: 2
I have converted one of my Oaks to Arduino ESP8266 Core a while back and it worked fine. But now when I reflashed it with Platform.IO and left it off overnight it would not boot anymore and upon inspection it just kept drawing about 500 mA at 3.3 V while cooking itself silly quite in a hurry.

I thought it was just bad luck but when the same happened to two of the other Oaks I was left completely baffled.

The last one was flashed multiple times, restarted and everything worked fine, but as soon as I completely removed it's supply voltage (not using the reset pin to restart it) it went into the same unresponsive power hungry state as the others.

None of them will respond on the serial port, even though I try to start them in serial programming mode by holding P2 to GND and they just sit there trying to crisp themselves with 450 to 800 mA of current at 3.3 V.

Does anyone have an idea if they are salvageable or should I just forget about them, toss them in the bin and get a more mainstream ESP board?


  • Newbie
  • *
  • Posts: 2
Nog3's blog referenced in the first post has been wiped. It does live on in the Internet Archive though (bless their hearts - they've saved me countless times recovering old hack documentation - donate!)

I'll repost the text of it here... If Nog3 doesn't like it, he can bloody well restore his blog.
So a while back I backed the Digistump Oak Kickstarter. I thought these boards were great and I'd supported other Digistump projects by backing or purchasing Erik's dev boards.

One of the big drawcards was over the air updates via Particle and at the time the ESP8266 Arduino Core didn't have great OTA support so this was win-win. (It's now waaaay better.)

Now the boards are great and the Oak support for arduino and the firmware was solid. The one thing I never found consistantly solid however was the Particle OTA support. I'd be able to flash it successfully a few times, come back a few months later and then flashing would just randomly and annoyingly fail.

Each time it failed I'd spend days troubleshooting, manually wiping the firmware/bootloader and replacing it until it kinda worked. The Oaks would phone home properly to Particle and show up on the Dashboard but would either stop recieving data during a flash or just stop responding.

Eventually when I came back to work on a project I'd built on the Oak pinout I finally gave in as I spent all the time I'd intended to use for development on fault finding the Particle OTA.

At its core, the Oak is simply an ESP8266 12E with a 4mb flash on it. I've had plenty of experience flashing them using and esptool-ck, so I did what any self respecting person did.

Firstly, I wired a Serial -> USB Adaptor to it: was a good primer for how to wire it and install

Make sure you connect P2 to ground, or the ESP8266 will not boot into serial flash mode.
My setup looks like this. (missing pic)

Then I backed it up using
Code: [Select]
python --baud 115200 --port /dev/tty.SLAB_USBtoUART read_flash 0x000000 0x400000 flash_devicenumber.bin
You will definitely need to adjust the --port part of this command to suit your circumstances (COM on windows, usually /dev/tty. on mac and similar on linux) and make sure you put the device number or a friendly name in for your.bin file so if you ever have to go back you're not totally screwed.

Then, I wiped it with
Code: [Select]
python --baud 115200 --port /dev/tty.SLAB_USBtoUART erase_flash
Again, change the port to whatever port your serial-usb adaptor shows up as on your relvant OS.

Your Digispark Oak is now Particle free
But it's still not entirely usable. At this point you could:

Flash it using the Arduino ESP8266 Core and use ESP8266 OTA
Flash it with Nodemcu (Lua), Micropython, Espruino or half a dozen other projects.
I expect most people will want the first option as it means you can use local or HTTP based Over The Air updating.

But we need to tell the Arduino ESP8266 Core about the Digispark Oak as the pin numbers on the board don't match what pins are being used on the ESP8266.

Telling Arduino about Oak's pins.
First thing you'll need to do is to create a variant in the hardware folder for the ESP8266 core. These instructions are assuming you've already installed the core.

On Windows 10, this is in your user's Documents folder. The full address will look something like:
Code: [Select]
On Mac, it's in your user's Library folder, so the location is:
Code: [Select]
The version numbers may change when new releases of the core come out, so you will need to double-check.

To begin, unzip this zip file in the variants folder. This should create a folder called DigiStumpOak with a file inside it called Pins_Arduino.h . For those of you who'd rather not download a zip file, here's a gist with it.

Then, we will need to add some lines to boards.txt, which is in the folder above the variants folder.

At the end of the boards.txt file, add the following:
Code: [Select]
############################################################## Oak

view rawaddtoboards.txt hosted with ❤ by GitHub
Congrats, you're done!
At this point, you can now reopen the Arduino IDE and you should end up seeing another board in your Boards menu under Tools.

I may submit this upstream as a new board definition for the Arduino ESP8266 core, but that will take a little bit to be added.

If you've found this useful, please let me know.