Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GatewayESP8266 and GatewayESP32 do not compile with MY_USE_UDP #919

Closed
mfalkvidd opened this issue Sep 2, 2017 · 2 comments
Closed

GatewayESP8266 and GatewayESP32 do not compile with MY_USE_UDP #919

mfalkvidd opened this issue Sep 2, 2017 · 2 comments

Comments

@mfalkvidd
Copy link
Member

On 2.1.1, using the vanilla GatewayESP8266 sketch and uncommenting
#define MY_USE_UDP
and either uncommenting
#define MY_CONTROLLER_IP_ADDRESS 192, 168, 178, 68
or adding
#define MY_CONTROLLER_URL_ADDRESS "http://192.168.0.101"
results in compile error:

"C:\Users\Micke\AppData\Local\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-IC:\Users\Micke\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0/tools/sdk/include" "-IC:\Users\Micke\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0/tools/sdk/lwip/include" "-IR:\Scratch\ArduinoBuild/core" -c  -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -MMD -ffunction-sections -fdata-sections -DF_CPU=80000000L -DLWIP_OPEN_SRC   -DARDUINO=10608 -DARDUINO_ESP8266_NODEMCU -DARDUINO_ARCH_ESP8266 -DARDUINO_BOARD="ESP8266_NODEMCU"  -DESP8266 "-IC:\Users\Micke\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266" "-IC:\Users\Micke\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\variants\nodemcu" "-IC:\Users\Micke\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\SPI" "-IC:\Users\Micke\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\ESP8266WiFi\src" "-IR:\Documents\Arduino\libraries\MySensors" "-IC:\Users\Micke\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\EEPROM" "R:\Scratch\ArduinoBuild\sketch\GatewayESP8266.ino.cpp" -o "R:\Scratch\ArduinoBuild\sketch\GatewayESP8266.ino.cpp.o"
In file included from R:\Documents\Arduino\libraries\MySensors/MySensors.h:200:0,

                 from C:\Users\Micke\AppData\Local\Temp\arduino_modified_sketch_585609\GatewayESP8266.ino:135:

R:\Documents\Arduino\libraries\MySensors/core/MyGatewayTransportEthernet.cpp: In function 'bool gatewayTransportAvailable()':

R:\Documents\Arduino\libraries\MySensors/core/MyGatewayTransportEthernet.cpp:302:35: error: no match for 'operator[]' (operand types are 'inputBuffer' and 'int')

   _ethernetServer.read(inputString[0].string, MY_GATEWAY_MAX_RECEIVE_LENGTH);

                                   ^

R:\Documents\Arduino\libraries\MySensors/core/MyGatewayTransportEthernet.cpp:303:14: error: no match for 'operator[]' (operand types are 'inputBuffer' and 'int')

   inputString[0].string[packet_size] = 0;

              ^

In file included from R:\Documents\Arduino\libraries\MySensors/MySensors.h:28:0,

                 from C:\Users\Micke\AppData\Local\Temp\arduino_modified_sketch_585609\GatewayESP8266.ino:135:

R:\Documents\Arduino\libraries\MySensors/core/MyGatewayTransportEthernet.cpp:304:55: error: no match for 'operator[]' (operand types are 'inputBuffer' and 'int')

   debug(PSTR("UDP packet received: %s\n"), inputString[0].string);

                                                       ^

R:\Documents\Arduino\libraries\MySensors/core/MySensorsCore.h:90:40: note: in definition of macro 'debug'

 #define debug(x,...) hwDebugPrint(x, ##__VA_ARGS__)   //!< debug, to be removed (follow-up PR)

                                        ^

In file included from R:\Documents\Arduino\libraries\MySensors/MySensors.h:200:0,

                 from C:\Users\Micke\AppData\Local\Temp\arduino_modified_sketch_585609\GatewayESP8266.ino:135:

R:\Documents\Arduino\libraries\MySensors/core/MyGatewayTransportEthernet.cpp:305:58: error: no match for 'operator[]' (operand types are 'inputBuffer' and 'int')

   const bool ok = protocolParse(_ethernetMsg, inputString[0].string);

                                                          ^

Using library ESP8266WiFi at version 1.0 in folder: C:\Users\Micke\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\ESP8266WiFi 
Using library MySensors at version 2.1.1 in folder: R:\Documents\Arduino\libraries\MySensors 
Using library EEPROM at version 1.0 in folder: C:\Users\Micke\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\EEPROM 
Using library SPI at version 1.0 in folder: C:\Users\Micke\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\SPI 
exit status 1
Error compiling for board NodeMCU 1.0 (ESP-12E Module).

This might be related to #918

@mfalkvidd
Copy link
Member Author

RWoerz has posted a suggested fix in https://forum.mysensors.org/post/78210

@mfalkvidd
Copy link
Member Author

This error is still reproducible when using ESP8266 board definition 2.4.0 so it might not be related to #918 Or maybe it is related, but the problem has not been fixed in the ESP8266 board definitions yet?

@mfalkvidd mfalkvidd changed the title GatewayESP8266 does not compile with MY_USE_UDP GatewayESP8266 and GatewayESP32 do not compile with MY_USE_UDP Aug 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant