ESP8266/ESP32 connecting to SSL/TLSv1.2 secured Mosquitto MQTT Broker

Поділитися
Вставка
  • Опубліковано 2 гру 2024

КОМЕНТАРІ • 31

  • @mandaroak6909
    @mandaroak6909 4 роки тому +2

    Watching this video after 2yrs almost :-)
    I am trying to use my esp8266 device as one of the IOT devices to publish data to greengrass core. It is not able to connect to broker. It shows "MQTT connecting failed, reason -> Connect failed < try again in 5 seconds" message once it connects to WIFI successfully. Is there anything different needed for greengrass broker connectivity?

  • @chris_hro4404
    @chris_hro4404 5 років тому +1

    Hey, thanks a lot for your information regarding the not working wificlientsecure library and your respository. This was the solution after two days of debuging attempts and searching the web. A little comment: In the Arduino-version, I had to change line 28 in src/dependencies/WiFiClientSecure.h from
    "class WiFiClientSecure : public Client"
    into "class WiFiClientSecure : public WiFiClient"
    After that I could get an TLS encrypted connect to the local MQTT-broker and publish/subscribe to topics.
    Many thanks to you!!
    (Probably in some month there will exist an update of the WiFiClientSecure library and then this workaround is not needed any more.)

  • @AdamAdam-qt5kt
    @AdamAdam-qt5kt Рік тому

    in this case we need to update our ESP32 every 90 days..is there any way to avoid this ?!

  • @horst23487
    @horst23487 4 роки тому +1

    Thanks for the great summary!
    I have a question regarding the use of the ca certificate on ESP8266 and the MQTT class (not PubSubClient).
    On ESP8266 I can only get it to work using the fingerprint method. When using the root CA option the connection fails and will try indefinitely. When using the public key it even crashes.
    On ESP32 it works for me using the root certificate that signed the MQTT certificate.
    My root cert is in this format:
    #ifdef CHECK_CA_ROOT
    static const char root_ca[] PROGMEM = R"EOF(
    -----BEGIN CERTIFICATE-----
    ...omitted....
    -----END CERTIFICATE-----
    )EOF";
    #endif
    Do you know of any limitations of the BearSSL class?

  • @DesignitBuilditRepairit
    @DesignitBuilditRepairit 6 років тому +1

    Another great video always learning something from you guys

  • @hanumanatonu
    @hanumanatonu 3 роки тому +1

    Hello I am uploading the MQTTPubSubClient sketch to ESP8266. It connects to WiFi but am getting MQTT connection error in serial monitor. The error code is -2. Please help

  • @JA-ge6ij
    @JA-ge6ij 5 років тому

    I'm trying to understand how this code works. I don't understand if the communication here is actually encrypted or not. Could you please explain where is the key negotiation and exchange done?

  • @1999sumit
    @1999sumit 4 роки тому

    Glad that I came across your channel.

  • @khokababusaheb
    @khokababusaheb 5 років тому

    I have extracted ca.crt and arduino_root_ca_check.cer from 8.42 of your video. How o I get the raspberry.crt and raspberry.key? I do not have a asus router. I have setup the certbot and the domain is now opening in https.

  • @hamhacksandhome
    @hamhacksandhome 3 роки тому

    Thanks! solved my pubsubclient & wificlientsecure issue

  • @ramkumar-bn8hl
    @ramkumar-bn8hl 4 роки тому +2

    hey man, it is also work for opensll connection..? or not

    • @Ramkumar-kb7yb
      @Ramkumar-kb7yb 4 роки тому +1

      ​@@debsahu7801 i try to using WiFiClientsecure but i am facing some error please help me to solve that issue i struck 2 week
      i give link for more details stackoverflow.com/questions/60700651/socket-error-on-client-unknown-disconnecting/60700825

    • @thuthukamhlongo918
      @thuthukamhlongo918 4 роки тому

      @@Ramkumar-kb7yb I am also experiencing the same problem. I am wondering if you managed to get this issue resolved?

    • @Ramkumar-kb7yb
      @Ramkumar-kb7yb 4 роки тому

      @@thuthukamhlongo918 no ..I didn't solve this issue today onwards i am facing error .if you will solve this issue tell me how to solve this

  • @iqballuqmanparis8908
    @iqballuqmanparis8908 4 роки тому

    Hello , I’m having trouble when I type a command /etc/mosquitto/mosquitto.conf on my raspberry pi.It said “permission denied”.help me to solve this problem.

    • @iqballuqmanparis8908
      @iqballuqmanparis8908 4 роки тому

      Debashish Sahu hey , after I edit my conf file , my mosquitto server cannot run. It kept saying activating (auto-restart). help me

  • @dizvo6853
    @dizvo6853 Рік тому

    ELF file SHA256: 3a8f1b89a7e712e0 it give this ?

  • @marinehm
    @marinehm 3 роки тому

    I'm curious. This was a great tutorial. What programming method are you using? I'm looking for a similar subject in Micropython and cannot find it. Basically, I want to program my ESP32 using Micropython. Get data from a sensor, connect to my RaspberryPi MQTT broker, and publish the sensor data as a topic. I can do it using Arduino IDE. I'm just starting to learn Micropython. I just figured comparing a familiar project to how it looks in Micropython would help me learn micropython. Just so I'm clear. I have NO experience with Micropython. Thanks!

  • @hubertmargreiter3508
    @hubertmargreiter3508 6 років тому

    A great clip! I am new to this matter. I try to set up a project at my (sophisticated) home. How can one and the same client (Wemos D1 mini or Wemos ESP32) send AND receive data?

  • @anhtran-hu1ff
    @anhtran-hu1ff 5 років тому

    Hello brothers, This is the best thing I've been looking for for my project, what I wonder is the encryption algorithm used in it? (RSA, AES ...) and it reduces the performance of ESP?

  • @suniladhikari1029
    @suniladhikari1029 5 років тому

    thank you for great tutorial, my case is little bit different and I hope you can help me,
    I have self signed certificates i.e. (root-ca-certificate, client-certificate and client-key) server also has corresponding keys and certificates. and I am trying to make https post request can you provide me any suggestions or reference codes..?

  • @БогданПарфенюк-л8л
    @БогданПарфенюк-л8л 5 років тому

    cool video! thanks for information. For now I try to understand general details in TLS program implementation and yours example moved me more forward. But I didn't understand after which line (function) in ESP8266_PubSubClient_SSL.ino client generate private key. Could you please explain it in more detailed way?

    • @БогданПарфенюк-л8л
      @БогданПарфенюк-л8л 5 років тому

      ​@@debsahu7801 thanks for answer_)) I found using of this method (net.setClientRSACert) in your another repository. github.com/debsahu/ESP-MQTT-AWS-IoT-Core Why didn't you use it in this example?

    • @БогданПарфенюк-л8л
      @БогданПарфенюк-л8л 5 років тому

      ​@@debsahu7801 Okay) I caught it. Is it true way to use own Certificate Authority? I mean creating a MQTT Server certificate using openSSl

  • @deltaruined
    @deltaruined 5 років тому

    Thanks man. Work like a charm.

  • @sanchitadas9837
    @sanchitadas9837 3 роки тому

    Hi!! Thanks for this informative tutorial. I am using ethernet client on Teensy 3.6. Can you please make a tutorial on that?

    • @sanchitadas9837
      @sanchitadas9837 3 роки тому

      thanks for prompt reply. I am wondering how you generated the root certificate? It has only "x" in it.