Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    OSError -9984

    Scheduled Pinned Locked Moved Issues & Bugs
    mqtt
    2 Posts 2 Posters 354 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T Offline
      tac240
      last edited by

      Trying to use SSL with MQTTClient (simple.py) gives this error. Cannot find any listing anywhere to describe it.

          client = MQTTClient(client_id="", server=host,user="",password=token,port=8883,  keepalive=0, ssl=True, ssl_params= {'cert_reqs':ssl.CERT_REQUIRED, 'ca_certs':'/flash/cert/ca.pem'})
      

      WLAN connection succeeded!
      Unhandled exception in thread started by <function main_loop at 0x3ffe7d50>
      Traceback (most recent call last):
      File "main.py", line 68, in main_loop
      File "simple.py", line 61, in connect
      OSError: -9984

      1 Reply Last reply Reply Quote 0
      • K Offline
        kruthers
        last edited by

        That's interesting, I get that same cryptic error when I test directly over an SSL socket with a bogus certificate:

        >>> s = socket.socket()
        >>> ss = ssl.wrap_socket(s, cert_reqs=ssl.CERT_REQUIRED, ca_certs=bad_cert)
        >>> ss.connect(socket.getaddrinfo(host, 443)[0][-1])
        Traceback (most recent call last):
          File "<stdin>", line 1, in <module>
        OSError: -9984
        

        With other "wrong" certificates I've gotten OSError: [Errno -30592] MBEDTLS_ERR_SSL_FATAL_ALERT_MESSAGE instead. Not sure why the difference.

        Anyway, I know this post is old, just putting this here in case it helps someone in the future.

        K

        1 Reply Last reply Reply Quote 0

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        • 1 / 1
        • First post
          Last post

        Pycom on Twitter

        Pycom