Android: Authenticating with NXP MiFare Ultralight C

Below is an example java code to perform Ultralight-C authentication as described in MF0ICU2 / MIFARE Ultralight C – Contactless ticket IC document (chapter 7.5.5 — 3DES Authentication, page 15): public void authenticate(byte[] key) throws CardException { System.out.println(“AUTHENTICATE”); byte[] encRndB = transmitRaw(new byte[] { 0x1A, 0x00 }); if((encRndB.length!=9)||(encRndB[0]!=AF)) { throw new RuntimeException(“Invalid response!”); } encRndB=Arrays.copyOfRange(encRndB, … 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)