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: -32512

    Scheduled Pinned Locked Moved WiPy 2&3
    7 Posts 2 Posters 1.6k Views 3 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.
    • K Offline
      Knoahlr
      last edited by Knoahlr

      OSError: -32512 when I try

      >>sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
      >>sock.settimeout(5)
      >>s = ssl.wrap_socket(sock)
      OSError: -32512
      
      1 Reply Last reply Reply Quote 0
      • A Offline
        abilio
        last edited by

        Which firmware version are you using?

        K 1 Reply Last reply Reply Quote 0
        • K Offline
          Knoahlr @abilio
          last edited by

          @abilio 1.5.0.0.b2, this doesn`t happen all the time. Actually, it rarely happens. But my application requires SSL socket connections to be made every second and sometimes after running for a while the error is thrown.

          A 1 Reply Last reply Reply Quote 0
          • A Offline
            abilio @Knoahlr
            last edited by

            @Knoahlr, this error used to appear very often in previous versions. It is caused when the OS (not the GC) runs out of memory. We released some memory in version 1.5.0, and the problem seemed to disappear. Perhaps the frequency of SSL connections you're making, combined to other things you're using are creating this out of memory condition. Can you provide more information about your specific application? perhaps some code example?

            Regards,
            Abilio

            K 1 Reply Last reply Reply Quote 0
            • K Offline
              Knoahlr @abilio
              last edited by Knoahlr

              @abilio I was almost certain that was the case. Ive introduced gc.collect() in my loops and I think this will solve the problem.
              If not, I`ll be back here for some more help

              Im using a HC-SR04 Ultrasonic sensor to send distance measurements to my company`s IOT server. Sending this data requires an ssl connection.
              Every time I send this data I have to create a time.ticks_us() object and set up a pin callback among other things.

              Thanks.

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

                @abilio gc.collect() seems to have solved the problem. Had it up and running smoothly for about 30mins now.
                before every ssl connection gc.mem_free() is about 37000 -39000. Before it would fall all the way to 600.

                A 1 Reply Last reply Reply Quote 0
                • A Offline
                  abilio @Knoahlr
                  last edited by

                  @Knoahlr, thanks a lot for the feedback. Keep me posted in case of any change.

                  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