iOS USB Serial Hardware Options?

I’m thinking of building a wall case for an iPad and I’d like to be able to control simple electronics on it programmatically (for example, a LED or LEDs to begin with).

Bluetooth requires pairing and NFC is for reading or writing, but doesn’t really handle communications that I know of in iOS so I assume serial communication through usb through lightning is my only option (please correct me if I’m wrong, I’d love for more options to exist :smiley: )

Also, do you know if the serial protocols from http://documentation.xojo.com/index.php/Serial available on iOS?

I was looking at the Apple Store point-of-sale devices (an iPhone case with an external battery, barcode reader and credit card reader, all connected via lightning) and I wondered if it could be possible to do.

I haven’t found any USB hardware kit I can use through the lightning connector. I have found ways to make the headphone jack into an interface for an external device by driving audio through it, but this is not ideal considering the jack keeps going away from devices (although I may be able to use a lightning to jack passthrough if I can somehow pass charge to the iPad as well).

Do you know of a USB development board that is USB HID compliant so the iPhone won’t complain when connected? Something that behaves like a keyboard, for example?

the best way to handle communication out of an iOS device is to use Wifi.
for anything else, you need to be a big $$$ company paying royalties to Apple for MFI (made for ios) certifications…

you use a device such as an esp8266 or esp32 module they are cheap, and you can make them behave as a web page, and control simple or more complex electronics.
then you talk from the iOS device using regular web access.

there used to be this hardware kit made to talk to iOS devices, but it is no more available
http://www.cypress.com/documentation/development-kitsboards/cy8ckit-023-psoc-mfi-made-ipod-iphone-ipad-expansion-board-kit

Well, I just remembered MIDI devices through USB are recognized by iOS and are a “safe” way to send information back and forth. I should’ve remembered this.

There’re nice USB MIDI boards at affordable prices:

https://ask.audio/articles/5-easy-ways-to-make-your-own-midi-controller-on-a-budget

[quote=401579:@Jean-Yves Pochez]the best way to handle communication out of an iOS device is to use Wifi.
[/quote]

Sadly, I’m limited on what I can use. There’re many ways to connect to iOS without being part of MFi programs. The most obvious ones are through a headphone jack or as a USB device through a USB adapter. Both of these allow non-MFI devices to interact with iOS to some degrees.

The headphone jack (even through the Lightning adapter) has two-way communication that’s perfect for very-low-bandwidth requirements (it can really handle high-bandwidth but errors start piling up quickly.

The USB adapter allows for any device that presents itself as one of the allowed USB HID profiles to interact with iOS as well, as long as the adapter is MFi-compatible. From these acceptable USB HID profiles the most versatile is probably MIDI, that allows full-speed two-way communications.

I’ll look further. What I want needs to integrate into an iPad case, so it can’t use WiFi nor can it require much from users beyond plugging the case and, perhaps, confirming access through an OS prompt.

an iOS device that’s not connected to the internet looses IMHO more than half the interest.
and the only way for an ipad to connect to the internet is … wifi !
Apple started to charge the phones remotely, so sooner or later, they will all charge remotely
then I can assure you that there will be no more connexion available, not any !
and the only way to escape will be wifi or bluetooth.
bluetooth stack is extremely limited by apple on iOS devices, you also need to be MFI certified.
don’t build something relying on the actual connector, it may soon disapear.
wifi will not.
the headphone jack has already disappeared on recent phones, apple willing to sell airpads …

[quote=401584:@Jean-Yves Pochez]an iOS device that’s not connected to the internet looses IMHO more than half the interest.
and the only way for an ipad to connect to the internet is … wifi !
Apple started to charge the phones remotely, so sooner or later, they will all charge remotely
then I can assure you that there will be no more connexion available, not any !
and the only way to escape will be wifi or bluetooth.
bluetooth stack is extremely limited by apple on iOS devices, you also need to be MFI certified.
don’t build something relying on the actual connector, it may soon disapear.
wifi will not.
the headphone jack has already disappeared on recent phones, apple willing to sell airpads …[/quote]

I dunno, man. I’m looking for something very specific to use this year and you’re convinced that a change is so imminent in an uncertain future that I should increase the complexity of this project by several orders of magnitude :slight_smile:

Today I can use MIDI through USB without MFi certification. All of my needs may be covered by this and a $30 teensy board :slight_smile:

From my original post:

I’m talking about an iPad case with an LED. It’s seriously overkill to think about putting WiFi on an iPad case that will contain an iPad so it can communicate with it, there being so many easier choices out there for what I need.

I mean, as I mentioned, the Apple Store, Apple’s Apple Store, today has iPhone cases interfacing through lightning. They may think it’s OK for the time being :slight_smile:

If in a few years the lightning connector disappears, I’ll see if an iPad case with a LED warrants re-deploying into wireless MFi :smiley:

[quote]an iOS device that’s not connected to the internet looses IMHO more than half the interest.
and the only way for an ipad to connect to the internet is … wifi ![/quote]

Not sure what you were driving at here. My idea is for an iPad case with a LED the iPad can control. It’s irrelevant if the iPad is connected to the internet for the project I have in mind (in the sense that it shouldn’t require it nor be affected by it). It’s like saying I shouldn’t be using a USB microphone with my iPad through a USB adapter because the future is WiFi. It’s two unrelated things.

I’m speaking of a $3 development board such as this one :
https://www.ebay.com/itm/ESP8266-ESP-12-NodeMcu-Lua-WeMos-D1-Mini-WIFI-CH340G-Development-Board-Antenna/173240979495

you have wifi, usb, I/O ports, and you program it with an arduino IDE. you only need a power supply … and a wifi router of course.

see also here : https://forum.xojo.com/47706-remote-gpio-with-xojo/?quote=388704

or detailed setup here : https://www.instructables.com/id/ESP8266-BASIC-IoT-Light/

I’m sorry I’m not being clear enough: I want to build a case for an iPad with an LED in it. It makes no sense to expect the iPad case to connect to a WiFi to talk to the iPad it will enclose.

I appreciate your intention explaining this, since you’re obviously convinced this is the way I should go about my project. I have understood this and insist: I know about WiFi and BT. I’m choosing to do a physical connection for many reasons I’ve already evaluated. For the sake of stop going in circles let’s assume I have evaluated, and set aside, all options that don’t fit this simple requirement: I have to control an LED through a Physical connection to one this year’s ipads.

A side note: “you only need a power source and a wifi router of course” means this solution is orders of magnitude more complex for a lot of situations. The fact that there’s another device that needs to connect to a WiFi that may or may not exist means this is overkill for many projects (including, but not limited, to a simple ipad case with an LED).

You really don’t need a router to connect with an ESP8266 / ESP32 as they can act as an Access Point.

https://arduino-esp8266.readthedocs.io/en/latest/esp8266wifi/soft-access-point-examples.html