I have a device with software that I developed a ways back. The device used a older v-USB usb stack and the new device uses LUFA. I pretty much am making a replica of the old device. There are some small changes but for the most parts its the same thing. These device used the USB_PID force feedback to send data FFB data and they both do that well. The old device I believe set the pipe0 to both in and out and I do not see how to do that with LUFA but as it is with LUFA using FFB, there is an out and and in pipe.
#define JOYSTICK_EPADDR_IN (ENDPOINT_DIR_IN | EPNUM1)
#define JOYSTICK_EPADDR_OUT (ENDPOINT_DIR_OUT | EPNUM2)
Endpoint_ConfigureEndpoint(JOYSTICK_EPADDR_OUT, EP_TYPE_INTERRUPT, JOYSTICK_EPSIZE, ENDPOINT_DIR_OUT);
Endpoint_ConfigureEndpoint(JOYSTICK_EPADDR_IN, EP_TYPE_INTERRUPT, JOYSTICK_EPSIZE, ENDPOINT_DIR_IN);
The new device also accepts get reports, and does so just fine but sent report always have empty payloads. See attached.
I confirmed my device sees the report 18 and the length is 9, but the data are missing.
I wrote the software so I can break point and see the data set to go out (it's correct), the report descriptor matches 1:1 and the device config is nearly the same (see below). but I do not get any data.
new device:
Connection Status Device connected
Current Configuration 1
Speed Full (12 Mbit/s)
Device Address 2
Number Of Open Pipes 2
Device Descriptor
Offset Field Size Value Description
0 bLength 1 12h
1 bDescriptorType 1 01h Device
2 bcdUSB 2 0200h USB Spec 2.0
4 bDeviceClass 1 00h Class info in Ifc Descriptors
5 bDeviceSubClass 1 00h
6 bDeviceProtocol 1 00h
7 bMaxPacketSize0 1 40h 64 bytes
8 idVendor 2 16D0h
10 idProduct 2 0D04h
12 bcdDevice 2 0200h 2.00
14 iManufacturer 1 01h "Bliss-Box"
15 iProduct 1 02h
16 iSerialNumber 1 04h "0001"
17 bNumConfigurations 1 01h
Configuration Descriptor 1 Bus Powered, 200 mA
Offset Field Size Value Description
0 bLength 1 09h
1 bDescriptorType 1 02h Configuration
2 wTotalLength 2 0029h
4 bNumInterfaces 1 01h
5 bConfigurationValue 1 01h
6 iConfiguration 1 00h
7 bmAttributes 1 80h Bus Powered
4..0: Reserved ...00000
5: Remote Wakeup ..0..... No
6: Self Powered .0...... No, Bus Powered
7: Reserved (set to one)
(bus-powered for 1.0) 1.......
8 bMaxPower 1 64h 200 mA
Interface Descriptor 0/0 HID, 2 Endpoints
Offset Field Size Value Description
0 bLength 1 09h
1 bDescriptorType 1 04h Interface
2 bInterfaceNumber 1 00h
3 bAlternateSetting 1 00h
4 bNumEndpoints 1 02h
5 bInterfaceClass 1 03h HID
6 bInterfaceSubClass 1 00h
7 bInterfaceProtocol 1 00h
8 iInterface 1 00h
HID Descriptor
Offset Field Size Value Description
0 bLength 1 09h
1 bDescriptorType 1 21h HID
2 bcdHID 2 0111h 1.11
4 bCountryCode 1 00h
5 bNumDescriptors 1 01h
6 bDescriptorType 1 22h Report
7 wDescriptorLength 2 04ECh 1260 bytes
Endpoint Descriptor 02 2 Out, Interrupt, 1 ms
Offset Field Size Value Description
0 bLength 1 07h
1 bDescriptorType 1 05h Endpoint
2 bEndpointAddress 1 02h 2 Out
3 bmAttributes 1 03h Interrupt
1..0: Transfer Type ......11 Interrupt
7..2: Reserved 000000..
4 wMaxPacketSize 2 0040h 64 bytes
6 bInterval 1 01h 1 ms
Endpoint Descriptor 81 1 In, Interrupt, 1 ms
Offset Field Size Value Description
0 bLength 1 07h
1 bDescriptorType 1 05h Endpoint
2 bEndpointAddress 1 81h 1 In
3 bmAttributes 1 03h Interrupt
1..0: Transfer Type ......11 Interrupt
7..2: Reserved 000000..
4 wMaxPacketSize 2 000Eh 14 bytes
6 bInterval 1 01h 1 ms
old device:
Connection Status Device connected
Current Configuration 1
Speed Low (1.5 Mbit/s)
Device Address 4
Number Of Open Pipes 2
Device Descriptor 4-PLAY(GP)PORT.1
Offset Field Size Value Description
0 bLength 1 12h
1 bDescriptorType 1 01h Device
2 bcdUSB 2 0110h USB Spec 1.1
4 bDeviceClass 1 00h Class info in Ifc Descriptors
5 bDeviceSubClass 1 00h
6 bDeviceProtocol 1 00h
7 bMaxPacketSize0 1 08h 8 bytes
8 idVendor 2 16D0h
10 idProduct 2 0D04h
12 bcdDevice 2 0400h 4.00
14 iManufacturer 1 01h "BLISS-BOX"
15 iProduct 1 02h "4-PLAY(GP)PORT.1"
16 iSerialNumber 1 03h "1000"
17 bNumConfigurations 1 01h
Configuration Descriptor 1 Bus Powered, 200 mA
Offset Field Size Value Description
0 bLength 1 09h
1 bDescriptorType 1 02h Configuration
2 wTotalLength 2 0029h
4 bNumInterfaces 1 01h
5 bConfigurationValue 1 01h
6 iConfiguration 1 00h
7 bmAttributes 1 00h Bus Powered
4..0: Reserved ...00000
5: Remote Wakeup ..0..... No
6: Self Powered .0...... No, Bus Powered
7: Reserved (set to one)
(bus-powered for 1.0) 0.......
8 bMaxPower 1 64h 200 mA
Interface Descriptor 0/0 HID, 2 Endpoints
Offset Field Size Value Description
0 bLength 1 09h
1 bDescriptorType 1 04h Interface
2 bInterfaceNumber 1 00h
3 bAlternateSetting 1 00h
4 bNumEndpoints 1 02h
5 bInterfaceClass 1 03h HID
6 bInterfaceSubClass 1 00h
7 bInterfaceProtocol 1 00h
8 iInterface 1 00h
HID Descriptor
Offset Field Size Value Description
0 bLength 1 09h
1 bDescriptorType 1 21h HID
2 bcdHID 2 0110h 1.10
4 bCountryCode 1 00h
5 bNumDescriptors 1 01h
6 bDescriptorType 1 22h Report
7 wDescriptorLength 2 04ECh 1260 bytes
Endpoint Descriptor 81 1 In, Interrupt, 8 ms
Offset Field Size Value Description
0 bLength 1 07h
1 bDescriptorType 1 05h Endpoint
2 bEndpointAddress 1 81h 1 In
3 bmAttributes 1 03h Interrupt
1..0: Transfer Type ......11 Interrupt
7..2: Reserved 000000..
4 wMaxPacketSize 2 0008h 8 bytes
6 bInterval 1 08h 8 ms
Endpoint Descriptor 01 1 Out, Interrupt, 8 ms
Offset Field Size Value Description
0 bLength 1 07h
1 bDescriptorType 1 05h Endpoint
2 bEndpointAddress 1 01h 1 Out
3 bmAttributes 1 03h Interrupt
1..0: Transfer Type ......11 Interrupt
7..2: Reserved 000000..
4 wMaxPacketSize 2 0008h 8 bytes
6 bInterval 1 08h 8 ms
What could I possible have wrong here?