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

    Connecting a serial-over-USB device to a WiPy?

    Scheduled Pinned Locked Moved Getting Started
    wipy2.0usb
    6 Posts 4 Posters 1.9k Views 4 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
      tshead
      last edited by

      I have a battery charger that can be connected to a computer using a serial-over-USB interface; it’d be great if I could connect it to a WiPy for data collection / notifications. Any thoughts on how to do this? I’m guessing the WiPy can’t be configured as a USB host ...

      Thanks in advance,
      Tim

      robert-hhR 1 Reply Last reply Reply Quote 1
      • robert-hhR Offline
        robert-hh @tshead
        last edited by

        @tshead You can use the machine.UART class for that purpose (see https://docs.pycom.io/chapter/firmwareapi/pycom/machine/UART.html).
        You can for instance use UART1 for that purpose (P3 and P4). Just check that both sides work at 3.3V level Otherwise you would need a level converter.

        1 Reply Last reply Reply Quote 0
        • T Offline
          tshead
          last edited by

          @robert-hh : Thanks for the quick response! I want to believe you, but this seems too simple :) To clarify, the device in question has a USB mini-B receptacle; when I plug it into my Mac, it uses a silabs CP210x driver to expose the device as a serial port at /dev/cu.SLAB_USBtoUART … are you saying that there’s some way to open-up a USB cable and wire it to the WiPy UART? My assumption was that the USB signal on the cable at that point wouldn’t be usable with a UART.

          Many thanks,
          Tim

          J 1 Reply Last reply Reply Quote 0
          • J Offline
            jmarcelino @tshead
            last edited by jmarcelino

            @tshead
            You would have to get the UART signal before it goes into the CP210X, maybe physically opening your charger and finding a way to connect? If you can’t do that then it’s not possible.

            1 Reply Last reply Reply Quote 0
            • T Offline
              tshead
              last edited by

              Unfortunately, that’s what I expected … was hoping for a magic cable :)

              Cheers,
              Tim

              1 Reply Last reply Reply Quote 0
              • S Offline
                semireg
                last edited by semireg

                We are building a custom expansion board that will have a USB host port for bringing IOT to ordinary USB devices. If you message me I can keep you updated of our progress. First batch of boards are due to arrive next week.

                Update: Check out the First look: USB Host Expansion Board by Semireg

                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