Digital Logic uFR-series NFC reader Python communication class

Guys,

Some of you may remember that I recently ordered 3 Digital Logic uFR Nano Online NFC readers.

Well, I’m properly impressed with that little device, and I’m even more impressed with Digital Logic’s documentation. They’re completely open with their protocol, and the documentation is comprehensive and crystal-clear. If all device manufacturers published specs of that caliber, I’m be a happier engineer.

In fact, I’m so impressed that I undertook to write a pure Python communication class for their uFR-series devices - which is remarkable, considering how lazy I am. Digital Logic provides a full API, but it has several problems - chief of which is, it conflicts with the stock Linux FTDI kernel drivers, which is a big no-no if, like me, you have several other serial USB devices connected. My Python reimplementation plays nice with other serial devices, and also makes it very easy to communicate with uFR devices over IP.

You can find the project here: https://github.com/Giraut/pyuFR

I don’t normally spend that much time on an NFC reader. So you may wonder what I find so great about it.

Well, it’s really a clever little device: it’s a simple serial device with a simple low-level protocol at heart. But the uFR Nano Online allows you to pipe the serial communication stream over BLE, UDP, TCP, HTTP REST and Websocket.

If you don’t want to do low-level stuff and you just want a turnkey solution, you can also configure it in master mode, and it’ll send what it reads over UDP, or to a HTTP server all by itself. And if that’s not enough for you, you can also configure it as a dumb serial reader, or HID reader over BLE (i.e. it’s seen as a Bluetooth keyboard). The number of configuration options is just staggering.

On top of that, anything and everything is configurable - from the many LEDs to the buzzer’s frequency.

What’s not to love eh? I highly recommend that device. If you have a particular need for a wireless NFC reader, this one will surely fit your bill.

And in case you’ve missed it, here’s the uFR Nano Online working over Wifi in master mode with Sirfidal:

7 Likes

Once again, great sharing :wink: I hope future humans will recognize the beauty and wonder of our digital works as they do the physical.

3 Likes

I highly doubt that. Me, I’m happy when my data lasts more than 15 years on dead storage media.

Here’s a story: when I was a little boy, my grandpa used to sit me on his lap and we’d talk for hours. Or rather, he’d talk to me and I’d babble back at him. Little did I know, he was recording everything on his cassette player for his own enjoyment later.

I found the cassettes in the attic after he passed away, as my mom and I were emptying the house. We listened to them and cried for hours that day.

I thought, this is important to preserve. That was the early nineties or something, and I had one one of the very first CDR recorders (1x, external SCSI VHS-sized contraption, well over $5k as I remember). So I sampled all the tapes as WAV files on my then-brand-spanking-new enormously expensive Pentium 90, did some audio editing to separate the wheat from the chaff, and burned 2 audio CDs. I put one in storage in my vault at the bank, and gave the other to my mom. And then I forgot about them for a good 15 years.

One day my mom said she couldn’t read the CD no more. I tried and tried on various readers and players, but no, it was dead. So I retrieved the one in the vault, and… same thing. Dead. So I went for the original cassettes, and while the audio was still there, it was faded beyond recognition. Uh oh…

Long story short, eventually I found the one CD drive that deigned reading the second disk. It ran for 2 days and read all the sectors repeatedly until it got one good read out of each of them. And eventually, lo and behold, I had a full image. I extracted the audio tracks and made MP3s out of them.

Now I can hear my grandpa’s voice again. But it was a close shave. One more year and my grandpa would have been consigned to oblivion forever.

That’s the future in the digital age I’m afraid. Ubiquitous amnesia.

I don’t agree. Mediums and formats change but digital data is easily migrated. Also, there is such a thing now as archival media which is designed for very long term storage. Of course, there will always an input energy requirement to maintain data against entropy… however that energy input can be in the form of money. Paying a very small fee per month to maintain an online data repo like Glacier or even Backblaze is a pretty safe bet as an active data backup solution, and is accessible to everyone.

Novel data storage techniques are also becoming more accessible, including DNA based data storage which has been shown capable of lasting several millennia… doubly so if you go for one of the XNA variants.

I think the idea of data longevity is not impractical, it just requires the attention and energy input required to preserve it properly.

That’s exactly my point: preserving data requires constant attention nowadays. Let your attention slip for a few years and you lose data.

In 100 years, you can bet your ass the switch will have been turned off on a lot of storage we have today, and that data will be gone. As opposed to books or scrolls written millenia ago that we can still decipher. I’m not saying papyrus is the answer to today’s data glutony, but you know… just sayin’

As for DNA storage and other long-term data storage, the problem is, who will invest in that? Most companies, governments, organizations are either looking at short term profits or immediate savings. Nobody invests in the future of humanity’s memory.

Let’s just say I’m not as optimistic as you are. Not that I really care ultimately though, as I have no children and no real interest in what happens to humanity after I’m gone.

Nowadays? I think it’s been pretty terrible for all human recorded data since the first characters were scribbled in the dirt.

If you want to consider novel long term storage, get some papyrus paper together or some stone tablets and convert your digital data into hole pokes or iron oxide ink dots or something that if kept in a halfway dry place (plenty of deserts around here) will take a lot of energy to create but basically zero energy to maintain… and computer vision systems will only get better and better, so reading it 10,000 years from now will be a matter of some simple software, if we’re not all software by then anyway.

It’s totally possible to store important data long term, especially if practicality isn’t your primary concern.

Absolutely agree. It’s just that nobody is doing it.

People of yesteryear weren’t thinking about data preservation. Librarians did, but your average shopkeep who recorded his balance sheet on kipu or clay tablets didn’t. It’s just that they had no other media to write on, and some of that media turned out to be rather durable entirely by accident. And we can still access that data.

Nowadays, everything is recorded on non-permanent storage media. If you want data to last, you have to do it on purpose for the sake of future generations. On punch cards, printed data storage, whatever. And nobody invests in that because nobody has any interest in doing that: it’s expensive, the data density is usually low, and it benefits no-one in the next financial quarter. Only a few nonprofits concerned about leaving traces of our civilization to future generations do that, desperately trying to raise money for their projects, and generally not succeeding all that well.

Kind of OT if it wasn’t already, but one aspect of implants I like is that, while the data in my implants will be long gone, and/or will make no sense, and/or will be unretrievable because nobody will know what NFC was, at least if someone digs up my grave, they’ll be wondering what that person inserted those strange objects in his body for. It’s a sort of a message for future archaelogists.

So in a sense, DT is creating time capsules of sorts :slight_smile:

True, but who this data was not important to the person to preserve. Even medical records were tossed out after 7 years as recently as the 90s.

Yep exactly… not all data should be preserved… just as human memory regularly and intentionally forgets unimportant details, data erosion is necessary too… but things we deem important for future generations can still be preserved with relative ease.

I do like this idea as well. I’ve often thought of how these little capsules will end up in just 50 or 100 years from now. I don’t want to get crazy OT here or too morbid either, but I sometimes wonder if people with transponder implants have ended up dying… I have heard of nobody thus far but I’m sure it’s happened… and I wonder if the chip will end up sitting there in the coffin for 200 years or whatever… or if it will ever be discovered… such a strange idea to think about.

1 Like

That’s the problem: you don’t know in advance what’s worth preserving. Everyday insignificant tidbits taught us as much if not more about the civilizations that created them as the nice, purposedly preserved gilded books and official engraved obelisks commissioned by pharaohs.

I don’t think so. It’s a valid and interesting question to ask. It certainly fascinates me to think about what someone in 1000 or 2000 years might think of those strange technological remnants lying around this person’s skeleton - nevermind 200 years.

Maybe they’ll lift them with their unobtainium quantum powered 4-dimensional arm and shout “This must be one of the very first of our kind!”

1 Like

hmm… I’d think the etched tablets and hieroglyphs and Mayan calendar stones and the many things that were meant to stand the test of time probably gave us way more direct information about past human societies than the daily accounting of a shopkeep… but having them both does form a more well rounded picture for sure.

I think the only reason the mundane detail of a random spice trader is considered super important and interesting is because it is so rare for such things to survive… if we had a huge cache of accounting data for all spice traders across thousands of years, nobody would really care all that much… its only interesting because it is rare… but who knows… we might not even make it past 2021 as a species at this rate, so this might all be moot :wink:

1 Like

True dat. I’m not too hopeful neither about the future of the species, and not because of the virus, but because it has utter stupidity and violence both genetically built in.

Has this thread gone OT yet? :slight_smile:

1 Like

I feel this is proof you agree we are cyborgs.

Nah: 4-dimensional quantum-powered archaeologist of the future won’t know what it is. I do :slight_smile:

1 Like

After much creative coding and abusing of the Digital Logic API, I finally managed to take control of the uFR Nano’s RF field to make it flash Morse code on my doNExT, for my smart bracelet project (since I can’t reverse-engineer the ChameleonTiny Pro’s BLE protocol). Check it out:

It’s very slow: I can’t get it to go faster than 7 words per minute without messing up the Morse code timings beyond recognition. That’s a limitation of the firmware: it just wasn’t designed to do that. But I reached out to Digital Logic, and maybe I’ll be getting some help from them. They already replied and gave me some pretty good technical tips, so there is hope.

If it was a bit faster, it’d be perfect to power the bracelet.

2 Likes

If anybody is interested, I made a small program to turn a uFR reader into a RF field detector on steroids:

image

That there is the pulses from my cellphone when it’s probing for a tag to read.

This thing is really versatile! It’s not a Proxmark, but it goes well beyond most other readers in terms of functionalities.

3 Likes

This is good: I reached out to Digital Logic to ask them whether they could make the firmware better for my silly purpose - not hoping much, since it’s not exactly a mainstream use case - and here’s the answer I got today:

My R&D was very quick to act.
They released a new firmware version v5.0.51
[…]
My colleagues also added commands for turning the RF field ON (RF_ON) and OFF (RF_OFF).

Ain’t that great or what!

I’ll flash the new firmware in my uFR reader tomorrow and play with the new commands. If they work well, it’ll be the ideal hardware for my blinkie bracelet project. That’s for after I get my dead flexNExT replaced of course :wink:

1 Like

Here’s some Morse code at 15 words per minute, output with the new firmware commands, using the uFR reader over wifi: the timing and nice and sharp now:

That’s more like it.