Linux Driver Assignment9 Usb Febt2013
Linux Driver Assignment9 Usb Febt2013
1.writeasimplemodulethatwillsearchtheentiresystemforall
availableusbphysicaldevicesand
printtheirbasicdetails
a!vendor"#$product"#$devicespeedandusbspace
address%%%
b!no.ofconfigurations$no.ofinterfaces$activeconfiguration$
activeinterfaceofaconfigurationandno.ofendpoints
foragivenactiveinterface%%%
c!"naddition$alsoidentifythehubdevices&root'hubaswell!
whicharealsodevicesinausbbusfabric.
d!alsoprintthedetailsoftheassociateddriver
boundtoagivenstructinterface()ob*ect
LinuxdriverassignmentsUSBdriversassignment9
+hisassignmentwillgiveyouahandsontouraroundthe
USBfabricrepresentation$intheusbsubsystem
,oucanuseusb-device-read&!of
./src01drivers1usb1core1devices.casthebasecodeand
customi2ethecodeasneeded%%%youmustunderstandthis
codeandalsounderstandyourre3uirements$beforeyou
startcoding%%%
4!alsoverifythattheaboveinformationcorrectasperwhat
youobserveforthecorrespondingphysicalandlogical
devicesundersysfsyoumustuseinformationunder
1sys1bus1usb1devicescompareinformationfromsysfs$with
"nformationgeneratedbyyourcode%%%
LinuxdriverassignmentsUSBdriversassignment9
5!6riteamodule$whichusestheUSB1notifier'chain
frame'wor/ofLinuxanddetectsadditionofnewdevices$
removalofdevices$additionofbuses&hubs!and
removalofbuses%%
,oucanusechapter7ofbootstrapUSBforthebasics
onnotifierchain$simplemodulesuggestedthereand
customi2ecodegivenforourre3uirements%%%
'youmusttestforevents$duringaddition1removalofdevices
busesbyconnectinganddisconnectingdevices1hubs%%%
'alsoprintsufficientinformationaboutthedetectdevices1
buses$inthenotificationhandler%%%
8ollowing9eadingisamust
'youmustreadch15ofL##15certaindetailsarenot
insyncwithcurrent/ernelversions$butbasicsare
verygood%%%
'youmustalsoreadchapters:$7$;$9and1<of
bootstrapusb
'refertocustom-usb's/eleton4.cprovidedwithcomments%%%
'refertothe/ernelsourcefilesreferredto
bytheabovereferencesandprovidedinlectures%%%
'relevantsectionsofpartone$fiveandsixof
USBsystemarchitecture=indsharepublications%%%
'youmustreadtherelevantsectionsfromusb4.<specificationfor
thehost$whenneedthisisnormallymentionedinthe
abovereferencesand/ernelsourcefiles%%%
'agoodunderstandingoftheusb'buswor/ingisaprere3uisitefor
writingusbdevicedrivers%%%