Linux USB: ve?power on dönüm
Nasıl Linux üzerinde programlı ve belirli bir USB bağlantı noktasına güç devre dışı bırakabilir miyim? Böyle bir şey mümkün mü?(hayır, aşağıya bakınız)Mac yanıtlar da takdir!
Bir BOC (bir tane almak için deneyin olmadığın gibi davranma!) için çalışıyordum ve bunlardan biri ile sona eren ve işten bazı kullanmak için sunucu izlemek için o kadar çengel tarafından ister.
güncelleme:Bu mümkün görünmüyor. API tüm güç temelde bağlı aygıtı kapatsın askıya alma, ama güç hala Bu ışıklar gibi basit cihazlar doğrudan program aracılığıyla kontrol edilebilir. yani 1, pin mevcuttur. Belki de hub çözüm sözü çalışacak.
CEVAP
Linux bunun için sys bir giriş var. Documentation/usb/power-management.txt:
güç/seviye
This file contains one of three words: "on", "auto", or "suspend". You can write those words to the file to change the device's setting. "on" means that the device should be resumed and autosuspend is not allowed. (Of course, system suspends are still allowed.) "auto" is the normal state in which the kernel is allowed to autosuspend and autoresume the device. "suspend" means that the device should remain suspended, and autoresume is not allowed. (But remote wakeup may still be allowed, since it is controlled separately by the power/wakeup attribute.)
Mesela şöyle bir şey: echo on > /sys/bus/usb/devices/usb5/power/level
Autosuspend ayarı ile oynamak gerekebilir. Çekirdek denemeyi söylemeden, bağlantı otomatik olarak askıya alabilir.
İyi şanslar!
Hesaplama, Linux işlemin CPU kullanımı...
Çözünürlük C ve Linux ile zamanlayıcı ...
Linux komut listesi komutlar ve tüm di...
Linux için sanal Seri Port...
sed komut Mac başarısız, ama Linux üze...