prusa3d / Prusa-Firmware-ESP32-Cam

Firmware for ESP32 Cam modules to be used in Prusa Connect
GNU General Public License v3.0
161 stars 13 forks source link

No connection after changing from 1.0.3 to 1.1.0-rc2 #53

Closed blue0ceanby closed 1 week ago

blue0ceanby commented 1 month ago

I have tried several times with two cameras of the type: https://www.amazon.de/gp/product/B0CXXYGNL4/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1 These run very smoothly with firmware 1.0.3. To stay up to date, I have installed FW 1.1.0-rc2 in the cameras. The cameras start and log into the WiFi. When connecting to Prusa Connect, the cameras do not progress and the following error message is displayed in the log: Connetion failed to domain! Error: -1 - ERROR - Generic error : 0 ,BA:Wait for first connection What's also interesting is that the NTP sync doesn't work. The error message appears: Waiting for NTP time sync: System time: 0000-00-00_00-00-00 Both cameras work well with FW 1.0.3. I also did a complete reset via pin 12 to GND and then erased the ESO32 Flash and Download Tools. Does anyone have any idea how I can continue to search for the cause?

johnyHV commented 1 month ago

Hello @blue0ceanby . can you try connecting the camera to the power supply and let it run for approximately 60 seconds without trying to connect to the camera WEB interface and then send me the log file from the micro SD card ?

blue0ceanby commented 1 month ago

Hello johnyHV,

here is the log file. FW 1_1_RC2.txt

johnyHV commented 1 month ago

Hello @blue0ceanby . I mean, it's problem with WiFi signal quality. Some time camera don't see WiFi network, and some time camera have too low wifi signal. Can you try change camera position or use external WiFi antena ?

0000-00-00_00-00-00 - Nr | SSID                             | RSSI | CH | BSSID             | Encryption
0000-00-00_00-00-00 -  1 | xxx0815                       |  -86 |  1 | 9A:9D:5D: | WPA2
0000-00-00_00-00-00 -  2 | xxx                         |  -87 |  1 | 98:9D:5D: | WPA2
blue0ceanby commented 1 month ago

Hello johnyHV,

I still don't quite understand how the connection works with 1.0.3 and the same hardware. The camera is easily accessible via web browser, here is a current log. Log.txt

johnyHV commented 1 month ago

Hello @blue0ceanby

SW version 1.0.3 used ESP IDF 4.x.x, and SW version 1.1.0 used ESP IDF 5.x.x. ESP IDF is basic MCU driver for the ESP procesors.

How long have you been using the camera? I've noticed that on some cameras, the signal quality decreases over time. I think it might be a hardware issue. I have one camera that, after a year, sees the same WiFi network with a signal strength of -80 dB, and a new camera that sees the same WiFi network at the same location with a signal strength of -65 dB.

In the your log you can see signal quality from -85 to -87dbm, and this is too low signal quality

blue0ceanby commented 1 month ago

Hello Johnny HV, I bought the cameras 3 months ago, I can't find out how old they are. What irritates me is that as soon as I install the FW 1.0.3, the camera connects within 6 minutes. OK, I'll replace the cameras with others at the end of August and then get back to you. Thanks for your support and the great idea with the software.

johnyHV commented 1 month ago

Hello @blue0ceanby thanks. But you can try use external WiFi antena. When do you have good soldering skills, then it's easy procedure here is the manual

blue0ceanby commented 1 month ago

Hello Johnny HV, I flashed both cameras with 1.1.0 this morning and they connected to the Prusa Connect website within about 3 minutes. What I noticed is that with versions 1.0.3 and 1.1.0 the NTP time sync takes place very quickly and with the 1.1.0 RC version no sync works. Could it be that without a valid timestamp Prusa Connect does not accept a connection? I just wanted to give this as feedback and thank you for your efforts.

mozgy commented 1 month ago

Could it be that without a valid timestamp Prusa Connect does not accept a connection?

I don't think that Prusa Connect requires valid timestamp. With my code I am sending captured jpeg without ?ts part and without EXIF time data and it works fine.

blue0ceanby commented 1 month ago

If it's ok with you, I would close the issue?

johnyHV commented 3 weeks ago

Hello.

n my case, version 1.1.0 has much faster NTP time loading compared to version 1.0.3.

For sending photos to PrusaConnect, it's not necessary to set the correct time for the photo. PrusaConnect displays the uploaded photo.