views:

752

answers:

5

What is the best way to realize wireless communication between an embedded system (based on an AVR controller) and the iPhone? I think there are only two options: either WiFi or BlueTooth. The range is not really a problem, since both devices should stay in the same room.

I have no idea, if there are any useful WiFi boards that can be connected to an AVR based microcontroller system (or any small microcontroller), any hints would be highly welcome.

I guess the better solution would be BlueTooth, but there is also the problem: which BlueTooth board is best suited for attachment to an AVR system, and is it possible to use the iPhone BlueTooth stack for (serial) communication over BlueTooth with the AVR device.

I hope that somebody already realized such a system and can give some helpful tips...

+1  A: 

Here's an article you might find helpful. I would lean toward a WiFi solution just because of the added flexibility available.

http://www.embedded.com/design/networking/215801088

-t

Tim
+3  A: 

You can get modules for both WiFi and Bluetooth that will connect to an embedded system through a UART interface, however a WiFi module will have far more processing power than your AVR microcontroller, often with spare capacity and I/O to execute additional user code, so connecting one to an AVR maybe somewhat redundant in many cases.

Bluetooth modules are simpler, less expensive, and the data-rate is better matched to the AVR's capabilities. For example these Parani modules. I have used them between an embedded system and a Laptop PC's Bluetooth, so given appropriate communications software, there is no technical reason why it could not be used with an iPhone I think. However this may be the flaw, on the PC the device was recognised as a virtual serial port, I don't know whether iPhone supports 'legacy' communications in quite the same way.

For comparison, a WiFi solution

Clifford
+2  A: 

From what I know, BlueTooth is very limited on the iPhone: There is only very few BlueTooth-Profiles implemented, and - even if they can be extended with a jailbroken iPhone - I doubt this is easy to use from the application layer.

On the other side, transferring via WiFi requires a lot of processing power and memory since much more things have to be implemented before you can even start transferring data: 802.11, cdma/ca, arp, tcp. That's a big task.

Is it an option to build a hardware extension to the iPhone ? You might be able to get the serial connection and power out of the dock connector. Then even ZigBee could be very helpful.

lImbus
You are right, the full BlueTooth stack is only available via the btstack project (http://code.google.com/p/btstack/) for jailbroken iPhones. For the unbroken iPhone you need the "Made of iPod/iPhone" program to get access to the BlueTooth stack, which seems to need (since it is an NDA program, I couldn't find any useful information regarding the BlueTooth part) some special certified BlueTooth hardware (and you need to be a company to even apply for this program - which also prevents me from building a hardware extension for the iPhone).So I guess WiFi is the only possible solution left...
ComSubVie
+1  A: 

Some of the other people at the office have done AVR <- Bluetooth -> Symbian and AVR <- Bluetooth -> PC solutions without trouble. There is lots of info, reference designs and source available. I have no idea of how hard it would be to use Bluetooth on Iphone.

The exact module is probability also not important as long as it got some type of serial interface (I2C,SPI) to interface to the AVR and some source code show how to use the module.

Gerhard
+1  A: 

Is it an 8-bit or 32-bit AVR? For the AVR32 processors there's support for WiFi in the Atmel 1.5.0 Software Framework using SD-card-mounted WiFi modules from HD Wireless (http://www.hd-wireless.se), including an IP stack (lwIP). Be aware that you need Ad-Hoc (IBSS) support to connect directly to the iPhone.

Per Ekman
Good point, however "AVR" generally refers to the 8-bit devices rather than a generic term for both AVR and AVR32. I would have expected him to be explicit if it were AVR32. They are of course entirely different architectures.
Clifford
Thanks for this answer! However, it is an 8-bit AVR.
ComSubVie