How to card emulate with ACR122U-A9

The ACR122U contains a PN532 NFC controller chip. The PN532 supports host card emulation through its TgInitAsTarget command (see the PN532 user manual). In order to pass commands to the PN532, you would connect to the ACR122U just as if it was a normal smartcard reader (e.g. using PC/SC). You can then send pack PN532 … Read more

Bluetooth pairing without user confirmation

This need is exactly why createInsecureRfcommSocketToServiceRecord() was added to BluetoothDevice starting in Android 2.3.3 (API Level 10) (SDK Docs)…before that there was no SDK support for this. It was designed to allow Android to connect to devices without user interfaces for entering a PIN code (like an embedded device), but it just as usable for … Read more

Android app enable NFC only for one Activity

If you want to diable processing of NFC discovery events (NDEF_DISCOVERED, TECH_DISCOVERED, TAG_DISCOVERED) while a certain activity is in the foreground, you would register that activity for the foreground dispatch system. That activity can then ignore these events (which it would receive in its onNewIntent() method. This will prevent NFC discovery events to be delivered … Read more

Editing Functionality of Host Card Emulation in Android

Ok ! So i’ve found a solution to the problem I was having! On the Nexus 7, when the NFC is turned on, it gets its information from a config file in “/etc/” called “libnfc-brcm-20791b05.conf” Inside of this file there is a parameter called “NFA_DM_START_UP_CFG” By default, it looks like this: NFA_DM_START_UP_CFG={42:CB:01:01:A5:01:01:CA:14:00:00:00:00:0E:C0:D4:01:00:0F:00:00:00:00:C0:C6:2D:00:14:0A:B5:03:01:02:FF:80:01:01:C9:03:03:0F:AB:5B:01:00:B2:04:E8:03:00:00:CF:02:02:08:B1:06:00:20:00:00:00:12:C2:02:01:C8} To edit the … Read more

Reading NFC Tags with iPhone 6 / iOS 8

The iPhone6/6s/6+ are NOT designed to read passive NFC tags (aka Discovery Mode). There’s a lot of misinformation on this topic, so I thought to provide some tangible info for developers to consider. The lack of NFC tag read support is not because of software but because of hardware. To understand why, you need to … Read more

Emulate Mifare card with Android 4.4

With host-based card emulation (HCE) in Android 4.4 you can only emulate the ISO/IEC 14443-4 protocol. More specifically you can only emulate application structures according to ISO/IEC 7816-4 (thus card emulation applications need to be selected though an AID). Moreover, the API doesn’t give you any means to specify if card emulation should be done … Read more