hid-data comunication problem

General discussions about V-USB, our firmware-only implementation of a low speed USB device on Atmel's AVR microcontrollers
24c1024
Posts: 2
Joined: Sat Sep 10, 2016 7:07 am

hid-data comunication problem

Postby 24c1024 » Sat Sep 10, 2016 4:35 pm

hi

i use hid-data example with 2 reportid .

how can i get data from pc in avr ?

in usbFunctionSetup

rq->wIndex.bytes[1];

is return report id ?

how can i get hid buffer data ?

thanks

mostafayasin
Posts: 5
Joined: Sun Oct 21, 2018 12:30 am

Re: hid-data comunication problem

Postby mostafayasin » Mon Oct 22, 2018 4:06 pm

I think the first byte it contain the report ID .

ulao
Rank 4
Rank 4
Posts: 480
Joined: Mon Aug 25, 2008 8:45 pm

Re: hid-data comunication problem

Postby ulao » Wed Oct 24, 2018 4:06 pm

yeah,

usbRequest_t *rq = (void *)data;
char rID = rq->wValue.bytes[0];//report ID;

then you can do

if(rq->bRequest == USBRQ_HID_GET_REPORT)//features reports.
and
if (rID == 1)

wait.. This is a 2 year old post? LOL Don't bump those man... ;)

Arsmther
Posts: 6
Joined: Mon Nov 26, 2018 4:45 pm

Re: hid-data comunication problem

Postby Arsmther » Mon Nov 26, 2018 7:18 pm

mostafayasin wrote:I think the first byte it contain the report ID .

Ye it is!

ulao
Rank 4
Rank 4
Posts: 480
Joined: Mon Aug 25, 2008 8:45 pm

Re: hid-data comunication problem

Postby ulao » Tue Dec 04, 2018 6:43 pm

First byte is report ID if there are report IDs in the report. In the case you do not use Report ID's, the first byte is first data.


Return to “V-USB”

Who is online

Users browsing this forum: No registered users and 1 guest