I'm designing an embedded system based on a Cortex-M0+ MCU. I have to choose a way to make a connection between this system and a generic Android smartphone. The requirements are low-cost, simplicity and availability with the most of smartphones on the market. I don't need long range: it's sufficient to exchange data when the smartphone is near the system. The embedded system has an integrated GSM module (used for other things) that can be used for this purpose.
I was thinking about the following alternatives, but all of them have pros and cons. Any suggestions?
SMS/voice The app running module in the embedded system.on the smartphone can sends/receives SMSs or make voice calls. In this scenario I can use the GSM Main cons are the cost of the connection and the old technology.
IP connection The communication can be made on top of an IP connection, but I need to use a GPRS/UMTS modem (for my application, I need just a GSM modem). Even this type of connection could be expensive for the user. Moreover, the point-to-point connection could be troublesome depending on the mobile service providers: firewall, private NAT-ed IP addresses and so on. I know I can provide a central server on the Internet, but I dont' want to offer this service (that should work everyday).
Bluetooth Bluetooth connection has many advantages: wireless, point-to-point, short range. The main problem I see is the complexity (cost) of the embedded system that must be keeped be very simple (low cost). I could integrate a serial-Bluetooth module, but I think it is expensive (do you know how much could it cost for 1000 pieces?). I could provide a RS232-Bluetooth dongle separated from the emebedd system, so the user can re-use it for many systems. What is the cost of this type of product? How complex would be developing and Android app that sends/receives asyncronous packets on a Bluetooth link, like on a RS232 link? The app should open the connection, sends some bytes and waits for some other bytes from the embedded system.
USB Every smartphone has at least one USB port that is used for battery recharging and communication with the PC. The problem is it is usually a device port and I can't add the complexity of a host USB port on my system. I know newer Android versions have a native USB host support, but the smartphone should have at least an OTG USB port. How many smartphones provide this type of port? If I have a smartphone with a OTG USB port and a decent Android version, could I connect a simple RS232-USB adapter and hope it will be detected without problems? How simple is to write an app that open the virtual RS232 port and sends/reiceves data on that link? Another possibility could be to directly integrate a USB slave port in my system. This port should provide CDC interface and the Android smartphone should detect it as a virtual serial port (to open/close, write/read). Actually integrating a host USB port in the system shouldn't be difficult and expensive, but how the smartphone will be detected by my system? As a mass storage device? And how could I exchange data between them as on a serial link?