User Tools

Site Tools


uphp:functions:get3gstat

get3gstat

WMPRO, WMMINI FW >= 1.0 WMMEGA FW >= 2.0

Get cellular data connection status information

Description

array get3gstat ( )

Return an array containing information on the status of the USB Dongle network interface

Parameters

None

Return Values

Array containing the following keys and values:

KEYTYPEVALUE
RXintNumber of bytes received
TXintNumber of bytes transmitted
signalintsignal strength
snrstringSignal to Noise Ratio dBm (and evaluation)
enabledint1 if cellular data is enabled, 0 if disabled
connectedint1 if currently connected, 0 if disconnected
ip_addressstringCurrent IP address (if connected)

Example

<pre><?
  $arr=get3gstat();
  if ($arr['connected']) {
    print("Cellular data is currently connected\r\n");
  } else {
    print("Cellular data is NOT currently connected\r\n");
  }
  print_r($arr);
?></pre>

Typical output for the above example (results vary depending on the status of the connection):

Cellular data is NOT currently connected
[$arr] = Array (
(int) [RX] => 0
(int) [TX] => 0
(int) [signal] => 0
(string) [snr] => < -113 dBm (Marginal)
(int) [enabled] => 1
(int) [connected] => 0
) 

See Also

net_enable3g() - Enable 3G support for the dongle

net_disable3g() - Disable 3G support for the dongle

getethstat() - Get Ethernet connection status information

uphp/functions/get3gstat.txt · Last modified: 2021/09/13 05:57 (external edit)