Reverse engineering Reloop Beatpad

Today I looked into the USB descriptors of my Beatpad with USBLyzer.
Here is what I found:

Audio Control Interface
Audio Streaming Interface: ISO OUT: 4ch, 16bit, 44,1 KHz, but max packet size is 384bytes
MIDI streaming Interface: BULK IN and OUT with 32byte maximum packet size
HID interface with vendor defined functions

There could be some difficulites for me in the next steps:
– I have to implement a 4 channel USB soundcard. I think nobody did it before on STM32, or at least I haven’t found anything on the web.
– ST USB Audio Class driver is by default does not support 44.1KHz so I’m using 48KHz. I hope Algoriddim can work with 48KHz and still thinks my device is a Reloop Beatpad.
– The STM32F4 Full Speed USB core can handle 1 Control endpoint, 3 IN and 3 OUT endpoints. And I need to use 1 Control, 1 ISO audio out, 1 MIDI in, 1 MIDI out, 1 Interrupt IN, 1Interrupt out. So allmost all possibile endpoints will be used, I’m worrying about performance.
– Reloop Beatpad has the endpoint address 05 and 06 for MIDI. But in STM32 I think I cannot modify the endpoint number, so I have to use 0,1,2, and 3 for all my endpoints. Maybe if it’s needed I can remap somehow the request and the FIFO address inside, but I really hope It’s not needed.

Anyway, the next step will be to make a 4 channel soundcard.

USB kcomposit device

Connection Status Device connected
Current Configuration 1
Speed Full (12 Mbit/s)
Device Address 1
Number Of Open Pipes 4
Device Descriptor Reloop Beatpad
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 26ADh
10 idProduct 2 65A2h
12 bcdDevice 2 0200h 2.00
14 iManufacturer 1 01h “reLOOP”
15 iProduct 1 02h “Reloop Beatpad”
16 iSerialNumber 1 00h
17 bNumConfigurations 1 01h
Configuration Descriptor 1 Self Powered
Offset Field Size Value Description
0 bLength 1 09h
1 bDescriptorType 1 02h Configuration
2 wTotalLength 2 00CFh
4 bNumInterfaces 1 04h
5 bConfigurationValue 1 01h
6 iConfiguration 1 00h
7 bmAttributes 1 40h Self Powered
4..0: Reserved …00000
5: Remote Wakeup ..0….. No
6: Self Powered .1…… Yes
7: Reserved (set to one)
(bus-powered for 1.0)
0…….
8 bMaxPower 1 00h 0 mA
Interface Descriptor 0/0 Audio, 0 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 00h
5 bInterfaceClass 1 01h Audio
6 bInterfaceSubClass 1 01h Audio Control
7 bInterfaceProtocol 1 00h
8 iInterface 1 00h
Audio Control Interface Header Descriptor
Offset Field Size Value Description
0 bLength 1 0Ah
1 bDescriptorType 1 24h Audio Control Interface Header
2 8 01 00 01 1F 00 02 01 02
Audio Control Input Terminal Descriptor
Offset Field Size Value Description
0 bLength 1 0Ch
1 bDescriptorType 1 24h Audio Control Input Terminal
2 10 02 01 01 01 00 04 33 00
00 00
Audio Control Output Terminal Descriptor
Offset Field Size Value Description
0 bLength 1 09h
1 bDescriptorType 1 24h Audio Control Output Terminal
2 7 03 02 01 03 00 01 00
Interface Descriptor 1/0 Audio, 0 Endpoints
Offset Field Size Value Description
0 bLength 1 09h
1 bDescriptorType 1 04h Interface
2 bInterfaceNumber 1 01h
3 bAlternateSetting 1 00h
4 bNumEndpoints 1 00h
5 bInterfaceClass 1 01h Audio
6 bInterfaceSubClass 1 02h Audio Streaming
7 bInterfaceProtocol 1 00h
8 iInterface 1 00h
Interface Descriptor 1/1 Audio, 1 Endpoint
Offset Field Size Value Description
0 bLength 1 09h
1 bDescriptorType 1 04h Interface
2 bInterfaceNumber 1 01h
3 bAlternateSetting 1 01h
4 bNumEndpoints 1 01h
5 bInterfaceClass 1 01h Audio
6 bInterfaceSubClass 1 02h Audio Streaming
7 bInterfaceProtocol 1 00h
8 iInterface 1 00h
Audio Streaming Interface Descriptor
Offset Field Size Value Description
0 bLength 1 07h
1 bDescriptorType 1 24h Audio Streaming Interface
2 5 01 01 01 01 00
Audio Streaming Format Type Descriptor
Offset Field Size Value Description
0 bLength 1 0Bh
1 bDescriptorType 1 24h Audio Streaming Format Type
2 9 02 01 04 02 10 01 44 AC
00
Endpoint Descriptor 01 1 Out, Isochronous, 1 ms
Offset Field Size Value Description
0 bLength 1 09h
1 bDescriptorType 1 05h Endpoint
2 bEndpointAddress 1 01h 1 Out
3 bmAttributes 1 09h Isochronous, Adaptive, Data
1..0: Transfer Type ……01 Isochronous
3..2: Sync Type ….10.. Adaptive
5..4: Usage Type ..00…. Data
7..6: Reserved 00……
4 wMaxPacketSize 2 0180h 384 bytes
6 bInterval 1 01h 1 ms
7 bRefresh 1 00h
8 bSynchAddress 1 00h
Audio Streaming Isochronous Audio Data Endpoint Descriptor
Offset Field Size Value Description
0 bLength 1 07h
1 bDescriptorType 1 25h Audio Streaming Isochronous Audio Data Endpoint
2 5 01 01 00 00 00
Interface Descriptor 2/0 Audio, 2 Endpoints
Offset Field Size Value Description
0 bLength 1 09h
1 bDescriptorType 1 04h Interface
2 bInterfaceNumber 1 02h
3 bAlternateSetting 1 00h
4 bNumEndpoints 1 02h
5 bInterfaceClass 1 01h Audio
6 bInterfaceSubClass 1 03h MIDI Streaming
7 bInterfaceProtocol 1 00h
8 iInterface 1 00h
MIDI Streaming Interface Header Descriptor
Offset Field Size Value Description
0 bLength 1 07h
1 bDescriptorType 1 24h MIDI Streaming Interface Header
2 5 01 00 01 41 00
MIDI In Jack Descriptor
Offset Field Size Value Description
0 bLength 1 06h
1 bDescriptorType 1 24h MIDI In Jack
2 4 02 01 01 00
MIDI Out Jack Descriptor
Offset Field Size Value Description
0 bLength 1 09h
1 bDescriptorType 1 24h MIDI Out Jack
2 7 03 02 02 01 01 01 00
MIDI In Jack Descriptor
Offset Field Size Value Description
0 bLength 1 06h
1 bDescriptorType 1 24h MIDI In Jack
2 4 02 02 03 00
MIDI Out Jack Descriptor
Offset Field Size Value Description
0 bLength 1 09h
1 bDescriptorType 1 24h MIDI Out Jack
2 7 03 01 04 01 03 01 00
Endpoint Descriptor 05 5 Out, Bulk, 32 bytes
Offset Field Size Value Description
0 bLength 1 09h
1 bDescriptorType 1 05h Endpoint
2 bEndpointAddress 1 05h 5 Out
3 bmAttributes 1 02h Bulk
1..0: Transfer Type ……10 Bulk
7..2: Reserved 000000..
4 wMaxPacketSize 2 0020h 32 bytes
6 bInterval 1 00h
7 bRefresh 1 00h
8 bSynchAddress 1 00h
Unrecognized Audio Class-Specific Descriptor
Offset Field Size Value Description
0 bLength 1 05h
1 bDescriptorType 1 25h Unrecognized Audio Class-Specific
2 3 01 01 01
Endpoint Descriptor 86 6 In, Bulk, 32 bytes
Offset Field Size Value Description
0 bLength 1 09h
1 bDescriptorType 1 05h Endpoint
2 bEndpointAddress 1 86h 6 In
3 bmAttributes 1 02h Bulk
1..0: Transfer Type ……10 Bulk
7..2: Reserved 000000..
4 wMaxPacketSize 2 0020h 32 bytes
6 bInterval 1 00h
7 bRefresh 1 00h
8 bSynchAddress 1 00h
Unrecognized Audio Class-Specific Descriptor
Offset Field Size Value Description
0 bLength 1 05h
1 bDescriptorType 1 25h Unrecognized Audio Class-Specific
2 3 01 01 04
Interface Descriptor 3/0 HID, 2 Endpoints
Offset Field Size Value Description
0 bLength 1 09h
1 bDescriptorType 1 04h Interface
2 bInterfaceNumber 1 03h
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 0100h 1.00
4 bCountryCode 1 00h
5 bNumDescriptors 1 01h
6 bDescriptorType 1 22h Report
7 wDescriptorLength 2 0034h 52 bytes
Endpoint Descriptor 83 3 In, Interrupt, 1 ms
Offset Field Size Value Description
0 bLength 1 07h
1 bDescriptorType 1 05h Endpoint
2 bEndpointAddress 1 83h 3 In
3 bmAttributes 1 03h Interrupt
1..0: Transfer Type ……11 Interrupt
7..2: Reserved 000000..
4 wMaxPacketSize 2 0028h 40 bytes
6 bInterval 1 01h 1 ms
Endpoint Descriptor 04 4 Out, Interrupt, 1 ms
Offset Field Size Value Description
0 bLength 1 07h
1 bDescriptorType 1 05h Endpoint
2 bEndpointAddress 1 04h 4 Out
3 bmAttributes 1 03h Interrupt
1..0: Transfer Type ……11 Interrupt
7..2: Reserved 000000..
4 wMaxPacketSize 2 0028h 40 bytes
6 bInterval 1 01h 1 ms
Interface 3 HID Report Descriptor Vendor-Defined 1
Item Tag (Value) Raw Data
Usage Page (Vendor-Defined 161) 06 A0 FF
Usage (Vendor-Defined 1) 09 01
Collection (Application) A1 01
    Usage (Vendor-Defined 2) 09 02
    Collection (Physical) A1 00
        Usage Page (Vendor-Defined 162) 06 A1 FF
        Usage (Vendor-Defined 3) 09 03
        Usage (Vendor-Defined 4) 09 04
        Logical Minimum (24) 15 18
        Logical Maximum (127) 25 7F
        Physical Minimum (0) 35 00
        Physical Maximum (-1) 45 FF
        Report Size (8) 75 08
        Report Count (32) 95 20
        Input (Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit) 81 02
        Usage (Vendor-Defined 5) 09 05
        Usage (Vendor-Defined 6) 09 06
        Logical Minimum (-128) 15 80
        Logical Maximum (127) 25 7F
        Physical Minimum (0) 35 00
        Physical Maximum (-1) 45 FF
        Report Size (8) 75 08
        Report Count (32) 95 20
        Output (Data,Var,Abs,NWrp,Lin,Pref,NNul,NVol,Bit) 91 02
    End Collection C0
End Collection C0

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s