Connecting your product to an iPhone app: a simple guide

10th June 2016
Posted By : Nat Bowers
Connecting your product to an iPhone app: a simple guide

So you need to extend your product to interface with an iPhone? There are a few technologies you can use to achieve this, so it’s important that you make the right choice. In this article we will discuss the main technologies that you can use to wirelessly connect your product with an iPhone. In future articles we will go into greater detail on how to use each communication method in an iPhone app.

By Cobus Heukelman (MSc Stanford) and Rob Clucas (BSc University of the Witwatersrand), Symmetry Electronics.

Before we discuss the specifics of each technology, let’s first identify some of the features of the technologies which will be important to your application:

Data throughput - If the application is only sending small amounts of data to the iPhone, then it might be better to choose a technology with a lower throughput at a reduced cost.

Range - If the application needs to communicate with an iPhone over long distances, then a technology with long range should be chosen.

Nodes - If the application requires many simultaneous iPhones to be connected, or one iPhone connected to many products, then a technology supporting many nodes should be chosen.

Latency - Some applications may need the data to be communicated in real time without delay, in which case low latency is important.

Power Consumption - If the product is battery powered, we should choose a technology which is designed with low power consumption in mind.

Cost - Choosing a technology which provides much better performance than what is required results in unnecessary costs. It’s important to choose the technology which provides enough, but not too much performance for your application.

Ease of Integration - Often this is overlooked, but it can incur large costs if not considered. Will your team have to learn a new technology to integrate the technology into the existing software component? Is the part you chose already certified, or will you need to perform costly certification tests? If so, then it should be planned for in your schedule and budget.

Now that we have our yardstick defined, let’s have a look at the main technologies you can use. We will narrow our discussion to technologies that can directly communicate with the iPhone. Technologies like Cellular and Ethernet which require the iPhone to communicate via the internet will not be considered here.

WiFi

WiFi operates in both the 2.4 and 5GHz frequency bands. It supports very high data throughput of about 100Mb/s (depending on the protocol used), a range up to 500m and up to 32 nodes (depending on the part selected). Typically, it has a latency of around 150ms and has twice the power consumption of Bluetooth Classic. It will allow your application to support very high data rates over long distances, with multiple simultaneous connections. WiFi is a good choice for applications which require large amounts of data to be transferred between the application and an iPhone, or where the product has a constant power source. However, because of the high performance the power consumption is quite high and can lead to short battery life for applications which are battery powered. Additionally, the latency is higher than that of the other technologies (as we shall see shortly). Applications such as a home file server, electronics which transfer video data, or technologies that function within large buildings, are potentially good candidates for using WiFi.

WiFi also has the advantage of using TCP/IP addressing which facilitates easy identification of devices in the network compared to Bluetooth. This limitation has been addressed in the new Bluetooth 4 version, which we will discuss later. In addition to the high performance always-on applications we’ve discussed, WiFi can also be used in low power sensor applications, provided that the application doesn’t need continuous transmission of data. In this mode, the WiFi unit can spend most of its time in sleep mode and only turn on when data needs to be sent. Symmetry Electronics has numerous WiFi modules to offer the designer. The newest being the Silicon Labs WGM110. This module includes a powerful ARM Cortex-M3 processor which can also host user applications and is offered at a very competitive price.

Bluetooth Classic

Bluetooth Classic (typically referred to as 2.1, 2.1+EDR or 3.0) operates on the 2.4GHz frequency band. It supports lower data rates of up to 2.1Mb/s, a range of up to 400m (or up to 1km with a long range module), up to 7 nodes, typically has a latency above 100ms and requires around half the power of WiFi. Bluetooth Classic is marginally better than WiFi in some areas, but significantly worse in others. While it requires half the amount of power, with slightly better latency, you only get a fraction of the data throughput and a fraction of the number of nodes. So why would you want to use Bluetooth Classic? Well in some cases, the data throughput between the application and the iPhone might not be the primary concern. Your application might require lower power consumption.

Bluetooth Smart

Bluetooth Smart is the latest technology in the Bluetooth world. It is designed to facilitate the development of the IoT market, providing significant functionality in low powered devices. Like Bluetooth Classic, it uses the 2.4GHz frequency band. It supports low data rates of up to 250kb/s, a range of up to 150m (or up to 400m with a long range module), an unlimited number of nodes (but still about 7 simultaneous nodes), typically has a latency of less than 6ms and requires between 0.01 and 0.5 times the power of Bluetooth Classic. While the range can match that of Bluetooth Classic and WiFi with special long range modules, it’s designed for applications which typically communicate over shorter distances. The low data rates make it unsuited to applications requiring large amounts of data transfer, but the extremely low latency does make it ideal for applications which just require basic communication with an iPhone over shorter distances. Additionally, the low power consumption makes it ideal for battery powered applications. Some ideal applications are wearable devices like heart rate monitors, sensors for home automation, or computer peripherals which can be configured using an iPhone. If the purpose of the iPhone connection is to change settings on the device, or display small amounts of data to the user, then this is the perfect technology. Bluetooth Smart modules are also typically cheaper than Bluetooth Classic and WiFi modules. Silicon Labs, Nordic Semiconductor and RF Digital offer a range of Bluetooth Smart SOCs and modules.

A significant advantage of Bluetooth Smart was the introduction of Internet Protocol Support Profile (IPSP) in version 4.1, which allows Bluetooth Smart devices to support 6LoWPAN (IPv6 over Low power Wireless Personal Area Networks). For Bluetooth devices using versions before 4.1, communicating with other non-Bluetooth devices in a network was difficult, since those Bluetooth devices did not have any formal addressing system. The only way to communicate with the Bluetooth devices was via Bluetooth. However, with IPSP, Bluetooth devices can now have IPv6 addresses and can send and receive IPv6 packets. This means that Bluetooth Smart devices can now communicate with other devices which do not support Bluetooth Smart, but which do support IPv6. Examples include a cloud server, a home printer, or a drone which has only a WiFi module.

Below is a quick comparison of the different technologies:

Connecting your product to an iPhone app: a simple guide

If you are still unsure which technology to choose for your application, feel free to reach out to the engineers at Symmetry Electronics, they are more than happy to assist you.


You must be logged in to comment

Write a comment

No comments




More from Symmetry Electronics

Sign up to view our publications

Sign up

Sign up to view our downloads

Sign up

Cyber Security - Oil, Gas, Power 2017
29th November 2017
United Kingdom London