USB Host detects usb device type

How we can detect which USB device type(HID,MSC etc) connected to usb host port? and appropriate routine for that type of device.

More questions in this forum