169 похожих чатов

Is there a digital way to cut the electricity from

a usb in linux?

It sounds weird, but it's exactly what I need to do.

I tried to simulate the unplug/replug but is not the same.

15 ответов

49 просмотров

https://microchip.my.site.com/s/article/USB-Port-Power-Control-in-Linux-Ubuntu

D-H Автор вопроса

Are you trying to do that for automated testing? If that is the case, it may be easier to rig a cable with an arduino electrically unplug the USB port

D-H Автор вопроса
Ludovic 'Archivist' Lagouardette
Are you trying to do that for automated testing? I...

Nope, the server is remote, I can't access the usb devices I need to unplug, so I'm trying everything I virtually can

D H
Thanks, but didn't work

Did you try to disable just the USB device or the whole USB controller? You may get more success with the latter

D H
Nope, the server is remote, I can't access the usb...

Is that USB device a storage like USB drive?

D-H Автор вопроса
Ludovic 'Archivist' Lagouardette
Did you try to disable just the USB device or the ...

I tried a lot of options, uhubctl, bind/unbind, even usbmodeswitch But nothing works as unplug/plug the device

D-H Автор вопроса
Sharuzzaman Ahmat Raslan
Is that USB device a storage like USB drive?

Yes, it's some usb modems, huawei modems to be more precise

D-H Автор вопроса
D H
I think that's what modeswitch does

Modeswitch is switching between CD mode and Modem mode

D-H Автор вопроса
Sharuzzaman Ahmat Raslan
Modeswitch is switching between CD mode and Modem ...

Yeah I thought it had the same effect, let me try that eject option

D-H Автор вопроса
Sharuzzaman Ahmat Raslan
Have you tried to use eject?

it seems is not compatible with the modems

D H
it seems is not compatible with the modems

You tried changing it to CD mode then eject?

D-H Автор вопроса
Sharuzzaman Ahmat Raslan
You tried changing it to CD mode then eject?

This is very frustrating, I see them in /dev/sr0 /dev/sr1 and /dev/sr2

Похожие вопросы

Обсуждают сегодня

Всем привет, написал код ниже, но он выдает сегфолт, в чем причина? #include <stdio.h> #include <stdlib.h> #include <string.h> struct product { char *name; float price; };...
buzz базз
35
Хотел бы спросить у знающих, правильную ли я выбрал книгу для начала изучения ассемблера Юрова В.И ? Или есть более лучшие книги для начала обучения?
Botsman
25
Книга Юрова В.И пойдёт для обучения?
Botsman
24
$params = [ 'formid' => 'feedbackForm', 'formTpl' => '@CODE: <form class="form-validate" data-id="ajax_form"> <fieldset class="margin-bottom-md"> ...
Pathologic
1
> Примечательно, что новый владелец удаляет из GitHub любые жалобы, указывающие на подозрительную активность или смену владельца, и, видимо, рассчитывает на то, что пользовате...
Alex Sherbakov
1
Hey there Which is the best Linux destro for developers (coding)? To my research on reddit, they said Linux mint is good for mid level spec and Ubuntu for high Lev hardwar...
Wiz 🪄
11
И ещё вопрос: можно ли типа как на дос как-то запариться и с помощью прерываний выводить текст, вместо функции printf ?
НѣкъиⰘижєжєиꙁъвьсєсвѣтьноѣсѣтиѥсть•
34
а мы ещё не созрели до того, чтобы создать отдельный чатик про настройку редакторов?
Cheese Syrowiecki
16
Всем привет! У меня почему-то по-разному отображается TListView в Debug и Release режимах (FireMonkey)! При запуске под Win приложения TListView заливается программо. в Debug ...
Александр COM
8
Ладно, ещё тупого спрошу. Код должен банально вывести значение регистра на консоль, на деле же не выводя ничего, просто оставляя нерабочую консоль (открыта, ничего не написан...
НѣкъиⰘижєжєиꙁъвьсєсвѣтьноѣсѣтиѥсть•
25
Карта сайта