ESP8266 SDK with RTOS released on github!

alonewolfx2
Posts: 12
Joined: Sun Oct 26, 2014 6:14 am

Re: News!ESP8266 SDK with RTOS released on github!

Postby alonewolfx2 » Tue Jan 06, 2015 2:31 am

sorry my mistake. it's working. but still freertos sdk is buggy. for example i am trying to connect router in station mode with tcp request but it need restart sometimes.

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

Re: News!ESP8266 SDK with RTOS released on github!

Postby ESP_Faye » Tue Jan 06, 2015 10:14 am

Could you offer us your test code to replicate it ?

painkiller47
Posts: 5
Joined: Fri Jan 09, 2015 5:43 pm

Re: News!ESP8266 SDK with RTOS released on github!

Postby painkiller47 » Thu Jan 29, 2015 9:25 pm

I think I found a bug.
"wifi_get_ip_info" does not work as expected. It returns true without initializing the struct.
This causes dhcp_set_info to fail later on (as it depends on wifi_get_ip_info internally - check "...\third_party\udhcp\files.c" ) and DHCP does not work correctly.

Test code:
{
struct ip_info setinfo;
struct ip_info getinfo;

bool set_result;
bool get_result;

setinfo.gw.addr = ipaddr_addr( "192.168.4.128" );
setinfo.ip.addr = ipaddr_addr( "192.168.4.128" );
setinfo.netmask.addr = ipaddr_addr( "255.255.255.0" );

set_result = wifi_set_ip_info(SOFTAP_IF, &setinfo);

printf("Set returned:%d [IP:%X,GW:%X,MASK:%X]\r\n", set_result, setinfo.ip.addr, setinfo.gw.addr, setinfo.netmask.addr );

get_result = wifi_get_ip_info(SOFTAP_IF, &getinfo);

printf("Get returned:%d [IP:%X,GW:%X,MASK:%X]\r\n", get_result, getinfo.ip.addr, getinfo.gw.addr, getinfo.netmask.addr );
}

Results in:

Set returned:1 [IP:8004A8C0,GW:8004A8C0,MASK:FFFFFF]
Get returned:1 [IP:0,GW:0,MASK:0]

Otherwise, LWIP's BSD sockets seem to work nicely and system is pretty stable if only static memory is used. Using dynamic memory like it's done in the examples (zalloc,free) causes reset at some point.

Edit: It works if DHCP is configured at a later point (other thread in couple of seconds). wifi_get_ip_info then works as expected. I suppose a background thread is responsible for updating the values...

alonewolfx2
Posts: 12
Joined: Sun Oct 26, 2014 6:14 am

Re: News!ESP8266 SDK with RTOS released on github!

Postby alonewolfx2 » Fri Feb 06, 2015 6:38 am

We would like to see new forever deepsleep and deepsleep type functions on freertos. Is it possible? Do you planning to add this features on freertos?
Thank you for your good work.

painkiller47
Posts: 5
Joined: Fri Jan 09, 2015 5:43 pm

Re: News!ESP8266 SDK with RTOS released on github!

Postby painkiller47 » Fri Feb 06, 2015 5:14 pm

A few more sockets would be nice. Currently 4 lwip sockets can be allocated.

Who is online

Users browsing this forum: No registered users and 9 guests