GatewayESP8266 Compile problem.



  • I,m having a problem compiling GatewayESP8266. I downloaded the latest libraries and started with a fresh copy of the Gateway program. I put in my WiFi and gateway info and it complied. I then enabled UDP and I got the expected error that it needed a MY_CONTROLLER_IP_ADDRESS. I added the address of Vera and that's when things went sideways. I got the following error.

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

                 from C:\Users\RWoerz\AppData\Local\Temp\arduino_modified_sketch_73845\GatewayESP8266.ino:134:
    

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

    C:\Users\RWoerz\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);

                                   ^
    

    C:\Users\RWoerz\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 C:\Users\RWoerz\Documents\Arduino\libraries\MySensors/MySensors.h:28:0,

                 from C:\Users\RWoerz\AppData\Local\Temp\arduino_modified_sketch_73845\GatewayESP8266.ino:134:
    

    C:\Users\RWoerz\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);

                                                       ^
    

    C:\Users\RWoerz\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 C:\Users\RWoerz\Documents\Arduino\libraries\MySensors/MySensors.h:200:0,

                 from C:\Users\RWoerz\AppData\Local\Temp\arduino_modified_sketch_73845\GatewayESP8266.ino:134:
    

    C:\Users\RWoerz\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);

                                                          ^
    

    Multiple libraries were found for "WiFiUdp.h"
    Used: C:\Users\RWoerz\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\ESP8266WiFi
    Not used: C:\Program Files (x86)\Arduino\libraries\WiFi
    Not used: C:\Program Files (x86)\Arduino\libraries\WiFi
    Not used: C:\Program Files (x86)\Arduino\libraries\WiFi
    Not used: C:\Program Files (x86)\Arduino\libraries\WiFi
    Multiple libraries were found for "MySensors.h"
    Used: C:\Users\RWoerz\Documents\Arduino\libraries\MySensors
    Not used: C:\Users\RWoerz\Documents\Arduino\libraries\arduino_343871
    Not used: C:\Users\RWoerz\Documents\Arduino\libraries\arduino_271619
    exit status 1
    Error compiling for board NodeMCU 1.0 (ESP-12E Module).


  • Mod



  • Thanks that seems to have worked. This is what is needed.
    In the file MyGatewayTransportEthernet.cpp around line 301 the following changes need to be made. All the [0]'s need to be removed.

    Old:
    #if defined(MY_GATEWAY_ESP8266)
    _ethernetServer.read(inputString[0].string, MY_GATEWAY_MAX_RECEIVE_LENGTH);
    inputString[0].string[packet_size] = 0;
    debug(PSTR("UDP packet received: %s\n"), inputString[0].string);
    const bool ok = protocolParse(_ethernetMsg, inputString[0].string);
    #else

    New:
    #if defined(MY_GATEWAY_ESP8266)
    _ethernetServer.read(inputString.string, MY_GATEWAY_MAX_RECEIVE_LENGTH);
    inputString.string[packet_size] = 0;
    debug(PSTR("UDP packet received: %s\n"), inputString.string);
    const bool ok = protocolParse(_ethernetMsg, inputString.string);
    #else


Log in to reply
 

Suggested Topics

  • 3
  • 15
  • 2
  • 2
  • 4
  • 3

1
Online

11.2k
Users

11.1k
Topics

112.5k
Posts