[Solved] IGMP missing in lwip RTOS sdk version

fabianpie
Posts: 3
Joined: Wed Sep 02, 2015 12:04 pm

[Solved] IGMP missing in lwip RTOS sdk version

Postby fabianpie » Fri Sep 04, 2015 3:03 pm

Please include the IGMP suppot in RTOS sdk version
Regards,
Fabian

EliteScientist
Posts: 10
Joined: Sat Nov 21, 2015 5:08 pm

Re: IGMP missing in lwip RTOS sdk version

Postby EliteScientist » Mon Nov 30, 2015 8:39 am

Yes Please. I need this for my product.

ESP_Faye
Posts: 1642
Joined: Mon Oct 27, 2014 11:08 am

Re: IGMP missing in lwip RTOS sdk version

Postby ESP_Faye » Mon Nov 30, 2015 2:15 pm

Hi,

Sorry for the inconvenience.

Please have a try with the lib as the attachment.
Attachments
liblwip.zip
(132.05 KiB) Downloaded 249 times

EliteScientist
Posts: 10
Joined: Sat Nov 21, 2015 5:08 pm

Re: IGMP missing in lwip RTOS sdk version

Postby EliteScientist » Mon Nov 30, 2015 3:42 pm

This causes a continual WDT reset. Is there anything else that needs to be changed to make this work?

ESP_Faye
Posts: 1642
Joined: Mon Oct 27, 2014 11:08 am

Re: IGMP missing in lwip RTOS sdk version

Postby ESP_Faye » Tue Dec 01, 2015 10:38 am

Hi,

So sorry that there are more libs which are needed.

Please have a try with this new attachment.
Attachments
lib_support_igmp.zip
(295.99 KiB) Downloaded 256 times

EliteScientist
Posts: 10
Joined: Sat Nov 21, 2015 5:08 pm

Re: IGMP missing in lwip RTOS sdk version

Postby EliteScientist » Tue Dec 01, 2015 12:05 pm

Works! Thanks :)

EliteScientist
Posts: 10
Joined: Sat Nov 21, 2015 5:08 pm

Re: [Solved] IGMP missing in lwip RTOS sdk version

Postby EliteScientist » Wed Dec 02, 2015 1:37 pm

I have some feed back. I noticed the device kept rebooting and sometimes crashing. so what I did was put a return statement in user_init() to disable all of my code to make sure nothing that I was doing was causing it. Here is what I see:

scandone
state: 0 -> 2 (b0)
state: \0xa6\0xc9\0x02\0x9a\0x02B\0x82Jj

ets Jan 8 2013,rst cause:4, boot mode:(3,6)

wdt reset

----------------------------

scandone
state: 0 -> 2 (b0)
state:\0x802 -> 3 (0)

ets Jan 8 2013,rst cause:4, boot mode:(3,6)

wdt reset

----------------------------

Occasionally it will connect and run but will crash shortly after. When it connects I get:


scandone
state: 0 -> 2 (b0)
state: 2 -> 3 (0)
state: 3 -> 5 (10)
add 0
aid 3
pm open phy_2,type:2 0 0
cnt

connected with Elite Scientist, channel 4
dhcp client start...



Here are what the crashes look like:


Fatal exception (0):
epc1=0x40215090
epc2=0x40100070
epc3=0x40101798
epcvaddr=0x0000000c
depc=0x40100052
rtn_add=0x40101712

------------------

low_level_init
add if0
f r-40, scandone
state: 0 -> 2 (b0)
state:\0x002 -> 3 (0)
Fatal exception (28):
epc1=0x4000deed
epc2=0x40100070
epc3=0x40103861
epcvaddr=0x0000000c
depc=0x40100059
rtn_add=0x400018dc
\0xea
ets Jan 8 2013,rst cause:2, boot mode:(3,6)



After So many crashes I will see this and it will stop running completely:

low_level_init
add if0
f r-1, scandone
state: 0 -> 2 (b0)
sta

ESP_Faye
Posts: 1642
Joined: Mon Oct 27, 2014 11:08 am

Re: [Solved] IGMP missing in lwip RTOS sdk version

Postby ESP_Faye » Wed Dec 02, 2015 3:41 pm

Hi,

Please provide your test code, we will have a try.

jhinkle
Posts: 32
Joined: Tue Apr 19, 2016 12:09 am

Re: [Solved] IGMP missing in lwip RTOS sdk version

Postby jhinkle » Sun Apr 24, 2016 7:05 am

I'm developing with the latest RTOS SDK.

I found that IGMP was not working so I search this site for potential answers.

I downloaded the 4 libraries noteed earlier in this thread --- and igmp started to work. --- OR I Thought.

My simple test program has 2 tasks. Task1 creates a UDP socket and issues a recv request which blocks until a UDP message on the specified port arrives.

Task2 waits for a counting semaphore which is incremented upon Task1 receiving a message. Task2 waits for a counting semaphore and has a timeout of 30 seconds. Upon returning from a TimeOut -- Task2 posts a os_printf message stating that no message was received from Task1.

My test does NOT send any UDP messages so expected behavior is to see a os_printf post every 30 seconds --- forever.

It DOES post forever with the current RTOS SDK but igmp is not working.

Re complied and linked the 4 libs stated earlier in this post ... test if a multicast message is received ,--- all work OK.

Restart the ESP --- don't send any messages and expect to see os_printf posts forever -- WRONG.

The os_printf posts STOP showing up about 10 minutes after the ESP is started.

As another note --- I'm using the GDBstub and with the 4 libs noted ... I have received a SIGEMT: Emulation Trap and a SIGILL: illegal instruction.

It appears that the 4 libs posted earlier to resolve the missing igmp issue has created bugs of their own.

Is there any way to get a good RTOS SDK with igmp working?

Thanks -- and if I can supply anything to help debug the issue I have presented her -- please say so.

Thanks in advance for looking into this.

User avatar
raspberrypidmx
Posts: 15
Joined: Wed Apr 27, 2016 6:15 am
Contact:

Re: [Solved] IGMP missing in lwip RTOS sdk version

Postby raspberrypidmx » Thu Oct 06, 2016 11:16 pm

I have IGMP working with lwip RTOS SDK 1.4.2.

Code: Select all

void ICACHE_FLASH_ATTR handle_udp_join_group(void) {
   printf("handle_udp_join_group\n");

   struct ip_addr ipgroup;
   struct ip_info local_ip;

   const WIFI_MODE mode = wifi_get_opmode();

   if (mode & STATION_MODE) {
      wifi_get_ip_info(STATION_IF, &local_ip);
   } else {
      wifi_get_ip_info(SOFTAP_IF, &local_ip);
   }

   ipaddr_aton("239.255.0.1", &ipgroup);

   const uint8_t iret = igmp_joingroup(&local_ip.ip,(struct ip_addr *)(&ipgroup));

   if (iret != ERR_OK) {
      printf("Could not join\n");
   }

}


The full code can be found here -> https://github.com/vanvught/rpidmx512/tree/master/esp8266_rtos_sdk_rpi

Who is online

Users browsing this forum: No registered users and 4 guests