Guest blog #2: Near field communication by Donatien Garnier

7th of November 2012 by clive
submit to reddit

Arthur C. Clarke said that, “Any sufficiently advanced technology is indistinguishable from magic.” As a child of the late 20th century I have experienced all manner of technowonders, from the Apollo 11 moon landing to motion-activated air fresheners that look like rocks. But brandishing your smartphones at each other to exchange data is, let’s face it, complete and utter witchcraftery.

Donatien Garnier of Cambridge startup AppNearMe describes how near field communication (NFC) can be used to talk to the Raspberry Pi.

Configuring devices with no physical user interface

Many projects have been using Raspberry Pi for embedded applications because it gives you a complete GNU/Linux platform with a great deal of input/output busses at a very competitive cost.

These RaPi-based projects are usually using some kind of connectivity (Ethernet, Wi-Fi, Bluetooth or even Zigbee or 6LowPan) and some of them are battery powered.

Here a Raspberry Pi was used to upload photos from a camera through Wi-Fi, here to power an WiFi-connected internet radio. On elinux.org’s RaspberryPi projects wiki page, you can find a couple other cool projects involving Bluetooth or Zigbee connectivity.

In all these projects most of the devices sit happily doing their job quietly however the connectivity parameters have to be configured at some point: SSID and passphrase for WiFi, pairing info for Bluetooth, security key for Zigbee, etc.

This leaves you with a few options to allow the user to configure these parameters. First one is to embed a touchscreen or a screen plus keypad on your setup. However your overall cost would increase a lot and this would make your device quite bigger. Plus remember how frustrating it is to input text on a tiny keypad?

You can plug your Raspberry Pi into a computer screen and keyboard and input the parameters using the command line, but this is both time consuming and requires that you actually have this kind of equipment around. If your device is in a closed case this means that you would have to expose at least the HDMI output and one USB plug, which can be problematic especially if your case needs to be hermetic.

You can also let the user write the parameters on a file on the SD Card, but sometimes you just don’t want him to be able to access the whole file system, it is still time consuming and having to remove and insert back the SD card can lead to involuntary damage on the hardware.

Near Field Communication (NFC) at the rescue

Another solution is to somehow shift these constraints to another device. This is one of the situation where NFC can help. NFC is a very short range radio technology that allows touch-based interactions (to get an idea have a look at what Google is doing with Android Beam). We (a recently Cambridge-established startup called AppNearMe) developed a solution that allows you to touch your RaspberryPi with your Android phone to get the device’s configuration interface. You can configure every parameter using your phone’s large touchscreen and touch the Pi back to set the configuration.

For instance here is a demo of WiFi configuration:

WiFi configuration

List of WiFi networks transmitted by the Raspberry Pi to the phone

List of WiFi networks transmitted by the Raspberry Pi to the phone

For now you can see that the hardware is a bit messy but we are working on a more integrated solution!

The hardware we used for the demo: RaspberryPi with WiFi dongle, mbed LCP11U24, Adafruit NFC board

The hardware we used for the demo: RaspberryPi with WiFi dongle, mbed LCP11U24, Adafruit NFC board

From a developer’s point of view we have a Python API (on the Pi side – will be released soon) and an HTML5/Javascript framework for developing the interface (no Android programming skills required – more info here).

Beyond connectivity

Of course connection parameters are not the only things that you might need to configure: units, time zones, location based on the phone’s GPS, calibration data for sensors or even user accounts for cloud-connected devices. You can also transmit authentication keys to unlock features.

Does it inspire you with new project ideas? We’d love to know, so feel free to drop us a comment!

 

Buy a Pi!

buyapi

buypiswag
News Archives

Supported by


In the forums
  • jukingeo, 2 minutes ago: Gaming • Re: PiMame difficulties
    Hello Welshywelshy wrote:jukingeoThe vector game "colour problem" you mention is beacuse AdvMAME's Default setting is "auto". heres an extract from my "Guide" to AdvMAME which explains how to correct them - 1. The “default” advmame.rc, display_color is “auto”. Vector games…
  • Tumerboy, 2 minutes ago: Graphics, sound and multimedia • Re: Pausing OMXPlayer right after it starts?
    I'm not sure I'd be comfortable modding omxplayer. I really am not a programmer, and I'd guess that much beyond basic python scripting is a ways beyond me.Any other suggestions?Is there any way to tell python to perform an action…
  • Rezendes, 13 minutes ago: General programming discussion • code for 16x2 LCD test
    Hi, I'm brand new to LCDs and Raspberry Pi GPIO. I've wired up a LMB162ABC 16x2 LCD that came in an Arduino Uno kit from Maker Faire. I've used just any open GPIO pins that I wanted figuring it doesn't…
  • johnbeetem, 19 minutes ago: General discussion • Re: Newbie electriconics question..
    Lennie wrote:mline wrote:Lennie wrote:My question is, will my multimeter always show +5V, regardless of what value R is?Yes, because you measure always between +5V and GND.Thanks, I will check up in the links you provided. In that case, is it…
  • elektrknight, 21 minutes ago: Screens and displays • Re: Sainsmart 3.2" (SSD1289) framebuffer driver
    I suspect that since the display is so cheap, they might be using panels that didn't pass the most strict quality controls.The problem stems from mis registration between LCD and resistive overlay. It is actually pretty commonin these displays but…

On Twitter
  • Raspberry_Pi, 2 hours ago
    Keyboard sticker in use. Adorbs, isn't it? http://t.co/x6Ltk2RQ0x Cambridge, UK
  • Raspberry_Pi, 2 hours ago
    Back by popular demand: laptop and keyboard stickers! http://t.co/dA58AkopsW Cambridge, UK
  • Raspberry_Pi, 12 hours ago
    Crazy, crazy day. Full of satisfaction and jellyfish. Cambridge, UK
  • teknoteacher, 22 hours ago
    You can watch a live demonstration of NOOBS on @Raspberry_Pi at Tokyo Raspberry Jam http://t.co/Gjjy2VgWdY #RJam Preston, Lancashire, UK

Friends of Pi