cancel
Showing results for 
Search instead for 
Did you mean: 

Webusb descriptor for stm32f767

WIF
Associate II

Hello, I am trying to add the webusb descriptor to this code snippet to include the landing url but I cannot see a get device descriptor request for the webusb url in the request handling part of the code.

__ALIGN_BEGIN uint8_t USBD_FS_BOSDesc[] __ALIGN_END =
{
0x05, // Length
0x0F, // Binary Object Store descriptor
0x1D, 0x00, // Total length
0x02, // Number of device capabilities

// WebUSB Platform Capability descriptor (bVendorCode == 0x01).
0x18, // Length
0x10, // Device Capability descriptor
0x05, // Platform Capability descriptor
0x00, // Reserved
0x38, 0xB6, 0x08, 0x34, 0xA9, 0x09, 0xA0, 0x47,
0x8B, 0xFD, 0xA0, 0x76, 0x88, 0x15, 0xB6, 0x65, // WebUSB GUID
0x00, 0x01, // Version 1.0
0x02, // Vendor request code
0x06, //iLanding page index
}

I tried to debug to see if a request is being made with the vendor Id of 0x02, but I don't get any device request for the url

USBD_StatusTypeDef USBD_StdDevReq(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req)
{
USBD_StatusTypeDef ret = USBD_OK;

switch (req->bmRequest & USB_REQ_TYPE_MASK)
{
case USB_REQ_TYPE_CLASS:
case USB_REQ_TYPE_VENDOR:
ret = (USBD_StatusTypeDef)pdev->pClass[pdev->classId]->Setup(pdev, req);
break;

case USB_REQ_TYPE_STANDARD:
switch (req->bRequest)
{
case USB_REQ_GET_DESCRIPTOR:
case 0x02:
USBD_GetDescriptor(pdev, req);
break;

0 REPLIES 0