Dear Nordic,
it's about USB implementation. We need to add interface string descriptor for ineterface name.
Using USBD_STRING_DESCR_DEFINE(primary) I've added that to string descriptor section, but it has index "0" - that's wrong (?) because it brakes basic string descriptor structure defined in usb_descriptor.c.
How we could setup defines/linker commands to add new USB strings after that ones in usb_descriptor.c?
Given example defines newly added string with index 0 (but it must be 4 - after manufacturer, product and serial num).
USBD_STRING_DESCR_DEFINE(primary) struct webusb_iface_descriptor webusb_string_descr = {
/* webusb iface String Descriptor */
.bLength = sizeof(struct webusb_iface_descriptor),
.bDescriptorType = USB_DESC_STRING,
.bString = WEBUSB_IFNAME,
};
void webusb_init()
{
int idx = usb_get_str_descriptor_idx(&webusb_string_descr);
if (idx != 0) {
webusb_desc.if0.iInterface = idx;
}
}