• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

NFC or RFID on Android

Search This thread

etmatrix

Senior Member
Jan 6, 2015
67
16
I have a Nexus5 with NFC reader and I tring to comunicate with RFID tags ISO14443B and ISO14443A, these tags don't respect ISO at 100% for example for ISO14443B not reply to REQB command so android don't detect it.
I tried to comunicate with tags directly with this code:

Code:
Bundle extras = new Bundle();
    try {
        Class cls = Class.forName("android.nfc.Tag");
        Constructor c[] = cls.getConstructors();
        Method tags = cls.getMethod("getTagService");
        Object tagService = tags.invoke(tag);
        Tag t = (Tag)c[0].newInstance(new byte[]{0x00},new int[] { 2 },new Bundle[] { extras },1,tagService);
        Method setConnectedTechnology = cls.getMethod("setConnectedTechnology",new Class[]{int.class});
        setConnectedTechnology.invoke(tag,2);
        NfcB b = NfcB.get(t);

        b.connect();
        byte a[] = b.transceive(new byte[]{0x02,0x01,0x01,0x04});
    }catch(Exception e){ }
but transceive give an error because android monitoring constantly the presence of tag. I tried to receive data with Proxmark3.
I'd like to patch android for implement also not standard protocols, but I don't understand where in source code this comunication is done. Where REQB or REQA are generated?
Someone can help me to find it?
Thank you
 
  • Like
Reactions: MixedJenesis

tizio9833

New member
Aug 12, 2016
1
0
I have a Nexus5 with NFC reader and I tring to comunicate with RFID tags ISO14443B and ISO14443A, these tags don't respect ISO at 100% for example for ISO14443B not reply to REQB command so android don't detect it.
I tried to comunicate with tags directly with this code:

Code:
Bundle extras = new Bundle();
    try {
        Class cls = Class.forName("android.nfc.Tag");
        Constructor c[] = cls.getConstructors();
        Method tags = cls.getMethod("getTagService");
        Object tagService = tags.invoke(tag);
        Tag t = (Tag)c[0].newInstance(new byte[]{0x00},new int[] { 2 },new Bundle[] { extras },1,tagService);
        Method setConnectedTechnology = cls.getMethod("setConnectedTechnology",new Class[]{int.class});
        setConnectedTechnology.invoke(tag,2);
        NfcB b = NfcB.get(t);

        b.connect();
        byte a[] = b.transceive(new byte[]{0x02,0x01,0x01,0x04});
    }catch(Exception e){ }
but transceive give an error because android monitoring constantly the presence of tag. I tried to receive data with Proxmark3.
I'd like to patch android for implement also not standard protocols, but I don't understand where in source code this comunication is done. Where REQB or REQA are generated?
Someone can help me to find it?
Thank you

Hello, I have the same problem, has anyone found a solution?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    I have a Nexus5 with NFC reader and I tring to comunicate with RFID tags ISO14443B and ISO14443A, these tags don't respect ISO at 100% for example for ISO14443B not reply to REQB command so android don't detect it.
    I tried to comunicate with tags directly with this code:

    Code:
    Bundle extras = new Bundle();
        try {
            Class cls = Class.forName("android.nfc.Tag");
            Constructor c[] = cls.getConstructors();
            Method tags = cls.getMethod("getTagService");
            Object tagService = tags.invoke(tag);
            Tag t = (Tag)c[0].newInstance(new byte[]{0x00},new int[] { 2 },new Bundle[] { extras },1,tagService);
            Method setConnectedTechnology = cls.getMethod("setConnectedTechnology",new Class[]{int.class});
            setConnectedTechnology.invoke(tag,2);
            NfcB b = NfcB.get(t);
    
            b.connect();
            byte a[] = b.transceive(new byte[]{0x02,0x01,0x01,0x04});
        }catch(Exception e){ }
    but transceive give an error because android monitoring constantly the presence of tag. I tried to receive data with Proxmark3.
    I'd like to patch android for implement also not standard protocols, but I don't understand where in source code this comunication is done. Where REQB or REQA are generated?
    Someone can help me to find it?
    Thank you