[Hackrf-dev] Help with NFC decoding.

Dominic Spill dominicgs at gmail.com
Fri Apr 17 14:48:16 EDT 2015


On 17 April 2015 at 15:25, evilsocket <evilsocket at gmail.com> wrote:
> Hi everyone, I'm trying to decode NFC-A ( 13.56Mhz ) data from the HackRF
> using C/C++ code instead of GNU Radio, mostly because I want to understand
> the logic of demodulation and decoding itself instead of using pre made
> tools.

I think this is a great goal, but have you considered using GNU Radio
to confirm that it works and then rewrite it in C/C++ piece by piece?

> As far as I read on the web, NFC uses ASK modulation, so what I'm currently
> doing on the rx callback is taking each IQ, computing amplitude,
> thresholding it to get a 1 or 0 bit, appending each bit to a bit stream and
> print the hex value every 8 bits, you can see the code here:

Have you looked at the waveform to see if you can identify where the
data is being transmitted?

> I have two questions:
>
> 1. Am I on the right track or am I doing everything wrong? :)

I think you're on the right track.

> 2. If what I'm doing is correct, could someone point me to the right
> documentation on how to decode those hex streams I get?

It probably depends on what is being transferred.  A good place to
start would be these specs:
http://members.nfc-forum.org/specs/spec_list/


More information about the HackRF-dev mailing list