Code Monkey home page Code Monkey logo

anjay-esp32-client's People

Contributors

anuar2k avatar axellin avatar jzimnol avatar kfyatek avatar kucmasz avatar mierunski avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

anjay-esp32-client's Issues

Fix build with IPV6 and DTLS disabled

The Anjay-esp32-client will hit build error if disable IPV6 or DTLS.
Suggest adding below ifdef to allow build without IPV6 or DTLS.

diff --git a/main/anjay-config/avsystem/commons/avs_commons_config.h b/main/anjay-config/avsystem/commons/avs_commons_config.h
index 7d762da..004ea91 100644
--- a/main/anjay-config/avsystem/commons/avs_commons_config.h
+++ b/main/anjay-config/avsystem/commons/avs_commons_config.h
@@ -255,7 +255,9 @@
  * TinyDTLS support is only rudimentary.
  */
 /**@{*/
+#if CONFIG_MBEDTLS_SSL_PROTO_DTLS
 #define AVS_COMMONS_WITH_MBEDTLS
+#endif
 /* #undef AVS_COMMONS_WITH_OPENSSL */
 /* #undef AVS_COMMONS_WITH_TINYDTLS */
 
@@ -529,7 +531,9 @@
  * At least one of AVS_COMMONS_NET_WITH_IPV4 and AVS_COMMONS_NET_WITH_IPV6
  * MUST be defined if avs_net is enabled.
  */
+#if CONFIG_LWIP_IPV6
 #define AVS_COMMONS_NET_WITH_IPV6
+#endif
 
 /**
  * If the TLS backend is set to OpenSSL, enables support for DTLS.

mbedtls redefined warnings

When I build with esp-idf CONFIG_MBEDTLS_ROM_MD5=y, I got below redefined warnings:

[944/1039] Building C object esp-idf/main/CMakeFiles/anjay.dir/anjay/deps/avs_commons/src/stream/md5/avs_stream_mbedtls.c.obj
/home/axel/esp/lwm2m/Anjay-esp32-client/main/anjay/deps/avs_commons/src/stream/md5/avs_stream_mbedtls.c:41: warning: "mbedtls_md5_update" redefined
 #        define mbedtls_md5_update mbedtls_md5_update_ret

In file included from /home/axel/esp/esp-idf/components/mbedtls/mbedtls/include/mbedtls/md5.h:94,
                 from /home/axel/esp/lwm2m/Anjay-esp32-client/main/anjay/deps/avs_commons/src/stream/md5/avs_stream_mbedtls.c:23:
/home/axel/esp/esp-idf/components/mbedtls/port/include/md5_alt.h:34: note: this is the location of the previous definition
 #define mbedtls_md5_update                      esp_md5_update

/home/axel/esp/lwm2m/Anjay-esp32-client/main/anjay/deps/avs_commons/src/stream/md5/avs_stream_mbedtls.c:42: warning: "mbedtls_md5_finish" redefined
 #        define mbedtls_md5_finish mbedtls_md5_finish_ret

In file included from /home/axel/esp/esp-idf/components/mbedtls/mbedtls/include/mbedtls/md5.h:94,
                 from /home/axel/esp/lwm2m/Anjay-esp32-client/main/anjay/deps/avs_commons/src/stream/md5/avs_stream_mbedtls.c:23:
/home/axel/esp/esp-idf/components/mbedtls/port/include/md5_alt.h:35: note: this is the location of the previous definition
 #define mbedtls_md5_finish                      esp_md5_finish


Note, CONFIG_MBEDTLS_ROM_MD5 is default y.

Anjay-esp32-client stop working after registration update failure

I hit registration update failure when there is a temporary network interface down, the Anjay-esp32-client stop working.

Below is the error mesages I observed:
E (105533) anjay: ERROR [avs_net] [/home/axel/Anjay-esp32-client/main/anjay/deps/avs_commons/src/net/compat/posix/avs_net_impl.c:1198]: send failed
W (105544) anjay: WARNING [anjay] [/home/axel/Anjay-esp32-client/main/anjay/src/core/servers/anjay_register.c:878]: failure while receiving Update response: No route to host
E (105562) anjay: ERROR [anjay] [/home/axel/Anjay-esp32-client/main/anjay/src/core/servers/anjay_register.c:844]: could not send registration update for SSID==1: 2

It then stop working after above messages.
The point is that it does not recover after the network interface is back.
It looks like anjay_event_loop_run does not consider this as fatal error
so the application does not know how to handle such error.

CMake error when running set-target command

Hello,
I am using the ESP32 WROVER KIT. when i try to run the command idf.py set-target esp32. from the git folder directory it gives the error CMake Error at main/CMakeLists.txt:34 (add_library):
No SOURCES given to target: anjay

the full verbose cmd line output is attached below
error message.txt

Any help would be much appreciated.

Anjay-esp32-client 22.01 stop working with ANJAY_SECURITY_PSK

I test Anjay-esp32-client 22.01 with server uri: coaps://leshan.eclipseprojects.io:5684,
then I got below errors:

E (3866) anjay: ERROR [avs_net] [/home/axel/Anjay-esp32-client/main/anjay/deps/avs_commons/src/net/mbedtls/avs_mbedtls_socket.c:913]: PSK support disabled
E (3876) anjay: ERROR [avs_net] [/home/axel/Anjay-esp32-client/main/anjay/deps/avs_commons/src/net/mbedtls/../avs_ssl_common.h:113]: socket initialization error
E (3896) anjay: ERROR [anjay] [/home/axel/Anjay-esp32-client/main/anjay/src/core/servers/anjay_connection_ip.c:87]: could not create CoAP socket

The issue is because removing define for AVS_COMMONS_NET_WITH_PSK
cf987a2#diff-d0d7ec43c37443919998aa1b9e30f94d2ccc8bb635e683f397abd13ff4c4b23bL555
BTW, Anjay-esp32-client 22.01 added define for AVS_COMMONS_WITH_AVS_CRYPTO_PSK but seems it's not used at all.

Communication with Thingsboard IOT dashboard.

Hello,
I followed your instructions and was able to set up the communication with the coiote IOT dashboard. Now I want to set it up with a local instance of thingsboard with PSK on port 5686 ( DTLS port of thingsboard lwm2m) but I am getting the following error on the esp32.
esp error
eager to hear from you.
thanks

Lwm2m Client Issue in Openthread Device

Hi everyone,
I have facing the issue to use the LWM2M client in my openthread device as Application Layer.
Device Configuration :
1.) Espressif Devikit Wrover - ESP32C6
2.) Openthread Platform
3.) Lwm2m Client in Thread End Device

                I have included the anjay library to my component folder and the code is building without Error...

                The Connection for LWM2M Server in anjay_event_loop_run() getting an error as "Openthread radio buffer full"

                I have followed the AVsystem API documentation guide for Simple lwm2m client connection to server , instance and object registering get -> Done , But the Event loop connecting the Server shows an Buffer Size Full

                The Maximum Buffer Size for Openthread Radio Buffer is ->[100]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.