Skip to content
This repository was archived by the owner on Aug 24, 2020. It is now read-only.
This repository was archived by the owner on Aug 24, 2020. It is now read-only.

nodemcu_with_led - compilation errors #23

Description

@PappZso

Hi all!

I'm trying to use wakaamaNode library (latest version, freshly downloaded) on my NodeMCU board (based on esp8266, https://docs.zerynth.com/latest/official/board.zerynth.nodemcu_esp32/docs/index.html ).
I use PlatformIO as development tool (latest version, freshly re-installed).

I tried to upload a few simple esp8266 sketches (WiFiScan, WiFiAccesspoint ) and they worked on the same board, so the board is allright.

Next step: I wanted to try the nodemcu_with_led example code ( https://github.com/Openhab-Nodes/wakaamaNode/blob/master/examples/nodemcu_with_led/src/main.cpp ) from wakaamaNode as a beginning. I assumed that it should work without any modifications on my nodemcu board. But when I try to upload it with PlatformIO, I get two compilation errors, see below.

Processing nodemcu (platform: espressif8266; board: nodemcu; framework: arduino)
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif8266/nodemcu.html
PLATFORM: Espressif 8266 > NodeMCU 0.9 (ESP-12 Module)
HARDWARE: ESP8266 80MHz 80KB RAM (4MB Flash)
Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF MODES: FINDER(chain) COMPATIBILITY(soft)
Collected 28 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <WakaamaNode> 1.0.2
|-- <ESP8266httpUpdate> 1.3
|   |-- <ESP8266HTTPClient> 1.2
|   |   |-- <ESP8266WiFi> 1.0
|   |   |   |-- <WakaamaNode> 1.0.2
|   |-- <ESP8266WiFi> 1.0
|   |   |-- <WakaamaNode> 1.0.2
|-- <ArduinoOTA> 1.0
|   |-- <ESP8266mDNS> 1.2
|   |   |-- <WakaamaNode> 1.0.2
|   |   |-- <ESP8266WiFi> 1.0
|   |   |   |-- <WakaamaNode> 1.0.2
|   |-- <ESP8266WiFi> 1.0
|   |   |-- <WakaamaNode> 1.0.2
|-- <ESP8266WiFi> 1.0
|   |-- <WakaamaNode> 1.0.2

warning: Ignoring missing SConscript 'extra.py'
File "C:\users\epapzso\.platformio\penv\lib\site-packages\platformio\builder\main.py", line 175, in <module>
Compiling .pioenvs\nodemcu\src\examples\nodemcu_with_led\src\main.cpp.o
Compiling .pioenvs\nodemcu\src\src\network\mbedtls\library\cipher.c.o
Compiling .pioenvs\nodemcu\src\src\network\mbedtls\library\cipher_wrap.c.o
Compiling .pioenvs\nodemcu\src\src\network\mbedtls\library\cmac.c.o
Compiling .pioenvs\nodemcu\src\src\network\mbedtls\library\ctr_drbg.c.o
Compiling .pioenvs\nodemcu\src\src\network\mbedtls\library\debug.c.o
Compiling .pioenvs\nodemcu\src\src\network\mbedtls\library\des.c.o
Compiling .pioenvs\nodemcu\src\src\network\mbedtls\library\dhm.c.o
Compiling .pioenvs\nodemcu\src\src\network\mbedtls\library\ecdh.c.o
Compiling .pioenvs\nodemcu\src\src\network\mbedtls\library\ecdsa.c.o
Compiling .pioenvs\nodemcu\src\src\network\mbedtls\library\ecjpake.c.o
Compiling .pioenvs\nodemcu\src\src\network\mbedtls\library\ecp.c.o
Compiling .pioenvs\nodemcu\src\src\network\mbedtls\library\ecp_curves.c.o
Compiling .pioenvs\nodemcu\src\src\network\mbedtls\library\entropy.c.o
Compiling .pioenvs\nodemcu\src\src\network\mbedtls\library\entropy_poll.c.o
Compiling .pioenvs\nodemcu\src\src\network\mbedtls\library\error.c.o
Compiling .pioenvs\nodemcu\src\src\network\mbedtls\library\gcm.c.o
Compiling .pioenvs\nodemcu\src\src\network\mbedtls\library\havege.c.o
Compiling .pioenvs\nodemcu\src\src\network\mbedtls\library\hmac_drbg.c.o
Compiling .pioenvs\nodemcu\src\src\network\mbedtls\library\md.c.o
examples\nodemcu_with_led\src\main.cpp: In function 'void loop()':
examples\nodemcu_with_led\src\main.cpp:123:37: error: no matching function for call to 'LwM2MConnect::process(timeval*)'
int result = context.process(&tv);
^
examples\nodemcu_with_led\src\main.cpp:123:37: note: candidate is:
In file included from examples\nodemcu_with_led\src\main.cpp:16:0:
./src/include/lwm2m/connect.h:48:10: note: void LwM2MConnect::process()
void process();
^
./src/include/lwm2m/connect.h:48:10: note:   candidate expects 0 arguments, 1 provided
examples\nodemcu_with_led\src\main.cpp:129:13: error: 'class LwM2MConnect' has no member named 'watch_and_reconnect'
context.watch_and_reconnect(&tv, 5);
^
*** [.pioenvs\nodemcu\src\examples\nodemcu_with_led\src\main.cpp.o] Error 1
============================================================================================================== [ERROR] Took 5.41 seconds ==============================================================================================================

I've read the documentation too, especially the Connection API, as my problem is related to that in my opinion. I've noticed, that the connect.h and connect.cpp files don't match the Connection API documentation.

According to Connection API docs ( https://openhab-nodes.github.io/wakaamaNode/api/connection-api/#connection-c-api ) the problematical functions should look like

int process(struct timeval* next_event);
and
void watch_and_reconnect(struct timeval* next_event, int reconnectTime);

In the downloaded wakaamaNode library these functions look like:
'void process();'
and
watch_and_reconnect is completely missing from connect.h and connect.cpp, so no wonder I get these compilation error.

Am I doing something wrong, could you please explain?

Thanks for reading, and any help is appreciated! :)

wakaamaNode_error

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions