简体   繁体   中英

How to analyze data being passed by NFC tag to android phone?

So I've basically followed the tutorial here and everything works well. That's cool, but how the application handles the tag dispatch system, NDEF message being filtered etc is still like a black-box for me. Is there a way to look at the actual data being passed by the NFC tag to the android phone?

I don't know if this analogy will make sense but one of my desktop application uses SOAP protocol to communicate with other devices and if I wanted to take a look at the actual contents of what is being passed between the two communicating devices, I can launch wireshark to analyze the packets by following the stream and I'd get something like this:

POST /InStock HTTP/1.1
Host: www.example.org
Content-Type: application/soap+xml; charset=utf-8
Content-Length: 299
SOAPAction: "http://www.w3.org/2003/05/soap-envelope"

<?xml version="1.0"?>
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
  <soap:Header>
  </soap:Header>
  <soap:Body>
    <m:GetStockPrice xmlns:m="http://www.example.org/stock">
      <m:StockName>IBM</m:StockName>
    </m:GetStockPrice>
  </soap:Body>
</soap:Envelope>

Obviously NFC data is not XML based but I'd like to actually know what the data looks like.

It I have to make the to SOAP the most close one for NFC case is NDEF(NFC Data Exchange Format). But this is not the only way to exchange data between the NFC tag and a phone, but is the standard one. It is standardized by the NFC Forum and you can find more details here: http://www.nfc-forum.org/specs/spec_list/ .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM