WeatherDuino Forum

Full Version: OTA and Leds
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hi,

I have the AQM-III up and running. Easy task, nice piece of equipment, thanks!

I have two questions though:
  1. I don't seem to be able to get the OTA updates functional (I don't see the OTA port in the IDE). What do I need to do to accomplish this?
  2. I don't understand the functionality of the LEDs from the code. What do they do and do I need to do something special for this (apart from soldering the led)
Hi,

1- This seems something related to your LAN. I'm afraid I can't help much here. Check your firewall setting and make sure that it isn't blocking OTA upload tool.
2 - Regarding the LEDs, here is an explanation of their functions:

LED1 - Think on it as a power ON LED. You can set it to be always ON since power is applied, or have it doing a Fade IN Fade Out effect. For those who run the device without the OLED display, this will provide a quick way to see that the device is running.

LED2 - This LED will blink every time a data packet is transmitted via RF (LoRa or OOK). Those who are using the WiFi mode only, may not install LED2.
(30-09-2021, 17:45)Werk_AG Wrote: [ -> ]Hi,

1- This seems something related to your LAN. I'm afraid I can't help much here. Check your firewall setting and make sure that it isn't blocking OTA upload tool.
2 - Regarding the LEDs, here is an explanation of their functions:

LED1 - Think on it as a power ON LED. You can set it to be always ON since power is applied, or have it doing a Fade IN Fade Out effect. For those who run the device without the OLED display, this will provide a quick way to see that the device is running.

LED2 - This LED will blink every time a data packet is transmitted via RF (LoRa or OOK). Those who are using the WiFi mode only, may not install LED2.

OK, thanks for the reply. The LEDs are clear now (not much use as a power led is already present and no RF), the OTA is not.

I am pretty sure this has nothing to do with my LAN: I see all ports of all devices on the LAN, I have no reason to believe this one port is different (I see port 80).
I found the following links of similar issues (here and here, I point in the thread where the solution starts, discussion above is present). One has to do with power, one has to do with the order of calling the Wifi initialisation in relation to the AduinoOTA.begin(). I am no specialist and a relative beginner in the Arduino field and do not feel like just random changes in code for trial and error. Would like some guidance here.

This is my debug output on the serial:
Code:
07:18:04.459 -> ets Jun  8 2016 00:22:57
07:18:04.459 ->
07:18:04.459 -> rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
07:18:04.459 -> configsip: 0, SPIWP:0xee
07:18:04.459 -> clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
07:18:04.459 -> mode:DIO, clock div:1
07:18:04.459 -> load:0x3fff0018,len:4
07:18:04.459 -> load:0x3fff001c,len:1216
07:18:04.459 -> ho 0 tail 12 room 4
07:18:04.495 -> load:0x40078000,len:10944
07:18:04.495 -> load:0x40080400,len:6388
07:18:04.495 -> entry 0x400806b4
07:18:04.774 ->   WeatherDuino 4Pro
07:18:04.774 -> Air Quality Monitor III
07:18:04.774 ->   Firmware: 6.1_b008
07:18:04.774 ->
07:18:05.767 -> Initializing the SDS011 sensor!
07:18:05.767 ->
07:18:05.847 -> AA,C0,6,0,A,0,3D,3A,87,AB
07:18:05.847 -> Calculate crc: 87
07:18:05.847 ->  Response crc: 87
07:18:05.847 -> SDS011 correctly set to active report mode.
07:18:05.885 ->
07:18:06.875 -> AA,C0,9,0,16,0,3D,3A,96,AB
07:18:06.875 -> Calculate crc: 96
07:18:06.875 ->  Response crc: 96
07:18:06.875 -> SDS011 correctly set to factory working period.
07:18:06.875 ->
07:18:06.875 ->
07:18:06.875 -> Connecting to HansR
07:18:07.100 -> ..........................
07:18:09.620 -> WiFi connected!
07:18:09.620 -> IP address: 192.168.178.221
07:18:09.620 -> MDNS responder setup correctly.
07:18:09.698 -> Get time OK.
07:18:09.698 -> UTC Time  : 1633065487
07:18:09.698 -> Local Time: Friday, 01 October 2021 07:18:07
07:18:09.698 -> Reading Temp, Hum and Pressure
07:18:09.698 -> Temperature: 17.74
07:18:09.698 -> Humidity: 64.97
07:18:09.698 -> Amb. Pressure: 1015.53
07:18:09.698 -> SL Pressure: 1015.53
07:18:09.698 ->
07:18:09.698 ->
07:18:09.698 -> Waking up the dust sensor...
07:18:09.734 -> Reading will be done 40s later.
07:18:09.734 ->
07:18:49.715 -> Fan State: 1
07:18:49.715 -> Reading the dust sensor...
07:18:49.870 -> AA,C0,8,0,B,0,3D,3A,8A,AB,
07:18:49.870 -> Calculate crc: 8A
07:18:49.870 ->  Response crc: 8A
07:18:49.870 ->
07:18:49.870 ->
07:18:49.870 ->
SDS011 readings:
07:18:49.870 -> PM2.5 : 0.68
07:18:49.870 -> PM10.0: 0.93
07:18:49.870 ->
07:20:17.686 -> Reading Temp, Hum and Pressure
07:20:17.686 -> Temperature: 17.74
07:20:17.686 -> Humidity: 64.97
07:20:17.686 -> Amb. Pressure: 1015.53
07:20:17.722 -> SL Pressure: 1015.53
07:20:17.722 ->
07:20:18.811 -> Connection fail!
07:22:25.715 -> Reading Temp, Hum and Pressure
07:22:25.715 -> Temperature: 17.74
07:22:25.715 -> Humidity: 64.99
07:22:25.715 -> Amb. Pressure: 1015.52
07:22:25.715 -> SL Pressure: 1015.52
07:22:25.715 ->
07:22:25.851 -> Connection fail!
07:24:33.694 -> Reading Temp, Hum and Pressure
07:24:33.694 -> Temperature: 17.73
07:24:33.694 -> Humidity: 65.00
07:24:33.694 -> Amb. Pressure: 1015.52
07:24:33.694 -> SL Pressure: 1015.52

Regards,
And a nice other thread on the OTA issue which shows I am not alone and the problem is already two years old, going over several versions.
People trying everything and nothing works. Nice.

And another thread from 2018.

Timing issue between library versions?
(01-10-2021, 06:39)HansR Wrote: [ -> ]... I am no specialist and a relative beginner in the Arduino field and do not feel like just random changes in code for trial and error. Would like some guidance here.

Hello,

I don't know what is your problem with OTA, but please don't start by launching doubts on the AQM-III code. I'm absolutely sure that OTA is working properly, not only for me but for many other users too.

If you are using Arduino IDE with a laptop with WiFi, connect it to your LAN by WiFi, then restart Arduino IDE. Sometimes this solves the problem of OTA devices not appear on Arduino IDE.

Here is a picture of three AQM devices being detected properly by the Arduino IDE.

[attachment=2946]

Rgs.
Hi,

I don't intend to cast doubt on the AQM-III software, contrary I am pointing to the IDE of the Arduino.

The cause is not my LAN, my laptop is on wifi, I can connect with everything including the AQM-III. But even the BasicOTA sketch does not create the OTA port. And that is what this threads in my posts above are about.

I am only looking for a clue.
Are the PC running and the AQM on the same subnet? Can you ping the AQM from the PC? Sometime routers have separate vLANs for wired and wireless. Also try turning off the firewall for a test.
Hi Werk_AG,

Even though I have my two boards working successfully, there is one piece of information I needed to take a guess at.

Exactly which Board should I be choosing in the Board Manager.
To Date I've used ESP32 DEV Module at the very top of the list & that has worked fine.
I did on one occasion accidentally flash with AI-Thinker ESP32-CAM selected, but that appeared to work as well.

Being that I'm another that is very much a beginner in the ESP/Arduino world, it would help if you could add what board needs to be selected to either the support area or detail it in the code.


Cheers

Phil.


Edit:- A mention of the correct Partition Scheme would also be appreciated as I now I have needed to change that in one of my other projects, and know little about what is right or wrong for various projects..
(05-10-2021, 02:59)Phil23 Wrote: [ -> ]Exactly which Board should I be choosing in the Board Manager.

A mention of the correct Partition Scheme would also be appreciated....

Sorry,

On looking closer to your above image the selections are clear.

Board is:- MH ET LIVE ESP32MiniKit
&
Partition Scheme:- Default with spiffs


Assuming that's the same as what you have shipped.

Phil.
Hi Phil,

(05-10-2021, 04:33)Phil23 Wrote: [ -> ]...

Board is:- MH ET LIVE ESP32MiniKit
&
Partition Scheme:- Default with spiffs

Exactly Smile

Rgs.
Werk_AG
Pages: 1 2