Openwrt disable USB ports

sezione dedicata ai sistemi operativi alternativi Open Source

Openwrt disable USB ports

Messaggio da leggereda root » 04/02/2019, 20:04

Codice: Seleziona tutto
opkg update && opkg install hub-ctrl


check USB ports startus:
Codice: Seleziona tutto
hub-ctrl -v


you will see something similar (TL-WR710n):
> Hub #0 at 001:001
> INFO: individual power switching.
> WARN: Port indicators are NOT supported.
> Hub Port Status:
> Port 1: 0000.0100 power

note:
Port 1: 0000.0000 = USB off
Port 1: 0000.0100 power = USB on


**USB off:**
Codice: Seleziona tutto
 hub-ctrl -h 0 -P 1 -p 0

That says to control hub 0 (-h 0) port 1 (-P 1) and to turn the power off (-p 0)

**USB on:**
Codice: Seleziona tutto
 hub-ctrl -h 0 -P 1 -p 1

You can also use ”-p 1” to turn the power back on
Maurizio
Avatar utente
root
Amministratore
 
Messaggi: 450
Iscritto il: 10/04/2012, 10:55
Località: Turin

Re: Openwrt disable USB ports

Messaggio da leggereda root » 04/02/2019, 20:45

Practical use (example):
you have a router running on a solar system or on a battery, that collects and sends data via 3G USB dongle (that is quite power hungry).
To reduce power consumption you can switch on the 3G USB dongle just when it is needed and just for a few minutes during the day.
Maurizio
Avatar utente
root
Amministratore
 
Messaggi: 450
Iscritto il: 10/04/2012, 10:55
Località: Turin


Torna a OpenWRT

Chi c’è in linea

Visitano il forum: Nessuno e 1 ospite

cron