Giter Club home page Giter Club logo

Comments (9)

Mierunski avatar Mierunski commented on June 15, 2024

Hi!
Looking at the error code it seems that operation timed out: https://tls.mbed.org/api/ssl_8h.html#a2fdb240812860402a1a946eae8264148
If you were able to connect to coiote using same aplication, client has to be working. Please check if there is a connection between client and serwer and it is not blocked by firewalls or other blockers.

from anjay-esp32-client.

AirWind001 avatar AirWind001 commented on June 15, 2024

Thanks for the reply.
I'm running thingsboard IOT dashboard locally on an RPi and it doesn't have any firewall by default. To test the network I have simulated a client using wakaama git and there is no network issue there.
image
could this problem be side stepped by creating a client without PSK security? when I try this configuration:
image
it gives the following error and goes into a boot loop:
image

Also, could you please tell me how you checked the error code from the website that you linked (https://tls.mbed.org/api/ssl_8h.html#a2fdb240812860402a1a946eae8264148) It would help me a lot in the future to debug
Thanks

from anjay-esp32-client.

Mierunski avatar Mierunski commented on June 15, 2024

If you want to use nosec, you have to change it manually in code here:
https://github.com/AVSystem/Anjay-esp32-client/blob/main/main/main.c#L61
To use ANJAY_SECURITY_NOSEC mode.
It will also timeout if you provide wrong security configuration, which can be a case here

Regarding mbedtls error, you can find it in the log: -26624 which converts to hexadecimal and can be found on mbedtls page

from anjay-esp32-client.

AirWind001 avatar AirWind001 commented on June 15, 2024

Thanks for the reply.
when i change it to NOSEC it works. After doing some more testing i can say PSK doesn't work with thingsboard because:

  1. Thingsboard requires the PSK key to be in hexadecimal format. is this possible and if so can you please tell me how?
  2. Thingsboard requires the PSK key to be at least 128 bits long. Does the esp32 support uint128_t?

from anjay-esp32-client.

Mierunski avatar Mierunski commented on June 15, 2024
  1. We have not used thingsboard but it seems that it should be just plain text hexadecimal - for example "0123456789ABCDEF0123456789ABCDEF" you can set it same way as just plain text psk
  2. 128 bits long means at least 4 bytes -> 4 characters, same requirement is with coiote server

from anjay-esp32-client.

AirWind001 avatar AirWind001 commented on June 15, 2024

Sorry for the late reply,
I'm still facing the same issue with PSK configuration. Any help is very much appreciated.
here is the configuration of the device on thingsboard
image
here is the client configuration on the esp
image
I still get the same handshake timeout error in the terminal window
esp debug timeout
esp-client NOSEC with thingsboard works. wakaama test client (using dtls) with thingsboard works

from anjay-esp32-client.

Mierunski avatar Mierunski commented on June 15, 2024

Hi, it seems that thingsboards requires hexlified, while we use plain text, you can provide in the client psk for example "test", then conver it to hex form (by using i.e. https://www.convertstring.com/EncodeDecode/HexEncode) "74657374" and use it on thingsboard

Let me know if this helped

from anjay-esp32-client.

AirWind001 avatar AirWind001 commented on June 15, 2024

Hi, I chose the string as:
convertstring32a
and converted it to hex which came out to be
636F6E76657274737472696E67333261
I entered the hex code in the tb dashboard and the plain text key in the esp config and it works.
Thanks a lot for you help

from anjay-esp32-client.

Mierunski avatar Mierunski commented on June 15, 2024

Just noticed it, was on vacation before, great to hear that!

from anjay-esp32-client.

Related Issues (8)

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.