Android Question usbmanager connection buffer limit

zmrcic

Member
Licensed User
max buffer size of usbmanager connection endpoint is 64. Only.
can I somehow override that?
I'm using bulktransfer and my response is cut on 64....

thanks
 

zmrcic

Member
Licensed User
first I find device and interface...taht's OK
then
B4X:
connection = manager.OpenDevice(device, interface, True)

Dim bytes() As Byte

Dim b As ByteConverter

Dim responseBuffer( outEndpoint.MaxPacketSize) As Byte

bytes = b.HexToBytes("62000000000000000A404000BF38100000253455249440100")

dataTransferred=connection.BulkTransfer   (inEndpoint, responseBuffer,responseBuffer.Length,500) 

Dim sResponse As String

sResponse=b.HexFromBytes(responseBuffer)

'this last line is cut....
for example....I need to get 802600000000030000000002010001000100747208030303FFFFFFFFFFFF00FFFFFFFFFFFFFFFF00003F403FCF0F9000026069040302019000080030393033324a4a4aFF...
but I only get
802600000000030000000002010001000100747208030303FFFFFFFFFFFF00FFFFFFFFFFFFFFFF00003F403FCF0F900002606904030201900008003039303332

first 64, that's the limit of responseBuffer, maxpacketsize
 

zmrcic

Member
Licensed User
B4X:
Data: 64
Buffer length 64 (0x40)
the response starts with 80670000000006000000 HEX
so after 80 there is 67....that is REAL length(CCID specs)....that is what I need
 

zmrcic

Member
Licensed User
yeah, i get that....maybe I will read twice, first time to get length and second time with buffer of that exact length.
only problem is that I need to send a sequence of precise commands, it's APDU....
maybe it will reset, so I will have to restart that sequence from the beginning...
anyway, since you said that there is no library for sending APDU, I will post my progress, if any :(

thx Erel
 
Top