0 votes
in ESPaper by (120 points)
I brought my espaper2.9 to get it up and running again, and in the process of troubleshooting wifi connectivity removed the device from the espaper.com registration and reset teh firmware.  I am able to connect to wifi now, and it does appear to be hitting the espaper.com endpoint, however the screen stays blank and I am not able to get a claim code to create a new registration for the device.  I tried using teh device ID from the serial watcher (and a few other things like mac address) but can't seem to reestablish the registration :(
by (19.9k points)
I doesn't look like you have any devices registered currently. Can you please make the output on the serial console available here (redact WiFi credentials). In case it's not contained there please also report the device MAC address.
by (120 points)
08:29:01.498 -> Boot sequence arrived in setup()
08:29:01.498 -> ******** Client Version: "V030" ********
08:29:01.498 -> ******** Device Type: "Espaper29Bw" ********
08:29:01.533 -> ******** Screen Type: "" ********
08:29:01.533 -> Display Settings. CS: 15, RST: 2, DC: 5, BUSY: 4
08:29:01.908 -> Current free heap: 45080
08:29:02.694 -> Checking FS
08:29:02.727 -> WIFI_SSID = [redacted]
08:29:02.727 -> WIFI_PASS = [redacted]
08:29:02.727 -> UPDATE_INTERVAL_MINS = [20]
08:29:02.727 -> TIMEZONE = [America/Los_Angeles PST8PDT,M3.2.0,M11.1.0]
08:29:02.727 -> NTP_SERVERS = [0.pool.ntp.org,1.pool.ntp.org,2.pool.ntp.org]
08:29:02.727 -> DEVICE_ID = [feefeeeb-5287-4fe2-8107-a118d14f1222]
08:29:02.727 -> DEVICE_SECRET =[redacted]
08:29:02.727 -> Loaded config
08:29:02.727 -> TOTAL_DEVICE_STARTS = [1]
08:29:02.761 -> SUCCESSFUL_DEVICE_STARTS = [1]
08:29:02.761 -> LAST_NTP_SYNC_TIME = [1572015649]
08:29:02.761 -> STARTS_WITHOUT_NTP_SYNC = [0]
08:29:02.761 -> LAST_CYCLE_DURATION = [16417]
08:29:02.761 -> ACTION_AFTER_REBOOT = [0]
08:29:02.761 -> Loaded data file
08:29:02.761 -> Saved values in data file.
08:29:02.761 -> Button state: 1
08:29:02.761 ->
08:29:02.761 ->
08:29:02.761 -> ***Time before connecting to WiFi 1308
08:29:02.761 -> Reconnecting
08:29:02.829 -> WiFi connect.........................................................192.168.0.153
08:29:09.573 -> NTP sync.
08:29:09.842 -> Current time: 1572103749
08:29:09.877 ->
08:29:09.877 ->
08:29:09.877 -> ***Time before going to fetching data 8405
08:29:09.877 -> Downloading resource from:
08:29:09.877 ->     Scheme: https
08:29:09.877 ->     Host: www.espaper.com
08:29:09.877 ->     Port: 443
08:29:09.877 ->     Path: /public/devices/feefeeeb-5287-4fe2-8107-a118d14f1222/screen
08:29:09.877 -> Using secure WiFi client
08:29:09.877 -> [HTTP] configuring server root cert in client
08:29:10.498 -> MFLN supported: no
08:29:10.498 -> [HTTP] begin...
08:29:10.498 -> Connecting to www.espaper.com:443
08:29:10.498 -> Free mem: 34376
08:29:11.901 -> Sending request: GET /public/devices/feefeeeb-5287-4fe2-8107-a118d14f1222/screen HTTP/1.1
08:29:11.901 -> Host: www.espaper.com
08:29:11.901 -> User-Agent: ESPaperClient/1.0
08:29:11.901 -> X-ESPAPER-BATTERY: 1010
08:29:11.901 -> X-ESPAPER-CLIENT-VERSION: V030
08:29:11.901 -> X-ESPAPER-FREE-HEAP: 13232
08:29:11.936 -> X-ESPAPER-MILLIS: 10446
08:29:11.936 -> X-ESPAPER-SECRET: [redacted]
08:29:11.936 -> X-ESPAPER-SPIFFS-FREE: 447282
08:29:11.936 -> X-ESPAPER-SPIFFS-TOTAL: 459330
08:29:11.936 -> X-ESPAPER-WIFI-RSSI: -68
08:29:11.936 -> X-ESPAPER-TOTAL-DEVICE-STARTS: 1
08:29:11.936 -> X-ESPAPER-SUCCESSFUL-DEVICE-STARTS: 1
08:29:11.936 -> X-ESPAPER-LAST-NTP-SYNC-TIME: 1572103749
08:29:11.936 -> X-ESPAPER-STARTS-WITHOUT-NTP-SYNC: 0
08:29:11.936 -> X-ESPAPER-LAST-CYCLE-DURATION: 16417
08:29:11.936 -> Connection: close
08:29:11.936 ->
08:29:11.936 ->
08:29:12.346 -> HTTP/1.1 200 OK

08:29:12.346 -> Server: Cowboy

08:29:12.346 -> Connection: close

08:29:12.346 -> Expires: 0

08:29:12.346 -> Cache-Control: no-cache, no-store, max-age=0, must-revalidate

08:29:12.346 -> X-Xss-Protection: 1; mode=block

08:29:12.346 -> Pragma: no-cache

08:29:12.346 -> Date: Sat, 26 Oct 2019 15:29:12 GMT

08:29:12.346 -> X-Content-Type-Options: nosniff

08:29:12.346 -> Strict-Transport-Security: max-age=31536000 ; includeSubDomains

08:29:12.381 -> Content-Type: image/bin

08:29:12.381 -> Content-Length: 4742

08:29:12.381 -> X-Application-Context: espaper:prod,heroku:42070

08:29:12.381 -> Via: 1.1 vegur

08:29:12.381 ->

08:29:12.381 -> headers received
08:29:12.381 -> Parsed HTTP code: 200
08:29:12.381 -> Client disconnected before body parsing
08:29:12.381 -> Processing body
08:29:12.381 -> Starting resource download
08:29:12.381 -> ######################################Downloaded file /screen with size 4742
08:29:12.553 -> [HTTP] connection closed or file end.
08:29:13.275 -> Drawing /screen
08:29:13.275 -> FileSize:3811
08:29:13.275 -> Version:0
08:29:13.275 -> BitDept:0
08:29:13.275 -> Bmp has wrong bit depth. Device: 1, bmp: 0
08:29:13.275 -> Writting image to screen
08:29:13.275 -> Waiting for display idle
08:29:13.275 -> Display ready
08:29:13.412 -> Waiting for display idle
08:29:15.025 -> Display ready
08:29:15.025 -> De-allocating frame buffer
08:29:15.025 -> Saved values in data file.
08:29:15.025 -> Free mem: 41040
08:29:15.025 -> Start millis: 8405, start time: 1572103749, current millis: 13584 -> now: 1572103754
08:29:15.072 -> Going to sleep for: 0[s]
by (120 points)
MAC: 68:c6:3a:c8:37:5b
by (19.9k points)
The only thing that sticks out so far is the "Bmp has wrong bit depth. Device: 1, bmp: 0" and the apparently different file sizes (transfer vs. SPIFFS, 4742 vs. 3811). Everything ok on the server side.

Are you building and flashing with Arduino IDE or Platform IO? Can you please share your EspaperClient/settings.h and platformio.ini files?
by (120 points)
/**The MIT License (MIT)

 Copyright (c) 2018 by ThingPulse Ltd., https://thingpulse.com

 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to deal
 in the Software without restriction, including without limitation the rights
 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 copies of the Software, and to permit persons to whom the Software is
 furnished to do so, subject to the following conditions:

 The above copyright notice and this permission notice shall be included in all
 copies or substantial portions of the Software.

 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 SOFTWARE.
 */

#ifndef SETTINGS_H
#define SETTINGS_H

#include <FS.h>

/***************************
 * Device Type
 **************************/

// enable one of these devices for the Arduino IDE
// If you are using platformio enable the right device
// in platformio.ini
#define ESPAPER29BW
//#define ESPAPER42BW
//#define TTGOT529BW

#if defined(ESPAPER29BW)
  #define EPD29

  #define CS 15  // D8
  #define RST 2  // D4
  #define DC 5   // D1
  #define BUSY 4 // D2
  #define USR_BTN 12 // D6

  #define DEVICE_TYPE Espaper29Bw
#elif defined(ESPAPER42BW)
  #define EPD42

  #define CS 15  // D8
  #define RST 2  // D4
  #define DC 5   // D1
  #define BUSY 4 // D2
  #define USR_BTN 12 // D6
  
  #define DEVICE_TYPE Espaper42Bw
#elif defined(ESP_COLOR_KIT)
  #define COLOR_TFT_24

  #define TFT_CS D1
  #define TFT_DC D2
  #define TFT_LED D8
  #define USR_BTN D4
  
  #define DEVICE_TYPE Espaper42Bw
#elif defined(TTGOT529BW)
  #define EPD29

  #define CS 5  // D8
  #define RST 12  // D4
  #define DC 19   // D1
  #define BUSY 4 // D2
  #define USR_BTN 37 // D6

  #define DEVICE_TYPE TTGOT529Bw
#endif


/***************************
 * User Settings
 **************************/

static String WIFI_SSID = "";
static String WIFI_PASS = "";
static String TIMEZONE = "-7";
static String NTP_SERVERS = "0.pool.ntp.org,1.pool.ntp.org,2.pool.ntp.org";

static String DEVICE_ID = "";
static String DEVICE_SECRET = "";

static uint8_t UPDATE_INTERVAL_MINS = 20;


/***************************
 * Internal Settings
 **************************/

//#define CLIENT_VERSION V027


//#define DEV_ENV
//#define TEST_ENV

const String CONFIG_SSID = "ESPaperConfig";
const String CONFIG_MODE_INSTRUCTION = "Press and hold LEFT button and press & release RIGHT button to enter configuration mode.";

// August 1st, 2018
#define NTP_MIN_VALID_EPOCH 1533081600
#define NTP_SYNC_TIMEOUT_SECONDS 5

#if defined(EPD29)
  const float MAX_TEXT_WIDTH_FACTOR = 0.95;
  const uint8_t STD_MESSAGE_Y_POSITION = 12;
  #define SCREEN_TYPE EPD29
#elif defined(EPD42)
  const float MAX_TEXT_WIDTH_FACTOR = 0.85;
  const uint8_t STD_MESSAGE_Y_POSITION = 25;
  #define SCREEN_TYPE EPD42
#elif defined(EPD75)
  const float MAX_TEXT_WIDTH_FACTOR = 0.75;
  const uint8_t STD_MESSAGE_Y_POSITION = 40;
  #define SCREEN_TYPE EPD75
#elif defined(COLOR_TFT_24)
  const float MAX_TEXT_WIDTH_FACTOR = 0.75;
  const uint8_t STD_MESSAGE_Y_POSITION = 40;
  #define SCREEN_TYPE COLOR_TFT_24
#endif

/**********************************
 * ESPaper Server-related Settings
 *********************************/

const String SERVER_API_DEVICES_PATH = "/public/devices";

#ifdef DEV_ENV
  // use empty array as a placeholder, as the scheme is HTTP rather
  // than HTTPS it won't actually be used, see EspaperParser::createWifiClient
  static const char rootCaCert[] PROGMEM = {};
  const String SERVER_URL = "http://192.168.0.146:8080";
  #define USE_SECURE_WIFI_CLIENT 0
#else
  #define USE_SECURE_WIFI_CLIENT 1
  // exported from Firefox as x509.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cXjbDaJWFBM5
JDGFoqgCWjBH4d1QB7wCCZAA62RjYJsWvIjJEubSfZGL+T0yjWW06XyxV3bqxbYo
Ob8VZRzI9neWagqNdwvYkQsEjgfbKbYK7p2CNTUQ
-----END CERTIFICATE-----
)EOF";
    #ifdef TEST_ENV
      const String SERVER_URL = "https://test.espaper.com";

    #else
      // PROD
      const String SERVER_URL = "https://www.espaper.com";
    #endif

#endif

/***************************
 * Functions
 **************************/

static bool isDeviceRegistered() {
  return DEVICE_ID.length() != 0 && DEVICE_SECRET.length() != 0;
}

static void resetUserSettings() {
  WIFI_SSID = "";
  WIFI_PASS = "";
  UPDATE_INTERVAL_MINS = 20;
  TIMEZONE = "";
  NTP_SERVERS = "0.pool.ntp.org,1.pool.ntp.org,2.pool.ntp.org";
  DEVICE_ID = "";
  DEVICE_SECRET = "";
}

#endif //SETTINGS_H
by (19.9k points)
That looks just fine. What are your board/flash settings in Arduino IDE? Make sure you use  Flash Size "2M (512K SPIFFS)".
by (120 points)
I originally had it at 2M (1Mb) but found the support article in the forum where it gets stuck at flashing, and set it to the 2M 512K as you indicate. I also did a fresh download.   This is the OCR of the tools menu


Auto Format
Archive Sketch
Fix Encoding & Reload
Manage Libraries...
Serial Monitor
Serial Plotter
WiFi101 / WiFiNlNA Firmware Updater
Board: "Generic ESP8266 Module"
Upload Speed: "115200"
CPU Frequency: "80 MHz"
Crystal Frequency: "26 MHz"
Flash Size: "2M (512K SPIFFS)"
Flash Mode: "QIO (fast)"
Flash Frequency: "40MHz"
Reset Method: "ck"
Debug port: "Disabled"
Debug Level: "None"
lwlP Variant: "v2 Lower Memory"
VTables: "Flash"
Exceptions: "Disabled"
Builtin Led: "2"
Erase Flash: "Only Sketch"
Espressif FW: "nonos-sdk 2.2.1 (legacy)"
SSL Support: "All SSL ciphers (most compatible)"
Port
Get Board Info
Programmer: "AVRISP mkll"
Burn Bootloader
by (120 points)
I tried a couple of different things, starting with moving back on the esp8266 library from 2.5.2 to 2.5.0.  I also changed to test.espaper.com with the define in settings.h, and was able to connect and got the registration experience.  I reflashed, reverting off test and was able to connect and register the device on www.espaper.com.  Looks to be working correctly now.

Please log in or register to answer this question.

Welcome to ThingPulse Q&A, where you can ask questions and receive answers from other members of the community.

https://thingpulse.com

...