Skip to content

ArduinoOTA.begin() fails with assertion "igmp_lookup_group: first group must be allsystems" #1885

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
beegee-tokyo opened this issue Sep 22, 2018 · 1 comment

Comments

@beegee-tokyo
Copy link
Contributor

beegee-tokyo commented Sep 22, 2018

Hardware:

Board: ESP32 WROOM Dev kit
Core Installation/update date: ESP32 Stage Sept. 22nd
IDE name: Platform.io
Flash Frequency: 40Mhz
PSRAM enabled: YES
Upload Speed: 921600
Computer OS: Windows7

Description:

ArduinoOTA.begin fails with assertion "igmp_lookup_group: first group must be allsystems"
Steps:

  1. Init WiFi and connect to AP
  2. Connect to NTP server and get date and time
  3. Try to start ArduinoOTA

Sketch: Reduced code. not shown is function where WiFi is initialized and connecting.

This function is called after WiFi is connected.

/** Unique device name */
char apName[] = "Scent-xxxxxxxxxxxx";

/**
 * Initialize OTA
 */
void initOTA()
{
	SerialCMD.println("[OTA] Initialize OTA");
	// OTA INIT
	ArduinoOTA.onStart([]() {
		//Initialize the LED'S
		pinMode(ledPort, OUTPUT);
		digitalWrite(ledPort, HIGH);

		String type;
		if (ArduinoOTA.getCommand() == U_FLASH)
		{
			type = "sketch";
		}
		else
		{ // U_SPIFFS
			type = "filesystem";
			SPIFFS.end();
		}
	});
	ArduinoOTA.onEnd([]() {
		digitalWrite(ledPort, HIGH);
	});
	ArduinoOTA.onProgress([](unsigned int progress, unsigned int total) {
		unsigned int achieved = progress / (total / 100);
		if (otaStatus == 0 || achieved == otaStatus + 1)
		{
			otaStatus = achieved;
			digitalWrite(ledPort, !digitalRead(ledPort));
		}
	});
	ArduinoOTA.onError([](ota_error_t error) {
		if (error == OTA_AUTH_ERROR)
		{
			SerialCMD.println("Auth Failed");
		}
		else if (error == OTA_BEGIN_ERROR)
		{
			SerialCMD.println("Begin Failed");
		}
		else if (error == OTA_CONNECT_ERROR)
		{
			SerialCMD.println("Connect Failed");
		}
		else if (error == OTA_RECEIVE_ERROR)
		{
			SerialCMD.println("Receive Failed");
		}
		else if (error == OTA_END_ERROR)
		{
			SerialCMD.println("End Failed");
		}
		digitalWrite(ledPort, HIGH);
		delay(5000);
		ESP.restart();
	});
	ArduinoOTA.setHostname(apName);
	ArduinoOTA.begin();

	// Announce web service to mDNS
	MDNS.addService("http", "tcp", 80);
}

Debug Messages:

ets Jun  8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x33 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:1324
load:0x40078000,len:7788
ho 0 tail 12 room 4
load:0x40080400,len:6460
entry 0x400806e8
[D][esp32-hal-psram.c:47] psramInit(): PSRAM enabled
ÿ[DBG] ##################################
[DBG] Smart Remote
[DBG] Firmware: Dif_Essenze_SR_01
[DBG] Build: Sep 22 2018 16:31:52
[DBG] ##################################


[HEA] ##################################
[HEA] on start: 
[HEA] Internal Total heap 235164, internal Free Heap 205836
[HEA] SPIRam Total heap 4194252, SPIRam Free Heap 4194252
[HEA] ChipRevision 1, Cpu Freq 240, SDK Version v3.2-dev-1055-g3276a1316
[HEA] Flash Size 4194304, Flash Speed 40000000
[HEA] ##################################


[DBG] Init SPIFFS successfull
[HEA] after SPIFFS begin: 201500
[SPF] Listing directory: /
[SPF] FILE: /scent_1150.jpg	SIZE: 4089
[SPF] FILE: /all.js.gz	SIZE: 54282
[SPF] FILE: /esp.js	SIZE: 44233
[SPF] FILE: /favicon.ico	SIZE: 318
[SPF] FILE: /index.html	SIZE: 144573
[SPF] FILE: /all.css.gz	SIZE: 45652
[DBG] Get saved settings
[HEA] after readPreferences: 200292
[DBG] Get time
[DBG] Initialize pumps
[DBG] Start BT Serial
[BTS] BTSerial active. Device name: Scent-807D3ACFBC48
[HEA] after initBTSerial: 149592
[DBG] Module type WiFi/standalone with display
[I][BluetoothSerial.cpp:158] esp_spp_cb(): ESP_SPP_INIT_EVT
[I][BluetoothSerial.cpp:216] esp_spp_cb(): ESP_SPP_START_EVT
[DBG] Could not start display task
[HEA] after startDisplay: 149016
[D][WiFiGeneric.cpp:342] _eventCallback(): Event: 2 - STA_START
[D][WiFiGeneric.cpp:342] _eventCallback(): Event: 0 - WIFI_READY
[D][WiFiGeneric.cpp:342] _eventCallback(): Event: 13 - AP_START
[WIF] Created IMEI: 128058207188072
[WIF] Found stored WiFi creds: MHC2[D][WiFiGeneric.cpp:342] _eventCallback(): Event: 14 - AP_STOP

[D][WiFiGeneric.cpp:342] _eventCallback(): Event: 4 - STA_CONNECTED
[D][WiFiGeneric.cpp:342] _eventCallback(): Event: 7 - STA_GOT_IP
[D][WiFiGeneric.cpp:386] _eventCallback(): STA IP: 192.168.0.111, MASK: 255.255.255.0, GW: 192.168.0.1
[WIFI] STA status: connected
[WIF] STA IP: 192.168.0.111
[WIF] Timezone: UTC-8:00
[WIF] Got NTP time: 18/09/22 16:39:49
[RTC] Request to set time to: 16:39:49  D=18/9/22
[RTC] Set DS1307 H=16:39:49  D=2018/9/22  W=6
[HEA] after WiFi.begin(): 117976
[OTA] Initialize OTA
[OTA] Start OTA service
assertion "igmp_lookup_group: first group must be allsystems" failed: file "/Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/lwip/lwip/src/core/ipv4/igmp.c", line 269, function: igmp_lookup_group
abort() was called at PC 0x401691db on core 1

Backtrace: 0x4009746c:0x3ffe4d90 0x40097641:0x3ffe4db0 0x401691db:0x3ffe4dd0 0x4019c5f6:0x3ffe4e00 0x4019c7da:0x3ffe4e20 0x401660ee:0x3ffe4e40 0x4016625c:0x3ffe4e80 0x401662bd:0x3ffe4ea0 0x4019062c:0x3ffe4ec0 0x400930c9:0x3ffe4ef0

Rebooting...

Decoded Excpeption:

Decoding stack results
0x4009746c: invoke_abort at /Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/esp32/panic.c line 155
0x40097641: abort at /Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/esp32/panic.c line 170
0x401692b3: __assert_func at ../../../.././newlib/libc/stdlib/assert.c line 63
0x4019c70e: igmp_lookup_group at /Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/lwip/lwip/src/core/ipv4/igmp.c line 268
0x4019c8f2: igmp_joingroup_netif at /Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/lwip/lwip/src/core/ipv4/igmp.c line 498
0x401661c6: _udp_join_group at /Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/mdns/mdns_networking.c line 76
0x40166334: _udp_pcb_init at /Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/mdns/mdns_networking.c line 217
0x40166395: _mdns_pcb_init_api at /Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/mdns/mdns_networking.c line 245
0x40190744: tcpip_thread at /Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/lwip/lwip/src/api/tcpip.c line 124
0x400930c9: vPortTaskWrapper at /Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/freertos/port.c line 141
@beegee-tokyo
Copy link
Contributor Author

Solved, but not sure why.

I get the error (and only in a specific project) when the initialization sequence is

  1. Set WiFi to STA
  2. Init WiFi
  3. Connect WiFi
  4. Init OTA

When I change the sequence to

  1. Set WiFi to STA
  2. Init OTA
  3. Init WiFi
  4. Connect WiFi

the error disappears.

Not satisfied with the finding, as in other projects of mine the first sequence works just fine.

Still closing this as nobody showed interest or was able to explain.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant