[GH-ISSUE #124] 3ginfo.sh: /usr/share/3ginfo-lite/modem/usb/12d1155e: line 94: arithmetic syntax error #99

Open
opened 2026-03-04 11:58:36 +03:00 by kerem · 9 comments
Owner

Originally created by @ZAV-8 on GitHub (May 22, 2025).
Original GitHub issue: https://github.com/4IceG/luci-app-3ginfo-lite/issues/124

Hello,
script 3ginfo.sh and 3ginfo-lite menu works only in LTE mode (Network mode in interface settings set in Prefer LTE or LTE).
Any another mode (Prefer UMTS or UMTS/GPRS and etc) in interface settings give error script

/usr/share/3ginfo-lite/3ginfo.sh: /usr/share/3ginfo-lite/modem/usb/12d1155e: line 94: arithmetic syntax error

and
OpenWrt 3ginfo-lite page give next errors:
SyntaxError Unexpected end of JSON input
Error: Unexpected end of JSON input

luci-app-3ginfo-lite version is 1.0.75-r20250517

Originally created by @ZAV-8 on GitHub (May 22, 2025). Original GitHub issue: https://github.com/4IceG/luci-app-3ginfo-lite/issues/124 Hello, script 3ginfo.sh and 3ginfo-lite menu works only in LTE mode (Network mode in interface settings set in Prefer LTE or LTE). Any another mode (Prefer UMTS or UMTS/GPRS and etc) in interface settings give error script /usr/share/3ginfo-lite/3ginfo.sh: /usr/share/3ginfo-lite/modem/usb/12d1155e: line 94: arithmetic syntax error and OpenWrt 3ginfo-lite page give next errors: SyntaxError Unexpected end of JSON input Error: Unexpected end of JSON input luci-app-3ginfo-lite version is 1.0.75-r20250517
Author
Owner

@4IceG commented on GitHub (May 23, 2025):

Hi,
Scripts support only WCDMA and LTE mode.
You didn't show the results of the diagnostics, so I don't see the error.

<!-- gh-comment-id:2903739912 --> @4IceG commented on GitHub (May 23, 2025): Hi, Scripts support only WCDMA and LTE mode. You didn't show the results of the diagnostics, so I don't see the error.
Author
Owner

@ZAV-8 commented on GitHub (May 23, 2025):

Debug output:

  • RES=/usr/share/3ginfo-lite
  • /usr/share/3ginfo-lite/detect.sh
  • DEVICE=/dev/ttyUSB2
  • '[' -z /dev/ttyUSB2 ]
  • O=
  • '[' -e /usr/bin/sms_tool ]
  • sms_tool -D -d /dev/ttyUSB2 at 'AT+CPIN?;+CSQ;+COPS=3,0;+COPS?;+COPS=3,2;+COPS?;+CREG=2;+CREG?'
  • O='AT+CPIN?;+CSQ;+COPS=3,0;+COPS?;+COPS=3,2;+COPS?;+CREG=2;+CREG?

+CPIN: READY

+CSQ: 13,0

+COPS: 0,0,"MTS BY",2

+COPS: 0,2,"25702",2

+CREG: 2,1,"00D3","00D09A81",6

OK
'

  • CONFIG=modemdefine
      • grep -o '@modemdefine[[0-9]*].modem'
        uci show modemdefine
        wc+ -l
        xargs
  • MODEMZ=0
  • '' 0 -gt 1
  • '' 0 -eq 0
  • uci -q get '3ginfo.@3ginfo[0].network'
  • SEC=
  • '' 0 -eq 1
  • '[' -z ]
  • getpath /dev/ttyUSB2
  • basename /dev/ttyUSB2
  • devname=ttyUSB2
  • readlink -f /sys/class/tty/ttyUSB2/device
  • devpath=/sys/devices/platform/ahb/1b000000.usb/usb1/1-1/1-1:1.2/ttyUSB2
  • P=/sys/devices/platform/ahb/1b000000.usb/usb1/1-1
  • PORIG=/sys/devices/platform/ahb/1b000000.usb/usb1/1-1
  • getpath /dev/console
  • basename /dev/console
  • devname=console
  • readlink -f /sys/class/usbmisc/console/device/
  • devpath=
  • P=
  • '[' x/sys/devices/platform/ahb/1b000000.usb/usb1/1-1 '==' x ]
  • getpath /dev/ptmx
  • basename /dev/ptmx
  • devname=ptmx
  • readlink -f /sys/class/usbmisc/ptmx/device/
  • devpath=
  • P=
  • '[' x/sys/devices/platform/ahb/1b000000.usb/usb1/1-1 '==' x ]
  • getpath /dev/tty
  • basename /dev/tty
  • devname=tty
  • readlink -f /sys/class/tty/tty/device
  • devpath=/sys/devices/virtual/tty/tty/device
  • P=/sys/devices/virtual/tty
  • '[' x/sys/devices/platform/ahb/1b000000.usb/usb1/1-1 '==' x/sys/devices/virtual/tty ]
  • getpath /dev/ttyS0
  • basename /dev/ttyS0
  • devname=ttyS0
  • readlink -f /sys/class/tty/ttyS0/device
  • devpath=/sys/devices/platform/ahb/ahb:apb/18020000.uart
  • P=/sys/devices/platform/ahb
  • '[' x/sys/devices/platform/ahb/1b000000.usb/usb1/1-1 '==' x/sys/devices/platform/ahb ]
  • getpath /dev/ttyS1
  • basename /dev/ttyS1
  • devname=ttyS1
  • readlink -f /sys/class/tty/ttyS1/device
  • devpath=/sys/devices/platform/serial8250
  • P=/sys/devices
  • '[' x/sys/devices/platform/ahb/1b000000.usb/usb1/1-1 '==' x/sys/devices ]
  • getpath /dev/ttyS10
  • basename /dev/ttyS10
  • devname=ttyS10
  • readlink -f /sys/class/tty/ttyS10/device
  • devpath=/sys/devices/platform/serial8250
  • P=/sys/devices
  • '[' x/sys/devices/platform/ahb/1b000000.usb/usb1/1-1 '==' x/sys/devices ]
  • getpath /dev/ttyS11
  • basename /dev/ttyS11
  • devname=ttyS11
  • readlink -f /sys/class/tty/ttyS11/device
  • devpath=/sys/devices/platform/serial8250
  • P=/sys/devices
  • '[' x/sys/devices/platform/ahb/1b000000.usb/usb1/1-1 '==' x/sys/devices ]
  • getpath /dev/ttyS12
  • basename /dev/ttyS12
  • devname=ttyS12
  • readlink -f /sys/class/tty/ttyS12/device
  • devpath=/sys/devices/platform/serial8250
  • P=/sys/devices
  • '[' x/sys/devices/platform/ahb/1b000000.usb/usb1/1-1 '==' x/sys/devices ]
  • getpath /dev/ttyS13
  • basename /dev/ttyS13
  • devname=ttyS13
  • readlink -f /sys/class/tty/ttyS13/device
  • devpath=/sys/devices/platform/serial8250
  • P=/sys/devices
  • '[' x/sys/devices/platform/ahb/1b000000.usb/usb1/1-1 '==' x/sys/devices ]
  • getpath /dev/ttyS14
  • basename /dev/ttyS14
  • devname=ttyS14
  • readlink -f /sys/class/tty/ttyS14/device
  • devpath=/sys/devices/platform/serial8250
  • P=/sys/devices
  • '[' x/sys/devices/platform/ahb/1b000000.usb/usb1/1-1 '==' x/sys/devices ]
  • getpath /dev/ttyS15
  • basename /dev/ttyS15
  • devname=ttyS15
  • readlink -f /sys/class/tty/ttyS15/device
  • devpath=/sys/devices/platform/serial8250
  • P=/sys/devices
  • '[' x/sys/devices/platform/ahb/1b000000.usb/usb1/1-1 '==' x/sys/devices ]
  • getpath /dev/ttyS2
  • basename /dev/ttyS2
  • devname=ttyS2
  • readlink -f /sys/class/tty/ttyS2/device
  • devpath=/sys/devices/platform/serial8250
  • P=/sys/devices
  • '[' x/sys/devices/platform/ahb/1b000000.usb/usb1/1-1 '==' x/sys/devices ]
  • getpath /dev/ttyS3
  • basename /dev/ttyS3
  • devname=ttyS3
  • readlink -f /sys/class/tty/ttyS3/device
  • devpath=/sys/devices/platform/serial8250
  • P=/sys/devices
  • '[' x/sys/devices/platform/ahb/1b000000.usb/usb1/1-1 '==' x/sys/devices ]
  • getpath /dev/ttyS4
  • basename /dev/ttyS4
  • devname=ttyS4
  • readlink -f /sys/class/tty/ttyS4/device
  • devpath=/sys/devices/platform/serial8250
  • P=/sys/devices
  • '[' x/sys/devices/platform/ahb/1b000000.usb/usb1/1-1 '==' x/sys/devices ]
  • getpath /dev/ttyS5
  • basename /dev/ttyS5
  • devname=ttyS5
  • readlink -f /sys/class/tty/ttyS5/device
  • devpath=/sys/devices/platform/serial8250
  • P=/sys/devices
  • '[' x/sys/devices/platform/ahb/1b000000.usb/usb1/1-1 '==' x/sys/devices ]
  • getpath /dev/ttyS6
  • basename /dev/ttyS6
  • devname=ttyS6
  • readlink -f /sys/class/tty/ttyS6/device
  • devpath=/sys/devices/platform/serial8250
  • P=/sys/devices
  • '[' x/sys/devices/platform/ahb/1b000000.usb/usb1/1-1 '==' x/sys/devices ]
  • getpath /dev/ttyS7
  • basename /dev/ttyS7
  • devname=ttyS7
  • readlink -f /sys/class/tty/ttyS7/device
  • devpath=/sys/devices/platform/serial8250
  • P=/sys/devices
  • '[' x/sys/devices/platform/ahb/1b000000.usb/usb1/1-1 '==' x/sys/devices ]
  • getpath /dev/ttyS8
  • basename /dev/ttyS8
  • devname=ttyS8
  • readlink -f /sys/class/tty/ttyS8/device
  • devpath=/sys/devices/platform/serial8250
  • P=/sys/devices
  • '[' x/sys/devices/platform/ahb/1b000000.usb/usb1/1-1 '==' x/sys/devices ]
  • getpath /dev/ttyS9
  • basename /dev/ttyS9
  • devname=ttyS9
  • readlink -f /sys/class/tty/ttyS9/device
  • devpath=/sys/devices/platform/serial8250
  • P=/sys/devices
  • '[' x/sys/devices/platform/ahb/1b000000.usb/usb1/1-1 '==' x/sys/devices ]
  • getpath /dev/ttyUSB0
  • basename /dev/ttyUSB0
  • devname=ttyUSB0
  • readlink -f /sys/class/tty/ttyUSB0/device
  • devpath=/sys/devices/platform/ahb/1b000000.usb/usb1/1-1/1-1:1.0/ttyUSB0
  • P=/sys/devices/platform/ahb/1b000000.usb/usb1/1-1
  • '[' x/sys/devices/platform/ahb/1b000000.usb/usb1/1-1 '==' x/sys/devices/platform/ahb/1b000000.usb/usb1/1-1 ]
      • grep /dev/ttyUSB0
        uci show network
        cut -f2 -d.
  • SEC=
  • '[' -n ]
  • getpath /dev/ttyUSB1
  • basename /dev/ttyUSB1
  • devname=ttyUSB1
  • readlink -f /sys/class/tty/ttyUSB1/device
  • devpath=/sys/devices/platform/ahb/1b000000.usb/usb1/1-1/1-1:1.1/ttyUSB1
  • P=/sys/devices/platform/ahb/1b000000.usb/usb1/1-1
  • '[' x/sys/devices/platform/ahb/1b000000.usb/usb1/1-1 '==' x/sys/devices/platform/ahb/1b000000.usb/usb1/1-1 ]
      • ucigrep show network /dev/ttyUSB1

cut -f2 -d.

  • SEC=

  • '[' -n ]

  • getpath /dev/ttyUSB2

  • basename /dev/ttyUSB2

  • devname=ttyUSB2

  • readlink -f /sys/class/tty/ttyUSB2/device

  • devpath=/sys/devices/platform/ahb/1b000000.usb/usb1/1-1/1-1:1.2/ttyUSB2

  • P=/sys/devices/platform/ahb/1b000000.usb/usb1/1-1

  • '[' x/sys/devices/platform/ahb/1b000000.usb/usb1/1-1 '==' x/sys/devices/platform/ahb/1b000000.usb/usb1/1-1 ]

      • uci showgrep /dev/ttyUSB2
        network
        cut -f2 -d.
  • SEC=modemwan

  • '[' -n modemwan ]

  • break

  • CONN_TIME=-

  • RX=-

  • TX=-

    • grepifstatus '"up": true' modemwan
  • NETUP=' "up": true,'

  • '[' -n ' "up": true,' ]

  • uci -q -P /var/state/ get network.modemwan.connect_time

  • CT=

  • '[' -z ]

      • ifstatus modemwan
        xargsawk
        '-F[:,]' '/uptime/ {print $2}'
  • CT=330

  • '[' '!' -z 330 ]

  • expr 330 / 60 / 60 / 24

  • D=0

  • expr 330 / 60 / 60 '%' 24

  • H=0

  • expr 330 / 60 '%' 60

  • M=5

  • expr 330 '%' 60

  • S=30

  • printf '%dd, %02d:%02d:%02d' 0 0 5 30

  • CONN_TIME='0d, 00:05:30'

  • date '+%s'

  • date '+%Y%m%d%H%M%S' -d @1748011669

  • CONN_TIME_SINCE=20250523144749

    • awk '-F"' '/l3_device/ {print $4}'ifstatus
      modemwan
  • IFACE=wwan0

  • '[' -n wwan0 ]

    • ifconfig wwan0
      awk '-F[()]' '/bytes/ {printf "%s",$2}'
  • RX='3.8 MiB'

    • ifconfig wwan0
      awk '-F[()]' '/bytes/ {printf "%s",$4}'
  • TX='947.7 KiB'

    • echo 'AT+CPIN?;+CSQ;+COPS=3,0;+COPS?;+COPS=3,2;+COPS?;+CREG=2;+CREG?

+CPIN: READY

+CSQ: 13,0

+COPS: 0,0,"MTS BY",2

+COPS: 0,2,"25702",2

+CREG: 2,1,"00D3","00D09A81",6

OK
'
awk '-F[, ]' '/^+CSQ/ {print $2}'

  • CSQ=13
  • '[' x13 '==' x ]
  • '[' 13 -ge 0 -a 13 -le 31 ]
  • CSQ_PER=41
  • COPS=
  • COPS_MCC=
  • COPS_MNC=
  • echo 'AT+CPIN?;+CSQ;+COPS=3,0;+COPS?;+COPS=3,2;+COPS?;+CREG=2;+CREG?

+CPIN: READY

+CSQ: 13,0

+COPS: 0,0,"MTS BY",2

+COPS: 0,2,"25702",2

+CREG: 2,1,"00D3","00D09A81",6

OK
'+
awk '-F["]' '/^+COPS:\s*.,2/ {print $2}'

  • COPS_NUM=25702
  • '[' -n 25702 ]
  • COPS_MCC=257
  • COPS_MNC=02
    • echo 'AT+CPIN?;+CSQ;+COPS=3,0;+COPS?;+COPS=3,2;+COPS?;+CREG=2;+CREG?

+CPIN: READY

+CSQ: 13,0

+COPS: 0,0,"MTS BY",2

+COPS: 0,2,"25702",2

+CREG: 2,1,"00D3","00D09A81",6

OK
'
awk '-F["]' '/^+COPS:\s*.,0/ {print $2}'

  • TCOPS='MTS BY'
  • '[' 'xMTS BY' '!=' x ]
  • COPS='MTS BY'
  • '[' -z 'MTS BY' ]
  • '[' -z 'MTS BY' ]
    • awk '{if(NF==2 && tolower($1)==tolower($2)){print $1}else{print $0}}'
      echo 'MTS BY'
  • COPS='MTS BY'
      • sed -n 2p
        sms_tool -d /dev/ttyUSB2 at 'AT+COPS?'+
        cut -d '"' -f2
        tr -d '\r'
  • isp=
  • isp_num='257 02'
  • isp_numws=25702
  • LOCATIONFILE=/tmp/location
  • '[' -e /tmp/location ]
  • touch /tmp/location
  • cat /tmp/location
  • LOC=Belarus
  • '[' -n Belarus ]
  • cat /tmp/location
  • LOC=Belarus
  • '
  • awk '-F[;]' '/^25702;/ {print $2}' /usr/share/3ginfo-lite/mccmnc.dat
  • LOC=Belarus
  • '[' -n Belarus ]
  • echo Belarus
      • echo 'AT+CPIN?;+CSQ;+COPS=3,0;+COPS?;+COPS=3,2;+COPS?;+CREG=2;+CREG?

+CPIN: READY

+CSQ: 13,0

+COPS: 0,0,"MTS BY",2

+COPS: 0,2,"25702",2

+CREG: 2,1,"00D3","00D09A81",6

OK
'
xargsawk
'-F[, ]' '/^+CPIN:/ {print $0;exit}'

  • T='+CPIN: READY'
  • '[' -n '+CPIN: READY' ]
  • '[' '+CPIN: READY' '==' '+CPIN: READY' ]
    • echo 'AT+CPIN?;+CSQ;+COPS=3,0;+COPS?;+COPS=3,2;+COPS?;+CREG=2;+CREG?

+CPIN: READY

+CSQ: 13,0

+COPS: 0,0,"MTS BY",2

+COPS: 0,2,"25702",2

+CREG: 2,1,"00D3","00D09A81",6

OK
'awk
'-F[, ]' '/^+CME ERROR:/ {print $0;exit}'

  • T=
  • '[' -n ]
    • echo 'AT+CPIN?;+CSQ;+COPS=3,0;+COPS?;+COPS=3,2;+COPS?;+CREG=2;+CREG?

+CPIN: READY

+CSQ: 13,0

+COPS: 0,0,"MTS BY",2

+COPS: 0,2,"25702",2

+CREG: 2,1,"00D3","00D09A81",6

OK
'
busybox awk '-F[,]' '/^+CREG/ {gsub(/[[:space:]"]+/,"");printf "T="%d";LAC_HEX="%X";CID_HEX="%X";LAC_DEC="%d";CID_DEC="%d";MODE_NUM="%d"", $2, "0x"$3, "0x"$4, "0x"$3, "0x"$4, $5}'

  • eval 'T="1";LAC_HEX="D3";CID_HEX="D09A81";LAC_DEC="211";CID_DEC="13671041";MODE_NUM="6"'
  • T=1
  • LAC_HEX=D3
  • CID_HEX=D09A81
  • LAC_DEC=211
  • CID_DEC=13671041
  • MODE_NUM=6
  • REG=1
  • '[' -z 6 ]
  • '[' x6 '==' x0 ]
  • MODE=HSPA
  • sms_tool -d /dev/ttyUSB2 at at+cereg
  • OTX='at+cereg

'

      • echo 'at+cereg

'
sed 's/[^A-F0-9]//g'
awk '-F[,]' '/^+CEREG/ {printf "%s", toupper($3)}'

  • TAC=
  • '[' x '!=' x ]
  • TAC=-
  • TAC_HEX=-
  • uci -q get '3ginfo.@3ginfo[0].device'
  • CONF_DEVICE=
    • echo x
      grep -q 192.168.
  • '[' -e /usr/bin/sms_tool ]
  • REGOK=0
  • '[' x1 '==' x1 ]
  • REGOK=1
  • getdevicevendorproduct /dev/ttyUSB2
  • basename /dev/ttyUSB2
  • devname=ttyUSB2
  • readlink -f /sys/class/tty/ttyUSB2/device
  • devpath=/sys/devices/platform/ahb/1b000000.usb/usb1/1-1/1-1:1.2/ttyUSB2
  • T=/sys/devices/platform/ahb/1b000000.usb/usb1/1-1
  • cat /sys/devices/platform/ahb/1b000000.usb/usb1/1-1/idVendor
  • cat /sys/devices/platform/ahb/1b000000.usb/usb1/1-1/idProduct
  • echo usb/12d1155e
  • VIDPID=usb/12d1155e
  • '[' -e /usr/share/3ginfo-lite/modem/usb/12d1155e ]
  • cat /tmp/sysinfo/board_name
  • . /usr/share/3ginfo-lite/modem/usb/12d1155e
  • sms_tool -d /dev/ttyUSB2 at 'at^chiptemp?;^hcsq?;^iccid?'
  • O='at^chiptemp?;^hcsq?;^iccid?

^CHIPTEMP: 373,373,65535,30,65535

^HCSQ:"WCDMA",42,35,51

^ICCID: 89375027010070487051

'

      • echo 'at^chiptemp?;^hcsq?;^iccid?

^CHIPTEMP: 373,373,65535,30,65535

^HCSQ:"WCDMA",42,35,51

^ICCID: 89375027010070487051

'
xargs
awk '-F[,:]' '/^^HCSQ:/ {print $2}'

  • T=WCDMA
  • '[' -n WCDMA ]
  • MODE=WCDMA
      • echo 'at^chiptemp?;^hcsq?;^iccid?

^CHIPTEMP: 373,373,65535,30,65535

^HCSQ:"WCDMA",42,35,51

^ICCID: 89375027010070487051

'
awkxargs
'-F[,:]' '/^^HCSQ:/ {print $4}'

  • PARAM2=35
    • echo 'at^chiptemp?;^hcsq?;^iccid?

^CHIPTEMP: 373,373,65535,30,65535

^HCSQ:"WCDMA",42,35,51

^ICCID: 89375027010070487051

'
xargs

  • awk '-F[,:]' '/^^HCSQ:/ {print $5}'
  • PARAM3=51
  • awk 'BEGIN {print -121 + 35}'
  • RSCP=-86
  • awk 'BEGIN {print -32.5 + 51/2}'
  • ECIO=-7
  • sms_tool -d /dev/ttyUSB2 at ati
  • OF='ati

Manufacturer: Huawei Technologies Co.,Ltd.
Model: E3372h-320
Revision: 10.0.5.1(H195SP3C983)
IMEI: 862329049458888
+GCAP: +CGSM,+DS,+ES

'

      • echotr -s 'ati
        ' '\n' '
        '
        Manufacturer: Huawei Technologies 'Co.,Ltd.
        'xargs Model:
        'E3372h-320
        ' Revision: '10.0.5.1(H195SP3C983)
        ' IMEI: '862329049458888
        ' +GCAP: '+CGSM,+DS,+ES
        ' '
        '
  • DEV2='ati Manufacturer: Huawei Technologies Co.,Ltd. Model: E3372h-320 Revision: 10.0.5.1(H195SP3C983) IMEI: 862329049458888 +GCAP: +CGSM,+DS,+ES'
      • awk -F 'Manufacturer:|Revision:' '{print $2}'
        xargs
        echo ati Manufacturer: Huawei Technologies Co.,Ltd. Model: E3372h-320 Revision: '10.0.5.1(H195SP3C983)' IMEI: 862329049458888 +GCAP: +CGSM,+DS,+ES
  • MODELB='Huawei Technologies Co.,Ltd. Model: E3372h-320'
      • sed s/Model://
        echo Huawei Technologies Co.,Ltd. Model: E3372h-320
        xargs
  • MODELC='Huawei Technologies Co.,Ltd. E3372h-320'
    • awk '{print toupper(substr($0,0,1))tolower(substr($0,2))}'
      echo Huawei Technologies Co.,Ltd. E3372h-320
  • MODEL='Huawei technologies co.,ltd. e3372h-320'
      • awk -F 'Revision:|IMEI'xargs
        echo '{print $2}' ati
        Manufacturer: Huawei Technologies Co.,Ltd. Model: E3372h-320 Revision: '10.0.5.1(H195SP3C983)' IMEI: 862329049458888 +GCAP: +CGSM,+DS,+ES
  • FW='10.0.5.1(H195SP3C983)'
  • cat /sys/kernel/debug/usb/devices
  • PV='
    T: Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=480 MxCh= 1
    B: Alloc= 1/800 us ( 0%), #Int= 1, #Iso= 0
    D: Ver= 2.00 Cls=09(hub ) Sub=00 Prot=01 MxPS=64 #Cfgs= 1
    P: Vendor=1d6b ProdID=0002 Rev= 5.04
    S: Manufacturer=Linux 5.4.143 ehci_hcd
    S: Product=EHCI Host Controller
    S: SerialNumber=1b000000.usb
    C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr= 0mA
    I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
    E: Ad=81(I) Atr=03(Int.) MxPS= 4 Ivl=256ms

T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 3 Spd=480 MxCh= 0
D: Ver= 2.00 Cls=02(comm.) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=12d1 ProdID=155e Rev= 1.02
S: Manufacturer=HUAWEI_MOBILE
S: Product=HUAWEI_MOBILE
C:* #Ifs= 5 Cfg#= 1 Atr=80 MxPwr= 2mA
A: FirstIf#= 3 IfCount= 2 Cls=02(comm.) Sub=0d Prot=00
I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
E: Ad=83(I) Atr=03(Int.) MxPS= 10 Ivl=32ms
E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 3 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=0d Prot=00 Driver=cdc_ncm
E: Ad=87(I) Atr=03(Int.) MxPS= 16 Ivl=2ms
I: If#= 4 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=01 Driver=cdc_ncm
I:* If#= 4 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=01 Driver=cdc_ncm
E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms'

    • awk -F 'Vendor=12d1 ProdID=155e' '{print $2}'
      cut -c-1104
  • echo T: 'Bus=01' 'Lev=00' 'Prnt=00' 'Port=00' 'Cnt=00' 'Dev#=' 1 'Spd=480' 'MxCh=' 1 B: 'Alloc=' 1/800 us '(' '0%),' '#Int=' 1, '#Iso=' 0 D: 'Ver=' 2.00 'Cls=09(hub' ')' 'Sub=00' 'Prot=01' 'MxPS=64' '#Cfgs=' 1 P: 'Vendor=1d6b' 'ProdID=0002' 'Rev=' 5.04 S: 'Manufacturer=Linux' 5.4.143 ehci_hcd S: 'Product=EHCI' Host Controller S: 'SerialNumber=1b000000.usb' 'C:' '#Ifs=' 1 'Cfg#=' 1 'Atr=e0' 'MxPwr=' 0mA 'I:' 'If#=' 0 'Alt=' 0 '#EPs=' 1 'Cls=09(hub' ')' 'Sub=00' 'Prot=00' 'Driver=hub' E: 'Ad=81(I)' 'Atr=03(Int.)' 'MxPS=' 4 'Ivl=256ms' T: 'Bus=01' 'Lev=01' 'Prnt=01' 'Port=00' 'Cnt=01' 'Dev#=' 3 'Spd=480' 'MxCh=' 0 D: 'Ver=' 2.00 'Cls=02(comm.)' 'Sub=00' 'Prot=00' 'MxPS=64' '#Cfgs=' 1 P: 'Vendor=12d1' 'ProdID=155e' 'Rev=' 1.02 S: 'Manufacturer=HUAWEI_MOBILE' S: 'Product=HUAWEI_MOBILE' 'C:' '#Ifs=' 5 'Cfg#=' 1 'Atr=80' 'MxPwr=' 2mA A: 'FirstIf#=' 3 'IfCount=' 2 'Cls=02(comm.)' 'Sub=0d' 'Prot=00' 'I:' 'If#=' 0 'Alt=' 0 '#EPs=' 3 'Cls=ff(vend.)' 'Sub=ff' 'Prot=ff' 'Driver=option' E: 'Ad=83(I)' 'Atr=03(Int.)' 'MxPS=' 10 'Ivl=32ms' E: 'Ad=82(I)' 'Atr=02(Bulk)' 'MxPS=' 512 'Ivl=0ms' E: 'Ad=02(O)' 'Atr=02(Bulk)' 'MxPS=' 512 'Ivl=0ms' 'I:' 'If#=' 1 'Alt=' 0 '#EPs=' 2 'Cls=ff(vend.)' 'Sub=ff' 'Prot=ff' 'Driver=option' E: 'Ad=84(I)' 'Atr=02(Bulk)' 'MxPS=' 512 'Ivl=0ms' E: 'Ad=03(O)' 'Atr=02(Bulk)' 'MxPS=' 512 'Ivl=0ms' 'I:' 'If#=' 2 'Alt=' 0 '#EPs=' 2 'Cls=ff(vend.)' 'Sub=ff' 'Prot=ff' 'Driver=option' E: 'Ad=85(I)' 'Atr=02(Bulk)' 'MxPS=' 512 'Ivl=0ms' E: 'Ad=04(O)' 'Atr=02(Bulk)' 'MxPS=' 512 'Ivl=0ms' 'I:' 'If#=' 3 'Alt=' 0 '#EPs=' 1 'Cls=02(comm.)' 'Sub=0d' 'Prot=00' 'Driver=cdc_ncm' E: 'Ad=87(I)' 'Atr=03(Int.)' 'MxPS=' 16 'Ivl=2ms' I: 'If#=' 4 'Alt=' 0 '#EPs=' 0 'Cls=0a(data' ')' 'Sub=00' 'Prot=01' 'Driver=cdc_ncm' 'I:' 'If#=' 4 'Alt=' 1 '#EPs=' 2 'Cls=0a(data' ')' 'Sub=00' 'Prot=01' 'Driver=cdc_ncm' E: 'Ad=86(I)' 'Atr=02(Bulk)' 'MxPS=' 512 'Ivl=0ms' E: 'Ad=05(O)' 'Atr=02(Bulk)' 'MxPS=' 512 'Ivl=0ms'

  • PVCUT=' Rev= 1.02 S: Manufacturer=HUAWEI_MOBILE S: Product=HUAWEI_MOBILE C:* #Ifs= 5 Cfg#= 1 Atr=80 MxPwr= 2mA A: FirstIf#= 3 IfCount= 2 Cls=02(comm.) Sub=0d Prot=00 I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=83(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 3 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=0d Prot=00 Driver=cdc_ncm E: Ad=87(I) Atr=03(Int.) MxPS= 16 Ivl=2ms I: If#= 4 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=01 Driver=cdc_ncm I:* If#= 4 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=01 Driver=cdc_ncm E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms'

    • grep -q 'Driver=qmi_wwan'
      echo ' Rev= 1.02 S: Manufacturer=HUAWEI_MOBILE S: Product=HUAWEI_MOBILE C:* #Ifs= 5 Cfg#= 1 Atr=80 MxPwr= 2mA A: FirstIf#= 3 IfCount= 2 Cls=02(comm.) Sub=0d Prot=00 I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=83(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 3 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=0d Prot=00 Driver=cdc_ncm E: Ad=87(I) Atr=03(Int.) MxPS= 16 Ivl=2ms I: If#= 4 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=01 Driver=cdc_ncm I:* If#= 4 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=01 Driver=cdc_ncm E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms'
    • grep -q 'Driver=cdc_mbim'
      echo ' Rev= 1.02 S: Manufacturer=HUAWEI_MOBILE S: Product=HUAWEI_MOBILE C:* #Ifs= 5 Cfg#= 1 Atr=80 MxPwr= 2mA A: FirstIf#= 3 IfCount= 2 Cls=02(comm.) Sub=0d Prot=00 I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=83(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 3 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=0d Prot=00 Driver=cdc_ncm E: Ad=87(I) Atr=03(Int.) MxPS= 16 Ivl=2ms I: If#= 4 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=01 Driver=cdc_ncm I:* If#= 4 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=01 Driver=cdc_ncm E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms'
    • grep -q 'Driver=cdc_ether'
      echo ' Rev= 1.02 S: Manufacturer=HUAWEI_MOBILE S: Product=HUAWEI_MOBILE C:* #Ifs= 5 Cfg#= 1 Atr=80 MxPwr= 2mA A: FirstIf#= 3 IfCount= 2 Cls=02(comm.) Sub=0d Prot=00 I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=83(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 3 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=0d Prot=00 Driver=cdc_ncm E: Ad=87(I) Atr=03(Int.) MxPS= 16 Ivl=2ms I: If#= 4 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=01 Driver=cdc_ncm I:* If#= 4 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=01 Driver=cdc_ncm E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms'
    • grep -q cdc_ncm
      echo ' Rev= 1.02 S: Manufacturer=HUAWEI_MOBILE S: Product=HUAWEI_MOBILE C:* #Ifs= 5 Cfg#= 1 Atr=80 MxPwr= 2mA A: FirstIf#= 3 IfCount= 2 Cls=02(comm.) Sub=0d Prot=00 I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=83(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 3 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=0d Prot=00 Driver=cdc_ncm E: Ad=87(I) Atr=03(Int.) MxPS= 16 Ivl=2ms I: If#= 4 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=01 Driver=cdc_ncm I:* If#= 4 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=01 Driver=cdc_ncm E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms'
  • PROTO=ncm

    • xargs
      sms_tool -d /dev/ttyUSB2 at AT+GSN
  • OI='AT+GSN 862329049458888'

    • sed s/AT+GSN//g
      echo 'AT+GSN 862329049458888'
  • xargs

  • NR_I=862329049458888

  • '[' -n NR_I ]

  • NR_IMEI=862329049458888

    • xargs
      sms_tool -d /dev/ttyUSB2 at AT+CIMI
  • OC='^MODE: 5,17 ^RSSI: 14 ^CERSSI:0,-85,-6,0,0,0,0 ^HCSQ:WCDMA,42,36,53 AT+CIMI 257027017048705'

      • sed s/AT+CIMI//g
        echo '^MODE: 5,17 ^RSSI: 14 ^CERSSI:0,-85,-6,0,0,0,0 ^HCSQ:WCDMA,42,36,53 AT+CIMI 257027017048705'xargs
  • NR_C='^MODE: 5,17 ^RSSI: 14 ^CERSSI:0,-85,-6,0,0,0,0 ^HCSQ:WCDMA,42,36,53 257027017048705'

  • '[' -n '^MODE: 5,17 ^RSSI: 14 ^CERSSI:0,-85,-6,0,0,0,0 ^HCSQ:WCDMA,42,36,53 257027017048705' ]

  • NR_IMSI='^MODE: 5,17 ^RSSI: 14 ^CERSSI:0,-85,-6,0,0,0,0 ^HCSQ:WCDMA,42,36,53 257027017048705'

      • echo 'at^chiptemp?;^hcsq?;^iccid?

^CHIPTEMP: 373,373,65535,30,65535

^HCSQ:"WCDMA",42,35,51

^ICCID: 89375027010070487051

'
xargs
awk -F '[:]' '/^^ICCID: /{print $2}'

  • NR_D=89375027010070487051
  • '[' -n 89375027010070487051 ]
  • NR_ICCID=89375027010070487051
  • sms_tool -d /dev/ttyUSB2 at 'at^hfreqinfo?'
  • XFR='at^hfreqinfo?

'

    • wc -c
      echo -n 'at^hfreqinfo?

'

  • XFRCOUNT=16
  • '[' -n 'at^hfreqinfo?

' ]

  • '[' 16 -gt 15 ]
      • echo 'at^hfreqinfo?

'
awk -F '[:]'xargs '/^^HFREQINFO:/{print $2}'

  • TBX=
    • cutecho -d ,
      -f3-3
  • TB=
    • cutecho -d ,
      -f6-6
  • TDL=
    /usr/share/3ginfo-lite/3ginfo.sh: /usr/share/3ginfo-lite/modem/usb/12d1155e: line 94: arithmetic syntax error
<!-- gh-comment-id:2904711360 --> @ZAV-8 commented on GitHub (May 23, 2025): Debug output: + RES=/usr/share/3ginfo-lite + /usr/share/3ginfo-lite/detect.sh + DEVICE=/dev/ttyUSB2 + '[' -z /dev/ttyUSB2 ] + O= + '[' -e /usr/bin/sms_tool ] + sms_tool -D -d /dev/ttyUSB2 at 'AT+CPIN?;+CSQ;+COPS=3,0;+COPS?;+COPS=3,2;+COPS?;+CREG=2;+CREG?' + O='AT+CPIN?;+CSQ;+COPS=3,0;+COPS?;+COPS=3,2;+COPS?;+CREG=2;+CREG? +CPIN: READY +CSQ: 13,0 +COPS: 0,0,"MTS BY",2 +COPS: 0,2,"25702",2 +CREG: 2,1,"00D3","00D09A81",6 OK ' + CONFIG=modemdefine + + + grep -o '@modemdefine\[[0-9]*\]\.modem' uci show modemdefine wc+ -l xargs + MODEMZ=0 + '[[' 0 -gt 1 ]] + '[[' 0 -eq 0 ]] + uci -q get '3ginfo.@3ginfo[0].network' + SEC= + '[[' 0 -eq 1 ]] + '[' -z ] + getpath /dev/ttyUSB2 + basename /dev/ttyUSB2 + devname=ttyUSB2 + readlink -f /sys/class/tty/ttyUSB2/device + devpath=/sys/devices/platform/ahb/1b000000.usb/usb1/1-1/1-1:1.2/ttyUSB2 + P=/sys/devices/platform/ahb/1b000000.usb/usb1/1-1 + PORIG=/sys/devices/platform/ahb/1b000000.usb/usb1/1-1 + getpath /dev/console + basename /dev/console + devname=console + readlink -f /sys/class/usbmisc/console/device/ + devpath= + P= + '[' x/sys/devices/platform/ahb/1b000000.usb/usb1/1-1 '==' x ] + getpath /dev/ptmx + basename /dev/ptmx + devname=ptmx + readlink -f /sys/class/usbmisc/ptmx/device/ + devpath= + P= + '[' x/sys/devices/platform/ahb/1b000000.usb/usb1/1-1 '==' x ] + getpath /dev/tty + basename /dev/tty + devname=tty + readlink -f /sys/class/tty/tty/device + devpath=/sys/devices/virtual/tty/tty/device + P=/sys/devices/virtual/tty + '[' x/sys/devices/platform/ahb/1b000000.usb/usb1/1-1 '==' x/sys/devices/virtual/tty ] + getpath /dev/ttyS0 + basename /dev/ttyS0 + devname=ttyS0 + readlink -f /sys/class/tty/ttyS0/device + devpath=/sys/devices/platform/ahb/ahb:apb/18020000.uart + P=/sys/devices/platform/ahb + '[' x/sys/devices/platform/ahb/1b000000.usb/usb1/1-1 '==' x/sys/devices/platform/ahb ] + getpath /dev/ttyS1 + basename /dev/ttyS1 + devname=ttyS1 + readlink -f /sys/class/tty/ttyS1/device + devpath=/sys/devices/platform/serial8250 + P=/sys/devices + '[' x/sys/devices/platform/ahb/1b000000.usb/usb1/1-1 '==' x/sys/devices ] + getpath /dev/ttyS10 + basename /dev/ttyS10 + devname=ttyS10 + readlink -f /sys/class/tty/ttyS10/device + devpath=/sys/devices/platform/serial8250 + P=/sys/devices + '[' x/sys/devices/platform/ahb/1b000000.usb/usb1/1-1 '==' x/sys/devices ] + getpath /dev/ttyS11 + basename /dev/ttyS11 + devname=ttyS11 + readlink -f /sys/class/tty/ttyS11/device + devpath=/sys/devices/platform/serial8250 + P=/sys/devices + '[' x/sys/devices/platform/ahb/1b000000.usb/usb1/1-1 '==' x/sys/devices ] + getpath /dev/ttyS12 + basename /dev/ttyS12 + devname=ttyS12 + readlink -f /sys/class/tty/ttyS12/device + devpath=/sys/devices/platform/serial8250 + P=/sys/devices + '[' x/sys/devices/platform/ahb/1b000000.usb/usb1/1-1 '==' x/sys/devices ] + getpath /dev/ttyS13 + basename /dev/ttyS13 + devname=ttyS13 + readlink -f /sys/class/tty/ttyS13/device + devpath=/sys/devices/platform/serial8250 + P=/sys/devices + '[' x/sys/devices/platform/ahb/1b000000.usb/usb1/1-1 '==' x/sys/devices ] + getpath /dev/ttyS14 + basename /dev/ttyS14 + devname=ttyS14 + readlink -f /sys/class/tty/ttyS14/device + devpath=/sys/devices/platform/serial8250 + P=/sys/devices + '[' x/sys/devices/platform/ahb/1b000000.usb/usb1/1-1 '==' x/sys/devices ] + getpath /dev/ttyS15 + basename /dev/ttyS15 + devname=ttyS15 + readlink -f /sys/class/tty/ttyS15/device + devpath=/sys/devices/platform/serial8250 + P=/sys/devices + '[' x/sys/devices/platform/ahb/1b000000.usb/usb1/1-1 '==' x/sys/devices ] + getpath /dev/ttyS2 + basename /dev/ttyS2 + devname=ttyS2 + readlink -f /sys/class/tty/ttyS2/device + devpath=/sys/devices/platform/serial8250 + P=/sys/devices + '[' x/sys/devices/platform/ahb/1b000000.usb/usb1/1-1 '==' x/sys/devices ] + getpath /dev/ttyS3 + basename /dev/ttyS3 + devname=ttyS3 + readlink -f /sys/class/tty/ttyS3/device + devpath=/sys/devices/platform/serial8250 + P=/sys/devices + '[' x/sys/devices/platform/ahb/1b000000.usb/usb1/1-1 '==' x/sys/devices ] + getpath /dev/ttyS4 + basename /dev/ttyS4 + devname=ttyS4 + readlink -f /sys/class/tty/ttyS4/device + devpath=/sys/devices/platform/serial8250 + P=/sys/devices + '[' x/sys/devices/platform/ahb/1b000000.usb/usb1/1-1 '==' x/sys/devices ] + getpath /dev/ttyS5 + basename /dev/ttyS5 + devname=ttyS5 + readlink -f /sys/class/tty/ttyS5/device + devpath=/sys/devices/platform/serial8250 + P=/sys/devices + '[' x/sys/devices/platform/ahb/1b000000.usb/usb1/1-1 '==' x/sys/devices ] + getpath /dev/ttyS6 + basename /dev/ttyS6 + devname=ttyS6 + readlink -f /sys/class/tty/ttyS6/device + devpath=/sys/devices/platform/serial8250 + P=/sys/devices + '[' x/sys/devices/platform/ahb/1b000000.usb/usb1/1-1 '==' x/sys/devices ] + getpath /dev/ttyS7 + basename /dev/ttyS7 + devname=ttyS7 + readlink -f /sys/class/tty/ttyS7/device + devpath=/sys/devices/platform/serial8250 + P=/sys/devices + '[' x/sys/devices/platform/ahb/1b000000.usb/usb1/1-1 '==' x/sys/devices ] + getpath /dev/ttyS8 + basename /dev/ttyS8 + devname=ttyS8 + readlink -f /sys/class/tty/ttyS8/device + devpath=/sys/devices/platform/serial8250 + P=/sys/devices + '[' x/sys/devices/platform/ahb/1b000000.usb/usb1/1-1 '==' x/sys/devices ] + getpath /dev/ttyS9 + basename /dev/ttyS9 + devname=ttyS9 + readlink -f /sys/class/tty/ttyS9/device + devpath=/sys/devices/platform/serial8250 + P=/sys/devices + '[' x/sys/devices/platform/ahb/1b000000.usb/usb1/1-1 '==' x/sys/devices ] + getpath /dev/ttyUSB0 + basename /dev/ttyUSB0 + devname=ttyUSB0 + readlink -f /sys/class/tty/ttyUSB0/device + devpath=/sys/devices/platform/ahb/1b000000.usb/usb1/1-1/1-1:1.0/ttyUSB0 + P=/sys/devices/platform/ahb/1b000000.usb/usb1/1-1 + '[' x/sys/devices/platform/ahb/1b000000.usb/usb1/1-1 '==' x/sys/devices/platform/ahb/1b000000.usb/usb1/1-1 ] + + + grep /dev/ttyUSB0 uci show network cut -f2 -d. + SEC= + '[' -n ] + getpath /dev/ttyUSB1 + basename /dev/ttyUSB1 + devname=ttyUSB1 + readlink -f /sys/class/tty/ttyUSB1/device + devpath=/sys/devices/platform/ahb/1b000000.usb/usb1/1-1/1-1:1.1/ttyUSB1 + P=/sys/devices/platform/ahb/1b000000.usb/usb1/1-1 + '[' x/sys/devices/platform/ahb/1b000000.usb/usb1/1-1 '==' x/sys/devices/platform/ahb/1b000000.usb/usb1/1-1 ] + + + ucigrep show network /dev/ttyUSB1 cut -f2 -d. + SEC= + '[' -n ] + getpath /dev/ttyUSB2 + basename /dev/ttyUSB2 + devname=ttyUSB2 + readlink -f /sys/class/tty/ttyUSB2/device + devpath=/sys/devices/platform/ahb/1b000000.usb/usb1/1-1/1-1:1.2/ttyUSB2 + P=/sys/devices/platform/ahb/1b000000.usb/usb1/1-1 + '[' x/sys/devices/platform/ahb/1b000000.usb/usb1/1-1 '==' x/sys/devices/platform/ahb/1b000000.usb/usb1/1-1 ] + + + uci showgrep /dev/ttyUSB2 network cut -f2 -d. + SEC=modemwan + '[' -n modemwan ] + break + CONN_TIME=- + RX=- + TX=- + + grepifstatus '"up": true' modemwan + NETUP=' "up": true,' + '[' -n ' "up": true,' ] + uci -q -P /var/state/ get network.modemwan.connect_time + CT= + '[' -z ] + + + ifstatus modemwan xargsawk '-F[:,]' '/uptime/ {print $2}' + CT=330 + '[' '!' -z 330 ] + expr 330 / 60 / 60 / 24 + D=0 + expr 330 / 60 / 60 '%' 24 + H=0 + expr 330 / 60 '%' 60 + M=5 + expr 330 '%' 60 + S=30 + printf '%dd, %02d:%02d:%02d' 0 0 5 30 + CONN_TIME='0d, 00:05:30' + date '+%s' + date '+%Y%m%d%H%M%S' -d @1748011669 + CONN_TIME_SINCE=20250523144749 + + awk '-F"' '/l3_device/ {print $4}'ifstatus modemwan + IFACE=wwan0 + '[' -n wwan0 ] + + ifconfig wwan0 awk '-F[()]' '/bytes/ {printf "%s",$2}' + RX='3.8 MiB' + + ifconfig wwan0 awk '-F[()]' '/bytes/ {printf "%s",$4}' + TX='947.7 KiB' + + echo 'AT+CPIN?;+CSQ;+COPS=3,0;+COPS?;+COPS=3,2;+COPS?;+CREG=2;+CREG? +CPIN: READY +CSQ: 13,0 +COPS: 0,0,"MTS BY",2 +COPS: 0,2,"25702",2 +CREG: 2,1,"00D3","00D09A81",6 OK ' awk '-F[, ]' '/^\+CSQ/ {print $2}' + CSQ=13 + '[' x13 '==' x ] + '[' 13 -ge 0 -a 13 -le 31 ] + CSQ_PER=41 + COPS= + COPS_MCC= + COPS_MNC= + echo 'AT+CPIN?;+CSQ;+COPS=3,0;+COPS?;+COPS=3,2;+COPS?;+CREG=2;+CREG? +CPIN: READY +CSQ: 13,0 +COPS: 0,0,"MTS BY",2 +COPS: 0,2,"25702",2 +CREG: 2,1,"00D3","00D09A81",6 OK '+ awk '-F["]' '/^\+COPS:\s*.,2/ {print $2}' + COPS_NUM=25702 + '[' -n 25702 ] + COPS_MCC=257 + COPS_MNC=02 + + echo 'AT+CPIN?;+CSQ;+COPS=3,0;+COPS?;+COPS=3,2;+COPS?;+CREG=2;+CREG? +CPIN: READY +CSQ: 13,0 +COPS: 0,0,"MTS BY",2 +COPS: 0,2,"25702",2 +CREG: 2,1,"00D3","00D09A81",6 OK ' awk '-F["]' '/^\+COPS:\s*.,0/ {print $2}' + TCOPS='MTS BY' + '[' 'xMTS BY' '!=' x ] + COPS='MTS BY' + '[' -z 'MTS BY' ] + '[' -z 'MTS BY' ] + + awk '{if(NF==2 && tolower($1)==tolower($2)){print $1}else{print $0}}' echo 'MTS BY' + COPS='MTS BY' + + + sed -n 2p sms_tool -d /dev/ttyUSB2 at 'AT+COPS?'+ cut -d '"' -f2 tr -d '\r' + isp= + isp_num='257 02' + isp_numws=25702 + LOCATIONFILE=/tmp/location + '[' -e /tmp/location ] + touch /tmp/location + cat /tmp/location + LOC=Belarus + '[' -n Belarus ] + cat /tmp/location + LOC=Belarus + '[[' Belarus '==' - ]] + awk '-F[;]' '/^25702;/ {print $2}' /usr/share/3ginfo-lite/mccmnc.dat + LOC=Belarus + '[' -n Belarus ] + echo Belarus + + + echo 'AT+CPIN?;+CSQ;+COPS=3,0;+COPS?;+COPS=3,2;+COPS?;+CREG=2;+CREG? +CPIN: READY +CSQ: 13,0 +COPS: 0,0,"MTS BY",2 +COPS: 0,2,"25702",2 +CREG: 2,1,"00D3","00D09A81",6 OK ' xargsawk '-F[, ]' '/^\+CPIN:/ {print $0;exit}' + T='+CPIN: READY' + '[' -n '+CPIN: READY' ] + '[' '+CPIN: READY' '==' '+CPIN: READY' ] + + echo 'AT+CPIN?;+CSQ;+COPS=3,0;+COPS?;+COPS=3,2;+COPS?;+CREG=2;+CREG? +CPIN: READY +CSQ: 13,0 +COPS: 0,0,"MTS BY",2 +COPS: 0,2,"25702",2 +CREG: 2,1,"00D3","00D09A81",6 OK 'awk '-F[, ]' '/^\+CME ERROR:/ {print $0;exit}' + T= + '[' -n ] + + echo 'AT+CPIN?;+CSQ;+COPS=3,0;+COPS?;+COPS=3,2;+COPS?;+CREG=2;+CREG? +CPIN: READY +CSQ: 13,0 +COPS: 0,0,"MTS BY",2 +COPS: 0,2,"25702",2 +CREG: 2,1,"00D3","00D09A81",6 OK ' busybox awk '-F[,]' '/^\+CREG/ {gsub(/[[:space:]"]+/,"");printf "T=\"%d\";LAC_HEX=\"%X\";CID_HEX=\"%X\";LAC_DEC=\"%d\";CID_DEC=\"%d\";MODE_NUM=\"%d\"", $2, "0x"$3, "0x"$4, "0x"$3, "0x"$4, $5}' + eval 'T="1";LAC_HEX="D3";CID_HEX="D09A81";LAC_DEC="211";CID_DEC="13671041";MODE_NUM="6"' + T=1 + LAC_HEX=D3 + CID_HEX=D09A81 + LAC_DEC=211 + CID_DEC=13671041 + MODE_NUM=6 + REG=1 + '[' -z 6 ] + '[' x6 '==' x0 ] + MODE=HSPA + sms_tool -d /dev/ttyUSB2 at at+cereg + OTX='at+cereg ' + + + echo 'at+cereg ' sed 's/[^A-F0-9]//g' awk '-F[,]' '/^\+CEREG/ {printf "%s", toupper($3)}' + TAC= + '[' x '!=' x ] + TAC=- + TAC_HEX=- + uci -q get '3ginfo.@3ginfo[0].device' + CONF_DEVICE= + + echo x grep -q 192.168. + '[' -e /usr/bin/sms_tool ] + REGOK=0 + '[' x1 '==' x1 ] + REGOK=1 + getdevicevendorproduct /dev/ttyUSB2 + basename /dev/ttyUSB2 + devname=ttyUSB2 + readlink -f /sys/class/tty/ttyUSB2/device + devpath=/sys/devices/platform/ahb/1b000000.usb/usb1/1-1/1-1:1.2/ttyUSB2 + T=/sys/devices/platform/ahb/1b000000.usb/usb1/1-1 + cat /sys/devices/platform/ahb/1b000000.usb/usb1/1-1/idVendor + cat /sys/devices/platform/ahb/1b000000.usb/usb1/1-1/idProduct + echo usb/12d1155e + VIDPID=usb/12d1155e + '[' -e /usr/share/3ginfo-lite/modem/usb/12d1155e ] + cat /tmp/sysinfo/board_name + . /usr/share/3ginfo-lite/modem/usb/12d1155e + sms_tool -d /dev/ttyUSB2 at 'at^chiptemp?;^hcsq?;^iccid?' + O='at^chiptemp?;^hcsq?;^iccid? ^CHIPTEMP: 373,373,65535,30,65535 ^HCSQ:"WCDMA",42,35,51 ^ICCID: 89375027010070487051 ' + + + echo 'at^chiptemp?;^hcsq?;^iccid? ^CHIPTEMP: 373,373,65535,30,65535 ^HCSQ:"WCDMA",42,35,51 ^ICCID: 89375027010070487051 ' xargs awk '-F[,:]' '/^\^HCSQ:/ {print $2}' + T=WCDMA + '[' -n WCDMA ] + MODE=WCDMA + + + echo 'at^chiptemp?;^hcsq?;^iccid? ^CHIPTEMP: 373,373,65535,30,65535 ^HCSQ:"WCDMA",42,35,51 ^ICCID: 89375027010070487051 ' awkxargs '-F[,:]' '/^\^HCSQ:/ {print $4}' + PARAM2=35 + + echo 'at^chiptemp?;^hcsq?;^iccid? ^CHIPTEMP: 373,373,65535,30,65535 ^HCSQ:"WCDMA",42,35,51 ^ICCID: 89375027010070487051 ' xargs + awk '-F[,:]' '/^\^HCSQ:/ {print $5}' + PARAM3=51 + awk 'BEGIN {print -121 + 35}' + RSCP=-86 + awk 'BEGIN {print -32.5 + 51/2}' + ECIO=-7 + sms_tool -d /dev/ttyUSB2 at ati + OF='ati Manufacturer: Huawei Technologies Co.,Ltd. Model: E3372h-320 Revision: 10.0.5.1(H195SP3C983) IMEI: 862329049458888 +GCAP: +CGSM,+DS,+ES ' + + + echotr -s 'ati ' '\n' ' ' Manufacturer: Huawei Technologies 'Co.,Ltd. 'xargs Model: 'E3372h-320 ' Revision: '10.0.5.1(H195SP3C983) ' IMEI: '862329049458888 ' +GCAP: '+CGSM,+DS,+ES ' ' ' + DEV2='ati Manufacturer: Huawei Technologies Co.,Ltd. Model: E3372h-320 Revision: 10.0.5.1(H195SP3C983) IMEI: 862329049458888 +GCAP: +CGSM,+DS,+ES' + + + awk -F 'Manufacturer:|Revision:' '{print $2}' xargs echo ati Manufacturer: Huawei Technologies Co.,Ltd. Model: E3372h-320 Revision: '10.0.5.1(H195SP3C983)' IMEI: 862329049458888 +GCAP: +CGSM,+DS,+ES + MODELB='Huawei Technologies Co.,Ltd. Model: E3372h-320' + + + sed s/Model:// echo Huawei Technologies Co.,Ltd. Model: E3372h-320 xargs + MODELC='Huawei Technologies Co.,Ltd. E3372h-320' + + awk '{print toupper(substr($0,0,1))tolower(substr($0,2))}' echo Huawei Technologies Co.,Ltd. E3372h-320 + MODEL='Huawei technologies co.,ltd. e3372h-320' + + + awk -F 'Revision:|IMEI'xargs echo '{print $2}' ati Manufacturer: Huawei Technologies Co.,Ltd. Model: E3372h-320 Revision: '10.0.5.1(H195SP3C983)' IMEI: 862329049458888 +GCAP: +CGSM,+DS,+ES + FW='10.0.5.1(H195SP3C983)' + cat /sys/kernel/debug/usb/devices + PV=' T: Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=480 MxCh= 1 B: Alloc= 1/800 us ( 0%), #Int= 1, #Iso= 0 D: Ver= 2.00 Cls=09(hub ) Sub=00 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=1d6b ProdID=0002 Rev= 5.04 S: Manufacturer=Linux 5.4.143 ehci_hcd S: Product=EHCI Host Controller S: SerialNumber=1b000000.usb C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr= 0mA I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub E: Ad=81(I) Atr=03(Int.) MxPS= 4 Ivl=256ms T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 3 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=02(comm.) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=12d1 ProdID=155e Rev= 1.02 S: Manufacturer=HUAWEI_MOBILE S: Product=HUAWEI_MOBILE C:* #Ifs= 5 Cfg#= 1 Atr=80 MxPwr= 2mA A: FirstIf#= 3 IfCount= 2 Cls=02(comm.) Sub=0d Prot=00 I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=83(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 3 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=0d Prot=00 Driver=cdc_ncm E: Ad=87(I) Atr=03(Int.) MxPS= 16 Ivl=2ms I: If#= 4 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=01 Driver=cdc_ncm I:* If#= 4 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=01 Driver=cdc_ncm E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms' + + awk -F 'Vendor=12d1 ProdID=155e' '{print $2}' cut -c-1104 + echo T: 'Bus=01' 'Lev=00' 'Prnt=00' 'Port=00' 'Cnt=00' 'Dev#=' 1 'Spd=480' 'MxCh=' 1 B: 'Alloc=' 1/800 us '(' '0%),' '#Int=' 1, '#Iso=' 0 D: 'Ver=' 2.00 'Cls=09(hub' ')' 'Sub=00' 'Prot=01' 'MxPS=64' '#Cfgs=' 1 P: 'Vendor=1d6b' 'ProdID=0002' 'Rev=' 5.04 S: 'Manufacturer=Linux' 5.4.143 ehci_hcd S: 'Product=EHCI' Host Controller S: 'SerialNumber=1b000000.usb' 'C:*' '#Ifs=' 1 'Cfg#=' 1 'Atr=e0' 'MxPwr=' 0mA 'I:*' 'If#=' 0 'Alt=' 0 '#EPs=' 1 'Cls=09(hub' ')' 'Sub=00' 'Prot=00' 'Driver=hub' E: 'Ad=81(I)' 'Atr=03(Int.)' 'MxPS=' 4 'Ivl=256ms' T: 'Bus=01' 'Lev=01' 'Prnt=01' 'Port=00' 'Cnt=01' 'Dev#=' 3 'Spd=480' 'MxCh=' 0 D: 'Ver=' 2.00 'Cls=02(comm.)' 'Sub=00' 'Prot=00' 'MxPS=64' '#Cfgs=' 1 P: 'Vendor=12d1' 'ProdID=155e' 'Rev=' 1.02 S: 'Manufacturer=HUAWEI_MOBILE' S: 'Product=HUAWEI_MOBILE' 'C:*' '#Ifs=' 5 'Cfg#=' 1 'Atr=80' 'MxPwr=' 2mA A: 'FirstIf#=' 3 'IfCount=' 2 'Cls=02(comm.)' 'Sub=0d' 'Prot=00' 'I:*' 'If#=' 0 'Alt=' 0 '#EPs=' 3 'Cls=ff(vend.)' 'Sub=ff' 'Prot=ff' 'Driver=option' E: 'Ad=83(I)' 'Atr=03(Int.)' 'MxPS=' 10 'Ivl=32ms' E: 'Ad=82(I)' 'Atr=02(Bulk)' 'MxPS=' 512 'Ivl=0ms' E: 'Ad=02(O)' 'Atr=02(Bulk)' 'MxPS=' 512 'Ivl=0ms' 'I:*' 'If#=' 1 'Alt=' 0 '#EPs=' 2 'Cls=ff(vend.)' 'Sub=ff' 'Prot=ff' 'Driver=option' E: 'Ad=84(I)' 'Atr=02(Bulk)' 'MxPS=' 512 'Ivl=0ms' E: 'Ad=03(O)' 'Atr=02(Bulk)' 'MxPS=' 512 'Ivl=0ms' 'I:*' 'If#=' 2 'Alt=' 0 '#EPs=' 2 'Cls=ff(vend.)' 'Sub=ff' 'Prot=ff' 'Driver=option' E: 'Ad=85(I)' 'Atr=02(Bulk)' 'MxPS=' 512 'Ivl=0ms' E: 'Ad=04(O)' 'Atr=02(Bulk)' 'MxPS=' 512 'Ivl=0ms' 'I:*' 'If#=' 3 'Alt=' 0 '#EPs=' 1 'Cls=02(comm.)' 'Sub=0d' 'Prot=00' 'Driver=cdc_ncm' E: 'Ad=87(I)' 'Atr=03(Int.)' 'MxPS=' 16 'Ivl=2ms' I: 'If#=' 4 'Alt=' 0 '#EPs=' 0 'Cls=0a(data' ')' 'Sub=00' 'Prot=01' 'Driver=cdc_ncm' 'I:*' 'If#=' 4 'Alt=' 1 '#EPs=' 2 'Cls=0a(data' ')' 'Sub=00' 'Prot=01' 'Driver=cdc_ncm' E: 'Ad=86(I)' 'Atr=02(Bulk)' 'MxPS=' 512 'Ivl=0ms' E: 'Ad=05(O)' 'Atr=02(Bulk)' 'MxPS=' 512 'Ivl=0ms' + PVCUT=' Rev= 1.02 S: Manufacturer=HUAWEI_MOBILE S: Product=HUAWEI_MOBILE C:* #Ifs= 5 Cfg#= 1 Atr=80 MxPwr= 2mA A: FirstIf#= 3 IfCount= 2 Cls=02(comm.) Sub=0d Prot=00 I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=83(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 3 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=0d Prot=00 Driver=cdc_ncm E: Ad=87(I) Atr=03(Int.) MxPS= 16 Ivl=2ms I: If#= 4 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=01 Driver=cdc_ncm I:* If#= 4 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=01 Driver=cdc_ncm E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms' + + grep -q 'Driver=qmi_wwan' echo ' Rev= 1.02 S: Manufacturer=HUAWEI_MOBILE S: Product=HUAWEI_MOBILE C:* #Ifs= 5 Cfg#= 1 Atr=80 MxPwr= 2mA A: FirstIf#= 3 IfCount= 2 Cls=02(comm.) Sub=0d Prot=00 I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=83(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 3 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=0d Prot=00 Driver=cdc_ncm E: Ad=87(I) Atr=03(Int.) MxPS= 16 Ivl=2ms I: If#= 4 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=01 Driver=cdc_ncm I:* If#= 4 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=01 Driver=cdc_ncm E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms' + + grep -q 'Driver=cdc_mbim' echo ' Rev= 1.02 S: Manufacturer=HUAWEI_MOBILE S: Product=HUAWEI_MOBILE C:* #Ifs= 5 Cfg#= 1 Atr=80 MxPwr= 2mA A: FirstIf#= 3 IfCount= 2 Cls=02(comm.) Sub=0d Prot=00 I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=83(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 3 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=0d Prot=00 Driver=cdc_ncm E: Ad=87(I) Atr=03(Int.) MxPS= 16 Ivl=2ms I: If#= 4 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=01 Driver=cdc_ncm I:* If#= 4 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=01 Driver=cdc_ncm E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms' + + grep -q 'Driver=cdc_ether' echo ' Rev= 1.02 S: Manufacturer=HUAWEI_MOBILE S: Product=HUAWEI_MOBILE C:* #Ifs= 5 Cfg#= 1 Atr=80 MxPwr= 2mA A: FirstIf#= 3 IfCount= 2 Cls=02(comm.) Sub=0d Prot=00 I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=83(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 3 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=0d Prot=00 Driver=cdc_ncm E: Ad=87(I) Atr=03(Int.) MxPS= 16 Ivl=2ms I: If#= 4 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=01 Driver=cdc_ncm I:* If#= 4 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=01 Driver=cdc_ncm E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms' + + grep -q cdc_ncm echo ' Rev= 1.02 S: Manufacturer=HUAWEI_MOBILE S: Product=HUAWEI_MOBILE C:* #Ifs= 5 Cfg#= 1 Atr=80 MxPwr= 2mA A: FirstIf#= 3 IfCount= 2 Cls=02(comm.) Sub=0d Prot=00 I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=83(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 3 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=0d Prot=00 Driver=cdc_ncm E: Ad=87(I) Atr=03(Int.) MxPS= 16 Ivl=2ms I: If#= 4 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=01 Driver=cdc_ncm I:* If#= 4 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=01 Driver=cdc_ncm E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms' + PROTO=ncm + + xargs sms_tool -d /dev/ttyUSB2 at AT+GSN + OI='AT+GSN 862329049458888' + + sed s/AT+GSN//g echo 'AT+GSN 862329049458888' + xargs + NR_I=862329049458888 + '[' -n NR_I ] + NR_IMEI=862329049458888 + + xargs sms_tool -d /dev/ttyUSB2 at AT+CIMI + OC='^MODE: 5,17 ^RSSI: 14 ^CERSSI:0,-85,-6,0,0,0,0 ^HCSQ:WCDMA,42,36,53 AT+CIMI 257027017048705' + + + sed s/AT+CIMI//g echo '^MODE: 5,17 ^RSSI: 14 ^CERSSI:0,-85,-6,0,0,0,0 ^HCSQ:WCDMA,42,36,53 AT+CIMI 257027017048705'xargs + NR_C='^MODE: 5,17 ^RSSI: 14 ^CERSSI:0,-85,-6,0,0,0,0 ^HCSQ:WCDMA,42,36,53 257027017048705' + '[' -n '^MODE: 5,17 ^RSSI: 14 ^CERSSI:0,-85,-6,0,0,0,0 ^HCSQ:WCDMA,42,36,53 257027017048705' ] + NR_IMSI='^MODE: 5,17 ^RSSI: 14 ^CERSSI:0,-85,-6,0,0,0,0 ^HCSQ:WCDMA,42,36,53 257027017048705' + + + echo 'at^chiptemp?;^hcsq?;^iccid? ^CHIPTEMP: 373,373,65535,30,65535 ^HCSQ:"WCDMA",42,35,51 ^ICCID: 89375027010070487051 ' xargs awk -F '[:]' '/^\^ICCID: /{print $2}' + NR_D=89375027010070487051 + '[' -n 89375027010070487051 ] + NR_ICCID=89375027010070487051 + sms_tool -d /dev/ttyUSB2 at 'at^hfreqinfo?' + XFR='at^hfreqinfo? ' + + wc -c echo -n 'at^hfreqinfo? ' + XFRCOUNT=16 + '[' -n 'at^hfreqinfo? ' ] + '[' 16 -gt 15 ] + + + echo 'at^hfreqinfo? ' awk -F '[:]'xargs '/^\^HFREQINFO:/{print $2}' + TBX= + + cutecho -d , -f3-3 + TB= + + cutecho -d , -f6-6 + TDL= /usr/share/3ginfo-lite/3ginfo.sh: /usr/share/3ginfo-lite/modem/usb/12d1155e: line 94: arithmetic syntax error
Author
Owner

@4IceG commented on GitHub (May 23, 2025):

Replace this file /usr/share/3ginfo-lite/modem/usb/12d1155e and check if it will be OK.
12d1155e.zip

<!-- gh-comment-id:2905570071 --> @4IceG commented on GitHub (May 23, 2025): Replace this file /usr/share/3ginfo-lite/modem/usb/12d1155e and check if it will be OK. [12d1155e.zip](https://github.com/user-attachments/files/20417177/12d1155e.zip)
Author
Owner

@ZAV-8 commented on GitHub (May 24, 2025):

My report after replace 12d1155e.
Modem in LTE mode
/usr/share/3ginfo-lite/3ginfo.sh: /usr/share/3ginfo-lite/modem/usb/12d1155e: line 115: syntax error: unexpected "fi"
I deleted string 115 "fi" from fle and script started.

Modem in UMTS mode
/usr/share/3ginfo-lite/modem/usb/12d1155e: line 96: arithmetic syntax error

Debug info:

+ RES=/usr/share/3ginfo-lite
+ /usr/share/3ginfo-lite/detect.sh
+ DEVICE=/dev/ttyUSB2
+ '[' -z /dev/ttyUSB2 ]
+ O=
+ '[' -e /usr/bin/sms_tool ]
+ sms_tool -D -d /dev/ttyUSB2 at 'AT+CPIN?;+CSQ;+COPS=3,0;+COPS?;+COPS=3,2;+COPS?;+CREG=2;+CREG?'
+ O='AT+CPIN?;+CSQ;+COPS=3,0;+COPS?;+COPS=3,2;+COPS?;+CREG=2;+CREG?

+CPIN: READY

+CSQ: 13,0

+COPS: 0,0,"MTS BY",2

+COPS: 0,2,"25702",2

+CREG: 2,1,"00D3","00D09A81",6

OK
'
+ CONFIG=modemdefine
+ + + grepuci -o '@modemdefine\[[0-9]*\]\.modem' show
 modemdefine
+ wc -l
xargs
+ MODEMZ=0
+ '[[' 0 -gt 1 ]]
+ '[[' 0 -eq 0 ]]
+ uci -q get '3ginfo.@3ginfo[0].network'
+ SEC=modemwan
+ '[[' 0 -eq 1 ]]
+ '[' -z modemwan ]
+ CONN_TIME=-
+ RX=-
+ TX=-
+ + grep '"up": true'
ifstatus modemwan
+ NETUP='	"up": true,'
+ '[' -n '	"up": true,' ]
+ uci -q -P /var/state/ get network.modemwan.connect_time
+ CT=
+ '[' -z ]
+ + + ifstatusxargs modemwan

awk '-F[:,]' '/uptime/ {print $2}'
+ CT=217
+ '[' '!' -z 217 ]
+ expr 217 / 60 / 60 / 24
+ D=0
+ expr 217 / 60 / 60 '%' 24
+ H=0
+ expr 217 / 60 '%' 60
+ M=3
+ expr 217 '%' 60
+ S=37
+ printf '%dd, %02d:%02d:%02d' 0 0 3 37
+ CONN_TIME='0d, 00:03:37'
+ date '+%s'
+ date '+%Y%m%d%H%M%S' -d @1748065850
+ CONN_TIME_SINCE=20250524055050
+ + awk '-F"'ifstatus '/l3_device/ {print $4}' modemwan

+ IFACE=wwan0
+ '[' -n wwan0 ]
+ + ifconfig wwan0
awk '-F[()]' '/bytes/ {printf "%s",$2}'
+ RX='14.0 MiB'
+ + ifconfig wwan0
awk '-F[()]' '/bytes/ {printf "%s",$4}'
+ TX='1.6 MiB'
+ + echo 'AT+CPIN?;+CSQ;+COPS=3,0;+COPS?;+COPS=3,2;+COPS?;+CREG=2;+CREG?

+CPIN: READY

+CSQ: 13,0

+COPS: 0,0,"MTS BY",2

+COPS: 0,2,"25702",2

+CREG: 2,1,"00D3","00D09A81",6

OK
'
awk '-F[, ]' '/^\+CSQ/ {print $2}'
+ CSQ=13
+ '[' x13 '==' x ]
+ '[' 13 -ge 0 -a 13 -le 31 ]
+ CSQ_PER=41
+ COPS=
+ COPS_MCC=
+ COPS_MNC=
+ + echo 'AT+CPIN?;+CSQ;+COPS=3,0;+COPS?;+COPS=3,2;+COPS?;+CREG=2;+CREG?

+CPIN: READY

+CSQ: 13,0

+COPS: 0,0,"MTS BY",2

+COPS: 0,2,"25702",2

+CREG: 2,1,"00D3","00D09A81",6

OK
'
awk '-F["]' '/^\+COPS:\s*.,2/ {print $2}'
+ COPS_NUM=25702
+ '[' -n 25702 ]
+ COPS_MCC=257
+ COPS_MNC=02
+ + echo 'AT+CPIN?;+CSQ;+COPS=3,0;+COPS?;+COPS=3,2;+COPS?;+CREG=2;+CREG?

+CPIN: READY

+CSQ: 13,0

+COPS: 0,0,"MTS BY",2

+COPS: 0,2,"25702",2

+CREG: 2,1,"00D3","00D09A81",6

OK
'
awk '-F["]' '/^\+COPS:\s*.,0/ {print $2}'
+ TCOPS='MTS BY'
+ '[' 'xMTS BY' '!=' x ]
+ COPS='MTS BY'
+ '[' -z 'MTS BY' ]
+ '[' -z 'MTS BY' ]
+ + awk '{if(NF==2 && tolower($1)==tolower($2)){print $1}else{print $0}}'
echo 'MTS BY'
+ COPS='MTS BY'
+ + + sed+  -nsms_tool 2p
 -d /dev/ttyUSB2cut at -d 'AT+COPS?' '"'
 -f2
tr -d '\r'
+ isp=
+ isp_num='257 02'
+ isp_numws=25702
+ LOCATIONFILE=/tmp/location
+ '[' -e /tmp/location ]
+ touch /tmp/location
+ cat /tmp/location
+ LOC=Belarus
+ '[' -n Belarus ]
+ cat /tmp/location
+ LOC=Belarus
+ '[[' Belarus '==' - ]]
+ awk '-F[;]' '/^25702;/ {print $2}' /usr/share/3ginfo-lite/mccmnc.dat
+ LOC=Belarus
+ '[' -n Belarus ]
+ echo Belarus
+ + + echo 'AT+CPIN?;+CSQ;+COPS=3,0;+COPS?;+COPS=3,2;+COPS?;+CREG=2;+CREG?

+CPIN: READY

+CSQ: 13,0

+COPS: 0,0,"MTS BY",2

+COPS: 0,2,"25702",2

+CREG: 2,1,"00D3","00D09A81",6

OK
'xargs

awk '-F[, ]' '/^\+CPIN:/ {print $0;exit}'
+ T='+CPIN: READY'
+ '[' -n '+CPIN: READY' ]
+ '[' '+CPIN: READY' '==' '+CPIN: READY' ]
+ + echo 'AT+CPIN?;+CSQ;+COPS=3,0;+COPS?;+COPS=3,2;+COPS?;+CREG=2;+CREG?

+CPIN: READY

+CSQ: 13,0

+COPS: 0,0,"MTS BY",2

+COPS: 0,2,"25702",2

+CREG: 2,1,"00D3","00D09A81",6

OK
'
awk '-F[, ]' '/^\+CME ERROR:/ {print $0;exit}'
+ T=
+ '[' -n  ]
+ + echo 'AT+CPIN?;+CSQ;+COPS=3,0;+COPS?;+COPS=3,2;+COPS?;+CREG=2;+CREG?

+CPIN: READY

+CSQ: 13,0

+COPS: 0,0,"MTS BY",2

+COPS: 0,2,"25702",2

+CREG: 2,1,"00D3","00D09A81",6

OK
'
busybox awk '-F[,]' '/^\+CREG/ {gsub(/[[:space:]"]+/,"");printf "T=\"%d\";LAC_HEX=\"%X\";CID_HEX=\"%X\";LAC_DEC=\"%d\";CID_DEC=\"%d\";MODE_NUM=\"%d\"", $2, "0x"$3, "0x"$4, "0x"$3, "0x"$4, $5}'
+ eval 'T="1";LAC_HEX="D3";CID_HEX="D09A81";LAC_DEC="211";CID_DEC="13671041";MODE_NUM="6"'
+ T=1
+ LAC_HEX=D3
+ CID_HEX=D09A81
+ LAC_DEC=211
+ CID_DEC=13671041
+ MODE_NUM=6
+ REG=1
+ '[' -z 6 ]
+ '[' x6 '==' x0 ]
+ MODE=HSPA
+ sms_tool -d /dev/ttyUSB2 at at+cereg
+ OTX='at+cereg

'
+ + + echo 'at+cereg

'sed
 's/[^A-F0-9]//g'
awk '-F[,]' '/^\+CEREG/ {printf "%s", toupper($3)}'
+ TAC=
+ '[' x '!=' x ]
+ TAC=-
+ TAC_HEX=-
+ uci -q get '3ginfo.@3ginfo[0].device'
+ CONF_DEVICE=/dev/ttyUSB2
+ + grep -q 192.168.
echo x/dev/ttyUSB2
+ '[' -e /usr/bin/sms_tool ]
+ REGOK=0
+ '[' x1 '==' x1 ]
+ REGOK=1
+ getdevicevendorproduct /dev/ttyUSB2
+ basename /dev/ttyUSB2
+ devname=ttyUSB2
+ readlink -f /sys/class/tty/ttyUSB2/device
+ devpath=/sys/devices/platform/ahb/1b000000.usb/usb1/1-1/1-1:1.2/ttyUSB2
+ T=/sys/devices/platform/ahb/1b000000.usb/usb1/1-1
+ cat /sys/devices/platform/ahb/1b000000.usb/usb1/1-1/idVendor
+ cat /sys/devices/platform/ahb/1b000000.usb/usb1/1-1/idProduct
+ echo usb/12d1155e
+ VIDPID=usb/12d1155e
+ '[' -e /usr/share/3ginfo-lite/modem/usb/12d1155e ]
+ cat /tmp/sysinfo/board_name
+ . /usr/share/3ginfo-lite/modem/usb/12d1155e
+ sms_tool -d /dev/ttyUSB2 at 'at^chiptemp?;^hcsq?;^iccid?'
+ O='at^chiptemp?;^hcsq?;^iccid?

^CHIPTEMP: 391,391,65535,31,65535

^HCSQ:"WCDMA",44,35,47

^ICCID: 89375027010070487051

'
+ + + echo 'at^chiptemp?;^hcsq?;^iccid?

^CHIPTEMP: 391,391,65535,31,65535

^HCSQ:"WCDMA",44,35,47

^ICCID: 89375027010070487051

'
awk '-F[,:]' '/^\^HCSQ:/ {print $2}'
xargs
+ T=WCDMA
+ '[' -n WCDMA ]
+ MODE=WCDMA
+ + + echo 'at^chiptemp?;^hcsq?;^iccid?

^CHIPTEMP: 391,391,65535,31,65535

^HCSQ:"WCDMA",44,35,47

^ICCID: 89375027010070487051

'
xargs
awk '-F[,:]' '/^\^HCSQ:/ {print $4}'
+ PARAM2=35
+ + + echo 'at^chiptemp?;^hcsq?;^iccid?

^CHIPTEMP: 391,391,65535,31,65535

^HCSQ:"WCDMA",44,35,47

^ICCID: 89375027010070487051

'
xargsawk
 '-F[,:]' '/^\^HCSQ:/ {print $5}'
+ PARAM3=47
+ awk 'BEGIN {print -121 + 35}'
+ RSCP=-86
+ awk 'BEGIN {print -32.5 + 47/2}'
+ ECIO=-9
+ sms_tool -d /dev/ttyUSB2 at ati
+ OF='ati

Manufacturer: Huawei Technologies Co.,Ltd.
Model: E3372h-320
Revision: 10.0.5.1(H195SP3C983)
IMEI: 862329049458888
+GCAP: +CGSM,+DS,+ES

'
+ + + tr -s '\n'
echo 'ati
'xargs '
'
 Manufacturer: Huawei Technologies 'Co.,Ltd.
' Model: 'E3372h-320
' Revision: '10.0.5.1(H195SP3C983)
' IMEI: '862329049458888
' +GCAP: '+CGSM,+DS,+ES
' '
'
+ DEV2='ati Manufacturer: Huawei Technologies Co.,Ltd. Model: E3372h-320 Revision: 10.0.5.1(H195SP3C983) IMEI: 862329049458888 +GCAP: +CGSM,+DS,+ES'
+ + + awk -F 'Manufacturer:|Revision:' '{print $2}'
echo ati Manufacturer:xargs Huawei Technologies
 Co.,Ltd. Model: E3372h-320 Revision: '10.0.5.1(H195SP3C983)' IMEI: 862329049458888 +GCAP: +CGSM,+DS,+ES
+ MODELB='Huawei Technologies Co.,Ltd. Model: E3372h-320'
+ + + sed s/Model://
echo Huawei Technologies Co.,Ltd. Model:xargs E3372h-320

+ MODELC='Huawei Technologies Co.,Ltd. E3372h-320'
+ + awk '{print toupper(substr($0,0,1))tolower(substr($0,2))}'
echo Huawei Technologies Co.,Ltd. E3372h-320
+ MODEL='Huawei technologies co.,ltd. e3372h-320'
+ + + awk -F 'Revision:|IMEI' '{print $2}'
echoxargs
 ati Manufacturer: Huawei Technologies Co.,Ltd. Model: E3372h-320 Revision: '10.0.5.1(H195SP3C983)' IMEI: 862329049458888 +GCAP: +CGSM,+DS,+ES
+ FW='10.0.5.1(H195SP3C983)'
+ cat /sys/kernel/debug/usb/devices
+ PV='
T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480  MxCh= 1
B:  Alloc=  1/800 us ( 0%), #Int=  1, #Iso=  0
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=1d6b ProdID=0002 Rev= 5.04
S:  Manufacturer=Linux 5.4.143 ehci_hcd
S:  Product=EHCI Host Controller
S:  SerialNumber=1b000000.usb
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   4 Ivl=256ms

T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  3 Spd=480  MxCh= 0
D:  Ver= 2.00 Cls=02(comm.) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=12d1 ProdID=155e Rev= 1.02
S:  Manufacturer=HUAWEI_MOBILE
S:  Product=HUAWEI_MOBILE
C:* #Ifs= 5 Cfg#= 1 Atr=80 MxPwr=  2mA
A:  FirstIf#= 3 IfCount= 2 Cls=02(comm.) Sub=0d Prot=00
I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
E:  Ad=83(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
E:  Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
E:  Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 3 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=0d Prot=00 Driver=cdc_ncm
E:  Ad=87(I) Atr=03(Int.) MxPS=  16 Ivl=2ms
I:  If#= 4 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=01 Driver=cdc_ncm
I:* If#= 4 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=01 Driver=cdc_ncm
E:  Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms'
+ + + awk -F 'Vendor=12d1 ProdID=155e' '{print $2}'
cut -c-1104
echo T: 'Bus=01' 'Lev=00' 'Prnt=00' 'Port=00' 'Cnt=00' 'Dev#=' 1 'Spd=480' 'MxCh=' 1 B: 'Alloc=' 1/800 us '(' '0%),' '#Int=' 1, '#Iso=' 0 D: 'Ver=' 2.00 'Cls=09(hub' ')' 'Sub=00' 'Prot=01' 'MxPS=64' '#Cfgs=' 1 P: 'Vendor=1d6b' 'ProdID=0002' 'Rev=' 5.04 S: 'Manufacturer=Linux' 5.4.143 ehci_hcd S: 'Product=EHCI' Host Controller S: 'SerialNumber=1b000000.usb' 'C:*' '#Ifs=' 1 'Cfg#=' 1 'Atr=e0' 'MxPwr=' 0mA 'I:*' 'If#=' 0 'Alt=' 0 '#EPs=' 1 'Cls=09(hub' ')' 'Sub=00' 'Prot=00' 'Driver=hub' E: 'Ad=81(I)' 'Atr=03(Int.)' 'MxPS=' 4 'Ivl=256ms' T: 'Bus=01' 'Lev=01' 'Prnt=01' 'Port=00' 'Cnt=01' 'Dev#=' 3 'Spd=480' 'MxCh=' 0 D: 'Ver=' 2.00 'Cls=02(comm.)' 'Sub=00' 'Prot=00' 'MxPS=64' '#Cfgs=' 1 P: 'Vendor=12d1' 'ProdID=155e' 'Rev=' 1.02 S: 'Manufacturer=HUAWEI_MOBILE' S: 'Product=HUAWEI_MOBILE' 'C:*' '#Ifs=' 5 'Cfg#=' 1 'Atr=80' 'MxPwr=' 2mA A: 'FirstIf#=' 3 'IfCount=' 2 'Cls=02(comm.)' 'Sub=0d' 'Prot=00' 'I:*' 'If#=' 0 'Alt=' 0 '#EPs=' 3 'Cls=ff(vend.)' 'Sub=ff' 'Prot=ff' 'Driver=option' E: 'Ad=83(I)' 'Atr=03(Int.)' 'MxPS=' 10 'Ivl=32ms' E: 'Ad=82(I)' 'Atr=02(Bulk)' 'MxPS=' 512 'Ivl=0ms' E: 'Ad=02(O)' 'Atr=02(Bulk)' 'MxPS=' 512 'Ivl=0ms' 'I:*' 'If#=' 1 'Alt=' 0 '#EPs=' 2 'Cls=ff(vend.)' 'Sub=ff' 'Prot=ff' 'Driver=option' E: 'Ad=84(I)' 'Atr=02(Bulk)' 'MxPS=' 512 'Ivl=0ms' E: 'Ad=03(O)' 'Atr=02(Bulk)' 'MxPS=' 512 'Ivl=0ms' 'I:*' 'If#=' 2 'Alt=' 0 '#EPs=' 2 'Cls=ff(vend.)' 'Sub=ff' 'Prot=ff' 'Driver=option' E: 'Ad=85(I)' 'Atr=02(Bulk)' 'MxPS=' 512 'Ivl=0ms' E: 'Ad=04(O)' 'Atr=02(Bulk)' 'MxPS=' 512 'Ivl=0ms' 'I:*' 'If#=' 3 'Alt=' 0 '#EPs=' 1 'Cls=02(comm.)' 'Sub=0d' 'Prot=00' 'Driver=cdc_ncm' E: 'Ad=87(I)' 'Atr=03(Int.)' 'MxPS=' 16 'Ivl=2ms' I: 'If#=' 4 'Alt=' 0 '#EPs=' 0 'Cls=0a(data' ')' 'Sub=00' 'Prot=01' 'Driver=cdc_ncm' 'I:*' 'If#=' 4 'Alt=' 1 '#EPs=' 2 'Cls=0a(data' ')' 'Sub=00' 'Prot=01' 'Driver=cdc_ncm' E: 'Ad=86(I)' 'Atr=02(Bulk)' 'MxPS=' 512 'Ivl=0ms' E: 'Ad=05(O)' 'Atr=02(Bulk)' 'MxPS=' 512 'Ivl=0ms'
+ PVCUT=' Rev= 1.02 S: Manufacturer=HUAWEI_MOBILE S: Product=HUAWEI_MOBILE C:* #Ifs= 5 Cfg#= 1 Atr=80 MxPwr= 2mA A: FirstIf#= 3 IfCount= 2 Cls=02(comm.) Sub=0d Prot=00 I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=83(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 3 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=0d Prot=00 Driver=cdc_ncm E: Ad=87(I) Atr=03(Int.) MxPS= 16 Ivl=2ms I: If#= 4 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=01 Driver=cdc_ncm I:* If#= 4 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=01 Driver=cdc_ncm E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms'
+ + grep -q 'Driver=qmi_wwan'
echo ' Rev= 1.02 S: Manufacturer=HUAWEI_MOBILE S: Product=HUAWEI_MOBILE C:* #Ifs= 5 Cfg#= 1 Atr=80 MxPwr= 2mA A: FirstIf#= 3 IfCount= 2 Cls=02(comm.) Sub=0d Prot=00 I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=83(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 3 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=0d Prot=00 Driver=cdc_ncm E: Ad=87(I) Atr=03(Int.) MxPS= 16 Ivl=2ms I: If#= 4 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=01 Driver=cdc_ncm I:* If#= 4 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=01 Driver=cdc_ncm E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms'
+ + grep -q 'Driver=cdc_mbim'
echo ' Rev= 1.02 S: Manufacturer=HUAWEI_MOBILE S: Product=HUAWEI_MOBILE C:* #Ifs= 5 Cfg#= 1 Atr=80 MxPwr= 2mA A: FirstIf#= 3 IfCount= 2 Cls=02(comm.) Sub=0d Prot=00 I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=83(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 3 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=0d Prot=00 Driver=cdc_ncm E: Ad=87(I) Atr=03(Int.) MxPS= 16 Ivl=2ms I: If#= 4 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=01 Driver=cdc_ncm I:* If#= 4 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=01 Driver=cdc_ncm E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms'
+ grep -q 'Driver=cdc_ether'
+ echo ' Rev= 1.02 S: Manufacturer=HUAWEI_MOBILE S: Product=HUAWEI_MOBILE C:* #Ifs= 5 Cfg#= 1 Atr=80 MxPwr= 2mA A: FirstIf#= 3 IfCount= 2 Cls=02(comm.) Sub=0d Prot=00 I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=83(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 3 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=0d Prot=00 Driver=cdc_ncm E: Ad=87(I) Atr=03(Int.) MxPS= 16 Ivl=2ms I: If#= 4 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=01 Driver=cdc_ncm I:* If#= 4 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=01 Driver=cdc_ncm E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms'
+ grep -q cdc_ncm
+ echo ' Rev= 1.02 S: Manufacturer=HUAWEI_MOBILE S: Product=HUAWEI_MOBILE C:* #Ifs= 5 Cfg#= 1 Atr=80 MxPwr= 2mA A: FirstIf#= 3 IfCount= 2 Cls=02(comm.) Sub=0d Prot=00 I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=83(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 3 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=0d Prot=00 Driver=cdc_ncm E: Ad=87(I) Atr=03(Int.) MxPS= 16 Ivl=2ms I: If#= 4 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=01 Driver=cdc_ncm I:* If#= 4 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=01 Driver=cdc_ncm E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms'
+ PROTO=ncm
+ + xargs
sms_tool -d /dev/ttyUSB2 at AT+GSN
+ OI='AT+GSN 862329049458888'
+ + sed+  s/AT+GSN//g
echo 'AT+GSN 862329049458888'
xargs
+ NR_I=862329049458888
+ '[' -n NR_I ]
+ NR_IMEI=862329049458888
+ + xargs
sms_tool -d /dev/ttyUSB2 at AT+CIMI
+ OC='AT+CIMI 257027017048705'
+ + + sed s/AT+CIMI//g
echo 'AT+CIMI 257027017048705'
xargs
+ NR_C=257027017048705
+ '[' -n 257027017048705 ]
+ NR_IMSI=257027017048705
+ + + echo 'at^chiptemp?;^hcsq?;^iccid?

^CHIPTEMP: 391,391,65535,31,65535

^HCSQ:"WCDMA",44,35,47

^ICCID: 89375027010070487051

'
xargsawk -F
 '[:]' '/^\^ICCID: /{print $2}'
+ NR_D=89375027010070487051
+ '[' -n 89375027010070487051 ]
+ NR_ICCID=89375027010070487051
+ sms_tool -d /dev/ttyUSB2 at 'at^hfreqinfo?'
+ XFR='at^hfreqinfo?

'
+ + wc -c
echo -n 'at^hfreqinfo?

'
+ XFRCOUNT=16
+ '[' -n 'at^hfreqinfo?

' ]
+ '[' -n 16 ]
+ '[' 16 -gt 15 ]
+ + + xargsawk
 -Fecho 'at^hfreqinfo?

' '[:]'
 '/^\^HFREQINFO:/{print $2}'
+ TBX=
+ + cut -d , -f3-3
echo 
+ TB=
+ + cut -decho ,  -f6-6

+ TDL=
/usr/share/3ginfo-lite/3ginfo.sh: /usr/share/3ginfo-lite/modem/usb/12d1155e: line 96: arithmetic syntax error
<!-- gh-comment-id:2906476162 --> @ZAV-8 commented on GitHub (May 24, 2025): My report after replace 12d1155e. Modem in LTE mode /usr/share/3ginfo-lite/3ginfo.sh: /usr/share/3ginfo-lite/modem/usb/12d1155e: line 115: syntax error: unexpected "fi" I deleted string 115 "fi" from fle and script started. Modem in UMTS mode /usr/share/3ginfo-lite/modem/usb/12d1155e: line 96: arithmetic syntax error Debug info: ``` + RES=/usr/share/3ginfo-lite + /usr/share/3ginfo-lite/detect.sh + DEVICE=/dev/ttyUSB2 + '[' -z /dev/ttyUSB2 ] + O= + '[' -e /usr/bin/sms_tool ] + sms_tool -D -d /dev/ttyUSB2 at 'AT+CPIN?;+CSQ;+COPS=3,0;+COPS?;+COPS=3,2;+COPS?;+CREG=2;+CREG?' + O='AT+CPIN?;+CSQ;+COPS=3,0;+COPS?;+COPS=3,2;+COPS?;+CREG=2;+CREG? +CPIN: READY +CSQ: 13,0 +COPS: 0,0,"MTS BY",2 +COPS: 0,2,"25702",2 +CREG: 2,1,"00D3","00D09A81",6 OK ' + CONFIG=modemdefine + + + grepuci -o '@modemdefine\[[0-9]*\]\.modem' show modemdefine + wc -l xargs + MODEMZ=0 + '[[' 0 -gt 1 ]] + '[[' 0 -eq 0 ]] + uci -q get '3ginfo.@3ginfo[0].network' + SEC=modemwan + '[[' 0 -eq 1 ]] + '[' -z modemwan ] + CONN_TIME=- + RX=- + TX=- + + grep '"up": true' ifstatus modemwan + NETUP=' "up": true,' + '[' -n ' "up": true,' ] + uci -q -P /var/state/ get network.modemwan.connect_time + CT= + '[' -z ] + + + ifstatusxargs modemwan awk '-F[:,]' '/uptime/ {print $2}' + CT=217 + '[' '!' -z 217 ] + expr 217 / 60 / 60 / 24 + D=0 + expr 217 / 60 / 60 '%' 24 + H=0 + expr 217 / 60 '%' 60 + M=3 + expr 217 '%' 60 + S=37 + printf '%dd, %02d:%02d:%02d' 0 0 3 37 + CONN_TIME='0d, 00:03:37' + date '+%s' + date '+%Y%m%d%H%M%S' -d @1748065850 + CONN_TIME_SINCE=20250524055050 + + awk '-F"'ifstatus '/l3_device/ {print $4}' modemwan + IFACE=wwan0 + '[' -n wwan0 ] + + ifconfig wwan0 awk '-F[()]' '/bytes/ {printf "%s",$2}' + RX='14.0 MiB' + + ifconfig wwan0 awk '-F[()]' '/bytes/ {printf "%s",$4}' + TX='1.6 MiB' + + echo 'AT+CPIN?;+CSQ;+COPS=3,0;+COPS?;+COPS=3,2;+COPS?;+CREG=2;+CREG? +CPIN: READY +CSQ: 13,0 +COPS: 0,0,"MTS BY",2 +COPS: 0,2,"25702",2 +CREG: 2,1,"00D3","00D09A81",6 OK ' awk '-F[, ]' '/^\+CSQ/ {print $2}' + CSQ=13 + '[' x13 '==' x ] + '[' 13 -ge 0 -a 13 -le 31 ] + CSQ_PER=41 + COPS= + COPS_MCC= + COPS_MNC= + + echo 'AT+CPIN?;+CSQ;+COPS=3,0;+COPS?;+COPS=3,2;+COPS?;+CREG=2;+CREG? +CPIN: READY +CSQ: 13,0 +COPS: 0,0,"MTS BY",2 +COPS: 0,2,"25702",2 +CREG: 2,1,"00D3","00D09A81",6 OK ' awk '-F["]' '/^\+COPS:\s*.,2/ {print $2}' + COPS_NUM=25702 + '[' -n 25702 ] + COPS_MCC=257 + COPS_MNC=02 + + echo 'AT+CPIN?;+CSQ;+COPS=3,0;+COPS?;+COPS=3,2;+COPS?;+CREG=2;+CREG? +CPIN: READY +CSQ: 13,0 +COPS: 0,0,"MTS BY",2 +COPS: 0,2,"25702",2 +CREG: 2,1,"00D3","00D09A81",6 OK ' awk '-F["]' '/^\+COPS:\s*.,0/ {print $2}' + TCOPS='MTS BY' + '[' 'xMTS BY' '!=' x ] + COPS='MTS BY' + '[' -z 'MTS BY' ] + '[' -z 'MTS BY' ] + + awk '{if(NF==2 && tolower($1)==tolower($2)){print $1}else{print $0}}' echo 'MTS BY' + COPS='MTS BY' + + + sed+ -nsms_tool 2p -d /dev/ttyUSB2cut at -d 'AT+COPS?' '"' -f2 tr -d '\r' + isp= + isp_num='257 02' + isp_numws=25702 + LOCATIONFILE=/tmp/location + '[' -e /tmp/location ] + touch /tmp/location + cat /tmp/location + LOC=Belarus + '[' -n Belarus ] + cat /tmp/location + LOC=Belarus + '[[' Belarus '==' - ]] + awk '-F[;]' '/^25702;/ {print $2}' /usr/share/3ginfo-lite/mccmnc.dat + LOC=Belarus + '[' -n Belarus ] + echo Belarus + + + echo 'AT+CPIN?;+CSQ;+COPS=3,0;+COPS?;+COPS=3,2;+COPS?;+CREG=2;+CREG? +CPIN: READY +CSQ: 13,0 +COPS: 0,0,"MTS BY",2 +COPS: 0,2,"25702",2 +CREG: 2,1,"00D3","00D09A81",6 OK 'xargs awk '-F[, ]' '/^\+CPIN:/ {print $0;exit}' + T='+CPIN: READY' + '[' -n '+CPIN: READY' ] + '[' '+CPIN: READY' '==' '+CPIN: READY' ] + + echo 'AT+CPIN?;+CSQ;+COPS=3,0;+COPS?;+COPS=3,2;+COPS?;+CREG=2;+CREG? +CPIN: READY +CSQ: 13,0 +COPS: 0,0,"MTS BY",2 +COPS: 0,2,"25702",2 +CREG: 2,1,"00D3","00D09A81",6 OK ' awk '-F[, ]' '/^\+CME ERROR:/ {print $0;exit}' + T= + '[' -n ] + + echo 'AT+CPIN?;+CSQ;+COPS=3,0;+COPS?;+COPS=3,2;+COPS?;+CREG=2;+CREG? +CPIN: READY +CSQ: 13,0 +COPS: 0,0,"MTS BY",2 +COPS: 0,2,"25702",2 +CREG: 2,1,"00D3","00D09A81",6 OK ' busybox awk '-F[,]' '/^\+CREG/ {gsub(/[[:space:]"]+/,"");printf "T=\"%d\";LAC_HEX=\"%X\";CID_HEX=\"%X\";LAC_DEC=\"%d\";CID_DEC=\"%d\";MODE_NUM=\"%d\"", $2, "0x"$3, "0x"$4, "0x"$3, "0x"$4, $5}' + eval 'T="1";LAC_HEX="D3";CID_HEX="D09A81";LAC_DEC="211";CID_DEC="13671041";MODE_NUM="6"' + T=1 + LAC_HEX=D3 + CID_HEX=D09A81 + LAC_DEC=211 + CID_DEC=13671041 + MODE_NUM=6 + REG=1 + '[' -z 6 ] + '[' x6 '==' x0 ] + MODE=HSPA + sms_tool -d /dev/ttyUSB2 at at+cereg + OTX='at+cereg ' + + + echo 'at+cereg 'sed 's/[^A-F0-9]//g' awk '-F[,]' '/^\+CEREG/ {printf "%s", toupper($3)}' + TAC= + '[' x '!=' x ] + TAC=- + TAC_HEX=- + uci -q get '3ginfo.@3ginfo[0].device' + CONF_DEVICE=/dev/ttyUSB2 + + grep -q 192.168. echo x/dev/ttyUSB2 + '[' -e /usr/bin/sms_tool ] + REGOK=0 + '[' x1 '==' x1 ] + REGOK=1 + getdevicevendorproduct /dev/ttyUSB2 + basename /dev/ttyUSB2 + devname=ttyUSB2 + readlink -f /sys/class/tty/ttyUSB2/device + devpath=/sys/devices/platform/ahb/1b000000.usb/usb1/1-1/1-1:1.2/ttyUSB2 + T=/sys/devices/platform/ahb/1b000000.usb/usb1/1-1 + cat /sys/devices/platform/ahb/1b000000.usb/usb1/1-1/idVendor + cat /sys/devices/platform/ahb/1b000000.usb/usb1/1-1/idProduct + echo usb/12d1155e + VIDPID=usb/12d1155e + '[' -e /usr/share/3ginfo-lite/modem/usb/12d1155e ] + cat /tmp/sysinfo/board_name + . /usr/share/3ginfo-lite/modem/usb/12d1155e + sms_tool -d /dev/ttyUSB2 at 'at^chiptemp?;^hcsq?;^iccid?' + O='at^chiptemp?;^hcsq?;^iccid? ^CHIPTEMP: 391,391,65535,31,65535 ^HCSQ:"WCDMA",44,35,47 ^ICCID: 89375027010070487051 ' + + + echo 'at^chiptemp?;^hcsq?;^iccid? ^CHIPTEMP: 391,391,65535,31,65535 ^HCSQ:"WCDMA",44,35,47 ^ICCID: 89375027010070487051 ' awk '-F[,:]' '/^\^HCSQ:/ {print $2}' xargs + T=WCDMA + '[' -n WCDMA ] + MODE=WCDMA + + + echo 'at^chiptemp?;^hcsq?;^iccid? ^CHIPTEMP: 391,391,65535,31,65535 ^HCSQ:"WCDMA",44,35,47 ^ICCID: 89375027010070487051 ' xargs awk '-F[,:]' '/^\^HCSQ:/ {print $4}' + PARAM2=35 + + + echo 'at^chiptemp?;^hcsq?;^iccid? ^CHIPTEMP: 391,391,65535,31,65535 ^HCSQ:"WCDMA",44,35,47 ^ICCID: 89375027010070487051 ' xargsawk '-F[,:]' '/^\^HCSQ:/ {print $5}' + PARAM3=47 + awk 'BEGIN {print -121 + 35}' + RSCP=-86 + awk 'BEGIN {print -32.5 + 47/2}' + ECIO=-9 + sms_tool -d /dev/ttyUSB2 at ati + OF='ati Manufacturer: Huawei Technologies Co.,Ltd. Model: E3372h-320 Revision: 10.0.5.1(H195SP3C983) IMEI: 862329049458888 +GCAP: +CGSM,+DS,+ES ' + + + tr -s '\n' echo 'ati 'xargs ' ' Manufacturer: Huawei Technologies 'Co.,Ltd. ' Model: 'E3372h-320 ' Revision: '10.0.5.1(H195SP3C983) ' IMEI: '862329049458888 ' +GCAP: '+CGSM,+DS,+ES ' ' ' + DEV2='ati Manufacturer: Huawei Technologies Co.,Ltd. Model: E3372h-320 Revision: 10.0.5.1(H195SP3C983) IMEI: 862329049458888 +GCAP: +CGSM,+DS,+ES' + + + awk -F 'Manufacturer:|Revision:' '{print $2}' echo ati Manufacturer:xargs Huawei Technologies Co.,Ltd. Model: E3372h-320 Revision: '10.0.5.1(H195SP3C983)' IMEI: 862329049458888 +GCAP: +CGSM,+DS,+ES + MODELB='Huawei Technologies Co.,Ltd. Model: E3372h-320' + + + sed s/Model:// echo Huawei Technologies Co.,Ltd. Model:xargs E3372h-320 + MODELC='Huawei Technologies Co.,Ltd. E3372h-320' + + awk '{print toupper(substr($0,0,1))tolower(substr($0,2))}' echo Huawei Technologies Co.,Ltd. E3372h-320 + MODEL='Huawei technologies co.,ltd. e3372h-320' + + + awk -F 'Revision:|IMEI' '{print $2}' echoxargs ati Manufacturer: Huawei Technologies Co.,Ltd. Model: E3372h-320 Revision: '10.0.5.1(H195SP3C983)' IMEI: 862329049458888 +GCAP: +CGSM,+DS,+ES + FW='10.0.5.1(H195SP3C983)' + cat /sys/kernel/debug/usb/devices + PV=' T: Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=480 MxCh= 1 B: Alloc= 1/800 us ( 0%), #Int= 1, #Iso= 0 D: Ver= 2.00 Cls=09(hub ) Sub=00 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=1d6b ProdID=0002 Rev= 5.04 S: Manufacturer=Linux 5.4.143 ehci_hcd S: Product=EHCI Host Controller S: SerialNumber=1b000000.usb C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr= 0mA I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub E: Ad=81(I) Atr=03(Int.) MxPS= 4 Ivl=256ms T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 3 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=02(comm.) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=12d1 ProdID=155e Rev= 1.02 S: Manufacturer=HUAWEI_MOBILE S: Product=HUAWEI_MOBILE C:* #Ifs= 5 Cfg#= 1 Atr=80 MxPwr= 2mA A: FirstIf#= 3 IfCount= 2 Cls=02(comm.) Sub=0d Prot=00 I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=83(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 3 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=0d Prot=00 Driver=cdc_ncm E: Ad=87(I) Atr=03(Int.) MxPS= 16 Ivl=2ms I: If#= 4 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=01 Driver=cdc_ncm I:* If#= 4 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=01 Driver=cdc_ncm E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms' + + + awk -F 'Vendor=12d1 ProdID=155e' '{print $2}' cut -c-1104 echo T: 'Bus=01' 'Lev=00' 'Prnt=00' 'Port=00' 'Cnt=00' 'Dev#=' 1 'Spd=480' 'MxCh=' 1 B: 'Alloc=' 1/800 us '(' '0%),' '#Int=' 1, '#Iso=' 0 D: 'Ver=' 2.00 'Cls=09(hub' ')' 'Sub=00' 'Prot=01' 'MxPS=64' '#Cfgs=' 1 P: 'Vendor=1d6b' 'ProdID=0002' 'Rev=' 5.04 S: 'Manufacturer=Linux' 5.4.143 ehci_hcd S: 'Product=EHCI' Host Controller S: 'SerialNumber=1b000000.usb' 'C:*' '#Ifs=' 1 'Cfg#=' 1 'Atr=e0' 'MxPwr=' 0mA 'I:*' 'If#=' 0 'Alt=' 0 '#EPs=' 1 'Cls=09(hub' ')' 'Sub=00' 'Prot=00' 'Driver=hub' E: 'Ad=81(I)' 'Atr=03(Int.)' 'MxPS=' 4 'Ivl=256ms' T: 'Bus=01' 'Lev=01' 'Prnt=01' 'Port=00' 'Cnt=01' 'Dev#=' 3 'Spd=480' 'MxCh=' 0 D: 'Ver=' 2.00 'Cls=02(comm.)' 'Sub=00' 'Prot=00' 'MxPS=64' '#Cfgs=' 1 P: 'Vendor=12d1' 'ProdID=155e' 'Rev=' 1.02 S: 'Manufacturer=HUAWEI_MOBILE' S: 'Product=HUAWEI_MOBILE' 'C:*' '#Ifs=' 5 'Cfg#=' 1 'Atr=80' 'MxPwr=' 2mA A: 'FirstIf#=' 3 'IfCount=' 2 'Cls=02(comm.)' 'Sub=0d' 'Prot=00' 'I:*' 'If#=' 0 'Alt=' 0 '#EPs=' 3 'Cls=ff(vend.)' 'Sub=ff' 'Prot=ff' 'Driver=option' E: 'Ad=83(I)' 'Atr=03(Int.)' 'MxPS=' 10 'Ivl=32ms' E: 'Ad=82(I)' 'Atr=02(Bulk)' 'MxPS=' 512 'Ivl=0ms' E: 'Ad=02(O)' 'Atr=02(Bulk)' 'MxPS=' 512 'Ivl=0ms' 'I:*' 'If#=' 1 'Alt=' 0 '#EPs=' 2 'Cls=ff(vend.)' 'Sub=ff' 'Prot=ff' 'Driver=option' E: 'Ad=84(I)' 'Atr=02(Bulk)' 'MxPS=' 512 'Ivl=0ms' E: 'Ad=03(O)' 'Atr=02(Bulk)' 'MxPS=' 512 'Ivl=0ms' 'I:*' 'If#=' 2 'Alt=' 0 '#EPs=' 2 'Cls=ff(vend.)' 'Sub=ff' 'Prot=ff' 'Driver=option' E: 'Ad=85(I)' 'Atr=02(Bulk)' 'MxPS=' 512 'Ivl=0ms' E: 'Ad=04(O)' 'Atr=02(Bulk)' 'MxPS=' 512 'Ivl=0ms' 'I:*' 'If#=' 3 'Alt=' 0 '#EPs=' 1 'Cls=02(comm.)' 'Sub=0d' 'Prot=00' 'Driver=cdc_ncm' E: 'Ad=87(I)' 'Atr=03(Int.)' 'MxPS=' 16 'Ivl=2ms' I: 'If#=' 4 'Alt=' 0 '#EPs=' 0 'Cls=0a(data' ')' 'Sub=00' 'Prot=01' 'Driver=cdc_ncm' 'I:*' 'If#=' 4 'Alt=' 1 '#EPs=' 2 'Cls=0a(data' ')' 'Sub=00' 'Prot=01' 'Driver=cdc_ncm' E: 'Ad=86(I)' 'Atr=02(Bulk)' 'MxPS=' 512 'Ivl=0ms' E: 'Ad=05(O)' 'Atr=02(Bulk)' 'MxPS=' 512 'Ivl=0ms' + PVCUT=' Rev= 1.02 S: Manufacturer=HUAWEI_MOBILE S: Product=HUAWEI_MOBILE C:* #Ifs= 5 Cfg#= 1 Atr=80 MxPwr= 2mA A: FirstIf#= 3 IfCount= 2 Cls=02(comm.) Sub=0d Prot=00 I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=83(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 3 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=0d Prot=00 Driver=cdc_ncm E: Ad=87(I) Atr=03(Int.) MxPS= 16 Ivl=2ms I: If#= 4 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=01 Driver=cdc_ncm I:* If#= 4 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=01 Driver=cdc_ncm E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms' + + grep -q 'Driver=qmi_wwan' echo ' Rev= 1.02 S: Manufacturer=HUAWEI_MOBILE S: Product=HUAWEI_MOBILE C:* #Ifs= 5 Cfg#= 1 Atr=80 MxPwr= 2mA A: FirstIf#= 3 IfCount= 2 Cls=02(comm.) Sub=0d Prot=00 I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=83(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 3 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=0d Prot=00 Driver=cdc_ncm E: Ad=87(I) Atr=03(Int.) MxPS= 16 Ivl=2ms I: If#= 4 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=01 Driver=cdc_ncm I:* If#= 4 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=01 Driver=cdc_ncm E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms' + + grep -q 'Driver=cdc_mbim' echo ' Rev= 1.02 S: Manufacturer=HUAWEI_MOBILE S: Product=HUAWEI_MOBILE C:* #Ifs= 5 Cfg#= 1 Atr=80 MxPwr= 2mA A: FirstIf#= 3 IfCount= 2 Cls=02(comm.) Sub=0d Prot=00 I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=83(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 3 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=0d Prot=00 Driver=cdc_ncm E: Ad=87(I) Atr=03(Int.) MxPS= 16 Ivl=2ms I: If#= 4 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=01 Driver=cdc_ncm I:* If#= 4 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=01 Driver=cdc_ncm E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms' + grep -q 'Driver=cdc_ether' + echo ' Rev= 1.02 S: Manufacturer=HUAWEI_MOBILE S: Product=HUAWEI_MOBILE C:* #Ifs= 5 Cfg#= 1 Atr=80 MxPwr= 2mA A: FirstIf#= 3 IfCount= 2 Cls=02(comm.) Sub=0d Prot=00 I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=83(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 3 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=0d Prot=00 Driver=cdc_ncm E: Ad=87(I) Atr=03(Int.) MxPS= 16 Ivl=2ms I: If#= 4 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=01 Driver=cdc_ncm I:* If#= 4 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=01 Driver=cdc_ncm E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms' + grep -q cdc_ncm + echo ' Rev= 1.02 S: Manufacturer=HUAWEI_MOBILE S: Product=HUAWEI_MOBILE C:* #Ifs= 5 Cfg#= 1 Atr=80 MxPwr= 2mA A: FirstIf#= 3 IfCount= 2 Cls=02(comm.) Sub=0d Prot=00 I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=83(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 3 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=0d Prot=00 Driver=cdc_ncm E: Ad=87(I) Atr=03(Int.) MxPS= 16 Ivl=2ms I: If#= 4 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=01 Driver=cdc_ncm I:* If#= 4 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=01 Driver=cdc_ncm E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms' + PROTO=ncm + + xargs sms_tool -d /dev/ttyUSB2 at AT+GSN + OI='AT+GSN 862329049458888' + + sed+ s/AT+GSN//g echo 'AT+GSN 862329049458888' xargs + NR_I=862329049458888 + '[' -n NR_I ] + NR_IMEI=862329049458888 + + xargs sms_tool -d /dev/ttyUSB2 at AT+CIMI + OC='AT+CIMI 257027017048705' + + + sed s/AT+CIMI//g echo 'AT+CIMI 257027017048705' xargs + NR_C=257027017048705 + '[' -n 257027017048705 ] + NR_IMSI=257027017048705 + + + echo 'at^chiptemp?;^hcsq?;^iccid? ^CHIPTEMP: 391,391,65535,31,65535 ^HCSQ:"WCDMA",44,35,47 ^ICCID: 89375027010070487051 ' xargsawk -F '[:]' '/^\^ICCID: /{print $2}' + NR_D=89375027010070487051 + '[' -n 89375027010070487051 ] + NR_ICCID=89375027010070487051 + sms_tool -d /dev/ttyUSB2 at 'at^hfreqinfo?' + XFR='at^hfreqinfo? ' + + wc -c echo -n 'at^hfreqinfo? ' + XFRCOUNT=16 + '[' -n 'at^hfreqinfo? ' ] + '[' -n 16 ] + '[' 16 -gt 15 ] + + + xargsawk -Fecho 'at^hfreqinfo? ' '[:]' '/^\^HFREQINFO:/{print $2}' + TBX= + + cut -d , -f3-3 echo + TB= + + cut -decho , -f6-6 + TDL= /usr/share/3ginfo-lite/3ginfo.sh: /usr/share/3ginfo-lite/modem/usb/12d1155e: line 96: arithmetic syntax error ```
Author
Owner

@ZAV-8 commented on GitHub (May 24, 2025):

I think script can't get value DL, UL (and also BAND) in UMTS mode.
I replaced it on integer and script started (these and signal quality values are absent)

Image

result

Image

thank you for attention

<!-- gh-comment-id:2906494763 --> @ZAV-8 commented on GitHub (May 24, 2025): I think script can't get value DL, UL (and also BAND) in UMTS mode. I replaced it on integer and script started (these and signal quality values are absent) ![Image](https://github.com/user-attachments/assets/5daa1711-70ba-454f-9eef-87a4f50ca575) result ![Image](https://github.com/user-attachments/assets/7fa6cb21-b826-4418-ae50-f68d8d800566) thank you for attention
Author
Owner

@4IceG commented on GitHub (May 24, 2025):

Script needs fixing, because for WCDMA the modem does not return much of the data required by LuCI. I will look at it later.

<!-- gh-comment-id:2906557170 --> @4IceG commented on GitHub (May 24, 2025): Script needs fixing, because for WCDMA the modem does not return much of the data required by LuCI. I will look at it later.
Author
Owner

@4IceG commented on GitHub (May 24, 2025):

Replace files:

/www/luci-static/resources/view/modem/3gdetail.js
/usr/share/3ginfo-lite/modem/usb/12d1155e
/usr/share/3ginfo-lite/3ginfo.sh

test.zip

Clear browser cache and check if it will be OK.

<!-- gh-comment-id:2906848573 --> @4IceG commented on GitHub (May 24, 2025): Replace files: ``` /www/luci-static/resources/view/modem/3gdetail.js /usr/share/3ginfo-lite/modem/usb/12d1155e /usr/share/3ginfo-lite/3ginfo.sh ``` [test.zip](https://github.com/user-attachments/files/20426517/test.zip) Clear browser cache and check if it will be OK.
Author
Owner

@ZAV-8 commented on GitHub (May 29, 2025):

I tested it. Script work but signal indicators are empty.

Image
Image

<!-- gh-comment-id:2919820433 --> @ZAV-8 commented on GitHub (May 29, 2025): I tested it. Script work but signal indicators are empty. ![Image](https://github.com/user-attachments/assets/16e0640d-ca5d-4fa6-87f3-79642f77a4e6) ![Image](https://github.com/user-attachments/assets/27cd8497-2f30-445b-bcc6-a82096489b67)
Author
Owner

@4IceG commented on GitHub (May 29, 2025):

It is OK, it shows only what is available.

<!-- gh-comment-id:2919858813 --> @4IceG commented on GitHub (May 29, 2025): It is OK, it shows only what is available.
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/luci-app-3ginfo-lite#99
No description provided.