Coder Social home page Coder Social logo

esp8266_nonos_sdk's Introduction

Support Policy for ESP8266 NonOS

Starting from December 2019,

  • We will not add any new features to the ESP8266 NonOS SDK.
  • We will only fix critical bugs in the ESP8266 NonOS SDK.
  • We will only maintain the master branch of ESP8266 NonOS SDK, which is a continuously bug-fix version based on v3.0. This means:
    • All other released branches will not be updated.
    • All the future versions will be released from only the master branch mentioned above.
  • It is suggested that the ESP8266_RTOS_SDK, instead of ESP8266 NonOS SDK, be used for your projects.

The latest ESP8266_RTOS_SDK allows users to develop applications using an architecture that are compatible with the SDKs of all Espressif chips, including ESP8266 series, ESP32 series, and the upcoming new series of chips. Switching to ESP8266_RTOS_SDK will helps users to:

  • Eliminate the necessity to maintain more than one applications (for different chips), thus greatly reducing maintenance costs.
  • Easily switch to other Espressif chips in the future for enhanced flexibility, less dependency, and reduced time-to-market.

Thank you for your interest in Espressif products.

ESP8266 NonOS 支持政策

自 2019 年 12 月起,我们将:

  • 停止为 ESP8266 NonOS 新增任何功能。
  • 仅修复 ESP8266 NonOS 的关键 bug。
  • 所有更新仅在 master 分支进行,即基于 v3.0.0 的持续 bug 修复版本。这意味着:
    • 其他任何 release 分支均不再提供维护;
    • 所有更新均将通过上述 master 分支发布。
  • 建议客户使用新版 ESP8266_RTOS_SDK

简单来说,新版 ESP8266_RTOS_SDK 可帮助客户避免对单一 SDK 的依赖,允许客户应用程序同时兼容多款乐鑫芯片,包括 ESP8266 系列、ESP32 系列以及未来发布的新产品。使用 ESP8266_RTOS_SDK 允许客户:

  • 避免同时维护针对不同芯片的多套应用程序,从而降低维护成本。
  • 未来可轻松切换至其他乐鑫芯片,从而提高灵活性、降低对单一芯片的依赖,并缩短上市时间。

感谢大家对乐鑫的支持与关注。

ESP8266_NONOS_SDK

All documentations @ http://espressif.com/en/support/download/documents?keys=&field_type_tid%5B%5D=14

Notes

Please add user_pre_init() in your project, which will be called before user_init(). And you MUST call system_partition_table_regist() in user_pre_init to register your project partition table.

The following partition address CAN NOT be modified, and you MUST give the correct address. They are retated to the flash map, please refer to ESP8266 SDK Getting Started Guide or ESP8266 SDK 入门指南.

  • SYSTEM_PARTITION_BOOTLOADER
  • SYSTEM_PARTITION_OTA_1
  • SYSTEM_PARTITION_OTA_2
  • SYSTEM_PARTITION_SYSTEM_PARAMETER

If you donot use Non-FOTA bin, eagle.irom0.text.bin and irom0.text MUST be downloaded the fixed address, which also can be found in ESP8266 SDK Getting Started Guide or ESP8266 SDK 入门指南, and you can define their partition type after SYSTEM_PARTITION_CUSTOMER_BEGIN.

esp8266_nonos_sdk's People

Contributors

cwespressif avatar esp-yjm avatar heyinling avatar lhespress avatar marcelstoer avatar przemyslawzygmunt avatar ustccw avatar wujiangang avatar xcguang avatar xindeng11 avatar xiongyumail avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

esp8266_nonos_sdk's Issues

AT Custom cmd size

Hi, i am try to send a custom at cmd with a param size equal 200, and when i send the cmd the esp return ERROR. How can i increse a size of the RX buffer for the at custom cmd?
Thanks

No way to stop TCP server started with espconn_accept when it has active clients.

When calling espconn_delete(&tcp_server) i get error -5 (ESPCONN_INPROGRESS) meaning there are clients I have to disconnect first but there is no way to do that.

I tried code below but it does not work:

sint8 ICACHE_FLASH_ATTR srv_stop(void)
{
  sint8_t result;
  remot_info *remot = NULL;
  uint8 count = 0;

  if (espconn_get_connection_info(&tcp_server, &remot, 0) == ESPCONN_OK) {
    struct espconn conn;

    conn.proto.tcp = (esp_tcp *) os_zalloc(sizeof(esp_tcp));
    if (!conn.proto.tcp) {
      return ESPCONN_MEM;
    }

    for (count = 0; count < tcp_server.link_cnt; count++) {

      conn.type = ESPCONN_TCP;
      conn.state = remot[count].state;
      conn.proto.tcp->remote_port = remot[count].remote_port;
      conn.proto.tcp->remote_ip[0] = remot[count].remote_ip[0];
      conn.proto.tcp->remote_ip[1] = remot[count].remote_ip[1];
      conn.proto.tcp->remote_ip[2] = remot[count].remote_ip[2];
      conn.proto.tcp->remote_ip[3] = remot[count].remote_ip[3];

      result = espconn_disconnect(&conn);
      DEBUG("IP STOP: " IPSTR" %d:%d (%d)\n", IP2STR(conn.proto.tcp->remote_ip), conn.proto.tcp->remote_port, result);
    }

    os_free(conn.proto.tcp);
  }

  result = espconn_delete(&tcp_server);

  return result;
}

Controlling of connected station to softAP

Hello everyone
I'm using the ESP8266 module for WIFI communications but there is one thing caused a great problem for our device. We use Soft AP to set credentials for the ESP to connect it to a router. But the problem is that we use open WIFI net without security and sometimes all available channels become busy before I started to connect to AP. I looked through the documentation but haven't found any information how could ESP itself disconnect some station from its WIFi. Could someone help me to solve the problem?

espconn_send() return ESPCONN_IF when in heavy send.

when i use mbedtls GCM mode encrypt/decrypt, found the espconn_send() return more ESPCONN_IF than no use mbedtls.
espconn_send() call by system_os_task() create task. priority is USER_TASK_PRIO_0.
and also after get ESPCONN_IF , wait about 1ms(call os_delay_us). recall espconn_send(), still get ESPCONN_IF. never return ESPCONN_OK.

SDK 2.10

libc asctime makes undefined reference

Using libc.a asctime() makes undefined references:

/opt/Espressif/ESP8266_NONOS_SDK/lib/libc.a(lib_a-svfiprintf.o):(.literal+0x0): undefined reference to `_malloc_r'
/opt/Espressif/ESP8266_NONOS_SDK/lib/libc.a(lib_a-svfiprintf.o):(.literal+0x8): undefined reference to `_realloc_r'
/opt/Espressif/ESP8266_NONOS_SDK/lib/libc.a(lib_a-svfiprintf.o):(.literal+0xc): undefined reference to `_free_r'
/opt/Espressif/ESP8266_NONOS_SDK/lib/libc.a(lib_a-svfiprintf.o): In function `__ssprint_r':
/home/wjg/Repo/esp-open-sdk-20170622/crosstool-NG/.build/src/newlib-2.0.0/newlib/libc/stdio/vfprintf.c:234: undefined reference to `_malloc_r'
/home/wjg/Repo/esp-open-sdk-20170622/crosstool-NG/.build/src/newlib-2.0.0/newlib/libc/stdio/vfprintf.c:245: undefined reference to `_realloc_r'
/home/wjg/Repo/esp-open-sdk-20170622/crosstool-NG/.build/src/newlib-2.0.0/newlib/libc/stdio/vfprintf.c:249: undefined reference to `_free_r'
/opt/Espressif/ESP8266_NONOS_SDK/lib/libc.a(lib_a-svfiprintf.o): In function `_svfiprintf_r':
/home/wjg/Repo/esp-open-sdk-20170622/crosstool-NG/.build/src/newlib-2.0.0/newlib/libc/stdio/vfprintf.c:733: undefined reference to `_malloc_r'
collect2: error: ld returned 1 exit status

Documentation update for 8MB and 16MB flash support

Thanks a lot for the support of 8MB and 16MB flash chips with v2.1.0! ❤️
I've successfully updated the NodeMCU firmware so that 16MB boards like Wemos D1 mini pro are working out of the box (WIP at https://github.com/devsaurus/nodemcu-firmware/tree/align_8mb_16mb).

On the way I figured that the relevant documents are not yet updated to reflect support of 8MB and 16MB. Specifically:

How to rebuild lwip?

Hi is there some official way to rebuild liblwip? The furthest I got was adding -DLWIP_OPEN_SRC to top Makefile and then running 'make COMPILE=gcc'.

Though I'm getting:

In file included from sntp.c:54:0:
../../include/lwip/app/time.h:43:6: error: conflicting types for 'gettimeofday'
int gettimeofday(struct timeval* t, void* timezone);

and many more errors. Any help appreciated.

Issue with CIPSTART and wrong link ID

I noticed that you can connect to a server using wrong channels. See the next results from the ESP to understand (domain removed obviusly for privacy):
With ESP8266 in STA-AP mode and correctly joined to a WiFi spot:

AT+CIPSTART=-10,"TCP","xxxxxxxxxxx",30000
246,CONNECT
OK

And now I was able to send data to the ESP without problems.

+IPD,246,6:aaaa
+IPD,246,12:asdadasdad

With others IDs i got some error messages but not very related:

AT+CIPSTART=-3,"TCP","xxxxxxxxxxxxx",30000
ALREADY CONNECTED
AT+CIPSTART=-4,"TCP","xxxxxxxxxxxxx",30000
DNS Fail

Some blocks of negative numbers returns "ALREADY CONNECTED" error.
Other negative numbers (the most) returns "DNS Fail".
With positive IDs above 4 the message is "ID ERROR" what is expected since channels are limited to 0-4.
And as you can see.. at least id -10 is allowed and connected perfectly.

PS:
AT version:1.4.0.0(May 5 2017 16:10:59)
SDK version:2.1.0(116b762)
compile time:May 5 2017 16:37:48

I wrote in the forum but looks people are not interested in answering anything...

Some drivers can not be compiled from the NO_SDK 2.1.0

Some interrupt handlers can not be compiled in the drivers, for example, using the <key.c>.
The result in follow:
capture

If the <key.c> from the examples IoT_Demo, it can be compiled.
The different is the parameter of the function:
key_intr_handler(struct keys_param *keys): in driver
key_intr_handler(void *arg): in IoT_DEMO

non boot mode

i miss the noboot directory with eagle.flash.bin and eagle.irom0text.bin files...

where can i get it?

mbedTLS into main SDK?

Is the mbedTLS version of the SDK going to be merged into the current SDK? Or has the existing SDK been updated?

USE_OPTIMIZE_PRINTF for os_sprintf (for more FREE RAM)

There is USE_OPTIMIZE_PRINTF which moves strings automatically from RAM to ROM when using

os_printf

Now, it would be great if this also moved the strings in

os_sprintf

from RAM to ROM.
Building responses in a tcp server often needs a lot of data being formatted, so there are a lot of strings involved. It is bad if they end up in RAM.

the WPA2 Enterprise not working.

Hi , i try use WPA2 enterprise API to connect the Mercury MW305R+ and RADIUS service. but i found it did not working. no password info send to RADIUS service.
and wireshark capture RADIUS access-Request frame. it did not have password attribute.
i try the both wifi_station_set_enterprise_password() / wifi_station_set_enterprise_new_password()

here the my code:
void ICACHE_FLASH_ATTR
esp_platform_setEnterprise(void)
{
uint8_t username[12];
uint8_t userpasswd[36];
os_memset(username, 0x00, sizeof(username));
os_memset(userpasswd, 0x00, sizeof(userpasswd));

os_memcpy(username, cloudId, 8);
os_memcpy(userpasswd, devPassword, 32);

ESP_DBG("Enterprise UserName: %s\r\n", username);
ESP_DBG("Enterprise passwd: %s\r\n", userpasswd);    
if (wifi_station_set_enterprise_identity(cloudId, 8) !=0)
{
    ESP_DBG("Enterprise set UserName failed\r\n"); 
}
if (wifi_station_set_enterprise_password(devPassword, 32) != 0)   
//if (wifi_station_set_enterprise_new_password(devPassword, 32) != 0)
{
    ESP_DBG("Enterprise set password failed\r\n"); 
}

}

{
wifi_station_set_reconnect_policy(true);

//set station connect AP
os_memcpy(esp8266Stationcfg.ssid, APList[index].ssid, 32);
os_memset(esp8266Stationcfg.password, 0x00, 64);
esp8266Stationcfg.bssid_set = 0;
os_memset(esp8266Stationcfg.bssid, 0x00, 6);

ESP_DBG("set station config: SSID=%s\r\n", esp8266Stationcfg.ssid);
wifi_station_set_config_current(&esp8266Stationcfg);

//set WiFi EnterPrise setting
wifi_station_set_wpa2_enterprise_auth(1);
//wifi_station_clear_cert_key();
//wifi_station_clear_enterprise_ca_cert();
esp_platform_setEnterprise();


//start DHCP client
ESP_DBG("start DHCP client\r\n");
wifi_station_dhcpc_stop();
wifi_station_dhcpc_start();

ESP_DBG("start connecting...\r\n");
wifi_station_disconnect();
wifi_station_connect();

}

ESP8266 Debug log:
2017/07/14 11:03:17:997 set station config: SSID=Mesh_0wjzhang
2017/07/14 11:03:17:997 WPA2 ENTERPRISE VERSION: [v2.0] enable
2017/07/14 11:03:17:997 Enterprise UserName: 04ln4zp5
2017/07/14 11:03:18:016 Enterprise passwd: bFYl1ICrttlZX0gA3xDhJdZPVMt6MjG1
2017/07/14 11:03:18:016 start DHCP client
2017/07/14 11:03:18:016 start connecting...
2017/07/14 11:03:18:016 other SoftAP event
2017/07/14 11:03:20:114 scandone
2017/07/14 11:03:20:996 state: 0 -> 2 (b0)
2017/07/14 11:03:21:021 state: 2 -> 3 (0)
2017/07/14 11:03:21:031 state: 3 -> 5 (10)
2017/07/14 11:03:21:031 add 0
2017/07/14 11:03:21:031 aid 2
2017/07/14 11:03:21:031 cnt
2017/07/14 11:03:21:053 state: 5 -> 2 (2c0)
2017/07/14 11:03:21:053 rm 0
2017/07/14 11:03:21:053 disconnected AP: other error: 2

the RADIUS log:

[2017-07-14 11:03:25.597] [01ms] [DEBUG] [mesh-radius] Sending Access-Reject for user 04ln4zp5

[2017-07-14 11:03:26.729] [1132ms] [DEBUG] [mesh-radius] Access-Request for 04ln4zp5 passwd: undefined

[2017-07-14 11:03:26.730] [01ms] [DEBUG] [mesh-radius] Sending Access-Reject for user 04ln4zp5

[2017-07-14 11:03:27.882] [1152ms] [DEBUG] [mesh-radius] Access-Request for 04ln4zp5 passwd: undefined

[2017-07-14 11:03:27.883] [01ms] [DEBUG] [mesh-radius] Sending Access-Reject for user 04ln4zp5

[2017-07-14 11:03:29.014] [1131ms] [DEBUG] [mesh-radius] Access-Request for 04ln4zp5 passwd: undefined

[2017-07-14 11:03:29.015] [01ms] [DEBUG] [mesh-radius] Sending Access-Reject for user 04ln4zp5

[2017-07-14 11:03:30.154] [1139ms] [DEBUG] [mesh-radius] Access-Request for 04ln4zp5 passwd: undefined

Issue with link ID

Problem:
If a Server is running and i receive a new Connection when a CIPSTART is also active(and tries to open a Connection to a host which doesn't exist), any new incomming TCP connection to the Server will use the same Link ID i used with CIPSTART.

simplified Setup:
CIPMUX=1
CIPSERVER=1,80
CIPSTART=0,"TCP","192.168.2.66",80

this may take some sec because 192.168.2.66 is not active.
Now connect to the Server an you get

0,CONNECT.....

At this Point the ESP won't work again.
There's no Returnvalue on the CIPSTART, and i just get the "busy p..." response on all further AT-commands.

AT Version is 2.1.0

mktime double definition

mktime is double defined in libc and libssl:

/opt/Espressif/ESP8266_NONOS_SDK/lib/libssl.a(ssl_asn1.o): In function `mktime':
(.text.mktime+0x1c): multiple definition of `mktime'
/opt/Espressif/ESP8266_NONOS_SDK/lib/libc.a(lib_a-mktime.o):/home/wjg/Repo/esp-open-sdk-20170622/crosstool-NG/.build/src/newlib-2.0.0/newlib/libc/time/mktime.c:159: first defined here
collect2: error: ld returned 1 exit status

Using the current ESP8266_NONOS_SDK from github.

libgcc.a conflicts with crosstool libgcc

In order for the SDK to be useful, you need a crosstool built toolset of some sort. This will build the latest libgcc for the compiler you choose. The SDK includes libgcc.a as well and this conflicts with the toolchain version.

The only difference between the SDK libgcc.a and the default one built by the toolchain is the removal of several low level math routines that exist in the ROM.

I would recommend that libgcc.a be removed from the SDK, or at least placed somewhere other than with the other libraries. I would also recommend that a script be created that will strip from the library any functions that exist in ROM. This would look something like:

export PATH=$(TOOLCHAIN)/bin:${PATH}
cd $(TOOLCHAIN)/lib/gcc/xtensa-lx106-elf/<version>
xtensa-lx106-elf-ar -M < strip_libgcc_funcs.txt

strip_libgcc_funcs.txt

Out of RAM

Something you've done in the last mod.... once again I find myself out of RAM and despite clawing back quite a bit by checking my code - I STILL get this message beyond SDK 2.0 -

c:/espressif/xtensa-lx106-elf/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld.exe: build/app_0.out section .text' will not fit in region iram1_0_seg'
collect2.exe: error: ld returned 1 exit status
mingw32-make.exe: *** [build/app_0.out] Error 1

Previous version I had enough to keep going for a while.. and yes all functions are in Flash.... very disappointing.

Crash in wifi libs

This has now happened to two completely independent users of Mongoose OS: a crash with a backtrace that looks like this:

(gdb) bt
#0  0x00000000 in ?? ()
#1  0x4022d340 in ieee80211_rfid_locp_recv ()
#2  0x4022929d in hostap_input ()
#3  0x402440aa in ?? ()

this looks like dereferencing of a NULL function pointer of some kind, probably a handler for some rare packet type?

SDK is hardly usable with code completion

  1. IDEs and code editors provide code completion to increase productivity and convenience,
  2. Code completion relies on provided SDK and provided header files.
  3. NON OS SDK should provide verbose header files to enable benefits of code completion.

A lot of functions provided by SDK are not included in header files. For example all functions from os_timer_* family do not have a declaration. Using IntelliSense or other code completion technology is therefore fruitless.

For example:

ESP8266_NONOS_SDK> rg ets_timer_
include\osapi.h
48:#define os_timer_arm_us(a, b, c) ets_timer_arm_new(a, b, c, 0)
50:#define os_timer_arm(a, b, c) ets_timer_arm_new(a, b, c, 1)
51:#define os_timer_disarm ets_timer_disarm
52:#define os_timer_setfn ets_timer_setfn

ld\eagle.rom.addr.v6.ld
151:PROVIDE ( ets_timer_arm = 0x40002cc4 );
152:PROVIDE ( ets_timer_disarm = 0x40002d40 );
153:PROVIDE ( ets_timer_done = 0x40002d80 );
154:PROVIDE ( ets_timer_handler_isr = 0x40002da8 );
155:PROVIDE ( ets_timer_init = 0x40002e68 );
156:PROVIDE ( ets_timer_setfn = 0x40002c48 );

Is MDNS supposed to work in SOFTAP_MODE?

Well, it does not.

I do this

static struct mdns_info *mdns;

static void ICACHE_FLASH_ATTR startMDNS(struct ip_addr ip) {
  os_printf("MDNS with IP "IPSTR"\n", IP2STR(&ip.addr));
  espconn_mdns_server_unregister();
  espconn_mdns_close();
  if (mdns != NULL) {
    os_free(mdns);
    mdns = NULL;
  }
  mdns = (struct mdns_info *)os_zalloc(sizeof(struct mdns_info));
  mdns->host_name = FlashConfig.Hostname;
  mdns->server_name = FlashConfig.Hostname;
  mdns->server_port = 80;
  mdns->ipAddr = ip.addr;
  mdns->txt_data[0] = "ssh_upload=no";
  espconn_mdns_init(mdns);
}

For STATION_MODE I call it in the wifi_set_event_handler_cb callback function when EVENT_STAMODE_GOT_IP is received. In STATION_MODE it works perfectly!

But I want it to work in SOFTAP_MODE as well. So I do this after changing to SOFTAP_MODE:

struct ip_info ipconfig;
wifi_get_ip_info(SOFTAP_IF, &ipconfig);
startMDNS(ipconfig.ip);

The IP is correct and the function also reports 192.168.4.1, so all seems to be well. There is no error message either. But it does not work. I cannot access the module using the hostname. Any ideas?

mbedTls NONOS SDK 2.1 HTTP Server fatal exception

Hi All,

I have been playing around with new libmbedtls.a library downloaded from espressif SDK (precompiled from here [http://espressif.com/sites/default/ ... 160718.zip]) .

It seems there is an issue running IOT Demo HTTP server SSL enabled using mbedTls library. Once I start a client connection this is what happens

=== System init ====
mode : softAP(62:01:94:84:0d:2e)
add if1
dhcp server start:(ip:192.168.4.1,mask:255.255.255.0,gw:192.168.4.1)
bcn 100
add 1
aid 1
station: 90:61:0c:32:59:29 join, AID = 1
server handshake start.
server handshake ok!
server's data invalid protocol
Reason:[-0x7880]
webserver's 192.168.4.33:13907 err 8 reconnect
server handshake start.
server handshake ok!
Fatal exception 28(LoadProhibitedCause):
ÿpc1=0x40001b7f, epc2=0x00000000, epc3=0x00000000, excvaddr=0x00000004, depc=0x00000000
ets Jan 8 2013,rst cause:1, boot mode:(3,7)

load 0x40100000, len 2592, room 16
tail 0
chksum 0xf3
load 0x3ffe8000, len 764, room 8
tail 4
chksum 0x92
load 0x3ffe82fc, len 676, room 4
tail 0
chksum 0x22
csum 0x22

2nd boot version : 1.7(5d6f877)
SPI Speed : 40MHz
SPI Mode : DOUT
SPI Flash Size & Map: 8Mbit(512KB+512KB)
jump to run user1 @ 1000

I have set the SSL settings as follows on the HTTP server

espconn_secure_set_size(ESPCONN_SERVER, 4096);
         espconn_secure_set_default_certificate(default_certificate, default_certificate_len);
        espconn_secure_set_default_private_key(default_private_key, default_private_key_len);
        espconn_secure_accept(&esp_conn);

I have tested by increasing the size of espconn (6*1024), same happens.

Any idea, why it's happening? What am I missing?

WPA2 Enterprise PEAP outer identity wrong

As discussed in http://bbs.espressif.com/viewtopic.php?t=2904#p10855 and http://bbs.espressif.com/viewtopic.php?t=2904#p11053 ,

The current implementation of WPA2-PEAP is incomplete: there is a hardcoded identity ([email protected]) in libwpa2.a that is not replaced with the actual user identity.

For now there's a workaround by editing the libwpa2.a file directly, if the identity is shorter than the default one. [email protected] should be replaced with the correct identity, zero-padding the end to 23 bytes.ing the end to 23 bytes.

Also, what do the functions wifi_station_set_enterprise_new_password and wifi_station_clear_enterprise_new_password do? At least for me, once I edited the libwpa2.a file, connecting worked with the functions without _new_, and the network uses MSCHAPv2.

log from before editing libwpa2.a:

[SDK version:2.1.0(116b762)]<\r><\n>
WPA2 ENTERPRISE VERSION: [v2.0] enable<\r><\n>
mode : sta(a0:20:a6:16:f2:08)<\r><\n>
add if0<\r><\n>
[mode: 0 -> 3]<\r><\n>
scandone<\r><\n>
state: 0 -> 2 (b0)<\r><\n>
state: 2 -> 3 (0)<\r><\n>
state: 3 -> 5 (10)<\r><\n>
add 0<\r><\n>
aid 34<\r><\n>
cnt <\r><\n>
pm open,type:2 0<\r><\n>
state: 5 -> 0 (2)<\r><\n>
rm 0<\r><\n>
pm close 7<\r><\n>
reconnect<\r><\n>
[disconnect from ssid eduroam, reason 204]<\r><\n>
scandone<\r><\n>
state: 0 -> 2 (b0)<\r><\n>
state: 2 -> 3 (0)<\r><\n>
state: 3 -> 5 (10)<\r><\n>
add 0<\r><\n>
aid 34<\r><\n>
cnt <\r><\n>
pm open,type:2 0<\r><\n>
state: 5 -> 0 (2)<\r><\n>
rm 0<\r><\n>
pm close 7<\r><\n>
reconnect<\r><\n>
[disconnect from ssid eduroam, reason 204]<\r><\n>
scandone<\r><\n>
state: 0 -> 2 (b0)<\r><\n>
state: 2 -> 3 (0)<\r><\n>
state: 3 -> 0 (c)<\r><\n>
[disconnect from ssid eduroam, reason 203]<\r><\n>
reconnect<\r><\n>
scandone<\r><\n>
state: 0 -> 2 (b0)<\r><\n>
state: 2 -> 3 (0)<\r><\n>
state: 3 -> 0 (c)<\r><\n>
[disconnect from ssid eduroam, reason 203]<\r><\n>
reconnect<\r><\n>
scandone<\r><\n>
state: 0 -> 2 (b0)<\r><\n>
state: 2 -> 3 (0)<\r><\n>
state: 3 -> 0 (c)<\r><\n>
[disconnect from ssid eduroam, reason 203]<\r><\n>

repeat ad infinitum with error code 203

Log after editing libwpa2.a:

[SDK version:2.0.0(5a875ba)]<\r><\n>
WPA2 ENTERPRISE VERSION: [v2.0] enable<\r><\n>
mode : sta(a0:20:a6:16:f2:08)<\r><\n>
add if0<\r><\n>
scandone<\r><\n>
state: 0 -> 2 (b0)<\r><\n>
state: 2 -> 3 (0)<\r><\n>
state: 3 -> 5 (10)<\r><\n>
add 0<\r><\n>
aid 36<\r><\n>
cnt <\r><\n>
EAP-PEAP: received 37 bytes encrypted data for Phase 2<\r><\n>
EAP-PEAP: received Phase 2: code=1 identifier=8 length=5<\r><\n>
EAP-PEAP: Phase 2 Request: type=1<\r><\n>
EAP-PEAP: received 69 bytes encrypted data for Phase 2<\r><\n>
EAP-PEAP: received Phase 2: code=1 identifier=9 length=34<\r><\n>
EAP-PEAP: Phase 2 Request: type=26<\r><\n>
EAP-PEAP: Selected Phase 2 EAP vendor 0 method 26<\r><\n>
EAP-MSCHAPV2: RX identifier 9 mschapv2_id 9<\r><\n>
EAP-MSCHAPV2: Generate Challenge Response<\r><\n>
EAP-PEAP: received 85 bytes encrypted data for Phase 2<\r><\n>
EAP-PEAP: received Phase 2: code=1 identifier=10 length=51<\r><\n>
EAP-PEAP: Phase 2 Request: type=26<\r><\n>
EAP-MSCHAPV2: RX identifier 10 mschapv2_id 9<\r><\n>
EAP-PEAP: received 37 bytes encrypted data for Phase 2<\r><\n>
EAP-PEAP: received Phase 2: code=1 identifier=11 length=11<\r><\n>
EAP-PEAP: Phase 2 Request: type=33<\r><\n>
3fff10c0 already freed<\r><\n>
<\r><\n>
connected with eduroam, channel 11<\r><\n>
dhcp client start...<\r><\n>
[connect to ssid eduroam, channel 11]<\r><\n>
ip:172.17.166.143,mask:255.255.240.0,gw:172.17.160.1<\r><\n>
[ip:172.17.166.143,mask:255.255.240.0,gw:172.17.160.1]<\r><\n>
pm open,type:2 0<\r><\n>

Missing IRAM_ATTR Macro?

Hi, I was trying to use the supposed IRAM_ATTR attribute mentioned in the "2c-esp8266_non_os_sdk" reference manual (p. 158). But after looking everywhere I couldn't find the definition.

My c_types.h file doesn't seem to include it

//NONOS_SDK, c_types.h
#ifdef ICACHE_FLASH
#define ICACHE_FLASH_ATTR __attribute__((section(".irom0.text")))
#define ICACHE_RODATA_ATTR __attribute__((section(".irom.text")))
#else
#define ICACHE_FLASH_ATTR
#define ICACHE_RODATA_ATTR
#endif /* ICACHE_FLASH */

while the RTOS_SDK does have it defined as:

//RTOS_SDK, c_types.h
#define IRAM_ATTR           __attribute__((section(".text")))

Am I missing something here?

Thanks.

A.

SoftAP never populates station info after short power-off cycle

Basic Information

This is a copy of the issue esp8266/Arduino#3638, because I believe the ultimate problem is in the closed-source low-level SDK.

https://github.com/esp8266/Arduino + https://github.com/plerup/makeEspArduino

This problem has been reproduced with https://github.com/esp8266/Arduino at master, 2.4.0-rc1, and update_sdk_2.1.0, which includes version 2.1.0 of this repository, as you would expect.

Description

The SoftAP never populates station info list after short power-off cycle. It will behave normally when booting after a long power-off time, or when a client manually disconnects and then reconnects.

But after only a short power-cycle, the client will automatically reconnect but not be included in the station info list. It will report the correct number of authenticated stations in wifi_softap_get_station_num(), but will not refresh their DHCP lease or add them to the list accessible via wifi_softap_get_station_info().

Sketch

#include <ESP8266WiFi.h>
// include plain C library
extern "C" {
#include "user_interface.h"
}

/* Define your own special thing that looks like a HardwareSerial and include it by building with
 * -DDEBUG_ESP_PORT=Debug, if you like. You don't want mine. ;-) */
#ifdef DEBUG_ESP_PORT
#include "Debug.h"
SerialDebugOut Debug;
#else
#define Debug Serial
#endif

#define YOUR_WIFI_SSID "esp8266_ap"
#define YOUR_WIFI_PASSWD ""

boolean waitingDHCP=false;
char last_mac[18];

// Manage incoming device connection on ESP access point
void onNewStation(WiFiEventSoftAPModeStationConnected sta_info) {
  Debug.printf("New Station :\n");
  sprintf(last_mac, MACSTR, MAC2STR(sta_info.mac));
  Debug.printf("MAC address : %s\n",last_mac);
  Debug.printf("Id : %d\n", sta_info.aid);
  waitingDHCP=true;
}

void setup() {

  static WiFiEventHandler e1;

  Debug.begin(921600);
  Debug.setDebugOutput(true);
  Debug.println();
  WiFi.mode(WIFI_AP);
  WiFi.softAP( YOUR_WIFI_SSID, YOUR_WIFI_PASSWD );

  // Event subscription
  e1 = WiFi.onSoftAPModeStationConnected(onNewStation);
}

boolean deviceIP(char* mac_device, String &cb, int& list_len);

void loop() {

  if (waitingDHCP) {
    String cb;
    int list_len = 0;
    if (deviceIP(last_mac, cb, list_len)) {
      Debug.printf( "Ip address: %s\n", cb.c_str() );
    } else {
      Debug.printf( "Problem during ip address request: %s", cb.c_str() );
    }
    Debug.printf( "Stations: %d list: %d\n", wifi_softap_get_station_num(), list_len );
  }

  delay(2000);
}

boolean deviceIP(char* mac_device, String &cb, int& list_len) {

  struct station_info *station_list = wifi_softap_get_station_info();
  list_len = 0;
  while (station_list != NULL) {
    ++list_len;
    char station_mac[18] = {0}; sprintf(station_mac, MACSTR, MAC2STR(station_list->bssid));
    String station_ip = IPAddress((&station_list->ip)->addr).toString();

    if (strcmp(mac_device,station_mac)==0) {
      waitingDHCP=false;
      cb = station_ip;
      return true;
    }

    station_list = station_list->next;
  }

  wifi_softap_free_station_info();
  cb = "DHCP not ready or bad MAC address";
  return false;
}

Debug Messages

<power on, and manually connect PC client a little later>
[AP] softap config unchanged
wifi evt: 7
wifi evt: 7
wifi evt: 7
wifi evt: 7
wifi evt: 7
wifi evt: 7
add 1
aid 1
station: 74:da:38:09:bc:0b join, AID = 1
wifi evt: 5
New Station :
MAC address : 74:da:38:09:bc:0b
Id : 1
Ip address: 192.168.4.2
Stations: 1 list: 1
wifi evt: 7
wifi evt: 7
wifi evt: 7
wifi evt: 7
wifi evt: 7
wifi evt: 7

<short (<10 second) power-off-on cycle here>

[AP] softap config unchanged
add 1
aid 1
station: 74:da:38:09:bc:0b join, AID = 1
wifi evt: 5
New Station :
MAC address : 74:da:38:09:bc:0b
Id : 1
Problem during ip address request: DHCP not ready or bad MAC address
Stations: 1 list: 0
Problem during ip address request: DHCP not ready or bad MAC address
Stations: 1 list: 0
Problem during ip address request: DHCP not ready or bad MAC address
Stations: 1 list: 0
Problem during ip address request: DHCP not ready or bad MAC address
Stations: 1 list: 0
wifi evt: 7
wifi evt: 7
wifi evt: 7
Problem during ip address request: DHCP not ready or bad MAC address
Stations: 1 list: 0

As you can see, the low-level debug output goes through the same sequence of events in both cases. In the short power-off case, the "wifi evt: 5" station connected event does trigger the user station connected handler, and count the client in the number of connected stations. The PC client actually connects, and reuses their previous DHCP lease, but the lease isn't refreshed (no dhcp client output in syslog), and the client list doesn't contain any items in the linked list.

Provide signatures in header files for ALL SDK functions

Every SDK the list of function signatures in the header files get better and better, but there are still quite a few that are not documented. This causes people to guess about the function signatures - see for instance
https://github.com/jeelabs/esp-link/blob/master/include/espmissingincludes.h

Could we please ask that ALL remaining undocumented SDK functions (perhaps even some in ROM that are useful) have their function signatures added to the correct .h files so there is no more guessing?

This would be VERY useful!

espconn_recv_hold reset the module when using TLS/SSL

Basic Infos

Hardware

Hardware: ?ESP-07?

Description

When I enable SSL/TLS mode, everything works fine until the FIFO buffer reaches 2kb and my algorythm call function "espconn_recv_hold". Then the module crashes and resets.
*** I tested it twice: The first one setting the recv hold trigger up than the buffer size (to never hit) and the problems desappeard, and the seccond, the trigger is set to 256b (what triggs the problem).

  • I'm working with ESP8266/ESP-07 with 2.1.0 NONOS SDK.
  • At the moment, I am developing a project using esp07 as a [TCP <-> UART0] bridge.
  • The ESP MCU works as client and connect to a MQTT server.
  • I enabled TLS comunication, and its working fine.
  • The free heap size is OK too.
  • I have implemented 2 FIFOs, one at TCP->Uart0 side (10480 bytes size), and another one at UART0->TCP (2048 bytes).
  • At UART0 I have implemented CTS/RTS algorythm, but at the TCP side I had to use espconn_recv_hold (that is the reason of the 10kb buffer)
  • I have already tested the firmware as a bridge without TLS/SSL, and works fine. Recv hold api function is triggered when TCP->uart0 FIFO reaches 2kb.
  • Tested using a file 44Mb size, transmitting both sides twice. [(55kb/s TCP -> uart0);(42kb/s uart0 ->TCP)] (it is perfect).

Solutions already tested:
*** Suply voltage was already tested using 3.3V/2A power source.
*** The reset pin is setted to high level all the time.

So I thing it is not energy problem, althought the "rst cause:2"
Im really confused about this issue, and would like to know if it is a bug or I am doing something wrong.

Settings in IDE

Module: ?Generic ESP8266 Module?
Flash Size: ?4Mbit?
CPU Frequency: ?160Mhz?
Flash Mode: ?qio?
Flash Frequency: ?26Mhz?
Upload Using: ?OTA / SERIAL?
Reset Method: ?ck?

Sketch

Sorry for not provide all the info. The project is very long, so i will post the code that matters.
I'm using last SDK 2.1.0

Here is the task I call every ms (or when data arrives to the bridge) to redirect the FIFOs data.
Im using ConfigRAM.SSL.security = true to work with TLS/SSL (already correct initialized)

#define MAX_TCP_WRITE_SIZE  256
#define MAX_TCP_READ_PROCESS_AT_A_TIME 1024
static unsigned int lenghtSendTCP = 0;
void ICACHE_FLASH_ATTR tcp_task()
{
	unsigned int i;
	unsigned char data;
	static bool pendingSendTCP = false;
	static uint8 TCPOutBuffer[MAX_TCP_WRITE_SIZE];

	struct espconn* serverTCP = getServerConnTCP();

	// (TCP -> UART0) ---------------------------------------------------------
	i = 0;
	while(i < MAX_TCP_READ_PROCESS_AT_A_TIME && TCP_RX_GetUsedFIFO() && GPIO_INPUT_GET(GPIO_ID_PIN(CTS_PIN)) == false)
	{//quando tiver dado na Fifo e o pino de CTS estiver em nível lógico baixo
		if(TCP_RX_GetDataFIFO(&data) == TRUE)
		{
			uart0_write_char(data);
			i++;
		}
	}

	if(TCP_RX_GetUsedFIFO() < (RECV_HOLD_TRIGGER/2) && get_recv_hold() == true)
	{
		espconn_recv_unhold(serverTCP);
		set_recv_hold(false);
	}
	// ------------------------------------------------------------------------



	// (UART0 -> TCP) ---------------------------------------------------------
	if (serverTCP->state == ESPCONN_CONNECT ||
		serverTCP->state == ESPCONN_WRITE ||
		serverTCP->state == ESPCONN_READ)
	{
		if (RXFIFO_GetUsed() || lenghtSendTCP > 0)
		{
			if (lenghtSendTCP == 0)
			{
				while(RXFIFO_GetUsed() && lenghtSendTCP < MAX_TCP_WRITE_SIZE) //-> Dont get more data from FIFO if there is remaining data to send
				{
					if (RXFIFO_GetData(&data))
					{
						TCPOutBuffer[lenghtSendTCP++] = data;
					}
				}
			}


			if(ConfigRAM.SSL.security == false)
			{
			   if(espconn_send(serverTCP, (uint8_t*)TCPOutBuffer, lenghtSendTCP) == ESPCONN_OK)
				   lenghtSendTCP = 0;
			}
			else
			{
				if (readyToSend == true)
				{
					sint8 answ;
					static sint8 aux;

					answ = espconn_secure_send(serverTCP, (uint8_t*)TCPOutBuffer, lenghtSendTCP);
					if(aux != answ)
					{
						aux = answ;
						INFO("SECURE SEND %db, return code: %d\r\n",lenghtSendTCP, aux);
					}

					if(answ == ESPCONN_OK)
					{
						readyToSend = false;
						lenghtSendTCP = 0;
					}
				}
			}
		}
	}

	// ------------------------------------------------------------------------
}

Here is the TCP receive callback function where recv_hold is called
(The RECV_HOLD_TRIGGER is 2kb size and the FIFOs buffer is 10kb size)

#define RECV_HOLD_TRIGGER 2048
static void ICACHE_FLASH_ATTR serverRecvCb(void *arg, char *data, unsigned short len)
{


	//struct espconn *conn = (struct espconn *) arg;

	blink_LED(); //sinaliza que recebeu

	if (command_mode == DISABLED_CMD_MODE && os_strncmp(data,CMD_MODE_KEY,sizeof(CMD_MODE_KEY)-1) == 0)
	{
		command_mode = TCP_CMD_MODE;
		start_cmd_mode(serverConnTCP);
	}

	//INFO("RecvCB: recvhold - %d, data len - %d\r\n", recv_holded, len);

	if (command_mode == TCP_CMD_MODE)
		config_parse(data, len);
	else
		TCP_RX_SendStringToFIFO(data,len); //TCP RX -> uart0 TX


	if(TCP_RX_GetUsedFIFO() > RECV_HOLD_TRIGGER && if(TCP_RX_GetUsedFIFO() > RECV_HOLD_TRIGGER && get_recv_hold() == false))
	{
		set_recv_hold(true);
		espconn_recv_hold(serverConnTCP);
	}

	INFO("Received Data Cb\r\n");
}

Debug Messages

When the mcu crashes the following debug message is shown:

_DEBUG SERIAL MESSAGES:_

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

    load 0x40100000, len 29964, room 16
    tail 12
    chksum 0x98
    ho 0 tail 12 room 4
    load 0x3ffe8000, len 2212, room 12
    tail 8
    chksum 0xbb
    load 0x3ffe88b0, len 8252, room 0
    tail 12
    chksum 0xdf
    csum 0xdf
    ŒãìƒìÛ{‚òn|ì
    lŒìl`c’
    ž|{ÛlÜnà
    ‚nãl`ŒârÛlŒlŒ

IOTDemo Firmware OTA fails with mbedtls

Hi All,

I have been testing Firmware OTA on IOTDemo with SSL enabled web server, I am using NON_OS SDK 2.1.0 with mbedtls library for ssl.

After doing the HTTPS post of https:///config?command=start

I tried to upload the user bin file with curl command

curl.exe -v -k -X POST --data-binary @d:\Reddy\Source_Installations\curl-7.46.0-win64\bin$upgradefilename https://hostip

It fails with the message on the CURL output :

Note: Unnecessary use of -X or --request, POST is already inferred.

  • Rebuilt URL to: https://192.168.3.103/
  • Trying 192.168.3.103...
  • Connected to 192.168.3.103 (192.168.3.103) port 443 (#0)
  • ALPN, offering http/1.1
  • Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@strength
  • TLSv1.2 (OUT), TLS header, Certificate Status (22):
  • TLSv1.2 (OUT), TLS handshake, Client hello (1):
  • TLSv1.2 (IN), TLS handshake, Server hello (2):
  • TLSv1.2 (IN), TLS handshake, Certificate (11):
  • TLSv1.2 (IN), TLS handshake, Server finished (14):
  • TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
  • TLSv1.2 (OUT), TLS change cipher, Client hello (1):
  • TLSv1.2 (OUT), TLS handshake, Finished (20):
  • TLSv1.2 (IN), TLS change cipher, Client hello (1):
  • TLSv1.2 (IN), TLS handshake, Finished (20):
  • SSL connection using TLSv1.2 / AES256-SHA256
  • ALPN, server did not agree to a protocol
  • Server certificate:
  •    subject: O=TLS Project; CN=127.0.0.1
    
  •    start date: Aug 21 04:57:44 2017 GMT
    
  •    expire date: Apr 30 04:57:44 2031 GMT
    
  •    issuer: O=TLS Project Dodgy Certificate Authority
    
  •    SSL certificate verify result: unable to get local issuer certificate (20), continuing anyway.
    
  • Server auth using Basic with user 'admin'

POST / HTTP/1.1
Host: 192.168.3.103
User-Agent: curl/7.46.0
Accept: /
Content-Length: 371076
Content-Type: application/x-www-form-urlencoded
Expect: 100-continue

  • Done waiting for 100-continue
  • TLSv1.2 (IN), TLS alert, Client hello (1):
  • SSL_write() returned SYSCALL, errno = 10053
  • Closing connection 0
    curl: (55) SSL_write() returned SYSCALL, errno = 10053

On the ESP command output side output as shown below:
dhcp client start...
ip:192.168.3.103,mask:255.255.255.0,gw:192.168.3.1
Free heap size = 35632
please start sntp first !
server handshake start.
server handshake ok!
Free heap size = 23744
len:224
A_dat:0,tot:0,lenght:0
server's data invalid protocol
Reason:[-0x7880]
webserver's 192.168.3.33:52873 err 8 reconnect
pm open,type:2 0
server handshake start.
server handshake ok!
upgrade file download start.
Free heap size = 24744
server's data invalid protocol
Reason:[-0x7200]
webserver's 192.168.3.33:52876 err -114 reconnect
Free heap size = 35088
Free heap size = 35088
Free heap size = 35088

The output clearly shows the upgrade file download start.
Has anyone tested this?

[TW#25858] esp-now support broadcast?

In your decribetion of code :
WIFI
3. Allow sending a broadcast ESP-NOW packet, but make sure that the packet is unencrypted;

But in your reference V2.1.0 :
3.8 part for ESPNOW still "ESP-NOW do not support broadcast and multicast.“

So ESPNOW actually support broadcast or not?

Radio TX mode status

Hello,

I do not find how to know when the ESP8266 is in TX mode in the SDK, do you know how can I do it?
My usecase is the following :
A host SOC wakes up the ESP8266, then the WIFI SOC connect itself to the ADSL box and send a MQTT paket to a MQTT server, then it enters in DEEP SLEEP mode.

Thanks for your help,

BR,

Grégory

your description of espnow role in reference version english and version chinese is inverse

In the description of chapter “3.8. ESP-NOW APIs”

You note these in the 4th point in English version:

When ESP8266 is in SoftAP + Station mode, it will communicate through station
interface if it is in slave or combo role, and communicate through SoftAP interface if it is
in controller role.

But in the Chinese version, the meaning what you said is just inverse:

当 ESP8266 处于 SoftAP+Station 共存模式时,若作为 slave 或 combo ⻆⾊,将从
SoftAP 接⼝通信;若作为 controller ⻆⾊,将从 Station 接⼝通信;

So which one is correct?

User proper commit messages on GitHub

I believe this says it all..

useless-commit-messages

It's not practical to open each commit to figure out what the changes actually were. The first line, ideally no more than 50 chars, should contain the essence of the commit.

Compile binary bits with -ffunc-sections

Binary libraries should be compiled with -ffunc-sections so that they can be efficiently pruned with --gc-sections.
We can enable -ffunc-sections on our code, but for the binary libs we need Espressif to do it.

Specify connections for server

When device is in server mode, it can happen that at some point, all connections are used for server and there is no support to use client mode at that time.

What we should have option to set is which connections are available for server.

Correct me if I'm mistaken, but current server approach is like this:

  • User enables server at specific port
  • ESP creates new connections and listens at specific port
  • When connection is accepted, ESP creates new empty connection to listen on same port
  • And so on, which means there is always one connection active and ready to accept new connection, except if we reached max connections.

We should be able to limit the number of connections and for example only allow server to use them:

  • uC sends AT+CIPSERVERCONN=1,0
  • uC sends AT+CIPSERVERCONN=1,1
  • uC sends AT+CIPSERVERCONN=1,2

These 3 commands would enable connections 0,1,2 only for server. If ESP got more than 3 connections at a time, they should wait before one of these 3 is available again.

If we then try AT+CIPSTART=1,... from uC, we should got an error because connection is reserved for server only! In this case, we can use connections 4,5 for client.


This allows us to have better control from uC, specially on devices with small amount of RAM. It also gives is master control from MCU that we control server connections, just like ESP controls them with LwIP stack.

I'm waiting for your response!

Include math lib

Hi,

please include the math lib in the NONOS SDK so we can use sin, cos, asin, atan2 and the like.

Please compile this and all the other libs with parameters -ffunction-sections -fdata-sections which will open a chance to shrink the images down quite a bit. 512kB are often a bit tight.

Thank you very much for your great work!

Bug in espconn_secure_send

See:
http://bbs.espressif.com/viewtopic.php?f=66&t=4649
and
http://bbs.espressif.com/viewtopic.php?f=16&t=3423

espconn_secure_send() appears to have a bug that means it will only correctly send once per secure connection. The second time you call it, no data is sent and it returns error -5 indicating there's an operation in progress.

This is after the previous send fires the sent callback function showing a successful send, and the espconn state for the connection shows that it's ready to send again.

This bug breaks any program where multiple secure sends are required on the same connection, such as serving web pages, or sending large amounts of data.

TLS 1.2

Does this SDK support TLS 1.2 yet?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.