Changes

1,526 bytes removed ,  12:43, 10 March 2023
no edit summary
Line 51: Line 51:     
This section overviews basic ''gsmctl'' options, usually related to obtaining certain modem related information.
 
This section overviews basic ''gsmctl'' options, usually related to obtaining certain modem related information.
  −
===Get IP address of logical interface===
  −
----
  −
To obtain the IP address of a network interface, use '''''-p''''' or '''''--ip''''' options.
  −
  −
'''Usage syntax''':
  −
  −
gsmctl <span style="color:blue;">-p</span>, <span style="color:blue;">--ip</span> <span style="color:purple;"><INTERFACE></span>
  −
  −
Where ''<INTERFACE>'' is the name of a network interface.
  −
  −
'''Example''': obtaining the IP address of the mobile connection interface:
  −
  −
root@Teltonika:~# gsmctl <span style="color:blue;">-p</span> <span style="color:purple;">{{#ifeq:{{{series}}}|RUTOS|wwan0|mob1s1a1}}</span>
  −
<span style="color:red;">10.139.75.221</span>
  −
  −
  −
Where '''''mob1s1a1''''' is the name of the mobile interface when the connection type is set to QMI (default). You can get names of existing interfaces from '''''/etc/config/network''''' file.
  −
  −
'''Example''':
  −
root@Teltonika:~# cat /etc/config/network
  −
config interface '<span style="color:purple;">{{#ifeq:{{{series}}}|RUTOS|mob1s1a1|wwan0}}</span>'
  −
      option proto '{{#ifeq:{{{series}}}|RUTOS|mob1s1a1|wwan0}}'
  −
      option modem '1-1.4'
  −
      option metric '1'
  −
      option sim '1'
  −
      option pdp '1'
  −
      option auth 'none'
  −
  −
config interface '<span style="color:purple;">{{#ifeq:{{{series}}}|RUTOS|mob1s2a1|wwan}}</span>'
  −
      option proto '{{#ifeq:{{{series}}}|RUTOS|mob1s2a1|wwan0}}'
  −
      option modem '1-1.4'
  −
      option metric '1'
  −
      option sim '2'
  −
      option pdp '1'
  −
  −
'''Possible responses''':
  −
  −
*IP address (32-bit numeric address written as four numbers separated by periods)
        Line 104: Line 65:  
'''Example''': obtaining the number of bytes sent (TX bytes) by the mobile connection interface:
 
'''Example''': obtaining the number of bytes sent (TX bytes) by the mobile connection interface:
   −
  root@Teltonika:~# gsmctl <span style="color:blue;">-e</span> <span style="color:purple;">{{#ifeq:{{{series}}}|RUTOS|mob1s1a1|wwan0}}</span>
+
  root@Teltonika:~# gsmctl <span style="color:blue;">-e</span> <span style="color:purple;">{{#ifeq:{{{series}}}|RUTOS|wwan0|mob1s1a1}}</span>
 
  <span style="color:red;">36335</span>
 
  <span style="color:red;">36335</span>
   Line 126: Line 87:  
'''Example''': obtaining the number of bytes received (RX bytes) by the mobile connection interface:
 
'''Example''': obtaining the number of bytes received (RX bytes) by the mobile connection interface:
   −
  root@Teltonika:~# gsmctl <span style="color:blue;">-r</span> <span style="color:purple;">{{#ifeq:{{{series}}}|RUTOS|mob1s1a1|wwan0}}</span>
+
  root@Teltonika:~# gsmctl <span style="color:blue;">-r</span> <span style="color:purple;">{{#ifeq:{{{series}}}|RUTOS|wwan0|mob1s1a1}}</span>
 
  <span style="color:red;">92551</span>
 
  <span style="color:red;">92551</span>