| Electronic Components Datasheet Search |
|
AN4430 Datasheet(PDF) 36 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN4430 Datasheet(HTML) 36 Page - STMicroelectronics |
|
36 / 42 page ![]() How to use ST NFC package to implement HW enhanced features AN4430 36/42 DocID025722 Rev 1 With St object stnfcchandler constructor: 3.2 Enhanced M24LR features Study – Read / Write 15693 Tag ST M24LR products are ISO/IEC-15693 based product not natively supported by Android System. On some Android Phone, if presented tag is NDEF formatted the Android system may detect the tag and parse file stored inside. If tag is not formatted as a NDEF message, developer can address the memory from the tag in raw addressing mode by sending to the tag specific protocol commands defined by 15693-3 standard. For such an addressing mode, developer implements the relevant android technology tag to handle ST-M24LR products. Let’s show how to implement an activity able to read and write on this kind of tag. As previous use case, developer retrieves the nfcAdapter and registers the activity to receive NFCV tags events. In the NFC-V use case, intentFilter is declared in order the activity received only the 15693 tag event by using the android NfcV technology (see mfilters and mTechLists). Once the activity is registered to handled NfcV tag intent, OnNewIntent() callback system is overridden to retrieve the tag’s information. Once the referenced tag is parsed from the intent (tagFromIntent Tag object) developer can send protocol command defined to physical public stnfccchandler(byte[] buffer) { mcclength = (short) ((buffer[0]<<8 &0xFF) + (buffer[1]&0xFF)); mccmappingver = (short)(buffer[2]&0xFF); mmaxbytesread = (short) ((((short)buffer[3])<<8 &0xFF) + (((short)buffer[4])&0xFF)); mmaxbyteswritten = (short) ((((short)buffer[5])<<8 &0xFF) + (((short)buffer[6])&0xFF)); mnbTLVBlocks = 1; mtfield = (short)buffer[7]; mlfield = (short)buffer[8]; mfieldId = (int)((buffer[9]&0xFF)<<8)+ (int)(buffer[10]&0xFF); mndeffilelength = (int)((buffer[11]&0xFF)<<8) + (int)(buffer[12]&0xFF); mreadeaccess = (short)buffer[13]; mwriteaccess = (short)buffer[14]; } Intent = PendingIntent.getActivity(this, 0,new Intent(this, ()).addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP), 0); lter ndef = new IntentFilter(NfcAdapter.ACTION_TECH_DISCOVERED); mFilters = new IntentFilter[] {ndef,}; mTechLists = new String[][] { new String[] { android.nfc.tech.NfcV.class.getName() } }; .enableForegroundDispatch(this, mPendingIntent, mFilters, mTechLists); |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |