Toward a native NFC app

I’ve been looking at building an app that permits writing tags as well as reading and wanted to ask @slava if this GitHub - monich/libgnfcdc: Glib based NFC Daemon Client is the right place to start. I think usage has been primarily reading, but it looks updating tags is there, judging from: In any case, GitHub - monich/harbour-matkakortti: Application for reading Helsinki and Tampere travel cards looks like a great starting point for exploring what needs to be implemented?

The use case I’m thinking of is generic, but I got curious since I have a bloody digital identity card from the German Gov’t (which is currently useless to me :wink: EDIT: the workflows for using the eID foo are byzantine (requiring using the java app as an intermediary to communicate with the servers of the eID footzies). Just to keep people from hoping that i’ll get an auth capable app finished anytime soon :frowning:


And, a little further info I get nfc-core info like:

Type 4A tag
Target detected
NDEF Tag Application not found

FWIW there’s ndef-write app in nfcd repo. It can write NDEF records to a writable Type 2 tag.

Type 4 tags are essentially smart cards with NFC access, what you can do with those depends entirely on the applications installed on those cards, the functionality that they implement, APDUs that they understand (quite often undocumented) and so on.


Thanks! It’s clear that the range of cards and apps today is, well, vast? In any case, the question is more to what extent libgnfcdc supports which standards?

The application example above is way more complex than writing tags, but I thought I’d start with the low hanging fruit. The eID app from the German Gov’t requires using, in SFOS case, will probably require running their so-called sdk (actually a binary blob of java goodness) to communicate with the server infra. in the relevant ministry. They claim this makes things safer since one doesn’t need to encrypt communication to the gov’s server infra. Sigh. Looks like they have issues with PKI. On the other hand, the documentation is relatively good. I’m looking through the IOS code: GitHub - Governikus/AusweisApp2-SDK-iOS: EDIT and the android code.


I don’t think we need a native NFC.
What we need is an exclusive pass-through of NFC chip to android layer.


With that attitude you should switch to Android.


NFC pass-through mode could be a useful hacking tool. Instead of disassembling Android packages you could simply run an Android app and watch its NFC traffic. And then write a native app doing the same or even better thing :slightly_smiling_face:

I don’t think it can be done without changes on the AppSupport side, though. Most likely, NFC support is disabled there at compile time.


yeah, let’s keep dreaming on.
years have already shown the promising life of NFC apps on SFOS.


Well, we have native NFC, that’s not the issue. We just don’t have a lot of apps utilizing it.

Well, it’s a bit a question of utility and to whom that utility is important. I don’t REALLY need the digital id stuff but I am, as usual, infuriated by how it’s implemented. The upside is that the application (Ausweisapp) is a QT app :slight_smile:


Well, not anymore. The app is completely functional on linux and given the range of devices that need to be supported (mobile, I mean, and QT patches !) it’s actually quite a nice piece of open source work!

1 Like

A bit weird to complain about the lack of NFC apps in a thread started by someone who set out precisely to remedy this situation. :grinning_face_with_smiling_eyes:


I remember using these tools on SFOS a few years ago to create a few NFC tags.
Worked well.

I think I even tried to access the NFC functionality over dbus with the goal of creating an app but it was about the time Sailjail was introduced with major changes to the permissions system and fighting against it turned out to be enough of a chore to make me give up on this idea.


What kind of an app?

1 Like

I think on the N9 I used an NFC tag in my car as a input for “situations” app.


Of course just dreaming won’t do much, but actually doing something may. If nothing else, we (those who do something) have some fun in the process. And gain a useful hands-on experience which can later be applied elsewhere.

But yes, it’s hard to argue that SFOS and its NFC apps are very unlikely to take over the world any time soon :neutral_face:


Just something to read/write NFC tags to be able to keep track of various items. But it never even left the design phase after the whole dbus thing went nowhere.

BTW couple more NFC apps of mine that can serve as examples. YubiKey OTP talks to YubiKey over NFC (that’s Type 4, aka ISO-DEP) and Foil Notes can use NFC P2P (aka NFC-DEP) functionality to transfer notes with a touch.


I would love to be able to share e.g. contacts via NFC to other phones (Android and iOS).


Heh I did that roo.

Plus my employee badge is an NFC smartcard, and I used that to toggle ‘work mode’ in Situations.

Now that some parts of Situations are open, maybe a SFOS NFC plugin is possible?


Of course I’d been looking at those! That’s why I was looking at your library approach since you use your own shared libraries.

Have some gear coming monday (for the desktop) so I can hack at my eID … Have to be able to set the pin on it first, or I’ll just lock myself out hacking :slight_smile: