Connecting a serial-over-USB device to a WiPy?
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,
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
Unfortunately, that’s what I expected … was hoping for a magic cable :)
jmarcelino last edited by jmarcelino
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.
@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.
@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.