User Tools

Site Tools


uphp:functions:setusbpower

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
uphp:functions:setusbpower [2017/05/16 06:08]
admin created
uphp:functions:setusbpower [2021/09/13 05:57] (current)
Line 1: Line 1:
-====== setusbpower($val) ====== +======setusbpower======
-Switches on or off USB power.  This can be used to reset a usb dongle or just to disable it if required.+
  
-Parameters:+<badge>WMPRO, WMMINI FW >= 1.0</badge> <badge>WMMEGA FW >= 2.0</badge> 
 + 
 +Enable or disable USB power 
 + 
 +====Description==== 
 + 
 +<well size="sm"><html> 
 +<span style="font-size:125%">setusbpower ( 
 +<span style="color:green">int 
 +<span style="color:blue">$state 
 +<span style="color:black">
 +</html></well> 
 + 
 +This function will turn on or off the power for USB.  This can be used to reset a USB dongle or just to disable it if required. 
 + 
 +====Parameter==== 
 + 
 +<html><b><span style="color:blue">$state<span style="color:black"></b></html>: 
 + 
 +  * **1** - Enable USB power 
 +  * **0** - Disable USB power 
 + 
 +====Return Values==== 
 + 
 +None 
 + 
 +====Example==== 
 + 
 +<code php> 
 +<?  
 +  setusbpower(0); 
 +?> 
 +</code> 
 + 
 +====See Also==== 
 + 
 +[[get3gstat()]] - Get cellular data connection status information 
 + 
 +[[net_disable3g()]] - Disable 3G support for the dongle 
 + 
 +[[net_enable3g()]] - Enable 3G support for the dongle 
 + 
 +[[getusbstat()]] - Get USB host status information
  
-$val - if $val is 1 it will enable usb power.  If $val is 0 it will disable USB power. 
uphp/functions/setusbpower.1494914889.txt.gz · Last modified: 2021/09/13 05:56 (external edit)