PAN9520 ETU Webserver Camera Stream
This application for the PAN9520 ETU demonstrates a webserver that serves a camera live stream.
Installation
- Install Visual Studio Code
- Open the "Extensions" menu - using the icon in the left vertical menu bar or by pressing CTRL+SHIFT+X
- Search and start installation of the "PlatformIO IDE" extension.
- Wait for the installation to finish. This takes a while. Visual Studio Code must be restarted for the installation to take effect.
- Clone this project with:
git clone --recursive https://github.com/panasonic-industry-europe/pan9520-etu-camera-stream-web-server.git
- Use "File" -> "Open Folder" and select the project folder containing this application
- Wait for all dependencies to be downloaded and installed automatically. This takes a while.
Hardware setup
- For this application a OV2640 camera must be connected to the camera interface labelled CAM. https://www.seeedstudio.com/OV2640-Fisheye-Camera-p-4048.html
- Unplug jumpers from UART1 pinheader. This is needed because the camera interface GPIOs are also shared with the UART1 interface. This leads to a data stream on UART1 while the camera is running. Sometimes Windows will detect a serial mouse because of this and will cause random mouse pointer movement and clicks.
Firmware build
- Open the PlatformIO project task menu by clicking on the corresponding icon on the left side (Alien Head)
- Navigate to "Project Tasks" -> "esp32-s2-kaluga-1" -> "General" and select "Build"
- Wait until the project has been built. For the very first build the build time is huge because a lot of files from the SDK will be build. Following builds will be much faster.
Flashing the firmware
- Connect the PAN9520 ETU via the "USB Module" connector on the top left corner of the development board to the development PC.
- Activate the download mode by pressing the "RST" button while holding the SW1 button pressed down. After releasing the "RST" button a new USB device may be recognized by the PC.
- Open the PlatformIO project task menu by clicking on the corresponding icon on the left side (Alien Head)
- Navigate to "Project Tasks" -> "esp32-s2-kaluga-1" -> "General" and select "Upload"
- After upload the following error message is displayed in the terminal: "esptool.py can not exit the download mode over USB. To run the app, reset the chip manually." The development board needs to be reset manually by pressing the "RST" button to exit the download mode and start the application.
Running the demo
- Connect the PAN9520 ETU via the "USB Module" connector on the top left corner of the development board to the development PC.
- Scan for WiFi access points on any remote device like mobile phone or PC.
- Look out for the WiFi access point SSID "PAN9520LiveStream" and connect to it.
- Open a webbrowser and access http://192.168.4.1
- Enjoy the video stream.
Troubleshooting
If the application does not work as expected it is possible to inspect the setup by looking at the debug output of the system.
- Connect the PAN9520 ETU via the "USB Debug/Serial" connector on the bottom left corner of the development board to the development PC.
- Use a terminal applicaion like HTerm, Putty or Termite and open the debug COM port - this is usually the one with the highest COM port number - with 115200,8,N,1 configuration.
- Carefully analyze the debug output.
Camera not connected
If you receive the following message the camera is not connected to the development board correctly:
camera: Camera probe failed with error 0x105(ESP_ERR_NOT_FOUND)<27>[0m<\r><\n>
ESP_ERROR_CHECK failed: esp_err_t 0x105 (ESP_ERR_NOT_FOUND)
Solution: Please connect the camera correctly.