USB-Geräte im Netz durchreichen
Für einen Kunden arbeite ich gerade an einem Thin-Client-Netzwerk: Dünne, unter Linux laufende Clients sollen per RDP-Client auf Windows-7-Pro-Instanzen zugreifen, die gesammelt auf einem Xen-Host ausgeführt werden. Für die Nicht-Verwendung von Windows Server 2008 mit Terminaldiensten gibt es den simplen Grund, dass einige der eingesetzten Anwendungen nicht in Terminalserverumgebungen lauffähig sind. Der Haken an der Geschichte: Es muss ein komfortabler Zugriff auf lokale USB-Geräte – Speichersticks, Chipkartenleser und ähnliches – möglich sein.
Wir haben daher zunächst mit USB-Servern fürs Netz experimentiert, derartige Geräte gibt es für netto 30 Euro (Ein-Port-Versionen mit unbekanntem chinesischen Hersteller, z.B. bei Conrad) bis 300 Euro (zwei oder vier Ports, Hutschienenmontage, Industriequalität, PoE, z.B. bei WuT). Mir gefiel aber nicht, neben dem Thinclient ein weiteres Gerät mit eigenem Netzteil (günstige Geräte können kein PoE) am Arbeitsplatz zu haben und habe daher nach Softwarelösungen für Linux gesucht. Gestoßen bin ich zunächst auf die kommerzielle Software USB Redirector, die jedoch für unser Szenario mit 75 oder 89US$ je Arbeitsplatz zu Buche schlagen würde. Gelandet bin ich schließlich beim freien Projekt USBIP, das jedoch nicht ganz trivial zur Zusammenarbeit zu bewegen ist. Geschafft habe ich es dennoch, Testsystem ist ein Ubuntu 12.04, die im nachfolgenden Text beschriebenen Schritte dürften so auch auf andere Systeme mit Kernel 3.1 oder höher anzuwenden sein. Als Client habe ich bislang nur Windows probiert über meine Erfahrungen mit Linux werde ich ggf. später berichten.
Auf der Serverseite
Mich machte bereits stutzig, dass das Projekt seit 2009 keine Aktualisierungen für Linux veröffentlicht hat. Dennoch gibt es einen recht aktuellen Client für Windows und Screenshots, die diesen bei der Arbeit zeigen. Ich ging daher davon aus, dass die Version 0.1.7 stabil und erprobt war (USB- in IP-Pakete zu kapseln ist schließlich so aufwendig nicht). Zumal usbip 0.1.7 in den Repositories von Ubuntu 12.04 enthalten ist. Ich installierte es und stieß bereits beim Start des Daemons auf Fehlermeldungen:
root@caesium:~# usbipd --debug
usbipd: symbol lookup error: usbipd: undefined symbol: stub_driver
Den Grund zu finden erforderte eine ausgiebige Suche: Tatsächlich wird der Quellcode des USB-IP-Projektes seit einer Weile im Git-Repository des Linux-Kernels gepflegt – und das gilt auch für die Userlandwerkzeuge. Warum Ubuntu das veraltete Paket mitbringt, welches zwar unter neueren Kernel kompiliert, aber darüber hinaus nicht nutzbar ist, ist mir nicht ganz klar. Also: usbip-0.1.7-3 wieder deinstalliert und zurück auf Los.
Ubuntu 12.04 verwendet Linux 3.2 mit eigener Minor-Versionierung. Ich entschied mich daher für 3.2.23, natürlich können Sie auch Ubuntus Quellen verwenden. Entpacken Sie den Kernel und wechseln Sie in das Verzeichnis mit den Userland-Tools und bereiten Sie dort die Kompilation vor:
tar xvjf linux-3.2.23.tar.bz2 cd linux-3.2.23/drivers/staging/usbip/userspace bash autogen.sh ./configure --prefix=/usr --sysconfdir=/etc
Kleine Anpassungen erforderlich
Möchte man den Windows-Client 0.2.0.0 zusammen mit einem Kernel >3.0 verwenden, ist es gegebenenfalls erforderlich, die Protokollversion anzupassen: Aktuelle Linuxe sind derzeit bei 0×111, der Windows-Treiber kommuniziert nur mit 0×106. Ich habe daher die config.h abgeändert:
sed -i 's%USBIP_VERSION 0x00000111%USBIP_VERSION 0x00000106%g' config.h
Nehmen Sie diese Änderung nur vor, wenn Sie ausschließlich mit Windows-Clients der Version 0.2.0.0 auf den USB-IP-Server zugreifen wollen! Ich vermute, dass bald Windows-Clients erscheinen, welche diese Anpassung nicht erfordern.
Jetzt wird gebaut und installiert:
make && make install
Start des Daemons
Startet man den Daemon, gibt er möglicherweise eine Fehlermeldung aus:
root@caesium:~# usbipd --debug libusbip: debug: usbip_host_driver.c:244:[open_sysfs_host_driver] sysfs_open_driver_path failed usbipd: error: please load usbip-core.ko and usbip-host.ko!
Die erforderlichen Module aus dm Staging-Zweig müssen natürlich vorhanden sein (sind sie bei Ubuntu), im Zweifel mal nach USBIP in der Kernel-Config greppen:
root@caesium:~# modprobe -v usbip-host insmod /lib/modules/3.2.0-24-generic/kernel/drivers/staging/usbip/usbip-core.ko insmod /lib/modules/3.2.0-24-generic/kernel/drivers/staging/usbip/usbip-host.ko root@caesium:~# usbipd --debug & libusbip: debug: usbip_host_driver.c:189:[refresh_exported_devices] bind usbip-host.ko to a usb device to be exportable! usbipd: info: starting usbipd (usbip-utils 1.1.1) usbipd: info: listening on 0.0.0.0:3240 usbipd: debug: usbipd.c:394:[listen_all_addrinfo] listening on 1 address
Lassen wir uns lokale Geräte anzeigen…
root@caesium:~# usbip list -l
Local USB devices
=================
- busid 2-4 (0951:1603)
2-4:1.0 -> usb-storage
- busid 4-1 (0a12:0001)
4-1:1.0 -> btusb
4-1:1.1 -> btusb
4-1:1.2 -> unknown
…und exportieren dann einen USB-Stick (den sollte man vorher übrigens unmounten):
root@caesium:~# usbip bind -b 2-4 bind device on busid 2-4: complete
Und nun der Windows-Client
Nun werden die Treiber gemäß der im Zip enthaltenen Installationsanleitung eingerichtet. Zum Verbinden mit dem Server dient das Programm usbip.exe, welches im Zip beiliegt, Caesium hat die IP 10.76.23.55, schauen wir mal nach den freigegebenen Geräten…

…und verbinden dann mit dem USB-Stick:

Kommando zurück: Verbindung trennen
Trennen erfordert etwas mehr Aufwand, zunächst muss unter Windows die Hardware sicher entfernt werden, dann folgt das Lösen der Verbindung zum Server (1 ist die virtuelle Portnummer, welche im zweiten screen beim Verbinden angezeigt wird):
usbip.exe -d 1
Auf Serverseite ist das Gerät noch verbunden:
root@caesium:~# usbip list -l
Local USB devices
=================
- busid 2-4 (0951:1603)
2-4:1.0 -> usbip-host
Es folgt die Trennung:
root@caesium:~# usbip unbind -b 2-4
unbind device on busid 2-4: complete
root@caesium:~# usbip list -l
Local USB devices
=================
- busid 2-4 (0951:1603)
2-4:1.0 -> usb-storage
Trennt man nicht, verabschiedet sich Windows beim Shutdown möglicherweise mit einem Bluescreen. Dass USB-Fernzugriff zwischen Linux und Windows möglich ist, wäre damit bewiesen. In meinen kleinen Tests war die Verbindung stets zuverlässig. Wie sich Webcams und DVB-T-Sicks verhalten, probiere ich noch aus. Der weit aufwendigere Teil steht uns allerdings noch vor: Scripting und evtl. Erstellung eines Daemons für Windows, der neu an den Thinclient angeschlossene USB-Geräte, welche keine Drucker, Tastaturen und Mäuse sind, automatisch im Windows verfügbar macht, ohne das der Nutzer allzuviel interagieren muss.

Sehr interessant. Wirst du das Skript oder Teile davon veröffentlichen?
Ja, definitiv. Soweit fühle ich mich dem OSS-Gedanken verpflichtet. Vielleicht entsteht eine (temporär) kommerzielle Lösung mit mehr Komfort und “Enterprise”-Features, aber ich strebe schon an, den Komfort der billigen USB-Server auf Basis des freien usbip zu matchen oder zu übertreffen.
Danke, dass du mich an dieses Projekt erinnerst! Als ich das letzte mal schaute, gab es leider noch keinen Windows client. Damit war das für mich nicht so sehr interessant (auch wenn ich privat nur Linux einsetze).
Hi,
Echt gut das du deine Erfahrungen hier postest!
Ich will einen Raspberry pi als Server dafür einsetzten, die Sache ist aber schwieriger als ich gehofft hatte. Ich will auch einen Dvb-c stick darüber teilen, deswegen bin ich mal sehr gespannt auf deine Tests mit dem Dvb-t Stick!
Grüße
Cubii
After I initially commented I appear to have clicked the -Notify me when
new comments are added- checkbox and now every time a comment is added I get 4 emails with the same
comment. Perhaps there is a way you are able to remove me from that service?
Thanks!
Here is my weblog; Online Payday loans
http://globalhealthaction.org/usa/buytramadolonline/#43560 can you buy tramadol online in usa – tramadol 50 mg lexapro
buy tramadol online tramadol withdrawal depression – tramadol ultram online
tramadol online tramadol addiction treatment program – taking tramadol for dogs
olympus has fallen online free online jq watch olympus has fallen nHvR olympus has fallen for free online
buy soma buy soma overnight delivery – soma rx cheap
order tramadol no prescription buy 180 tramadol online – tramadol yellow and green capsule
buy cialis cialis customer reviews – buy real cialis no prescription
olympus has fallen free streaming UA watch olympus has fallen online XUdP watch olympus has fallen full movie online free no download
http://www.bewhatiwanttobe.com/usa/buycialis/#93652 cialis daily testimonials – cialis daily 36 hour
buy cialis online buy cialis cheap prices fast delivery – cialis online acquisto
soma medication medication stronger than soma – order soma
http://globalhealthaction.org/usa/buytramadolonline/#68455 order tramadol online with mastercard – ultram tramadol for depression
buy tramadol cod online buy tramadol online prescription – tramadol overdose amount mg
watch love and honor free stream Mm love and honor online free bkiB free love and honor free streaming
buy tramadol online cod tramadol for dogs pain – tramadol seizures
the host watch online movie Ze the host online gakP the host watch stream
buy soma where to buy soma without rx – soma bras cami
cheap tramadol can you order tramadol online legally – buy tramadol online no prescription mastercard
buy cialis cialis 20 mg buy online us – cialis price egypt
watch admission online 1channel qJ watch admission online for free QgyO admission onine
generic tadalafil safe place order cialis – cialis price walmart
watch the host online YR watch the host streaming HbuL the host watch free in hd
soma drug soma frames sale – buy soma online from usa
buy tramadol medication can you buy tramadol in the usa – help with tramadol addiction
tramadol online tramadol for cheap to buy – normal dosage tramadol hcl
watch admission full movie movie2k Dm admission watch online FZzN watch admission online free
tramadol 50mg ultram tramadol usa – where to buy tramadol online usa
soma online generic soma online – get soma online
buy tramadol online buy tramadol medication – tramadol for dogs and humans the same
g i joe retaliation movie to watch online yB watch g i joe retaliation streaming OyQr watch g i joe retaliation 1 channel
buy cheap cialis cialis daily prostate – buy generic cialis usa
watch love and honor onlinew Va watch love and honor online IRzk love and honor streaming for free
buy cialis generic cialis legal us – buy cialis pattaya
g i joe retaliation watch online for fee fL watch g i joe retaliation streaming FZLx watch g i joe retaliation free
tramadol online tramadol medication – tramadol purchase online usa
watch g i joe retaliation on megashare Zs watch g i joe retaliation streaming qlsQ watch g i joe retaliation full movie online
generic cialis round xanax 1mg – get cheap xanax online
buy tramadol online tramadol online no prescription mastercard – buy tramadol dogs online
http://checkingeducation.com/images/buytramadol/#9332 tramadol hcl online – tramadol legal to order online
http://www.mfg.com/usa/tramadolonline/#29647 how to buy tramadol online overnight – tramadol vs hydrocodone high
buy cialis xanax with alcohol high – xanax side effects gas
how can i watch g i joe retaliation on internet fp g i joe retaliation online streaming Kgrp g i joe retaliation 2013 online subtitrat
tramadol cheap cheap tramadol no prescription – tramadol dosage 60 lb dog
http://www.idplate.com/m/tramadol50mg/#8824 tramadol online pharmacy usa – tramadol 50mg usage
tramadol 50 mg tramadol ultram tramal – tramadol hcl usp monograph
http://www.bewhatiwanttobe.com/usa/buycialis/#14359 cialis price at costco – generic cialis efficacy
watch olympus has fallen eh watch olympus has fallen streaming kNdF watch olympus has fallenonline
buy cialis long does daily cialis take work – cialis 5 mg online kaufen
watch love and honor onlien Xg love and honor streaming vZfB love and honor watchonline free
welcome to the punch online latviski pC welcome to the punch online stream kIey watch online free welcome to the punch
buy tramadol 100mg tramadol stronger than vicodin – good place buy tramadol online
olympus has fallen free fV watch olympus has fallen streaming free kyPA olympus has fallen free online streamng
generic cialis xanax high stories – generic for xanax side effects
cialis online generic xanax to buy – buy xanax overnight
buy tramadol buy ultram without rx – buy tramadol no prescription cod
http://www.idplate.com/m/tramadol50mg/#1994 tramadol hcl with alcohol – tramadol high opiate tolerance
tramadol online tramadol hcl 20mg – tramadol withdrawal time frame
buy tramadol rx order tramadol online – tramadol cod online pharmacy
welcome to the punch 2013 watch online XG welcome to the punch online stream ohiG welcome to the punch watch online for free
tadalafil without prescription cheap cialis drug – cialis online store
generic cialis buy generic cialis online in usa – cialis online singapore
buy tramadol cheap no prescription tramadol 50 mg para que es – tramadol brand name ultram
cialis online xanax bars injecting – super cheap xanax
tramadol online tramadol 50mg tablets identification – tramadol high like vicodin
http://www.idplate.com/m/tramadol50mg/#50mg tramadol yahoo – online pharmacy for tramadol
http://www.idplate.com/m/tramadol50mg/#1994 buy tramadol with cod delivery – tramadol 50mg for toothache
cialis online how to buy xanax online in ireland – xanax anxiety medication side effects
http://www.bewhatiwanttobe.com/usa/buycialis/#82368 buy cialis online from us – cialis how long does it work
buy cialis buy cialis professional – cialis online usa pharmacy
buy tramadol tramadol online overnight – tramadol high tolerance
tramadol online tramadol ultram hcl – tramadol addiction dosage
mdkjdw buy cheap viagra online :-O buy cialis soft online >:-OOO
tramadol online buy tramadol online free shipping – tramadol 50 mg erowid
buy cialis cialis 0.25 – best price cialis 20mg
buy cialis no prescription many xanax pills can take – long 2mg xanax kick
http://www.bewhatiwanttobe.com/usa/buycialis/#82368 cialis price comparison us – cialis prostate
http://www.idplate.com/m/tramadol50mg/#2948 buy tramadol in u.s – tramadol 100mg online overnight
buy tramadol tramadol hcl for migraines – tramadol over the counter
cialis online buy xanax online cheap – .5 xanax effects
http://www.be-tv.net/descargas/buyultram/#5002 can i order ultram online – ultram plus
http://www.be-tv.net/descargas/buyultram/#1922 buy ultram online us – ultram pill 06 59
buy tramadol tramadol gabapentin – tramadol hcl liver
tramadol 50mg buy from online texas tramadol – tramadol withdrawal neonatal
tramadol online buy tramadol for dogs online – tramadol 50mg generic
buy cialis with dapoxetine cialis online to usa – when will the price of cialis come down
buy cialis cialis 800mg – cialis online best place buy
http://www.be-tv.net/descargas/buyultram/#4027 ultram lawsuits – ultram 200
buy tramadol 100mg online tramadol online overnight no prescription – tramadol 50mg prescribed
cialis online 3mg xanax effects – xanax side effects long term
http://www.be-tv.net/descargas/buyultram/#0924 ultram while breastfeeding – max daily dosage ultram
generic cialis steve-o quotes xanax – anyone ever bought xanax online
order tramadol online mastercard tramadol for purchase no prescription – cheap tramadol without rx
buy ultram online buy ultram online usa – ultram pill identification
canada online order pharmacy ultram ultram 100 – ultram hcl side effects
buy tramadol buy tramadol online no prescription – tramadol purchase canada
buy cialis online cheap xanax dosage 3 mg – xanax bars information
http://checkingeducation.com/images/buytramadol/#9332 buy tramadol and soma – tramadol dosage sr
buy real cialis online does xanax show up in urine drug test – xanax side effects rash
buy tramadol 100mg tramadol 50mg 180 tablets – tramadol online apotheke
tramadol 50mg buy tramadol 100mg online – buy tramadol 50mg online
buy ultram ultram online mastercard – ultram 50 mg compared to hydrocodone
order ultram online cheap ultram – ultram money order
http://checkingeducation.com/images/buytramadol/#6254 buy tramadol in canada – buy tramadol online 100mg
buy tramadol online no prescription overnight treatment for tramadol overdose – tramadol withdrawal oxycodone
buy tramadol tramadol buzz – buy tramadol 100mg
cialis online cheapest xanax online-no prescription – xanax dosage erowid
tramadol no prescription tramadol for dogs how much – tramadol 50 mg kaps
tadalafil online xanax side effects 2012 – where to buy cheap xanax online
http://www.be-tv.net/descargas/buyultram/#6903 legal to buy ultram online – ultram recreational use
buy ultram ultram for pain – generic ultram price
tramadol 50mg tramadol online florida – tramadol cheap
http://www.idplate.com/m/tramadol50mg/#0248 tramadol pictures – what does tramadol 50 mg look like
buy tramadol tramadol hcl er 100 – online drugstore tramadol
buy tramadol 100mg online tramadol withdrawal and sneezing – best place to buy tramadol online reviews
buy tramadol tramadol hcl blood thinner – buy tramadol with cod delivery
tramadol online tramadol for dogs empty stomach – tramadol hcl generic
buy ultram ultram st john’s wort – ultram 50 mg recreational use
http://www.artservemichigan.org/usa/cialisonline/#21769 best place order xanax – generic xanax pill id
buy ultram online ultram dosage in dogs – buy ultram us
buy cialis from canada effects using xanax – xanax bars mixed with alcohol
http://www.idplate.com/m/tramadol50mg/#0248 buy tramadol online cheap – tramadol hcl nih
http://www.idplate.com/m/tramadol50mg/#0248 ordering tramadol online legal – tramadol 50mg can you get high
buy tramadol online no prescription cheap get cheap tramadol – tramadol erowid experience
tramadol online cod cheap tramadol for dogs – buy tramadol with mastercard
http://sharemuch.com/swf/buytramadol/#8022 tramadol dosage erowid – high does tramadol make you
buy tramadol cod overnight how to purchase tramadol’ – ultram online prescription
buy ultram where to order ultram – can you buy ultram online
tramadol online tramadol dosage 37.5 – tramadol hcl recommended dosage
ultram price ultram hcl 50mg – ultram 37.5 mg
cialis online xanax xr withdrawal anxiety – generic xanax what do they look like
cialis online prescription drug xanax – xanax high grasscity
buy tramadol next day does tramadol 50mg get you high – buy tramadol online cod overnight
buy tramadol usa tramadol snort get high – tramadol usage
buy tramadol cod fedex tramadol no rx – tramadol online uk
buy ultram ultras online – ultram ultram er
buy tramadol can you buy tramadol online legally – can you buy ultram over the counter
ultram online pharmacy que es ultram 50 mg – ultram pictures
http://www.artservemichigan.org/usa/cialisonline/#13780 xanax effects if not prescribed – xanax bars highest mg
cheap cialis 20mg pictures generic xanax 1 mg – long xanax urine drug test
buy tramadol rx tramadol high 50mg – tramadol dosage chart
order tramadol online without prescription buy tramadol bluelight – tramadol vs hydrocodone high
buy ultram ultram pill shape – ordering ultram online legal
http://sharemuch.com/swf/buytramadol/#100mg tramadol 50 mg for migraine – buy tramadol online 100mg
http://www.be-tv.net/descargas/buyultram/#terms buy ultram 100mg – cheap ultram online no prescription
buy tramadol cheap online tramadol 50mg for dogs and humans – buy tramadol tablets
http://checkingeducation.com/images/buytramadol/#6254 tramadol 50 mg online pharmacy – tramadol online for cheap
cialis 10mg xanax drug test wiki – xanax dosage 2mg
cialis price valium xanax drug test – xanax buy online no prescription
tramadol online buy tramadol ultram – tramadol dosage 60 lb dog
buy tramadol tramadol zydol 50mg – legal buy tramadol online canada
http://www.mfg.com/usa/tramadolonline/#63984 tramadol dosage for 10lb dog – tramadol normal dosage
buy cialis online best site buy xanax online – xanax overdose like
buy tramadol buy tramadol online australia no prescription – tramadol hcl for sleep
cialis online xanax and alcohol long term effects – after effects xanax overdose
buy ultram buy generic ultram no prescription – ultram side effects addiction
http://checkingeducation.com/images/buytramadol/#50 tramadol ultracet dosage – tramadol kali 083 dosage
purchase ultram online ultram pills used – buy generic ultram no prescription
order tramadol overnight tramadol hcl side effects – tramadol online from mexico
tramadol online can you buy tramadol online in usa – buy tramadol online pay cod
generic tramadol online tramadol with alcohol – tramadol online international
buy tramadol tramadol hcl taken with tylenol – buy tramadol usa
buy tramadol tramadol online cod – tramadol online prescription
cialis online discount xanax no prescription – xanax dosage daily
http://www.be-tv.net/descargas/buyultram/#about buy ultram online no prescription overnight – ultram for depression
purchase ultram online what is the generic for ultram – ultram kidney disease
cialis online overdose on xanax and ambien – xanax effects with drinking
order tramadol overnight tramadol dosage adults – can you buy ultram over the counter
http://www.mfg.com/usa/tramadolonline/#63984 100mg tramadol every 4 hours – buy tramadol no prescription online
where to buy tramadol buy ultram online without rx – tramadol and high blood pressure