×

Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 19

Thread: Raw tag access

  1. #1
    Registered User
    Join Date
    Oct 2011
    Posts
    22

    Raw tag access

    Hello,
    This question should probably have gone under something like NFC for dummies / complete noobs, but I've looked under such and questions were very different..
    So here it is

    [my platform is qt & N9]

    I want to read a tag, suppose its an NFC tag. What I really want is a raw access - that is, I want to read that tag as I'm pleased, interpret raw bytes(words) myself as I know what they are.
    Can I do this with the NFC technology?

    I see this information:
    http://www.developer.nokia.com/Commu...opment-with-qt

    where it says: "No raw, tag-specific access on MeeGo Harmattan...."

    What does this really mean? Is this what i want - the 'raw' access? How can 'raw' access be 'tag-specific' ? Is 'tag-specific' referring to word/block memory sizes, sector sizes, etc?

    If the phone's hardware reader can read an NFC tag, why would I not get raw access to it?
    If it can read lines or files, I should be able to read raw bytes/blocks too?

    Thanks to anyone with an answer in advance

  2. #2
    Super Contributor
    Join Date
    Mar 2008
    Posts
    1,481

    Re: Raw tag access

    Hi,
    There is some thing mentioned in this page about Harmattan,
    http://doc.qt.nokia.com/qtmobility-1...nd-limitations
    Connectionless LLCP sockets (both client and server).
    Tag type specific access.

    I am not MeeGo person hence I forward this to the person who has written the blog.

  3. #3
    Nokia Developer Champion
    Join Date
    Mar 2010
    Posts
    6

    Re: Raw tag access

    With the N9, you can read the raw payload of a tag and interpret it yourself. See for example the Nfc Info app, which shows how to parse Smart Posters, business cards or MIME/image NDEF messages based on the raw data of the records. So you do see the whole byte array stored in the message on the tag.

    What doesn't work with Qt on MeeGo is to send direct commands to a tag. Each tag format has its own "language" - a set of very low-level commands that trigger a response. E.g., there is a command for writing or reading a memory block. See the tag type specifications at NFC Forum for all the details about possible commands. This is a very low-level access, and requires knowledge of the memory structure of the tag (with block memory sizes etc.) and is different for every tag type. Qt on MeeGo abstracts this for you, and provides a more convenient API to read/write messages from/to tags, or to do LLCP connections. This should be exactly what you need in almost all cases.

    If you need to use the raw commands and access the memory blocks and sectors of tags direclty, you can do so with Qt on Symbian.

  4. #4
    Registered User
    Join Date
    Oct 2011
    Posts
    22

    Re: Raw tag access

    Hi ajakl,
    Thanks for your answer. I do need to do lots of reading on NFC, and from answers here I will look at LLPC first ..

    >This is a very low-level access, and requires knowledge of the memory structure of the tag (with block memory sizes etc.) and is different for every tag type. ..
    >Qt on MeeGo abstracts this for you, and provides a more convenient API to read/write messages from/to tags, or to do LLCP connections. This should be exactly what you >need in almost all cases.

    I would like to do read/write of the specific tag memory block sizes.
    For example, for my tag i know its organized in 32bit/4byte words/blocks/pages, and 128bytes/32words sectors.
    I want as 'low' access as this - block/word read (and would be nice to write too) access.
    So hopefully Qt does not abstract that away
    If it does however, then where would I look for system calls /API Qt in turn uses on MeeGo to get its memory-block level access?

  5. #5
    Super Contributor
    Join Date
    Mar 2008
    Posts
    1,481

    Re: Raw tag access

    Could you try if this help you?

    // Will be called when a tag is detected
    void MyMainWindow::targetDetected(QNearFieldTarget *target)
    {
    // Can be saved for later references
    mdetectedCard = target;

    connect(detectedCard, SIGNAL(requestCompleted(QNearFieldTarget::RequestId)),this, SLOT(readResponse(QNearFieldTarget::RequestId)));
    detectedCard->waitForRequestCompleted(reqId);
    }

    // Got the response
    void MyMainWindow::readResponse(QNearFieldTarget::RequestId id)
    {
    QByteArray response(detectedCard->requestResponse(id).toByteArray()); // This probably you are looking for QByteArray????
    }

  6. #6
    Registered User
    Join Date
    Oct 2011
    Posts
    22

    Re: Raw tag access

    Hi Mahbub,

    I did some checking on my tags, using the sample NfcInfo app, and it detected only 2 of my 5 tags I tried. Specifically not ones I hoped for.
    So I first have to know if I can get that tag with N9's reader/driver at all

    For those that it did detect, it shows NFC tag type 4, UID, and 'Failed to read NDEF messages from the target' (which is ok as long as it gets detected).
    One of these it reads is my buscard, and I know its an ISO14443-A tag, the other is a tag inside a passport (don't know the type).

    I also see in the system log the nfcd daemon traces for these detected tags -
    WARNING: nfc_mw_cb.c:511: nfc_mw_extract_target_info(): tag doesn't contains NDEF data
    ....................................952: nfc_mw_notify_touch(): error unsupported tag

    Which is probably all ok as I don't care for NDEF data as long as I get direct read/write to it or as in your example, if I get that QbyteArray of the tag data eventually.

    But for my tags of interest, both happen to be ISO15693, i don't get any traces, logs. At least for one of them the manufacturer says they are readable by NFC enabled phones.
    Where would I get detailed info on the N9's RFID/NFC reader?
    And where is the doc on nfcd, nfc utils, nfc library, hal, etc and linux kernel driver for the N9? (I'm still trying to find a complete package list for the MeeGo/Harmattan on N9)

    I have also looked briefly at the Qt mobility API, and I saw this class iface QNearFieldTarget:
    sendCommand(...)
    requestResponse(...)
    and these look like what I want (provided tag is detected at all ...)

    Below is snippet from sample code the manufacturer provided for an Android phone to read/write their tag:

    NfcV nfcvTag = NfcV.get(ma.getCurrentTag());
    byte[] WriteSingleBlockCommand = new byte[]{ (byte) 0x0A, (byte) 0x21, (byte) 0x00, (byte) 0x00, (byte) 0x55, ConfigArray[2], ConfigArray[3], ConfigArray[4] };
    .....
    byte[] response = nfcvTag.transceive(WriteSingleBlockCommand);
    .....

    Looks similar to the sendCommand( raw request ) / requestResponse(...) in the Qt Mobility, no?


    But anyway, I need some more details on hardware on N9's RFID reader. Anyone can provide with details?
    Then would love to know where to get details on its nfc driver, libs, tools, etc. Where would I ask for this? MeeGo forum?

  7. #7
    Super Contributor
    Join Date
    Mar 2008
    Posts
    1,481

    Re: Raw tag access

    I am not much familir with N9 NFC. But that is same like Symbian C7.

    You are right about the SendCommand() and requestResponse().

  8. #8
    Registered User
    Join Date
    Oct 2011
    Posts
    22

    Re: Raw tag access

    Where /who can I ask in Nokia for details on the N9's nfc/rfid hardware reader, linux driver, and the rest of 'lower' (below Qt mobility) level firmware?
    I was suggested a 'MeeGo team' ..

    Anyone from Nokia here ? ))

  9. #9
    Registered User
    Join Date
    Oct 2011
    Posts
    22

    Re: Raw tag access

    Would be really nice to know which NFC/RFID chip N9 has to begin with .. (Is there an N9 hardware questions thread??? i did not see one).

    This source http://www.nfctimes.com/news/texas-i...offer-nfc-chip
    suggests all Nokia's use an NXP chip.

    From http://www.chipworks.com/en/technica...44-controller/
    Nokia C7 uses combination of PN544 NFC and PN65N NFC.

    I wonder if its same for N9, anyone knows?

    Any Nokia insider here who could answer ? ....

  10. #10
    Nokia Developer Champion
    Join Date
    Mar 2010
    Posts
    6

    Re: Raw tag access

    Using Qt's sendCommand() and similar methods is not supported on MeeGo Harmattan - this is the tag-type specific access I was referring to. You can do this only on Symbian phones.

    Nfc Info only reads and shows NDEF formatted messages. The passport and public transport tags usually don't use those standardized messages, but their own custom format. Thus, you'd need to take a look at the raw payload and interpret this manually.

    Sorry, I don't have information about the specific NFC chips or libraries inside our phones. As for tag type support: we support the standardized NFC Forum Type 1 - 4 tags, plus Mifare. From what I understand, ISO 15693 isn't standardized by the NFC Forum.

  11. #11
    Registered User
    Join Date
    Oct 2011
    Posts
    22

    Re: Raw tag access

    > You can do this only on Symbian phones.

    Will the raw / tag-specific access API be available for the MeeGo Harmattan API in the next release? Why would you not include it, it seems a mistake not too.

    >From what I understand, ISO 15693 isn't standardized by the NFC Forum.
    Perhaps at this day but will be very soon?

    The NXP chip in C7 (with refs that I found), the doc for that model actually says it does support read/write to the ISO 15693 tag.

    If N9 has the same NFC/RFID setup, then it should also be able to read/write such tag. If it is so, then if you do implement
    the Qt Mobility's API for the 'raw' tag access with sendCommand() etc. it will be great for those that want to use such
    tags with the phone / platform.

    Btw, what is the reason that these sendCommand/requestResponse are not implemented on MeeGo/Harmattan?

  12. #12
    Registered User
    Join Date
    Oct 2011
    Posts
    22

    Re: Raw tag access

    Actually, with some determined google'ing (things like service manuals), you can be almost certain its the same chip in N9 - the PN544.
    http://www.nxp.com/acrobat_download2...7/75016890.pdf

    Page 2 of that doc - Contactless protocols , reader/writer - you can see ISO15693 listed.
    So ajakl, could you please provide the raw access with Qt Mobility?

    If you don't have time to implement this do you want to outsource it ?

  13. #13
    Registered User
    Join Date
    Nov 2011
    Posts
    1

    Re: Raw tag access

    Yes, tag type specific access is definitely a must for Harmattan. Or is there any objective issues which are preventing this from happening? Hopefully we will see it in PR1.2?

  14. #14
    Registered User
    Join Date
    Dec 2011
    Posts
    2

    Re: Raw tag access

    Why not open /dev/pn544. Maybe your app have no right to access it.

  15. #15
    Registered User
    Join Date
    Oct 2011
    Posts
    22

    Re: Raw tag access

    hey, that is a nice idea .
    Perhaps I'm reading this too late (busy at wrk before xmas...), have you tried this already?

Page 1 of 2 12 LastLast

Similar Threads

  1. Qt Mobility 1.2 APIs - unable to access tag type specific access (-5)
    By tomprice in forum Near Field Communication
    Replies: 3
    Last Post: 2011-12-29, 05:58
  2. Replies: 1
    Last Post: 2010-08-05, 11:05
  3. Replies: 2
    Last Post: 2009-02-09, 13:04
  4. Does NOKIA 6103 Supports Camera Access/Local File Access?
    By aditya.binju in forum Mobile Java General
    Replies: 1
    Last Post: 2006-07-13, 13:03
  5. Is internet access on nokia mobiles possible via loca wireless access points?
    By ncoded in forum PC Suite API and PC Connectivity SDK
    Replies: 1
    Last Post: 2003-10-27, 19:22

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •