Skip to Content
0
Former Member
Jul 29, 2016 at 08:44 AM

Appeon NFC\RFID Android

194 Views

Hi Experts !

I need some help with Appeon NFC feature.

I’m testing with the MifareClassic 1000 card\tags with Samsung Galaxy S4 (both NFC options on phone enabled) but can’t get the read or write to work using both code as per Appeon help documentation below. I've created 2 buttons on mobile app, one for write (which clicked first) and second the read. I first scan card, then phone beeps, then i try read or write (using both options as per examples below) but no joy.


Code Example 1


eon_mobile_nfcex Inv_mobile_nfc //create nfc object

eon_mobile_str_nfcrecord istr_nfcrecord


//open nfc object

Inv_mobile_nfc.of_open()


//read nfc tag record

Inv_mobile_nfc.of_getNdefRecord(li_index,istr_nfcrecord)


//write nfc tag record

Inv_mobile_nfc.of_addrecord(istr_nfcrecord)

Inv_mobile_nfc.of_writeRecords()

//close nfc object

Inv_mobile_nfc.of_close()


Code example 2


eon_mobile_nfcex Inv_mobile_nfc //create nfc object

eon_mobile_str_nfcrecord istr_nfcrecord


//open nfc object

Inv_mobile_nfc.of_open()


//if necessary

Inv_mobile_nfc.of_setTimeout(li_timeout)

Inv_mobile_nfc.of_setkey(ls_key)

Inv_mobile_nfc.of_startBlockOperate()


//read nfc tag record

Inv_mobile_nfc.of_readBlock(li_block,ibl_data)


//write nfc tag record

Inv_mobile_nfc.of_writeBlock(li_block,ibl_data)

Inv_mobile_nfc.of_stopBlockOperate()


//close nfc object

Inv_mobile_nfc.of_close()


The function Inv_mobile_nfc.of_open() return 1 (success) as well as Inv_mobile_nfc.of_startBlockOperate() returns 1


1- What\how should the value of li_index be (in example 1) ?

2 - In the example 2 how do you obtain the key (for specific tag) ls_key ?

Thanks in advance


Regards

Benjamin