How to Handle VID/PID in Linux kernel 3.0 from userspace

122 views
Skip to first unread message

Thirupathi ch

unread,
Oct 7, 2011, 5:51:19 AM10/7/11
to lock...@android.com, android...@googlegroups.com, raveendra....@gmail.com
Hi,

In kernel 2.6.35 in android.c file VID/PID  will be provided by
platform data,But linux kernel3.0 andiord.c file  default VENDOR_ID =
0x18D1, PRODUCT_ID=0x001 is hardcoded. In android.c file Line:67  from
the comment “/* Default vendor and product IDs, overridden by
userspace */”   In our platform currently we are overriding PRODUCT_ID
and VENDOR_ID in the initrc file as per below.

write /sys/class/android_usb/android0/functions adb,mass_storage,acm,ecm

write /sys/class/android_usb/android0/f_acm/instances 1

write /sys/class/android_usb/android0/idProduct 0xABXX

 write /sys/class/android_usb/android0/idVendor 0x12XX

 write /sys/class/android_usb/android0/enable 1

When the cable is plugged in and boot the board PC Host reports
“Unknown Device”. Could you please suggest how to pass VENDOR_ID and
PRODUCT_ID from userspace so that PC driver recognizes the device
properly and installs the driver.

Regards,

Thirupathi

yingchun li

unread,
Oct 18, 2011, 11:13:55 PM10/18/11
to android...@googlegroups.com
Not sure, but you can try echo xxx > /sys/class/android_usb/android0/idVendor.
and why PC recognized your mobile as __Unknown Device__, IMO, it will use
the default PID and VID, something maybe wrong with your usb gadget driver.

> Thirupathi
>
> --
> unsubscribe: android-kerne...@googlegroups.com
> website: http://groups.google.com/group/android-kernel

Leng XueDong

unread,
Oct 18, 2011, 11:21:42 PM10/18/11
to android...@googlegroups.com

would you please tell me can I get the 2.6.35kernel source?many thanks

Reply all
Reply to author
Forward
0 new messages