BLYNK
HOME       📲 GETTING STARTED       📗 DOCS       ❓HELP CENTER       👉 SKETCH BUILDER

Help flashing blynk on ESP8266 with tls usb


#1

Help please. I’m trying to flash blynk directly on ESP8266 but I keep getting this error:


     netif* interface = ip_route(&addr);

                                      ^

D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\WiFiServer.cpp: In member function 'virtual void WiFiServer::begin()':

D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\WiFiServer.cpp:79:50: error: invalid conversion from 'int8_t (*)(void*, tcp_pcb*, int8_t) {aka signed char (*)(void*, tcp_pcb*, signed char)}' to 'tcp_accept_fn {aka long int (*)(void*, tcp_pcb*, long int)}' [-fpermissive]

     tcp_accept(listen_pcb, &WiFiServer::_s_accept);

                                                  ^

In file included from D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\WiFiServer.cpp:36:0:

D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\lwip/tcp.h:317:18: error:   initializing argument 2 of 'void tcp_accept(tcp_pcb*, tcp_accept_fn)' [-fpermissive]

 void             tcp_accept  (struct tcp_pcb *pcb, tcp_accept_fn accept) ICACHE_FLASH_ATTR;

                  ^

In file included from C:\Users\Nuno Leal\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/lwip2/include/lwip/debug.h:40:0,

                 from D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\lwip/opt.h:46,

                 from D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\WiFiClient.cpp:36:

D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\lwip/ip.h:136:21: error: 'ip_addr_p_t' does not name a type

   PACK_STRUCT_FIELD(ip_addr_p_t src);

                     ^

C:\Users\Nuno Leal\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/lwip2/include/lwip/arch.h:273:30: note: in definition of macro 'PACK_STRUCT_FIELD'

 #define PACK_STRUCT_FIELD(x) x

                              ^

D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\lwip/ip.h:137:21: error: 'ip_addr_p_t' does not name a type

   PACK_STRUCT_FIELD(ip_addr_p_t dest); 

                     ^

C:\Users\Nuno Leal\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/lwip2/include/lwip/arch.h:273:30: note: in definition of macro 'PACK_STRUCT_FIELD'

 #define PACK_STRUCT_FIELD(x) x

                              ^

In file included from C:\Users\Nuno Leal\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/lwip2/include/lwip/ip4.h:49:0,

                 from C:\Users\Nuno Leal\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/lwip2/include/lwip/ip.h:47,

                 from D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\lwip/tcp.h:42,

                 from D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\WiFiClient.cpp:38:

C:\Users\Nuno Leal\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/lwip2/include/lwip/prot/ip4.h:71:8: error: redefinition of 'struct ip_hdr'

 struct ip_hdr {

        ^

In file included from D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\WiFiClient.cpp:37:0:

D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\lwip/ip.h:116:8: error: previous definition of 'struct ip_hdr'

 struct ip_hdr {

        ^

In file included from D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\lwip/tcp.h:42:0,

Multiple libraries were found for "ESP8266WiFi.h"
                 from D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\WiFiClient.cpp:38:

 Used: D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi
C:\Users\Nuno Leal\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/lwip2/include/lwip/ip.h:89:8: error: redefinition of 'struct ip_pcb'

 Not used: C:\Users\Nuno Leal\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2\libraries\ESP8266WiFi
 struct ip_pcb {

        ^

In file included from D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\WiFiClient.cpp:37:0:

D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\lwip/ip.h:89:8: error: previous definition of 'struct ip_pcb'

 struct ip_pcb {

        ^

In file included from D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\WiFiClient.cpp:40:0:

D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\lwip/netif.h:119:25: error: conflicting declaration 'typedef err_t (* netif_output_fn)(struct netif*, struct pbuf*, ip_addr_t*)'

        ip_addr_t *ipaddr);

                         ^

In file included from D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\lwip/ip.h:41:0,

                 from D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\WiFiClient.cpp:37:

C:\Users\Nuno Leal\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/lwip2/include/lwip/netif.h:173:17: error: 'netif_output_fn' has a previous declaration as 'typedef err_t (* netif_output_fn)(struct netif*, struct pbuf*, const ip4_addr_t*)'

 typedef err_t (*netif_output_fn)(struct netif *netif, struct pbuf *p,

                 ^

In file included from D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\WiFiClient.cpp:40:0:

D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\lwip/netif.h:131:37: error: conflicting declaration 'typedef err_t (* netif_igmp_mac_filter_fn)(struct netif*, ip_addr_t*, u8_t)'

        ip_addr_t *group, u8_t action);

                                     ^

In file included from D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\lwip/ip.h:41:0,

                 from D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\WiFiClient.cpp:37:

C:\Users\Nuno Leal\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/lwip2/include/lwip/netif.h:201:17: error: 'netif_igmp_mac_filter_fn' has a previous declaration as 'typedef err_t (* netif_igmp_mac_filter_fn)(struct netif*, const ip4_addr_t*, enum netif_mac_filter_action)'

 typedef err_t (*netif_igmp_mac_filter_fn)(struct netif *netif,

                 ^

In file included from D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\WiFiClient.cpp:40:0:

D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\lwip/netif.h:136:8: error: redefinition of 'struct netif'

 struct netif {

        ^

In file included from D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\lwip/ip.h:41:0,

                 from D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\WiFiClient.cpp:37:

C:\Users\Nuno Leal\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/lwip2/include/lwip/netif.h:225:8: error: previous definition of 'struct netif'

 struct netif {

        ^

In file included from C:\Users\Nuno Leal\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/include/ets_sys.h:28:0,

                 from D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\WiFiClient.cpp:29:

C:\Users\Nuno Leal\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/include/c_types.h:87:67: error: declaration of C function 'netif* netif_add_LWIP2(netif*, ip_addr_t*, ip_addr_t*, ip_addr_t*, void*, netif_init_fn, netif_input_fn)' conflicts with

 #define ICACHE_FLASH_ATTR   __attribute__((section(".irom0.text")))

                                                                   ^

D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\lwip/netif.h:256:76: note: in expansion of macro 'ICACHE_FLASH_ATTR'

       ip_addr_t *gw, void *state, netif_init_fn init, netif_input_fn input)ICACHE_FLASH_ATTR;

                                                                            ^

In file included from C:\Users\Nuno Leal\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/lwip2/include/lwip/arch.h:48:0,

                 from C:\Users\Nuno Leal\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/lwip2/include/lwip/debug.h:40,

                 from D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\lwip/opt.h:46,

                 from D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\WiFiClient.cpp:36:

C:\Users\Nuno Leal\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/lwip2/include/arch/cc.h:126:19: error: previous declaration 'netif* netif_add_LWIP2(netif*, const ip4_addr_t*, const ip4_addr_t*, const ip4_addr_t*, void*, netif_init_fn, netif_input_fn)' here

 #define netif_add netif_add_LWIP2

                   ^

C:\Users\Nuno Leal\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/lwip2/include/lwip/netif.h:359:15: note: in expansion of macro 'netif_add'

 struct netif *netif_add(struct netif *netif,

               ^

In file included from C:\Users\Nuno Leal\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/include/ets_sys.h:28:0,

                 from D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\WiFiClient.cpp:29:

C:\Users\Nuno Leal\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/include/c_types.h:87:67: error: declaration of C function 'void netif_set_addr_LWIP2(netif*, ip_addr_t*, ip_addr_t*, ip_addr_t*)' conflicts with

 #define ICACHE_FLASH_ATTR   __attribute__((section(".irom0.text")))

                                                                   ^

D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\lwip/netif.h:260:21: note: in expansion of macro 'ICACHE_FLASH_ATTR'

       ip_addr_t *gw)ICACHE_FLASH_ATTR;

                     ^

In file included from C:\Users\Nuno Leal\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/lwip2/include/lwip/arch.h:48:0,

                 from C:\Users\Nuno Leal\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/lwip2/include/lwip/debug.h:40,

                 from D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\lwip/opt.h:46,

                 from D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\WiFiClient.cpp:36:

C:\Users\Nuno Leal\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/lwip2/include/arch/cc.h:129:24: error: previous declaration 'void netif_set_addr_LWIP2(netif*, const ip4_addr_t*, const ip4_addr_t*, const ip4_addr_t*)' here

 #define netif_set_addr netif_set_addr_LWIP2

                        ^

C:\Users\Nuno Leal\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/lwip2/include/lwip/netif.h:365:6: note: in expansion of macro 'netif_set_addr'

 void netif_set_addr(struct netif *netif, const ip4_addr_t *ipaddr, const ip4_addr_t *netmask,

      ^

In file included from C:\Users\Nuno Leal\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/include/ets_sys.h:28:0,

                 from D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\WiFiClient.cpp:29:

C:\Users\Nuno Leal\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/include/c_types.h:87:67: error: declaration of C function 'netif* netif_find(char*)' conflicts with

 #define ICACHE_FLASH_ATTR   __attribute__((section(".irom0.text")))

                                                                   ^

D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\lwip/netif.h:267:37: note: in expansion of macro 'ICACHE_FLASH_ATTR'

 struct netif *netif_find(char *name)ICACHE_FLASH_ATTR;

                                     ^

In file included from D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\lwip/ip.h:41:0,

                 from D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\WiFiClient.cpp:37:

C:\Users\Nuno Leal\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/lwip2/include/lwip/netif.h:374:15: error: previous declaration 'netif* netif_find(const char*)' here

 struct netif *netif_find(const char *name);

               ^

In file included from C:\Users\Nuno Leal\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/include/ets_sys.h:28:0,

                 from D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\WiFiClient.cpp:29:

C:\Users\Nuno Leal\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/include/c_types.h:87:67: error: declaration of C function 'void netif_set_ipaddr(netif*, ip_addr_t*)' conflicts with

 #define ICACHE_FLASH_ATTR   __attribute__((section(".irom0.text")))

                                                                   ^

D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\lwip/netif.h:271:62: note: in expansion of macro 'ICACHE_FLASH_ATTR'

 void netif_set_ipaddr(struct netif *netif, ip_addr_t *ipaddr)ICACHE_FLASH_ATTR;

                                                              ^

In file included from D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\lwip/ip.h:41:0,

                 from D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\WiFiClient.cpp:37:

C:\Users\Nuno Leal\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/lwip2/include/lwip/netif.h:379:6: error: previous declaration 'void netif_set_ipaddr(netif*, const ip4_addr_t*)' here

 void netif_set_ipaddr(struct netif *netif, const ip4_addr_t *ipaddr);

      ^

In file included from C:\Users\Nuno Leal\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/include/ets_sys.h:28:0,

                 from D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\WiFiClient.cpp:29:

C:\Users\Nuno Leal\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/include/c_types.h:87:67: error: declaration of C function 'void netif_set_netmask(netif*, ip_addr_t*)' conflicts with

 #define ICACHE_FLASH_ATTR   __attribute__((section(".irom0.text")))

                                                                   ^

D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\lwip/netif.h:272:64: note: in expansion of macro 'ICACHE_FLASH_ATTR'

 void netif_set_netmask(struct netif *netif, ip_addr_t *netmask)ICACHE_FLASH_ATTR;

                                                                ^

In file included from D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\lwip/ip.h:41:0,

                 from D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\WiFiClient.cpp:37:

C:\Users\Nuno Leal\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/lwip2/include/lwip/netif.h:380:6: error: previous declaration 'void netif_set_netmask(netif*, const ip4_addr_t*)' here

 void netif_set_netmask(struct netif *netif, const ip4_addr_t *netmask);

      ^

In file included from C:\Users\Nuno Leal\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/include/ets_sys.h:28:0,

                 from D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\WiFiClient.cpp:29:

C:\Users\Nuno Leal\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/include/c_types.h:87:67: error: declaration of C function 'void netif_set_gw(netif*, ip_addr_t*)' conflicts with

 #define ICACHE_FLASH_ATTR   __attribute__((section(".irom0.text")))

                                                                   ^

D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\lwip/netif.h:273:54: note: in expansion of macro 'ICACHE_FLASH_ATTR'

 void netif_set_gw(struct netif *netif, ip_addr_t *gw)ICACHE_FLASH_ATTR;

                                                      ^

In file included from D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\lwip/ip.h:41:0,

                 from D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\WiFiClient.cpp:37:

C:\Users\Nuno Leal\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/lwip2/include/lwip/netif.h:381:6: error: previous declaration 'void netif_set_gw(netif*, const ip4_addr_t*)' here

 void netif_set_gw(struct netif *netif, const ip4_addr_t *gw);

      ^

D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\WiFiClient.cpp: In member function 'virtual int WiFiClient::connect(IPAddress, uint16_t)':

D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\WiFiClient.cpp:109:24: error: cannot convert 'netif* (*)(ip_addr_t*) {aka netif* (*)(ip4_addr*)}' to 'netif*' in initialization

     netif* interface = ip_route(&addr);

                        ^

D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\WiFiClient.cpp:124:37: error: invalid conversion from 'void (*)(void*, int8_t) {aka void (*)(void*, signed char)}' to 'tcp_err_fn {aka void (*)(void*, long int)}' [-fpermissive]

     tcp_err(pcb, &WiFiClient::_s_err);

                                     ^

In file included from D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\WiFiClient.cpp:38:0:

D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\lwip/tcp.h:321:18: error:   initializing argument 2 of 'void tcp_err(tcp_pcb*, tcp_err_fn)' [-fpermissive]

 void             tcp_err     (struct tcp_pcb *pcb, tcp_err_fn err)ICACHE_FLASH_ATTR;

                  ^

In file included from C:\Users\Nuno Leal\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/lwip2/include/lwip/debug.h:40:0,

                 from D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\lwip/opt.h:46,

                 from D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\WiFiClientSecure.cpp:35:

D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\lwip/ip.h:136:21: error: 'ip_addr_p_t' does not name a type

   PACK_STRUCT_FIELD(ip_addr_p_t src);

                     ^

C:\Users\Nuno Leal\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/lwip2/include/lwip/arch.h:273:30: note: in definition of macro 'PACK_STRUCT_FIELD'

 #define PACK_STRUCT_FIELD(x) x

                              ^

D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\lwip/ip.h:137:21: error: 'ip_addr_p_t' does not name a type

   PACK_STRUCT_FIELD(ip_addr_p_t dest); 

                     ^

C:\Users\Nuno Leal\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/lwip2/include/lwip/arch.h:273:30: note: in definition of macro 'PACK_STRUCT_FIELD'

 #define PACK_STRUCT_FIELD(x) x

                              ^

In file included from C:\Users\Nuno Leal\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/lwip2/include/lwip/ip4.h:49:0,

                 from C:\Users\Nuno Leal\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/lwip2/include/lwip/ip.h:47,

                 from D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\lwip/tcp.h:42,

                 from D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\WiFiClientSecure.cpp:37:

C:\Users\Nuno Leal\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/lwip2/include/lwip/prot/ip4.h:71:8: error: redefinition of 'struct ip_hdr'

 struct ip_hdr {

        ^

In file included from D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\WiFiClientSecure.cpp:36:0:

D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\lwip/ip.h:116:8: error: previous definition of 'struct ip_hdr'

 struct ip_hdr {

        ^

In file included from D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\lwip/tcp.h:42:0,

                 from D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\WiFiClientSecure.cpp:37:

C:\Users\Nuno Leal\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/lwip2/include/lwip/ip.h:89:8: error: redefinition of 'struct ip_pcb'

 struct ip_pcb {

        ^

In file included from D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\WiFiClientSecure.cpp:36:0:

D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\lwip/ip.h:89:8: error: previous definition of 'struct ip_pcb'

 struct ip_pcb {

        ^

In file included from D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\WiFiClientSecure.cpp:39:0:

D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\lwip/netif.h:119:25: error: conflicting declaration 'typedef err_t (* netif_output_fn)(struct netif*, struct pbuf*, ip_addr_t*)'

        ip_addr_t *ipaddr);

                         ^

In file included from D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\lwip/ip.h:41:0,

                 from D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\WiFiClientSecure.cpp:36:

C:\Users\Nuno Leal\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/lwip2/include/lwip/netif.h:173:17: error: 'netif_output_fn' has a previous declaration as 'typedef err_t (* netif_output_fn)(struct netif*, struct pbuf*, const ip4_addr_t*)'

 typedef err_t (*netif_output_fn)(struct netif *netif, struct pbuf *p,

                 ^

In file included from D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\WiFiClientSecure.cpp:39:0:

D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\lwip/netif.h:131:37: error: conflicting declaration 'typedef err_t (* netif_igmp_mac_filter_fn)(struct netif*, ip_addr_t*, u8_t)'

        ip_addr_t *group, u8_t action);

                                     ^

In file included from D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\lwip/ip.h:41:0,

                 from D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\WiFiClientSecure.cpp:36:

C:\Users\Nuno Leal\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/lwip2/include/lwip/netif.h:201:17: error: 'netif_igmp_mac_filter_fn' has a previous declaration as 'typedef err_t (* netif_igmp_mac_filter_fn)(struct netif*, const ip4_addr_t*, enum netif_mac_filter_action)'

 typedef err_t (*netif_igmp_mac_filter_fn)(struct netif *netif,

                 ^

In file included from D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\WiFiClientSecure.cpp:39:0:

D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\lwip/netif.h:136:8: error: redefinition of 'struct netif'

 struct netif {

        ^

In file included from D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\lwip/ip.h:41:0,

                 from D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\WiFiClientSecure.cpp:36:

C:\Users\Nuno Leal\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/lwip2/include/lwip/netif.h:225:8: error: previous definition of 'struct netif'

 struct netif {

        ^

In file included from C:\Users\Nuno Leal\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/include/ets_sys.h:28:0,

                 from D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\WiFiClientSecure.cpp:28:

C:\Users\Nuno Leal\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/include/c_types.h:87:67: error: declaration of C function 'netif* netif_add_LWIP2(netif*, ip_addr_t*, ip_addr_t*, ip_addr_t*, void*, netif_init_fn, netif_input_fn)' conflicts with

 #define ICACHE_FLASH_ATTR   __attribute__((section(".irom0.text")))

                                                                   ^

D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\lwip/netif.h:256:76: note: in expansion of macro 'ICACHE_FLASH_ATTR'

       ip_addr_t *gw, void *state, netif_init_fn init, netif_input_fn input)ICACHE_FLASH_ATTR;

                                                                            ^

In file included from C:\Users\Nuno Leal\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/lwip2/include/lwip/arch.h:48:0,

                 from C:\Users\Nuno Leal\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/lwip2/include/lwip/debug.h:40,

                 from D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\lwip/opt.h:46,

                 from D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\WiFiClientSecure.cpp:35:

C:\Users\Nuno Leal\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/lwip2/include/arch/cc.h:126:19: error: previous declaration 'netif* netif_add_LWIP2(netif*, const ip4_addr_t*, const ip4_addr_t*, const ip4_addr_t*, void*, netif_init_fn, netif_input_fn)' here

 #define netif_add netif_add_LWIP2

                   ^

C:\Users\Nuno Leal\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/lwip2/include/lwip/netif.h:359:15: note: in expansion of macro 'netif_add'

 struct netif *netif_add(struct netif *netif,

               ^

In file included from C:\Users\Nuno Leal\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/include/ets_sys.h:28:0,

                 from D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\WiFiClientSecure.cpp:28:

C:\Users\Nuno Leal\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/include/c_types.h:87:67: error: declaration of C function 'void netif_set_addr_LWIP2(netif*, ip_addr_t*, ip_addr_t*, ip_addr_t*)' conflicts with

 #define ICACHE_FLASH_ATTR   __attribute__((section(".irom0.text")))

                                                                   ^

D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\lwip/netif.h:260:21: note: in expansion of macro 'ICACHE_FLASH_ATTR'

       ip_addr_t *gw)ICACHE_FLASH_ATTR;

                     ^

In file included from C:\Users\Nuno Leal\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/lwip2/include/lwip/arch.h:48:0,

                 from C:\Users\Nuno Leal\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/lwip2/include/lwip/debug.h:40,

                 from D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\lwip/opt.h:46,

                 from D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\WiFiClientSecure.cpp:35:

C:\Users\Nuno Leal\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/lwip2/include/arch/cc.h:129:24: error: previous declaration 'void netif_set_addr_LWIP2(netif*, const ip4_addr_t*, const ip4_addr_t*, const ip4_addr_t*)' here

 #define netif_set_addr netif_set_addr_LWIP2

                        ^

C:\Users\Nuno Leal\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/lwip2/include/lwip/netif.h:365:6: note: in expansion of macro 'netif_set_addr'

 void netif_set_addr(struct netif *netif, const ip4_addr_t *ipaddr, const ip4_addr_t *netmask,

      ^

In file included from C:\Users\Nuno Leal\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/include/ets_sys.h:28:0,

                 from D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\WiFiClientSecure.cpp:28:

C:\Users\Nuno Leal\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/include/c_types.h:87:67: error: declaration of C function 'netif* netif_find(char*)' conflicts with

 #define ICACHE_FLASH_ATTR   __attribute__((section(".irom0.text")))

                                                                   ^

D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\lwip/netif.h:267:37: note: in expansion of macro 'ICACHE_FLASH_ATTR'

 struct netif *netif_find(char *name)ICACHE_FLASH_ATTR;

                                     ^

In file included from D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\lwip/ip.h:41:0,

                 from D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\WiFiClientSecure.cpp:36:

C:\Users\Nuno Leal\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/lwip2/include/lwip/netif.h:374:15: error: previous declaration 'netif* netif_find(const char*)' here

 struct netif *netif_find(const char *name);

               ^

In file included from C:\Users\Nuno Leal\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/include/ets_sys.h:28:0,

                 from D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\WiFiClientSecure.cpp:28:

C:\Users\Nuno Leal\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/include/c_types.h:87:67: error: declaration of C function 'void netif_set_ipaddr(netif*, ip_addr_t*)' conflicts with

 #define ICACHE_FLASH_ATTR   __attribute__((section(".irom0.text")))

                                                                   ^

D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\lwip/netif.h:271:62: note: in expansion of macro 'ICACHE_FLASH_ATTR'

 void netif_set_ipaddr(struct netif *netif, ip_addr_t *ipaddr)ICACHE_FLASH_ATTR;

                                                              ^

In file included from D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\lwip/ip.h:41:0,

                 from D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\WiFiClientSecure.cpp:36:

C:\Users\Nuno Leal\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/lwip2/include/lwip/netif.h:379:6: error: previous declaration 'void netif_set_ipaddr(netif*, const ip4_addr_t*)' here

 void netif_set_ipaddr(struct netif *netif, const ip4_addr_t *ipaddr);

      ^

In file included from C:\Users\Nuno Leal\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/include/ets_sys.h:28:0,

                 from D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\WiFiClientSecure.cpp:28:

C:\Users\Nuno Leal\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/include/c_types.h:87:67: error: declaration of C function 'void netif_set_netmask(netif*, ip_addr_t*)' conflicts with

 #define ICACHE_FLASH_ATTR   __attribute__((section(".irom0.text")))

                                                                   ^

D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\lwip/netif.h:272:64: note: in expansion of macro 'ICACHE_FLASH_ATTR'

 void netif_set_netmask(struct netif *netif, ip_addr_t *netmask)ICACHE_FLASH_ATTR;

                                                                ^

In file included from D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\lwip/ip.h:41:0,

                 from D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\WiFiClientSecure.cpp:36:

C:\Users\Nuno Leal\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/lwip2/include/lwip/netif.h:380:6: error: previous declaration 'void netif_set_netmask(netif*, const ip4_addr_t*)' here

 void netif_set_netmask(struct netif *netif, const ip4_addr_t *netmask);

      ^

In file included from C:\Users\Nuno Leal\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/include/ets_sys.h:28:0,

                 from D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\WiFiClientSecure.cpp:28:

C:\Users\Nuno Leal\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/include/c_types.h:87:67: error: declaration of C function 'void netif_set_gw(netif*, ip_addr_t*)' conflicts with

 #define ICACHE_FLASH_ATTR   __attribute__((section(".irom0.text")))

                                                                   ^

D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\lwip/netif.h:273:54: note: in expansion of macro 'ICACHE_FLASH_ATTR'

 void netif_set_gw(struct netif *netif, ip_addr_t *gw)ICACHE_FLASH_ATTR;

                                                      ^

In file included from D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\lwip/ip.h:41:0,

                 from D:\Nuno Leal\Documents\Arduino\libraries\ESP8266WiFi\src\WiFiClientSecure.cpp:36:

C:\Users\Nuno Leal\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/lwip2/include/lwip/netif.h:381:6: error: previous declaration 'void netif_set_gw(netif*, const ip4_addr_t*)' here

 void netif_set_gw(struct netif *netif, const ip4_addr_t *gw);

      ^

exit status 1
Error compiling for board Generic ESP8266 Module.


#2

I don’t think you dumped enough unformatted data into your post, it is still almost readable… :stuck_out_tongue_winking_eye:

Blynk - FTFC

You have read enough posts over time so you should have some understanding on how to edit your post… and the need to also include the “offending script” (also properly formatted - PS NOT Blockquote) so we might actually have a hope of seeing the syntax error. :wink:


#3

Sorry for that X)

Well, maybe it is because I need to solder the 2 pins on my tls usb dongle?


#4

I do not have a clue about your issue… all that verbatim dump says is there was lots of things that the compiler was warning about.

You need to provide actual issue details and, if relevant, code.


#6

Full wipe on arduino, libraries included, and I’m up and running. Should’ve done that before whining X)

Thank you again!


#7

I have my relay connected to gp0 and the DHT11 on gp2.
I’m facing two problems:
First, sometimes I get crazy readings like 140% humidity and 10 degrees when it’s 24ºC.
Second, I see no network port for OTA on my 1.8.7 IDE,

PS: I followed the sketches I found on the forum for the OTA.

#define BLYNK_PRINT Serial    // Comment this out to disable prints and save space
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
#include <ESP8266mDNS.h>  // For OTA
#include <WiFiUdp.h>  // For OTA
#include <ArduinoOTA.h>  // For OTA

#include <SimpleTimer.h>
SimpleTimer timer;

#include <dht11.h>
dht11 DHT;
#define DHT11_PIN 2

char auth[] = "XXXXXX"; //insert here your token generated by Blynk



void setup()
{
 
  
  Serial.begin(9600); // See the connection status in Serial Monitor
   Blynk.begin(auth, "XXXXX", "XXXXXXX"); //insert here your SSID and password

  ArduinoOTA.setHostname("Ventilator");  // For OTA
  ArduinoOTA.begin();  // For OTA
  
  
  // Setup a function to be called every second
  timer.setInterval(120000L, sendUptime);
}

void sendUptime()
{
  Blynk.virtualWrite(10, DHT.temperature); //virtual pin
  Blynk.virtualWrite(11, DHT.humidity); // virtual pin 
}

void loop()
{
  ArduinoOTA.handle();  // For OTA
  timer.run(); // Initiates SimpleTimer
  int chk; 
  chk = DHT.read(DHT11_PIN);    // READ DATA
  Blynk.run(); // Initiates Blynk
}

#8

You’re currently trying to read the DHT sensor every time your void loop executes, which should be hundreds of times per second. The DHT can’t cope with this, and neither can Blynk. It may also be the cause of your OTA issues.

Move these lines to the start of your void sendUptime function:

  int chk; 
  chk = DHT.read(DHT11_PIN);    // READ DATA

You may then want to reduce the timer interval from the current 120000 (120 seconds) to around 10000 (10 seconds) if you want more frequent readings.

Also, I don’t think this is needed:

but I would include this before your ArduinoOTA.setHostname command:

  ArduinoOTA.onError([](ota_error_t error) { ESP.restart(); });

Pete.


#9

Thank you!

First problem seems to be solved. I will keep that in mind in future projects.

Unfortunatly still no OTA :S


#10

Do you have the correct Python library installed in the correct way on your PC?

Pete.


#11

Also, read this:

Pete.


#12

And solved again master Pete! Thank you!


#13

Well, I need help again…

Two and a half years since I played with blynk. Being an absolutely noob, it was so much time, I forgot everything I learned in that time.

I’m back now, trying to automate my new home.

I went back picking what I had from that time, which is 3 stand-alone esp8266, 2 nano, one uno and a couple of Relays. I learned quickly that the uno and the nanos are pretty much useless nowadays.
I’ve been reading as much as I can… everything is new again. I started with esp8266 with one relay and dht11. Problem is, as discussed on many topics, the relay go high on start. I tried every solution I found and none worked.

Believe me, I was not lazy, I tried to solve the problem for hours and hours…


#14

You don’t say what sort of ESP boards you’re using. If they are the ESP-01 boards (8 pins at one end of the small board) then I’d forget them and go for NodeMCU or Wemos D1 Mini boards instead.

The choice of GPIO pin you use is important, see this handy post:

Also, don’t forget that the numbers printed next to the pins on a NodeMCU or Wemos D1 Mini Board aren’t GPIO numbers, you need to refer to a pinout diagram for your board to translated the D numbers to GPIOs.

If you’re trying to manipulate your GPIO pins directly (by selecting Digital rather than Virtual pins in the Blynk app) then you have limited control over what they do.
I always use Virtual pins, and set them to the desired state (HIGH or LOW) immediately after startup with a digitalWrite command in the Void setup (don’t forget to issue a pinMode statement first for that pin, so that the code knows that it’s an input or output pin).

Pete.


#15

Yes, they are all esp01.

I read that article before and I understood my 4 available gpio will start on high. Anyway, I was trying to get them low after they auto go high on ‘boot’ and I can’t manage to achieve it.

It would be really nice to use, at least this old esps, since the uno and nanos are useless anyway.


#16

To be honest, the NodeMCUs and Wemos D1 Mini’s are so cheap, and so much easier to use, that it’s a false economy to waste time messing around with the ESP-01s.
I prefer the Wemos D1 Minis, as they’re a bit more breadboard friendly, and they have various ‘shields’ that can be stacked or used side-by-side on doubler or tripler bases. I find the modular nature of this setup very easy to work with and it makes troubleshooting and debugging very easy. I’ve used the relay modules, OLED display board and prototyping boards in a few of my home automation projects. You can get a D1 Mini for less than USD 3 on AliExpress.

Post the code where you’ve tried to get the pins to go Low after boot and we’ll take a look at it.

Pete.


#17

Actually, the ESP-01 still is best used to make those old UNO, Nano and Mega Arduinos fully usable with wireless IoT. Just use the ESP, with AT firmware, as a Serial to WiFi adapter and write your programs on the Arduino. Full control of lots of GPIO, without fighting the GPIO boot state quirks of the ESP’s GPIOs.

That said, when using fuller capacity ESP8266 boards like the NodeMCU and Wemos D1 Mini… working around those ESP boot state quirks is just like @PeteKnight said… it may not prevent the initial minuscule pulse on the pins, between boot state and code start, but even that can be mitigated with capacitors or other pin juggling to preferred boot-up state.


#18

Thank you all for your answers.

After hours and hours I understand the false economy thing and already bought one sonoff basic to hack and a wemos on aliexpress.

#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>

#include <SimpleTimer.h>
#include <DHT.h>
#define DHTPIN 0
#define DHTTYPE DHT11

DHT dht(DHTPIN, DHTTYPE);
SimpleTimer timer;

char auth[] = "";
char ssid[] = "";
char pass[] = "";


BLYNK_WRITE(V3)
{
  int pinValue = param.asInt(); // assigning incoming value from pin V3 to a variable
  Serial.println(pinValue);
  if (pinValue == 1) {
        digitalWrite(3, LOW);
    }else {
        digitalWrite(3, HIGH);    
    }

}

void setup()
{
  Serial.begin(9600);  // BLYNK_PRINT data

  WiFi.begin(ssid, pass);
  Blynk.config(auth);
  Blynk.connect();

  timer.setInterval(60000L, sendSensor);
}


void sendSensor()
{
  float h = dht.readHumidity();
  float t = dht.readTemperature(); // or dht.readTemperature(true) for Fahrenheit

  if (isnan(h) || isnan(t)) {
    Serial.println("Failed to read from DHT sensor!");
    return;
  }
  // You can send any value at any time.
  // Please don't send more that 10 values per second.
  Blynk.virtualWrite(V11, h);
  Blynk.virtualWrite(V10, t);
}

void loop()
{
  Blynk.run(); // Initiates Blynk
  timer.run(); // Initiates SimpleTimer
}

#19

Problem is it’s always desconnecting for no reason.

I also tried to add digitalWrite(3, LOW); in void setup Instead of blynk write before but with the same results.

About using esp01 as a shield with my old uno, tried that also, following blynk instructions but I get stuck on sending AT commands to ESP01 to put in 9600 rate.


#20

Because you have been programming the ESP-01 directly you overwrote the AT firmware. In-order to use it as a Serial-WiFi adapter, you need to re-flash it back to it’s “original” firmware… AKA AT firmware… then you can use AT commands to set the BAUD and never need to touch it again :wink:

https://www.google.com/search?&q=flashing+AT+firmware+to+ESP-01


#21

I’m not that noob! :stuck_out_tongue:
Already done that. But as per instructions I need to send

AT+CIOBAUD=9600

After flashing the original firmware but I get nothing 0 caput. I even tried sending at commands via uno.