We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi all,
How can i get vendorId and Productid of the usb connected. Which Api can be used from a middleware application?
From the link www.keil.com/.../_u_s_b__device__descriptor.html , i understood DEVICE DESCRIPTOR can be used.
But how this can be called in a function??
Regards Arun
http://www.keil.com/forum/62249 ?
Maybe if you explain what you're actually trying to achieve, people may be able to make informed suggestions?
www.catb.org/.../smart-questions.html
Ok.
Thanks for your suggestion.
So my question is how i can get vendorId and productId of the usb. it will be helpful if you could share a sample code.
Hi ,
I am using Keil-rtx and CMSIS driver for usb.
For STM32Cube driver ,i found following code which give Vendor Id and Product id of usb. Refernce Link: github.com/.../usbh_msc.c
///code for STM32 cube case MSC_READ_INQUIRY: scsi_status = USBH_MSC_SCSI_Inquiry(phost, MSC_Handle->current_lun, &MSC_Handle->unit[MSC_Handle->current_lun].inquiry); if( scsi_status == USBH_OK) { USBH_UsrLog ("Inquiry Vendor : %s", MSC_Handle->unit[MSC_Handle->current_lun].inquiry.vendor_id); USBH_UsrLog ("Inquiry Product : %s", MSC_Handle->unit[MSC_Handle->current_lun].inquiry.product_id); USBH_UsrLog ("Inquiry Version : %s", MSC_Handle->unit[MSC_Handle->current_lun].inquiry.revision_id); MSC_Handle->unit[MSC_Handle->current_lun].state = MSC_TEST_UNIT_READY; } if( scsi_status == USBH_FAIL) { MSC_Handle->unit[MSC_Handle->current_lun].state = MSC_REQUEST_SENSE; } else if(scsi_status == USBH_UNRECOVERED_ERROR) { MSC_Handle->unit[MSC_Handle->current_lun].state = MSC_IDLE; MSC_Handle->unit[MSC_Handle->current_lun].error = MSC_ERROR; } break;
///////////////////////////////////////////////////////////////////////////////
but, since i am using CMSIS driver these functions are not provided. Is there any method to find usb details with CMSIS driver.
I got the soluton and is working fine .
Refer: http://www.keil.com/forum/62263/#/msg204058