ESP8266/OTA: Difference between revisions

From Noisebridge
Jump to navigation Jump to search
ESP8266 (talk | contribs)
Memory probe #ff6600
ESP8266 (talk | contribs)
mNo edit summary
Line 1: Line 1:
Exploring Over The Air (OTA) updates.
Exploring Over The Air (OTA) updates.
* https://harizanov.com/2015/06/firmware-over-the-air-fota-for-esp8266-soc/


There is an OTA option in the Arduino IDE, however there doesn't seem to be much on how to use it.
There is an OTA option in the Arduino IDE, however there doesn't seem to be much on how to use it.
* https://github.com/esp8266/Arduino/tree/master/libraries/ArduinoOTA


It's also important to know the flash memory size, ESP.getFlashChipSize() may be useful.
It's also important to know the flash memory size, ESP.getFlashChipSize() may be useful.
Line 7: Line 11:
<pre>
<pre>
void setup() {
void setup() {
  // put your setup code here, to run once:
   Serial.begin(115200);
   Serial.begin(115200);
   Serial.println("Flash Memory Stuff");
   Serial.println("Flash Memory Stuff");


   Serial.println("ESP ID: ");
   Serial.println("ESP ID: ");
   Serial.println(ESP.getChipId());
   Serial.println(ESP.getChipId(), HEX);
   
   
   Serial.println("Flash ID: ");
   Serial.println("Flash ID: ");
   Serial.println(ESP.getFlashChipId());
   Serial.println(ESP.getFlashChipId(), HEX);
   Serial.println("Flash Size: ");
   Serial.println("Flash Size: ");
   Serial.println(ESP.getFlashChipSize());
   Serial.println(ESP.getFlashChipSize());
Line 22: Line 24:
   Serial.println(ESP.getFlashChipSpeed());
   Serial.println(ESP.getFlashChipSpeed());
}
}
</pre>
</pre>


Serial output from an ESP-01
Serial output from an ESP-01
<pre>
<pre>
Flash Memory Stuff
ESP ID:  
ESP ID:  
14478709
DCED75
Flash ID:  
Flash ID:  
1327328
1440E0
Flash Size:  
Flash Size:  
524288
4194304
Flash Speed:  
Flash Speed:  
40000000
40000000
</pre>
</pre>
 
''Note: Updated to HEX formatting of numbers. Flash Size returned seems to be whatever option you have set in the IDE, and may not reference the actual hardware size.
 
* https://harizanov.com/2015/06/firmware-over-the-air-fota-for-esp8266-soc/

Revision as of 18:57, 3 November 2015

Exploring Over The Air (OTA) updates.

There is an OTA option in the Arduino IDE, however there doesn't seem to be much on how to use it.

It's also important to know the flash memory size, ESP.getFlashChipSize() may be useful.

void setup() {
  Serial.begin(115200);
  Serial.println("Flash Memory Stuff");

  Serial.println("ESP ID: ");
  Serial.println(ESP.getChipId(), HEX);
 
  Serial.println("Flash ID: ");
  Serial.println(ESP.getFlashChipId(), HEX);
  Serial.println("Flash Size: ");
  Serial.println(ESP.getFlashChipSize());
  Serial.println("Flash Speed: ");
  Serial.println(ESP.getFlashChipSpeed());
}

Serial output from an ESP-01

ESP ID: 
DCED75
Flash ID: 
1440E0
Flash Size: 
4194304
Flash Speed: 
40000000

Note: Updated to HEX formatting of numbers. Flash Size returned seems to be whatever option you have set in the IDE, and may not reference the actual hardware size.