Scubapro G2 usb: always use exactly 32-byte packets (plus report byte)
It turns out that the Scubapro G2 itself does not care at all, but apparently some of the other dive computers that use the same protocol do). In particular, Vincent reports that his Scubapro Aladin Square downloads ok with the USB ID's switched to c251:2006, but only if we send 32-byte USB HID payload packets, even though the command itself is much smaller. Otherwise it will simply not reply at all. To actually download correctly, we'll still need to do some model- specific USB ID updates, and there will be some model changes for the Aladin Square, but this at least fixes the transport side. Jef had actually already done this because of the Windows behavior side, I just hadn't thought it could possibly matter. Mea Culpa. Reported-and-tested-by: Vincent <vavincavent@gmail.com> Cc: Berthold Stoeger <bstoeger@mail.tuwien.ac.at> Cc: Jef Driesen <jef@libdivecomputer.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
7de3a549ee
commit
4dce920c79
@ -113,7 +113,7 @@ static dc_status_t
|
||||
scubapro_g2_transfer(scubapro_g2_device_t *g2, const unsigned char command[], unsigned int csize, unsigned char answer[], unsigned int asize)
|
||||
{
|
||||
dc_custom_io_t *io = _dc_context_custom_io(g2->base.context);
|
||||
unsigned char buf[TX_PACKET_SIZE] = { 0 };
|
||||
unsigned char buf[TX_PACKET_SIZE+1] = { 0 }; // the +1 is for the report type byte
|
||||
dc_status_t status = DC_STATUS_SUCCESS;
|
||||
size_t transferred = 0;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user