Search found 9 matches

by drquark
Wed Mar 21, 2018 3:02 pm
Forum: V-USB
Topic: HID Variable data length
Replies: 16
Views: 82170

Re: HID Variable data length

Ok, I've got it working on a ATMEGA328P with Arduino bootloader . Thank you for your support ! I can read/write 511 bytes of data, that is enough for my use. BTW, what's the max size we can transfer in HID get/set report ? I've used 0x1ff (511) is it possible to go to 512 (0x200) ? As the max size i...
by drquark
Thu Mar 15, 2018 10:14 pm
Forum: V-USB
Topic: HID Variable data length
Replies: 16
Views: 82170

Re: HID Variable data length

I'm almost ready to start my project, I have a last question : I'd like to use the millis() function from Arduino code, but it uses TIMER 0 overflow interrupt. I read in the wiki : Make sure that you're not using interrupts higher than the interrupt you have set for VUSB. Also make sure you're not d...
by drquark
Wed Mar 14, 2018 6:10 pm
Forum: V-USB
Topic: HID Variable data length
Replies: 16
Views: 82170

Re: HID Variable data length

Ok, I think I found that macro to set to a higher value :D

Code: Select all

#define HID_ReportCountS(x)     0x96,(x&0xFF),((x>>8)&0xFF)
by drquark
Wed Mar 14, 2018 4:48 pm
Forum: V-USB
Topic: HID Variable data length
Replies: 16
Views: 82170

Re: HID Variable data length

Good, How do I transfer 512 bytes, as REPORT_COUNT is a byte with a max value of 0xFF (255) ? I understand that I can define USB_CFG_LONG_TRANSFERS to 1 to make it possible, but finally what's the use of REPORT_COUNT in the usb report descriptor ? in the wiki, I found this code snippet : static ucha...
by drquark
Tue Mar 13, 2018 10:11 pm
Forum: V-USB
Topic: HID Variable data length
Replies: 16
Views: 82170

Re: HID Variable data length

Great !
If I set the first byte of the buffer with the message length to the host, is it possible to abort USB communication when I get the desired buffer size ?
by drquark
Tue Mar 13, 2018 7:05 pm
Forum: V-USB
Topic: HID Variable data length
Replies: 16
Views: 82170

Re: HID Variable data length

Thank you so much, I'll try to understand how to build a USB report descriptor of this type (didn't find an example doing it).
512 bytes should be enough for my use, anyway !
by drquark
Tue Mar 13, 2018 3:18 pm
Forum: V-USB
Topic: HID Variable data length
Replies: 16
Views: 82170

Re: HID Variable data length

Thank you for your reply, I'm studying the CDC232 source code as it seems a good starting point for me. About CAN network, standard vehicle frames (non ISO_TP) are fixed length (8 bytes long). But I'd like to use CAN ISO_TP format (for diagnostic operation) and in this operation mode, the frames can...
by drquark
Mon Mar 12, 2018 10:18 pm
Forum: V-USB
Topic: HID Variable data length
Replies: 16
Views: 82170

Re: HID Variable data length

Sorry, I haven't been clear. I use a MCP2515 (CAN to SPI bus) to transfer data to/from avr and I want to use V-USB to communicate with a computer. The problem here is that CAN response have an arbitrary response length, and I want to know if it's manageable with V-USB. Is there any sample code using...
by drquark
Mon Mar 12, 2018 4:35 pm
Forum: V-USB
Topic: HID Variable data length
Replies: 16
Views: 82170

HID Variable data length

Hi, I'm working on a project for vehicle diagnostic via CAN bus. I'd like to use the V-USB library to do the communication, but I'm wondering if it's possible to send data with non-fixed data length (as the electronic control units reply with variable data length). Is there any other project doing t...