Android Question USB HID communication HELP

walterf25

Expert
Licensed User
Longtime User
Hello all, i've been struggling with this issue for a almost a week now, i thought i'd make this post and hopefully get some answers.
I have a medical device that i need to communicate with and download the stored data in it, I can't give too much details about the device itself since i signed an NDA for this project.\
I can communicate just fine with the device i can send commands to it to wake up the device and and initialize the data download sequence.

The issue is that when i'm receiving the data, the data doesn't seem to be received completed, and there are also some other characters that i can see if i copy the data into a text file, I've been reading a few other posts here in the forums where some other members have provided some various examples on how to receive the data, i've tried all those examples but i seem to get the same results.

here's how the data should be received......
One reading should be like this in hex bytes
28 67 35 35 38 34 32 30 46 37 31 45 34 33 30 29 37 41
and converted to ascii it should look like this
(g558420F71E430)7A
The last hex byte is the is actually the last two numbers of the checksum.
And here's how the data is actually received....
5830)89

(g5
g553925
(58

(g55AFE464E7841D730)84

(g5664E579A3

(g535EA6B71D
005250
22B0F630)830)768C416630)7B4A97239706230)5B

5830)89

(g5
B30)61

(58

(g55AFE464E7841D730)84

(g5664E579A3

(g535EA6B71D

(g250
22B0F630)830)768C416630)7B4A97239706230)5B

5830)89

(g5

What can I do to receive the correct information?
I tried pasting the weird characters i receive but they don't seem to appear when i paste them on the forum, but from googling the characters one of them is an ACK, another is ENQ, another one is BEL, and another one is ETX and STX, how can i detect this characters in B4A since they don't get logged in the logs, i hope i can get some help with this, most importantly i want to be able to receive all the data being retrieved from the device, the device has 501 records, so i should be able to download all 501.

Thanks everyone for your help.

Walter
 

walterf25

Expert
Licensed User
Longtime User
if that works you might find out when it adds extra bytes, maybe it's internal also using a buffer with eob codes.

What is eob codes, I will try your suggestion and let you know.

Thanks,
Walter
 
Upvote 0

walterf25

Expert
Licensed User
Longtime User
end of buffer codes
Ok, i tried your suggestion but i don't get any data by doing that, it needs to have the 64 byte inendpoint
 
Upvote 0
Top