1

I want to control a string of LEDs directly from my iPhone. The LED controller chips talk the i2c serial protocol.

Can I do this with Apple-supported APIs on a non-jailbroken iPhone? Which frameworks do I need to use?

Robert Atkins
  • 23,528
  • 15
  • 68
  • 97
  • How would you physically connect an i2c device to an iPhone ? – Paul R May 14 '12 at 20:16
  • @PaulR USB-connector cable?! Alternative, A/D-changer connected to the headphone jack. – Till May 14 '12 at 20:26
  • I was thinking by hacking a dock cable in some manner, or with some kind of USB b-socket-to-i2c adapter. Not headphone port, that sounds too flaky for what I want to do. – Robert Atkins May 14 '12 at 20:30
  • 1
    See http://stackoverflow.com/questions/1678789/how-to-integrate-iphone-with-other-non-iphone-devices-using-serial-port for a similar question. – Till May 14 '12 at 20:37
  • I think the difference between my situation and that link is that I don't need to have the LEDs talk to the iPhone, I only need to send data _out_. But it was still handy, thanks. – Robert Atkins May 14 '12 at 20:41
  • This answer (http://stackoverflow.com/a/7274105/17294) implies I can just wire up a hacked dock cable and bit-bang away to my heart's content. Interesting... – Robert Atkins May 14 '12 at 20:54

2 Answers2

1

Yes, but you will need an external hardware to do that. iOS does not give you access directly to I2C in the docking connector.

KissBos has a OEM board to do that, with a special firmware. You can connect to their board via WiFi, using a TCP based protocol, or via a RTP-MIDI based protocol (RTP-MIDI is implemented in iOS, you don't have to deal with the protocol details, it's just a MIDI port for your application).

If you want to go through the dock connector, you will need their USB interface (it will transform the USB into RTP-MIDI, which goes in the OEM board)

gotqn
  • 42,737
  • 46
  • 157
  • 243
SynthMaker
  • 11
  • 1
0

I'm quite sure that you can't do that. Apple is very strict about what you are allowed to and not. I spent days trying to find a way to get access to the iphone's bluetooth layer and ended up with my head against the wall (only a limited game api is public, else you have to go with the Made For Iphone program). However, you are able to do some stuff using the usb cable, but I guess that the possibilities are limited with that too.

Kasper Munck
  • 4,173
  • 2
  • 27
  • 50
  • Wait, you're saying I can't just use ExternalAccessory.framework to send arbitrary serial data to an arbitrary serial device? Did you do this investigation on iOS 5 or earlier? – Robert Atkins May 14 '12 at 20:56
  • Have a look at this: http://stackoverflow.com/questions/1678789/how-to-integrate-iphone-with-other-non-iphone-devices-using-serial-port – Kasper Munck May 15 '12 at 07:56