EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

Simple point-to-point communication with an embedded platform and an Android smartphone

Started by pozz August 9, 2014
Il 11/08/2014 11:46, Nils ha scritto:
 > [...]
> Support for Android is pretty good.
> [...] How difficult is to develop an Andorid app that uses NFC functionalities of the phone?
On 11.08.2014 15:26, pozz wrote:

> How difficult is to develop an Andorid app that uses NFC functionalities > of the phone?
Depends on your level of Android application knowledge. If you have already developed one application or test-program (e.g. you know what an Intent is, and how the life-cycle of an android app looks like) it is easy. In the manifest you just declare that you want to get activated if a NFC tag gets detected. Inside your application you implement an intent-filter for NFC tag intents. In this handler you'll get a NFC-Message (can be anything) along with a tag-object that you can use for raw or structured data-transfer. Overall, it's less than 100 lines for basic communication. With basic knowledge about Android you have something working within a day. Without any knowledge you may need 3 or 4 days. The nice thing if you use dynamic NFC tags is, that you get a lot of cool functionality for free: - Your embedded device gets a wakeup signal from the dynamic tag if the tag detects RF activity. That makes it easy to implement energy-saving stuff. - If you store a NFC action-record in the first bytes of the tag, the Android NFC subsystem will start your application automatically or redirect the user to the Android store for App download. (This feature is extremely convenient because you don't have to install anything). You can use the free memory behind the NDEF action-record for generic shared memory message passing between the phone and your device. That part is a bit tricky but can be done. If you want to read about it, try the official specification: http://developer.android.com/guide/topics/connectivity/nfc/nfc.html (You can ignore anything about Android Beam or HCE-Services because you're pretty much only using basic reader/writer functionality) /Nils
pozz <pozzugno@gmail.com> writes:
> How difficult is to develop an Andorid app that uses NFC > functionalities of the phone?
Most phones don't have NFC so the NFC approach doesn't sound that promising. BT or wifi are surely the best for user convenience. Audio cable would be cheapest in terms of hardware.
Den s&#4294967295;ndag den 10. august 2014 09.58.10 UTC+2 skrev Paul Rubin:
> pozz <pozzugno@gmail.com> writes: > > > The app could send 10 SMSes (about 1000 bytes) and, if something is > > > wrong, the process must be repeated. And if I need a feedback from > > > the field device, I have to send other SMSes from that side. > > > > Ok, if you need that much data and it has to be bidirectional, you want > > either a cable connection or wifi/BT. Have you picked out your Cortex > > M0+ chip? There is a Nordic Semi one with built-in BT. Look at > > rfduino.com and you should be able to find the data sheet from there. > > There is also that $2-ish TI chip that I mentioned. > > > > For using an audio cable (very cheap) I don't think you need anything > > fancy like DTMF. Some simple encoding on the wire, plus a checksum, is > > probably enough. Again it wouldn't surprise me if there's already code > > for this around.
you can even buy a board, http://www.lpcware.com/content/project/smartphone-quick-jack-solution -Lasse
Paul Rubin <no.email@nospam.invalid> writes:

> What? Do you mean you can't use standard bluetooth headsets and other > such accessories with an iphone?
For a long time it was "bluetooth is for audio apps only" with Apple so headsets and other audio thingies sure. Heart rate monitors, step counters, tethering, file transfers, networking, whatever, no way over bluetooth. But that all changed a few years ago with the iphone 4S and BT LE support. I guess Apple likes BT LE since there's no user-confusing pairing required and hence things "just work" in the way Apple likes things.
> I do know they work ok with standard 3-pin stereo headphones, but they > switched two of the pins around in the 4-pin connector for a headset > mic.
In fact Apple did a great service to everyone by pushing the standard 3.5 mm jack. Before that almost everyone tried to gouge customers with their proprietary headphone jacks. Sony-Ericsson especially comes to mind, what a stain on Sony who brought us Walkmans in the 80s to try and push substandard and overprices headphones... Others had some weird concept for a "music" phone which would include the jack and an MP3 player while other phone models wouldn't (Nokia...)
Il 11/08/2014 19:42, Nils ha scritto:
> Depends on your level of Android application knowledge.
> [...] Thank you for your suggestions. I nevere developed app for Android OS, but I have "normal skills" in programming. The question was if I need advanced/guru Android/Linux skills to develop NFC app or not.
On Saturday, August 9, 2014 12:54:36 PM UTC-4, edward....@gmail.com wrote:
> > The OP did say right off the target is an Android phone, but beware that > > you can't use these standard modules to connect to iPhone's etc. Apple > > requires some magic hardware in the middle. > > Yes, Apple is known for taking standard interfaces (USB, charging) and making it non-standard and more expensive. Hopefully, iPhone and iPad will follow the Mac PC's path to disappearance.
Ironic. Microsoft used to do the analogous thing with software standards. "Embrace and Extend" they called it. Without Jobs, Apple is drifting aimlessly. The cool factor is getting clammy.
On Monday, August 11, 2014 2:52:58 PM UTC-5, Paul Rubin wrote:
> pozz <pozzugno@gmail.com> writes: > > How difficult is to develop an Andorid app that uses NFC > > functionalities of the phone? > > Most phones don't have NFC so the NFC approach doesn't sound that > promising. BT or wifi are surely the best for user convenience. Audio > cable would be cheapest in terms of hardware.
old thread but, some Android tablets have the capability to use zigbee i think, not sure on the phones. Apps seem to be available. And I know WinSystems (probably others) offered a Zigbee PC/104 board in the past. If you need plug-n-play option. data sheet www.winsystems.com/datasheets/PCM-ZIGBEE-DS.pdf
1 Lucky Texan wrote:

> On Monday, August 11, 2014 2:52:58 PM UTC-5, Paul Rubin wrote: > > pozz <pozzugno@gmail.com> writes: > > > How difficult is to develop an Andorid app that uses NFC > > > functionalities of the phone? > > > > Most phones don't have NFC so the NFC approach doesn't sound that > > promising. BT or wifi are surely the best for user convenience. Audio > > cable would be cheapest in terms of hardware. > > old thread but, some Android tablets have the capability to use zigbee
> i think, not sure on the phones. Apps seem to be available. And I know
> WinSystems (probably others) offered a Zigbee PC/104 board in the
> past. If you need plug-n-play option. data sheet www.winsystems.com/datasheets/PCM-ZIGBEE-DS.pdf
I am looking a block of applications that need something like a smartphone or a lowcost tablet with an app as a user controller and a standalone application doing some specialized function. One of these is control of long exposure images on a telescope. Wires are both bothersome and often are responsible for adding to vibration in the images. The current approach is to use bluetooth or wifi. When low-cost tablets with WiFi have come to the $50-$60 range there just isn't an point in doing anything more than writing an app. w..
On Monday, November 24, 2014 11:59:53 AM UTC-8, Walter Banks wrote:
> 1 Lucky Texan wrote: > > > On Monday, August 11, 2014 2:52:58 PM UTC-5, Paul Rubin wrote: > > > pozz <pozzugno@gmail.com> writes: > > > > How difficult is to develop an Andorid app that uses NFC > > > > functionalities of the phone? > > > > > > Most phones don't have NFC so the NFC approach doesn't sound that > > > promising. BT or wifi are surely the best for user convenience. Audio > > > cable would be cheapest in terms of hardware. > > > > old thread but, some Android tablets have the capability to use zigbee > > > i think, not sure on the phones. Apps seem to be available. And I know > > > WinSystems (probably others) offered a Zigbee PC/104 board in the > > > past. If you need plug-n-play option. data sheet www.winsystems.com/datasheets/PCM-ZIGBEE-DS.pdf > > I am looking a block of applications that need something > like a smartphone or a lowcost tablet with an app as a user > controller and a standalone application doing some > specialized function. One of these is control of long exposure > images on a telescope. Wires are both bothersome and often > are responsible for adding to vibration in the images. > > The current approach is to use bluetooth or wifi. > > When low-cost tablets with WiFi have come to the > $50-$60 range there just isn't an point in doing anything > more than writing an app.
Except that WiFi transceivers are rather power hungry, of the order of 250mA. Some other transceivers are 30mA to 40mA.

The 2024 Embedded Online Conference