grundid / nfctools

nfctools library for Java
http://www.grundid.de/nfc/
Other
307 stars 94 forks source link

ndef message size limit Android 4.1.2 and ACR122 #19

Open breygin opened 11 years ago

breygin commented 11 years ago

Hi Adrian

I am trying to incorporate your llcp service code into an app that reads from Android Galaxy 3 phone. Ndef message is loaded with one TextMimeRecord. I seem to experience a payload size limitation problem. anything below aprrox. 100 Bytes is working fine while longer messages are not communicating. I think when the protocol is establish my phone is categorized as a FeLiCa tag (for some reason), I looked up the specs and it seems that Felica tags are at least of 1K capacity. Is there anything in the code that could have limited the payload size for that type of message? I found something but I am not sure if that is causing the problem: public static final int DEFAULT_MIU = 1024;

thanks victor

breygin commented 11 years ago

I stand corrected, your code reads: public static final int DEFAULT_MIU = 128; I actually tried to change it to 1024 with no visible effect on the problem in hand. sorry for confusion.

victor

grundid commented 11 years ago

Hi,

the MIU does not limit the maximum payload size. Please have a look at our forum: https://groups.google.com/forum/#!topic/nfc-developers/i4-Cq0e3GG4

There seam to be different size problems with different phones.

breygin commented 11 years ago

thanks Adrian

I wonder if this is an NFC reader, rather than a phone, that has a limitation of reading a long message without slicing payload in a smaller bite pieces? I noticed that sending long messages from the reader (in LLCP service example) is implemented exactly that way - slicing it in smaller payloads and sending them one by one.

org.nfctools.snep.FragmentReader

isn't it what that class is for?

does not it mean that ACR122 reader has some buffer memory that may impose a limit on the size of messages (received or sent) ? I am just guessing here...

thanks anyway, victor