Connecting iPad Pro to external breadboard circuits.

I'm trying to connect an iPad Pro to a breadboard to do some electronic experiments with, and develop a Swift application to help control things.

I'm looking the iPad to help provide low power to the board so need to connect via the USB-C rather than Bluetooth.

In order to work, I tried to connect a SparkFun Serial Basic Breakout - CH340C and USB-C board. When connected to an Apple Mac it shows up as "cu.usbserial-1420" and "tty.usbserial-1420", so I know the Mac can see it. Also can send output/input to it without issue.

On connecting it to an iPad and running a Swift application using the External Accessory framework, I'm getting nothing when connecting/disconnecting the device. I thought there might be something coming through on the didConnectAccessory, didDisconnectAccessory notifications.

I've also tried adding the above names to the info.plist file under "Supported external accessory protocols" and still nothing.

I've been told that you don't have to join the MFI program when developing as a hobby and the External Accessory framework should be sufficient.

Has anyone tried to connect their iPad Pro to a breadboard and been successful or point me in the general direction?

The device details can be found at the Sparkfun.com website via /products/15096 as can't link directly.

Thanks

Accepted Reply

Okay, just to bring anyone viewing this up to speed.

I've been trying a few different directions for this and most avenues seem to be dead ends, or at least in my case.

One test that has partially worked is to take the IOKit and headers from the iPhone private framework and add that to the project. Which I know won't pass muster if sending to the AppStore. This is just for my own testing at this point.

I create a notification port with IONotificationPortCreate and IONotificationPortSetDispatchQueue

I can set a matching service using IOServiceMatching with the vendor and product IDs which I can retrieve from the Mac, and a callback routine with IOServiceMatchingCallback.

When incorporated into an app and run, connecting and disconnecting the SparkFun Serial Basic Breakout board, with invoke the callback function with details of the device.

This is a small step in at least the board is now being recognised when connected and removed from the iPad Pro. Sending or receiving data to or from the board is the next step. Any help in this regard would be very helpful.

The SparkFun Serial Basic Breakout board allows the Tx and Rx to be connected together allowing a sort of echo function. This works when connected to an Apple Mac, this I'm looking to as the next small step.

If anyone know a better solution please let me know.

Replies

Okay, just to bring anyone viewing this up to speed.

I've been trying a few different directions for this and most avenues seem to be dead ends, or at least in my case.

One test that has partially worked is to take the IOKit and headers from the iPhone private framework and add that to the project. Which I know won't pass muster if sending to the AppStore. This is just for my own testing at this point.

I create a notification port with IONotificationPortCreate and IONotificationPortSetDispatchQueue

I can set a matching service using IOServiceMatching with the vendor and product IDs which I can retrieve from the Mac, and a callback routine with IOServiceMatchingCallback.

When incorporated into an app and run, connecting and disconnecting the SparkFun Serial Basic Breakout board, with invoke the callback function with details of the device.

This is a small step in at least the board is now being recognised when connected and removed from the iPad Pro. Sending or receiving data to or from the board is the next step. Any help in this regard would be very helpful.

The SparkFun Serial Basic Breakout board allows the Tx and Rx to be connected together allowing a sort of echo function. This works when connected to an Apple Mac, this I'm looking to as the next small step.

If anyone know a better solution please let me know.