Forum Discussion
Altera_Forum
Honored Contributor
11 years agoHello,
--- Quote Start --- As you can see, it's a bit confusing cause offsets here are not the same as it's shown in the manual. It's irritating :/ 0x06 = bRequest field => type of request (get_descriptor here) 0x08 = bmRequestType 0x0100 = descriptorType = device etc.. --- Quote End --- Hope following will help to clear your doubt. unsigned int dev_req[4]={0x0680,0x0100 ,0x0000,0x8}; dev_req[0] = 0x0680 ( Lower byte is 0x80 which is bmRequestType, Higher byte is 0x06 which is bRequest ) dev_req[1] = 0x0100 ( This 2 bytes are for wValue. Lower byte is 0x00 and upper byte is 0x01 which indicates Device descriptor.) dev_req[2] = 0x0000 ( This 2 bytes are for wIndex. For device descriptor this field is 0.) dev_req[3] = 0x0008 ( This 2 bytes are for wLength. This is 8 means we are expecting device to send 8 bytes in response to this request.) Reference: 9.4.3 Get Descriptor and Table 9-2 from USB2.0 Specification --- Quote Start --- i'm just wondering why you put 0x12 bytes in get device descriptor after setting the address and 0x9 for get config descriptor. --- Quote End --- I think, at present, you do not need to worry about this. I will answer later on. --- Quote Start --- arrrgh this thing makes me mad.. Pci express was almost easier for me... or i'm not normal --- Quote End --- Hey brother, you are absolutely normal. PCI express may be simpler, but USB is also not that much difficult. At initial stage, it seems difficult but then you will love it. Could you share code which you used to perform Bulk Request? I would like to check whether you are using correct endpoint number and device address. Have a Nice day. Regards, Bhaumik