User Tools

Site Tools


uphp:functions:get3gstat

This is an old revision of the document!


get3gstat

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

Get cellular data connection 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

getethstat() - Get Ethernet connection information

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