I have a FeliCa Lite S tag that I am trying to read information from. My problem is that i get TagLostException whenever i execute a trancieve command. The following code should read the first block in my tag according to "FeliCa Lite-S User's manual" (ref: http://www.sony.net/Products/felica/business/tech-support/data/fls_usmnl_1.2.pdf), but instead it throws the TagLostException:
NfcF tech = NfcF.get(tag);
byte[] id = tech.getManufacturer();
byte[] sc = tech.getSystemCode();
byte[] res;
try {
tech.connect();
res = tech.transceive(new byte[] {0x06,id[0],id[1],id[2],id[3],id[4],id[5],id[6],id[7],0x01,sc[0],sc[1],0x01,0x00});
} finally {
tech.close();
}
What am i doing wrong?
I have also tried with the poll command, and this also gives the TagLostException
byte[] pollRes = technology.transceive(new byte[] {
0x00, // poll command
SC[0], // system code B1 (FF -> any)
SC[1], // system code B2 (FF -> any)
0x01, // request code (0x00 == none)
0x00
});
Any help is greatly appreciated!
Edit 1:
After reading this post: http://code.google.com/p/android/issues/detail?id=15389 I altered the poll command to include a byte containing the length of the package, and that gave a responce to the polling.
res = tech.transceive(new byte[] {0x06, 0x00, sc[0], sc[1], 0x01, 0x00});
I tried to do the same to my read command, (including changing block list item to consist of 2 bytes), but the result is still the same:
tech.transceive(new byte[] {0x10, 0x06,id[0],id[1],id[2],id[3],id[4],id[5],id[6],id[7],0x01,sc[0],sc[1],0x01,0x80,0x00});