Sunday, December 17, 2017

Your iPad and U(SB)

A few weeks ago I bought an Apple Lightning to USB3 adapter in the hope that I could transfer scanned photos to my iPad. Nope. Not because it didn’t work, but because Photos apparently couldn’t understand the scanned image format. I was considering returning the adapter, it’s not cheap - $39 at the Apple store - when I noticed something in the product description...

Ethernet adapters? That would be interesting. A cheap Monoprice USB adapter was closest to hand and it worked fine:

That gave me the idea of trying to SSH into a Raspberry Pi that I wanted to work on. No configuration needed for either network interface, both the iPad and the Pi support mDNS so a simple connection to ‘raspberrypi.local’ is sufficient. Having logged in, I could set up VNC as well:

This particular Pi is running the Google AIY Voice kit, which is a lot of fun to play with. The next Google AIY project is going to use a Pi Zero W, so I had one of those on hand too. It doesn’t have a built-in Ethernet, but it turns out you can enable a cute feature called Ethernet Gadget, where the USB on-the-go interface emulates an Ethernet device. There's a thorough guide written up by Adafruit, and it's really quite easy - just two config changes. Wonder if that will work with iOS?

Yep! Same drill - automatic configuration of both devices and I could SSH or VNC into the Zero:

Well, that’s all working very nicely indeed, and much simpler than having a USB Ethernet adapter on both sides.

I wondered if I could get the iPad to talk to some of the super-cool Adafruit Circuit Python boards that I’ve just started to play with. I started with a Trinket M0, which should act like a mass storage device and a serial port. No errors, and the Photos app started right up, which says to me that the iPad is recognizing the storage device part. But there are no photos on the board, and it doesn’t appear that there’s any way to access it as a general-purpose drive; neither the built-in Files app nor third-party file managers are able to see it. And although it doesn’t throw an error, the serial port does not seem to be accessible by any app I’ve been able to try.

Maybe the Circuit Playground Express would have a better time? Nope:

Hrmph. Maybe a WiPy? No. A pile of USB serial adapters with various chips don’t work either. My limited amount of poking around various developer forums seems to indicate that serial access is highly restricted, or maybe not allowed at all. Oh, well. But what if I soldered a header on that Pi Zero and used its serial port to talk to the Trinket? Hmm... but it will have to wait for tomorrow.

No comments:

Post a Comment