usb driver

usb driver yazma – usb kodlama

usb a-device b-device kavramlari usb hattinin cektigi gucun kimin tarafindan saglandigini gosteriyor. a-device usb hattinin power supplier’i, b-device ise power consumer’i. bunlar sonradan istenirse SRP (Session Request Protocol) ile degitirilebiliyor. USB-OTG denilmesinin sebeplerinden biri bu power’in switch edilebilmesi bir de peripheral ya da host edilme ozelligi de (Host Negotiation Protocol - HNP) switch edilebiliyor. bu yuzden de USB-OTG deniyor. peripheral tarafindaki ID pini floating kalirken, host tarafindaki ID pini GND’ye cekilmesi lazim. bu connection basinda boyle olmasi lazim, connection kurulduktan sonra istenirse host ile peripheral HNP ile switch edilebilir. ayrica a ve b ile usb kablosunun hangi ucunun nereye bagli oldugunun tespiti de yapiliyor. a ucu host’a b ucu peripheral’a baglanmali connection baslangicinda. sonra bu a device ya da b device olmasinin cok onemi kalmiyor cunku HNP ile bunlar dinamik olarak (connection kurulduktan sonra) degistirilebiliyor.
kaynak_0
kaynak_1


usb baglantilarinda ID ile hangi tip kablonun (a tipi mi b tipi mi) baglantigi anlasilir. HNP ile bu baglantilarin bir onemi kalmaz. baglanti kurulduktan sonra dinamik olarak degistirilebilir. SRP ile baglantinin gucunun kim tarafindan saglaniyorsa power saving icin bunun Vbus’in switch of edilmesi.


  • Host — computer that controls the interface
  • Function — device that provides a capability to the host
  • Hub — device with one or more connections to USB devices plus hardware to enable communications with each device
  • Device — something that attaches to a USB port (sometimes synonymous with a function)
  • Port — a connector on the USB Host bus
  • Suspend — Device enters Suspend after 3mS of inactivity on the bus to minimize power consumption. Host uses timing packet to keep Peripherals active.
  • Enumeration — Initialization sequence to inform the host what device was attached to the bus. Device parameters are conveyed at this point.
  • Descriptors — List of tables that identify the capabilities of the device
  • Endpoint — All transmissions travel to/from and endpoint which is just a block of memory or a register. Endpoint 0 is the control endpoint which is the only bi-directional endpoint typically used for enumeration.

kaynak


OTG – on the go – bir device bir baglantida host olarak gorunurken baska bir baglantiya gectiginde device olarak hizmet verebilir. buna OTG deniyor. mesela bir cep telefonuna USB device takildiginda bu USB device’a gore kendisi host olurken, ayni cep telefonu bilgisayara baglaninca bilgisayara kendisini device olarak tanitir.

kaynak


usb paketlerini falan anlatan guzel bir site

kaynak


usb haberlesmesini izlemek için program Device Monitoring Studio