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

Android: Changing NFC settings (on/off) programmatically

It’s not possible programatically without rooting device. But you can start NFC Settings Activity by intent action Settings.ACTION_NFC_SETTINGS for api level 16 and above. For api < 16 use Settings.ACTION_WIRELESS_SETTINGS Previous selected answer suggests to use WIFI_SETTINGS but we can directly move to NFC_SETTINGS Here’s the example : android.nfc.NfcAdapter mNfcAdapter= android.nfc.NfcAdapter.getDefaultAdapter(v.getContext()); if (!mNfcAdapter.isEnabled()) { AlertDialog.Builder … 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

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

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

Serials on NFC Tags – truly unique? cloneable?

Are serial numbers of NFC tags truely unique? That depends on the tag product and what you consider truely unique. E.g.: ISO 14443 Type A tags with 4 byte serial numbers: There certainly exist duplicates (mainly because there is no clear scheme to divide the available range of serial numbers among the various manufacturers) and … 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

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)