These are chat archives for esp8266/Arduino

10th
Jul 2016
Clemens Kirchgatterer
@everslick
Jul 10 2016 09:11
is there a way to temporarily format the second half of the flash (that is normaly used for OTA) as SPIFFS. i don't mind the update to overwrite the SPIFFS. i would re-create it on boot (empty).
Mehrdad K
@mkeyno
Jul 10 2016 12:26
hi , anyone know how to by exit link in webpage ,exit from server.authenticate and remove relate token in browser
Clemens Kirchgatterer
@everslick
Jul 10 2016 15:32
crude, but seems to work ;-P ...
  uint32_t used = ESP.getSketchSize();
  uint32_t size, start, end;

  start = (used + FLASH_SECTOR_SIZE - 1) & (~(FLASH_SECTOR_SIZE - 1));
  end   = (uint32_t)&_SPIFFS_start - 0x40200000;
  size  = end - start;

  SPIFFS.end(); // free current FS implementation
  SPIFFS = FS(fs::FSImplPtr(
    new SPIFFSImpl(start, size, SPIFFS_PAGE, SPIFFS_BLOCK, 3))
  );

  if (SPIFFS.begin()) {
  ....
Shelby Merrick
@forkineye
Jul 10 2016 16:23
Is there any native way to combine both the sketch and SPIFFS into one OTA capable file for upload containing both bins? Or do I need to create my own package format?
Clemens Kirchgatterer
@everslick
Jul 10 2016 17:20
i never heard of a native way to do this.
could be difficult, though. you might have to implement your own updater
Mehrdad K
@mkeyno
Jul 10 2016 17:33
hi guys , sorry for interrupt , do you know how to by exit link in webpage ,exit from server.authenticate and remove related token(cookies) in browser
Me No Dev
@me-no-dev
Jul 10 2016 17:43
make a handler for exit and return server.requestAuthentication()
that will signal the browser that the current auth is bad
Mehrdad K
@mkeyno
Jul 10 2016 17:46
thanks dear @me-no-dev , you mean use empty argument of server.authenticate(www_username, www_password) function
this function set the tokens to empty or somethings else ?
Mehrdad K
@mkeyno
Jul 10 2016 18:00
thanks @me-no-dev it's work