Connecting the iPhone to an external device

I need to develop software that connects to an external device. The problem is communication. Is there a way to connect without Apple's dedicated chip?

In any case, it is possible: Bluetooth, Wi-Fi or USB.

+2


a source to share


4 answers


This is a too open question. Yes is the only answer; yes, you can connect to another device (assuming it has the ability to handle the connection request) via Wi-Fi or Bluetooth

If you want to connect over WiFi, you will need to manage this yourself (perhaps via HTTP requests or similar hardware).



If you want to connect to a device via Bluetooth to avoid having to use the 30-pin dock connector, check out the frontend documentation (EAAccessory class reference) in the xcode documentation.

+2


a source


Apple has no objection to connecting over Wi-Fi as long as you use the methods they present in their SDK.



+1


a source


Thanks everyone for the answers. I came up with a solution, please let me know if this will work and if apple accepts it:

The solution is to just use the device with ip (ie: 101.98.13.27). The device will be connected to Wi-Fi. I will send a URL request to this address and receive information from the device.

0


a source


If you try to use the ip address as you suggest, you cannot hardcode it. Even if it's in a private, non-routed block of addresses, that address can still be used on the Wi-Fi subnet to which the phone is connected. If not, there is no guarantee that the connection will work depending on the resolvability of the network devices involved.

Do you still have to configure an external device? If so, my preferred solution would be to put both the external device and the iPhone on the same Wi-Fi network and then use mDNS (bonjour or rendezvous same thing) to have the two devices discover each other on the network.

I had a similar situation that would have been easily resolved if the iPhone just supported the Bluetooth serial profile, but it doesn't. This is basically what I planned to do, but the external device was unable to support this approach.

0


a source







All Articles