Navigation

    LILYGO

    • Register
    • Login
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    Camera not connecting to server. Broken thumbnail.

    Technical Discussion
    1
    1
    108
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • L
      lilydoh last edited by lilydoh

      I'm testing the camera on my T-SIM7080G S3. I'm running the standard CameraWebServer script (see below) and have added the necessary chip/camera attributes. I've had everything working just a week ago. Now suddenly the camera doesn't supply an image to the server.

      Screenshot 2024-04-20 at 1.36.33 PM.jpg
      Screenshot 2024-04-20 at 1.41.59 PM.jpg

      The script complies and uploads correctly. The camera (OV2640) configures correctly too, and I receive no errors. However, all I see is the above broken image thumbnail.

      Screenshot 2024-04-20 at 1.36.47 PM.jpg

      Things I've Tried:

      • Different usbc power cables
      • Using battery power
      • Bought new OV2640 cameras
      • Different camera server scripts
      • Multiple combinations of reset & boot buttons
      • Cleaned ribbon cable connector

      I'm stumped! Anyone have ideas?

      Script I'm using. CameraWebServer.ino:

      #include "esp_camera.h"
      #include <WiFi.h>
      #include <Arduino.h>
      
      #define XPOWERS_CHIP_AXP2101
      #include "XPowersLib.h"
      
      
      
      //
      // WARNING!!! PSRAM IC required for UXGA resolution and high JPEG quality
      //            Ensure ESP32 Wrover Module or other board with PSRAM is selected
      //            Partial images will be transmitted if image exceeds buffer size
      //
      //            You must select partition scheme from the board menu that has at least 3MB APP space.
      //            Face Recognition is DISABLED for ESP32 and ESP32-S2, because it takes up from 15 
      //            seconds to process single frame. Face Detection is ENABLED if PSRAM is enabled as well
      
      // ===================
      // Select camera model
      // ===================
      #define LILYGO_ESP32S3_CAM_SIM7080G  // Has PSRAM
      #include "camera_pins.h"
      
      // ===========================
      // Enter your WiFi credentials
      // ===========================
      const char* ssid = "REMOVED";
      const char* password = "REMOVED!";
      
      void startCameraServer();
      
      void setup() {
        Serial.begin(115200);
        Serial.setDebugOutput(true);
        Serial.println();
      
          camera_config_t config;
          config.pin_d0 = Y2_GPIO_NUM;
          config.pin_d1 = Y3_GPIO_NUM;
          config.pin_d2 = Y4_GPIO_NUM;
          config.pin_d3 = Y5_GPIO_NUM;
          config.pin_d4 = Y6_GPIO_NUM;
          config.pin_d5 = Y7_GPIO_NUM;
          config.pin_d6 = Y8_GPIO_NUM;
          config.pin_d7 = Y9_GPIO_NUM;
          config.pin_xclk = XCLK_GPIO_NUM;
          config.pin_pclk = PCLK_GPIO_NUM;
          config.pin_vsync = VSYNC_GPIO_NUM;
          config.pin_href = HREF_GPIO_NUM;
          config.pin_sccb_sda = SIOD_GPIO_NUM;
          config.pin_sccb_scl = SIOC_GPIO_NUM;
          config.pin_pwdn = PWDN_GPIO_NUM;
          config.pin_reset = RESET_GPIO_NUM;
          config.xclk_freq_hz = 20000000;
          config.frame_size = FRAMESIZE_UXGA;
          config.pixel_format = PIXFORMAT_JPEG; // for streaming
          //config.pixel_format = PIXFORMAT_RGB565; // for face detection/recognition
          config.grab_mode = CAMERA_GRAB_WHEN_EMPTY;
          config.fb_location = CAMERA_FB_IN_PSRAM;
          config.jpeg_quality = 12;
          config.fb_count = 1;
      
          // if PSRAM IC present, init with UXGA resolution and higher JPEG quality
          //                      for larger pre-allocated frame buffer.
          if (config.pixel_format == PIXFORMAT_JPEG) {
              if (psramFound()) {
                  config.jpeg_quality = 10;
                  config.fb_count = 2;
                  config.grab_mode = CAMERA_GRAB_LATEST;
              } else {
                  // Limit the frame size when PSRAM is not available
                  config.frame_size = FRAMESIZE_SVGA;
                  config.fb_location = CAMERA_FB_IN_DRAM;
              }
      
          } else {
              // Best option for face detection/recognition
              config.frame_size = FRAMESIZE_240X240;
      #if CONFIG_IDF_TARGET_ESP32S3
              config.fb_count = 2;
      #endif
          }
      
          // camera init
          esp_err_t err = esp_camera_init(&config);
          if (err != ESP_OK) {
              Serial.printf("Camera init failed with error 0x%x Please check if the camera is connected well.", err);
              while (1) {
                  delay(5000);
              }
          }
      
          sensor_t *s = esp_camera_sensor_get();
          // initial sensors are flipped vertically and colors are a bit saturated
          if (s->id.PID == OV3660_PID) {
              s->set_vflip(s, 1); // flip it back
              s->set_brightness(s, 1); // up the brightness just a bit
              s->set_saturation(s, -2); // lower the saturation
          }
          // drop down frame size for higher initial frame rate
          if (config.pixel_format == PIXFORMAT_JPEG) {
              s->set_framesize(s, FRAMESIZE_QVGA);
          }
      
      #if defined(LILYGO_ESP32S3_CAM_PIR_VOICE)
          s->set_vflip(s, 1);
          s->set_hmirror(s, 1);
      #endif
      
      
        WiFi.begin(ssid, password);
        WiFi.setSleep(false);
      
        while (WiFi.status() != WL_CONNECTED) {
          delay(500);
          Serial.print(".");
        }
        Serial.println("");
        Serial.println("WiFi connected");
      
        startCameraServer();
      
        Serial.print("Camera Ready! Use 'http://");
        Serial.print(WiFi.localIP());
        Serial.println("' to connect");
      }
      
      void loop() {
        // Do nothing. Everything is done in another task by the web server
        delay(10000);
      }
      
      

      Camera_pins.h

      #if defined(LILYGO_ESP32S3_CAM_SIM7080G)
      
      
      #define PWDN_GPIO_NUM               (-1)
      #define RESET_GPIO_NUM              (18)
      #define XCLK_GPIO_NUM               (8)
      #define SIOD_GPIO_NUM               (2)
      #define SIOC_GPIO_NUM               (1)
      #define VSYNC_GPIO_NUM              (16)
      #define HREF_GPIO_NUM               (17)
      #define PCLK_GPIO_NUM               (12)
      #define Y9_GPIO_NUM                 (9)
      #define Y8_GPIO_NUM                 (10)
      #define Y7_GPIO_NUM                 (11)
      #define Y6_GPIO_NUM                 (13)
      #define Y5_GPIO_NUM                 (21)
      #define Y4_GPIO_NUM                 (48)
      #define Y3_GPIO_NUM                 (47)
      #define Y2_GPIO_NUM                 (14)
      
      #define I2C_SDA                     (15)
      #define I2C_SCL                     (7)
      
      #define PMU_INPUT_PIN               (6)
      
      #define BUTTON_CONUT                (1)
      #define USER_BUTTON_PIN             (0)
      #define BUTTON_ARRAY                {USER_BUTTON_PIN}
      
      #define BOARD_MODEM_PWR_PIN         (41)
      #define BOARD_MODEM_DTR_PIN         (42)
      #define BOARD_MODEM_RI_PIN          (3)
      #define BOARD_MODEM_RXD_PIN         (4)
      #define BOARD_MODEM_TXD_PIN         (5)
      
      #define USING_MODEM
      
      #define SDMMC_CMD                   (39)
      #define SDMMC_CLK                   (38)
      #define SDMMC_DATA                  (40)
      #else
      #error "Camera model not selected"
      #endif
      

      Similar threads:

      • https://www.reddit.com/r/esp32/comments/124zus9/esp32_camera_not_streaming_video_or_getting_still/
      • https://www.reddit.com/r/esp32/comments/11jxj6w/esp32cammb_is_just_showing_a_blank_video/
      1 Reply Last reply Reply Quote 0
      • First post
        Last post
      Powered by NodeBB | Contributors