Android and ndef

The ndef standard has a byte which can be used as a field identifier.
Android format tags seem to use it but i cannot find the format for this.
I assume the industry has come to an agreement somewhere, just do not know where to look.

Have you confused "Android" and "Arduino"?

No.
I have nfc tags programmed with a smart phone.
The byte seems to be used to identify , uri, contact details,web address etc.

I want to read this with an arduino

First thing I found with Google ndef format here

I suspect you could have done that and saved me the trouble.

...R

Hi robin.
That only defines the ndef format which i understand.
The type byte though has been hijacked by android somehow to identify different fields.
This is not specified in the ndef format itself.

Boardburner2:
Android format tags seem to use it but i cannot find the format for this.

That only defines the ndef format which i understand.

Somewhere there's a difference. Can you read the tags as bytes?

Yes.

I can match different fields sometimes but not always.
Tags are small and only have one or two records.
I know however that there ar 20 or more different fields out there, i just dont know what they all are.

Ill upload a sample dump when i get home.

And while you're teaching about why it should work, you might out why it doesn't.
I don't know Android.

This still doesn't sound like an Arduino problem, but can't you just read the data and then see what value is used to identify each field? If you want to know in advance what values might be programmed, this sounds like a question for the support community for whatever you're using to program the tags, rather than Arduino.

GoForSmoke:
And while you're teaching about why it should work, you might out why it doesn't.
I don't know Android.

Neither do i.
I can happily read and write ndef records with my arduino.
When i get an ndef tag that has been written by an android there is something there that is not in the ndef standards.

It this bit i am trying to understand.

I want my arduino to programme a lot of tags that an android phone can read reliably.

Im pretty much a beginner at this and ive spent well over a year wading through datasheets trying to understand how it works.
If don had not released his ndef library i would probably have given up by now.
I thought i had it cracked until i read a tag written by an android and found something not in the standard.

PeterH:
This still doesn't sound like an Arduino problem, but can't you just read the data and then see what value is used to identify each field? If you want to know in advance what values might be programmed, this sounds like a question for the support community for whatever you're using to program the tags, rather than Arduino.

No its not.
I can read and write the tags to ndef standard.
It appears that the android lot have done something else with it, its this i am trying to understand.

The addafruit libs concentrate on the mifare card which can be formatted as ndef.
Unfortunatley android phones do not read them reliably.
They will all work however with ntag203 tags but earlier there was little library support for this.
Im happy with using arduino to programme the tags, but do not understand the format needed for android to read.
Ive asked in android areas only to be met with blank stares.

I've been reading a little about NDEF. Which byte is the type byte that is causing you a problem?

...R

Boardburner2:
If don had not released his ndef library i would probably have given up by now.
I thought i had it cracked until i read a tag written by an android and found something not in the standard.

Does the library work and do you have the source?

If what you want is to write tags that work then don't get bent out of shape about reading whatever get sent?

The library works .
I have the scource but its largely uncommented, im trying to comment it atm as a learning excercise.

If i write a tag to ndef a smartphone ends up putting the data in the wrong fields.
Iv experimented with ordering of fields but its not that.

I would also like to take the data and generate an extra field which is generated by combining the title field with the uid to give some degree of copy protection.

Im not writing the android app but person that is, is experiencing the same problem with tags.

Robin2:
I've been reading a little about NDEF. Which byte is the type byte that is causing you a problem?

...R

In the link you gave , its the fourth byte of the header.
I said i would give a hex dump but my fdti lead was delivered to a neighbour and i need it to generate the test tags..

Boardburner2:
I have the scource but its largely uncommented, im trying to comment it atm as a learning excercise.

LOL! Something I learned from fixing and modifying code that had been danced through by multiple others, all with short deadlines and working rush jobs that didn't leave time to think up concise, correct comments or even remove comments no longer valid turned out to be an old saying even in 1983 -- the code IS the comments!

Boardburner2:
In the link you gave , its the fourth byte of the header.

I found this other page and this that seem more useful. The first link seems to have 2 bytes before the header that I can't find any explanation for.

On the Adafruit page there seem to be a lot of pre-defined types. I presume your problem is that some of the records you are trying to read have other types.

...R

That link talks about a mifare card formatted as ndef.
That has a structure of its own.

The type field has 6 defined according to ndef types plus null.

Its this one that the android uses somehow.

Boardburner2:
That link talks about a mifare card formatted as ndef.
That has a structure of its own.

The type field has 6 defined according to ndef types plus null.

Its this one that the android uses somehow.

Sorry. I don't know which of the three links I posted you are referring to.
Have you a link to the 6 defined types?

...R

This explains in depth
http://www.cardsys.dk/download/NFC_Docs/NFC%20Record%20Type%20Definition%20(RTD)%20Technical%20Specification.pdf