Archive

Archive for the ‘Information’ Category

QR Code Tech Info: MECARD Format

May 2, 2011 4 comments

Now you are (hopefully) getting familiar with sharing your personal details using a QR Code, specifically your contact details. Here we go a little more in depth in exactly what it is you are sharing and how.

One small issue with the QR Code format is that is only defines how the entirely of the data is encoded and does not include any specification for defining specific types of information within this blockof information. That is, if you were to encode a string of information, the QR Code would be the same, regardless of the type of data. e.g. if we were to encode the text ‘Anonymous Aardvark’, that could be decoded as a contact name, a telephone number, a website address or an email address. Of course, if you were to try to dial this ‘telephone number’ or send an email to this ’email address’, it clearly will not work – but it is the application that will perform the sanity check on the data – the QR Code decoder itself is quite happy for you to claim that ‘Anonymous Aardvark’ is a valid telephone number.

So, one way around this potential problem is for the world to accept various standards of data definitions and code the relevant apps to recommend them. The MECARD is one such format. As it was the Japanese phone industry that pushed the QR Code into popularity, it seems reasonable to use DotCoMo‘s address card format as a standard.

The chances are, if you use a standard app or website to create a Contact QR code, it will use the MECARD format by default. Also, if you read a QR Code with this format of information, most likely your decoding application will recognise this format and understand it.

So, what’s inside the MECARD format?

The first few characters are ‘MECARD:’  and this helps the decoding software to understand what it is looking at. The rest of the fields are as follows. Note that a) no field is compulsory – you can skip any of them and b) each field can be repeated. However, most likely your decoding application will be happy with multiple telephone numbers for a single contact, but multiple names are going to give it problems

The field names used are:

N:  Contact name (if comma separated, uses LASTNAME,FIRSTNAME)

SOUND:  Contact name in Japanese (Kana). Same comma rules as N:

TEL: Telephone number

TEL-AV: Videophone Tel number

EMAIL:  Email address

NOTE: Memo text field

BDAY: Birthday (YYYMMDD format)

ADR: Address. Comma separated: PO box, room number, house number, city, prefecture, zip code and country

URL:  Website

NICKNAME: Display name

(for more complete specs, please see DotCoMo’s website

Let’s look at one and see what we can get.

when we decode this, we get:

MECARD:N:Anonymous Aardvark;ADR:The Highstreet Cityville Big State 55555555 United Kingdom;TEL:+1111111111;TEL:+3333333333;TEL:+2222222222;TEL:+4444444444;
EMAIL:theqrplace@gmail.com;URL:theqrplace.wordpress.com;;

Adding in some line breaks:

MECARD:
N:Anonymous Aardvark;
ADR:The Highstreet Cityville Big State 55555555 United Kingdom;
TEL:+1111111111;
TEL:+3333333333;
TEL:+2222222222;
TEL:+4444444444;
EMAIL:theqrplace@gmail.com;
URL:theqrplace.wordpress.com;;

Now, at first glance, it seems fairly simple and comprehensive. However, taking some time to look deeper shows some potential problems that we should be aware of: specifically, there are 4 different telephone numbers, but no distinction between them. In this sample, we have a work, mobile, fax and home number, but no indication which is which.

If the same software is used to decode and encode the QR Code, then we should be alright, but there is no guarantee of this at all. Perhaps Encoder A believes that they are 1)work, 2)mobile, 3)fax, 4)home – but Decoder B believes they are 1)mobile, 2)work, 3)home 4)fax. The potential for mixing up a contact’s details is high.

A really good QR Code encoder will allow you to select which fields are included in the QR Code.

A really good and well-thought out QR Code decoder will allow you to edit the details of a contact and swap around the label of the various fields.

If you are creating your own QR Code for sharing your personal details (perhaps for printing on a business card, or similar), then it seems that the best option is to only include as much information as the MECARD standard defines; for example, one telephone number and one email address only.

If you are encoding QR Codes directly from your phone’s address book, be aware of the limitations of this format and choose an encoder that lets you limit the number of fields used.

Advertisements
Categories: Information

Legal Bit

March 31, 2011 Leave a comment

QR Codes were developed by Denso Wave Inc. but they have chosen not to exercise the patent. That means you are free to use, generate, decode, print, display QR Codes without any licensing requirements.

This is good news.

The only limitation is that the name itself is a trademark and they require that you include this line of text in any document/webpage that uses the phrase ‘QR Code’

QR Code is registered trademark of DENSO WAVE INCORPORATED.

 

You can read more about the exact requirements here:

http://www.denso-wave.com/qrcode/faqpatent-e.html

Categories: Information

What is a QR code?

March 27, 2011 Leave a comment

Let’s keep this simple.

You are probably familiar with the barcodes on the back of packing of items in shops. Here’s a quick example of one:

UPC-A code with the numbers 12345678901

UPC-A code with the numbers 12345678901

This is an UPC-A standard barcode. The combination of thick and thin bars are a way of encoding numbers that you and I can read into something that can be scanned and read by a computer. Note that there are only 13 number in this particular type of barcode – it can’t tell you anything about the product, just what record the computer should look up in a big database (in this case, the UPC database). So, great if you use them for product ID, but not very flexible outside the retail environment and not really useful to you and I.

Now, you can use a slightly different type of barcode (a different ‘symbology’) that lets you use letters as well as numbers: CODE128 lets you create alphanumeric barcodes of unlimited length:

Code128 Hello World

Short text encoded in a Code128 barcode

We can even encode a website address in it.

http://www.barcode-generator.org/

Website URL encoded in a Code128 barcode

Pretty good. Except that the more  characters you include, the longer it gets, until it becomes a bit silly  and just not practical:

Long line of text in a Code128 barcode

Only 65 characters and it starts to get a bit silly - click for bigger

Now, the above are all ‘1D’ barcodes – i.e. 1-dimensional – the scanner only reads from left to right to decode the information. If you scan the top half of the barcode, you get exactly the same information as if you scanned the bottom half. If we go 2-dimensional (‘2D’), so that data is encoded both vertically as well as horizontally, we can squeeze a lot more information in the same space:

http://www.barcode-generator.org/

URL in QR

See how we can include a lot of information in the barcode, while keeping it to a usable size.

There are different symbologies available:, PDF417 and QR Code. Both are freely usable by you and I, but the QR code is one you are more likely to encounter as they are more popular in uses for the general public. So we will concentrate on this type of barcode here.

QR code, Wordsworth

Wordsworth

I wandered lonely as a cloud,
That floats on high o’er vales and hills,
When all at once I saw a crowd,
A host, of golden daffodils

 

 

In fact, you can squeeze a lot of information into a QR code. The official limit is  4,296 characters – about 715 words. Practically, the limit is about 250 characters, this sample has 217 characters:

QRCode with long text

217 characters in a single QRcode

 

Space: the final frontier.
These are the voyages of the starship Enterprise.
Its five-year mission: to explore strange new worlds,
to seek out new life and new civilizations,
to boldly go where no man has gone before.

 

 

And just for fun, here is the whole ‘To be, or not to be’ speech from Hamlet in a single barcode. 276 words / 1,488 characters (Note your QR decoder might struggle with one this size: some phones/online decoders cannot handle one of this size)

To be, or not to be: that is the question:
Whether ’tis nobler in the mind to suffer
The slings and arrows of outrageous fortune,
Or to take arms against a sea of troubles,
And by opposing end them? To die: to sleep;
No more; and by a sleep to say we end
The heart-ache and the thousand natural shocks
That flesh is heir to, ’tis a consummation
Devoutly to be wish’d. To die, to sleep;
To sleep: perchance to dream: ay, there’s the rub;
For in that sleep of death what dreams may come

When we have shuffled off this mortal coil,
Must give us pause: there’s the respect
That makes calamity of so long life;
For who would bear the whips and scorns of time,
The oppressor’s wrong, the proud man’s contumely,
The pangs of despised love, the law’s delay,
The insolence of office and the spurns
That patient merit of the unworthy takes,
When he himself might his quietus make
With a bare bodkin? who would fardels bear,
To grunt and sweat under a weary life,
But that the dread of something after death,
The undiscover’d country from whose bourn
No traveller returns, puzzles the will
And makes us rather bear those ills we have

Than fly to others that we know not of?
Thus conscience does make cowards of us all;
And thus the native hue of resolution
Is sicklied o’er with the pale cast of thought,
And enterprises of great pith and moment
With this regard their currents turn awry,
And lose the name of action.–Soft you now!
The fair Ophelia! Nymph, in thy orisons
Be all my sins remember’d.

So, as you can see, there is the potential for some clever stuff with these 2D barcodes. In my next few posts, I will share some of them with you.

If you want to have a play with making your own barcodes, try
http://www.barcode-generator.org/ as it lets you try creating barcodes in most of the common symbologies

Categories: Information Tags:

Introduction

March 25, 2011 Leave a comment

Hi,

This website is all about this little black and white square:

You may have come across it in all sorts of places: bill boards, magazine, packaging, labels, etc, etc. What is it and what does it do.

Read on to learn more…..

Categories: Information