[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4678: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4680: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4681: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4682: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
virt2real.ru • Просмотр темы - управление питанием USB




 

Управляем чем угодно откуда угодно

управление питанием USB

Обсуждение линуксовой части и софта на борту виртурилки

управление питанием USB

Сообщение pek » 06 мар 2014, 23:49

Здравствуйте, скажите возможно-ли программно отключать и влючать питание на USB порту в виртурилке?
Где-то видел скрипт на линуксе, где можно было дергать питание на конкретном порту материнской платы. Но это ведь i386.
а тут как?

Дело в том, что 3G модемы подвисают через 1,5 суток непрерывной работы. Там дело темное в причинах, но лечится это пока только сбросом.
pek
 
Сообщения: 28
Зарегистрирован: 12 ноя 2013, 14:26

Re: управление питанием USB

Сообщение Gol » 10 мар 2014, 05:21

Аватара пользователя
Gol
 
Сообщения: 507
Зарегистрирован: 17 фев 2012, 01:44
Откуда: Тула-Свободный-Щёкино-Тула-Москва

Re: управление питанием USB

Сообщение Gol » 10 мар 2014, 05:54

Аватара пользователя
Gol
 
Сообщения: 507
Зарегистрирован: 17 фев 2012, 01:44
Откуда: Тула-Свободный-Щёкино-Тула-Москва

Re: управление питанием USB

Сообщение kelt_ » 12 мар 2014, 08:39

Немного оффтопиковый вопрос - а как сделать тоже самое (отключить/включить питание USB, с той же целью - ребутнуть USB-модем) на обычном PC-железе с linux?

Моё исследование показывает, что если просто линуксу сказать reboot, то модем "не полностью" перезагружается (например, сохраняется "режим модема" или "режим mass storage" такое, какое было до ребута, и глюки некоторые не уходят). Приходится сейчас делать полный shutdown -p и потом через ACPI wake up включать комп из выключенного состояния через 2 минуты.
kelt_
 
Сообщения: 10
Зарегистрирован: 09 ноя 2013, 14:17

Re: управление питанием USB

Сообщение Gol » 17 мар 2014, 03:09

Аватара пользователя
Gol
 
Сообщения: 507
Зарегистрирован: 17 фев 2012, 01:44
Откуда: Тула-Свободный-Щёкино-Тула-Москва

Re: управление питанием USB

Сообщение kelt_ » 18 мар 2014, 14:29

Отвечу сам на свой вопрос:

echo "usb1" > /sys/bus/usb/drivers/usb/unbind
echo "usb1" > /sys/bus/usb/drivers/usb/bind

вместо usb1 подставить правильный номер шины, на которой висит модем (определяется lsusb)
kelt_
 
Сообщения: 10
Зарегистрирован: 09 ноя 2013, 14:17

Re: управление питанием USB

Сообщение Gol » 19 мар 2014, 03:41

Аватара пользователя
Gol
 
Сообщения: 507
Зарегистрирован: 17 фев 2012, 01:44
Откуда: Тула-Свободный-Щёкино-Тула-Москва


Вернуться в Софт на виртурилке - SDK, Linux, Github, программирование (C/C++ и др.)

Кто сейчас на конференции

Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 7

cron