Okay, I am very confused right now.
I used a Beagle 480 to check the "over the wire" data on a USB serial device. The data sent with my program is the same as the original, the only difrence is the host->device data using multiple USB packets. But the data my program reads is not the same as what the original reads, despite the same data being sent over the wire.
What in the world is going on here?
@gudenau are the descriptors identical? Same max packet size, etc?
@MacVette The data is coming back different, for example 0xAA becomes 0x2A.
@gudenau does that happen if you memcpy() your buffer with zero after reading each chunk? Could the 0x2A be stale data?
@MacVette I'm effectively using read.
@gudenau does the read function return the number of valid bytes? I’m guessing you have to provide the read function with a buffer that’s at least as big as the configured value for max packet size. I would think the read would provide “n” chunks with max packet size and a final read of remaining data (unless there is other USB traffic causing delays).
@MacVette I'm just reading a byte at a time for now. I'm probably just going to have to do some lower level stuff to make this work.
@gudenau maybe reading single bytes cannot keep up with the transfer rate.
@MacVette The AA from the device is an ACK and it waits for a response. All the data is correct on the line.
This Mastodon instance is for people interested in technology. Discussions aren't limited to technology, because tech folks shouldn't be limited to technology either! We adhere to an adapted version of the TootCat Code of Conduct and have documented a list of blocked instances. Ash is the admin and is supported by Fuzzface, Brian!, and Daniel Glus as moderators. Hosting costs are largely covered by our generous supporters on Patreon – thanks for all the help!