mardi 20 septembre 2016

ESP8266 - Request received callback never called

Can someone help figure out whey esp8266 would not call request received callback in the following code.

wifi_set_opmode(STATIONAP_MODE); os_printf("\nTotal Heap at beginning %d\n", system_get_free_heap_size()); struct ip_info info; struct softap_config cfg; wifi_softap_get_config(&cfg); strcpy((char )cfg.ssid, "ESP8266_VisualGDB"); cfg.ssid_len = strlen((char)cfg.ssid); wifi_softap_set_config_current(&cfg); //wifi_set_opmode(SOFTAP_MODE);

wifi_softap_dhcps_stop();
IP4_ADDR(&info.ip, 192, 168, 123, 1);
IP4_ADDR(&info.gw, 192, 168, 123, 1);
IP4_ADDR(&info.netmask, 255, 255, 255, 0);
wifi_set_ip_info(SOFTAP_IF, &info);
dhcps_lease_test();
wifi_softap_dhcps_start();

static struct espconn httpdConn;
static esp_tcp httpdTcp;
httpdConn.type = ESPCONN_TCP;
httpdConn.state = ESPCONN_NONE;
httpdTcp.local_port = 80;
httpdConn.proto.tcp = &httpdTcp;


espconn_regist_connectcb(&httpdConn, httpdConnectCb);
espconn_regist_recvcb(&httpdConn, receive_callback);
espconn_accept(&httpdConn);




Aucun commentaire:

Enregistrer un commentaire