T: Bus=10 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 5 Spd=5000 MxCh= 0
D: Ver= 3.20 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 9 #Cfgs= 1
P: Vendor=2c7c ProdID=0800 Rev= 4.14
S: Manufacturer=Quectel
S: Product=RM500Q-GL
S: SerialNumber=85d4e215
C:* #Ifs= 6 Cfg#= 1 Atr=80 MxPwr=896mA
A: FirstIf#= 4 IfCount= 2 Cls=02(comm.) Sub=06 Prot=00
I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=option
E: Ad=81(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms
E: Ad=01(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms
I:* If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
E: Ad=83(I) Atr=03(Int.) MxPS= 10 Ivl=32ms
E: Ad=82(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms
E: Ad=02(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms
I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
E: Ad=85(I) Atr=03(Int.) MxPS= 10 Ivl=32ms
E: Ad=84(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms
E: Ad=03(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms
I:* If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
E: Ad=87(I) Atr=03(Int.) MxPS= 10 Ivl=32ms
E: Ad=86(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms
E: Ad=04(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms
I:* If#= 4 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=06 Prot=00 Driver=cdc_ether
E: Ad=88(I) Atr=03(Int.) MxPS= 16 Ivl=32ms
I: If#= 5 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_ether
I:* If#= 5 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_ether
E: Ad=8e(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms
E: Ad=0f(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms
root@OpenWrt-LTE-5G:/#
root@OpenWrt-LTE-5G:/#
root@OpenWrt-LTE-5G:/#
root@OpenWrt-LTE-5G:/#
root@OpenWrt-LTE-5G:/# sh -x /usr/share/3ginfo/infoparams.sh /dev/ttyUSB2
+ RES=/usr/share/3ginfo
+ 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: 31,99
+COPS: 0,0,"Cyfrowy Polsat",7
+COPS: 0,2,"26001",7
+CREG: 2,1,"12D15","330B68",7
'K
+ awk '-F[, ]' '/^\+(csq|CSQ)/ {print $2}'
+ echo 'AT+CPIN?;+CSQ;+COPS=3,0;+COPS?;+COPS=3,2;+COPS?;+CREG=2;+CREG?
+CPIN: READY
+CSQ: 31,99
+COPS: 0,0,"Cyfrowy Polsat",7
+COPS: 0,2,"26001",7
+CREG: 2,1,"12D15","330B68",7
'K
+ CSQ=31
+ '[' x31 '=' x ]
+ '[' 31 -ge 0 ]
+ '[' 31 -le 31 ]
+ CSQ_PER=100
+ COPS=
+ COPS_MCC=
+ COPS_MNC=
+ awk '-F["]' '/^\+COPS: .,2/ {print $2}'
+ echo 'AT+CPIN?;+CSQ;+COPS=3,0;+COPS?;+COPS=3,2;+COPS?;+CREG=2;+CREG?
+CPIN: READY
+CSQ: 31,99
+COPS: 0,0,"Cyfrowy Polsat",7
+COPS: 0,2,"26001",7
+CREG: 2,1,"12D15","330B68",7
'K
+ COPS_NUM=26001
+ '[' -n 26001 ]
+ COPS_MCC=260
+ COPS_MNC=01
+ '[' -z ]
+ awk '{if(NF==2 && $1==$2){print $1}else{print $0}}'
+ awk '-F["]' '/^\+COPS: .,0/ {print $2}'
+ echo 'AT+CPIN?;+CSQ;+COPS=3,0;+COPS?;+COPS=3,2;+COPS?;+CREG=2;+CREG?
+CPIN: READY
+CSQ: 31,99
+COPS: 0,0,"Cyfrowy Polsat",7
+COPS: 0,2,"26001",7
+CREG: 2,1,"12D15","330B68",7
'K
+ COPS='Cyfrowy Polsat'
+ '[' -z 'Cyfrowy Polsat' ]
+ 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}'+ echo 'AT+CPIN?;+CSQ;+COPS=3,0;+COPS?;+COPS=3,2;+COPS?;+CREG=2;+CREG?
+CPIN: READY
+CSQ: 31,99
+COPS: 0,0,"Cyfrowy Polsat",7
+COPS: 0,2,"26001",7
+CREG: 2,1,"12D15","330B68",7
'K
+ eval 'T="1";LAC_HEX="12D15";CID_HEX="330B68";LAC_DEC="77077";CID_DEC="3345256";MODE_NUM="7"'
+ T=1
+ LAC_HEX=12D15
+ CID_HEX=330B68
+ LAC_DEC=77077
+ CID_DEC=3345256
+ MODE_NUM=7
+ REG=1
+ '[' -z 7 ]
+ '[' x7 '=' x0 ]
+ MODE=LTE
+ awk '-F[, ]' '/^\+CME ERROR:/ {print $0;exit}'
+ echo 'AT+CPIN?;+CSQ;+COPS=3,0;+COPS?;+COPS=3,2;+COPS?;+CREG=2;+CREG?
+CPIN: READY
+CSQ: 31,99
+COPS: 0,0,"Cyfrowy Polsat",7
+COPS: 0,2,"26001",7
+CREG: 2,1,"12D15","330B68",7
'K
+ T=
+ '[' -n ]
+ xargs
+ awk '-F[, ]' '/^\+CPIN:/ {print $0;exit}'
+ echo 'AT+CPIN?;+CSQ;+COPS=3,0;+COPS?;+COPS=3,2;+COPS?;+CREG=2;+CREG?
+CPIN: READY
+CSQ: 31,99
+COPS: 0,0,"Cyfrowy Polsat",7
+COPS: 0,2,"26001",7
+CREG: 2,1,"12D15","330B68",7
'K
+ T='+CPIN: READY'
+ '[' -n '+CPIN: READY' ]
+ '[' '+CPIN: READY' '=' '+CPIN: READY' ]
+ '[' -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/pci0000:00/0000:00:1e.0/0000:05:02.0/0000:07:1b.0/usb10/10-1/10-1:1.2/ttyUSB2
+ T=/sys/devices/pci0000:00/0000:00:1e.0/0000:05:02.0/0000:07:1b.0/usb10/10-1
+ cat /sys/devices/pci0000:00/0000:00:1e.0/0000:05:02.0/0000:07:1b.0/usb10/10-1/idVendor
+ cat /sys/devices/pci0000:00/0000:00:1e.0/0000:05:02.0/0000:07:1b.0/usb10/10-1/idProduct
+ echo usb/2c7c0800
+ VIDPID=usb/2c7c0800
+ '[' -e /usr/share/3ginfo/addon/usb/2c7c0800 ]
+ ADDON=
+ cat /tmp/sysinfo/board_name
+ . /usr/share/3ginfo/addon/usb/2c7c0800
+ sms_tool -d /dev/ttyUSB2 at at+qtemp
+ O='at+qtemp
+QTEMP:"qfe_wtr_pa0","40"
+QTEMP:"qfe_wtr_pa1","38"
+QTEMP:"qfe_wtr_pa2","36"
+QTEMP:"qfe_wtr_pa3","-273"
+QTEMP:"aoss0-usr","39"
+QTEMP:"mdm-q6-usr","40"
+QTEMP:"ipa-usr","40"
+QTEMP:"cpu0-a7-usr","39"
+QTEMP:"mdm-5g-usr","40"
+QTEMP:"mdm-vpe-usr","40"
+QTEMP:"mdm-core-usr","39"
+QTEMP:"xo-therm-usr","39"
+QTEMP:"sdx-case-therm-usr","38"
'
+ xargs
+ head -n1
+ sort -r
+ awk '-F[,:]' '/^\+QTEMP/ {print $3}'
+ echo 'at+qtemp
+QTEMP:"qfe_wtr_pa0","40"
+QTEMP:"qfe_wtr_pa1","38"
+QTEMP:"qfe_wtr_pa2","36"
+QTEMP:"qfe_wtr_pa3","-273"
+QTEMP:"aoss0-usr","39"
+QTEMP:"mdm-q6-usr","40"
+QTEMP:"ipa-usr","40"
+QTEMP:"cpu0-a7-usr","39"
+QTEMP:"mdm-5g-usr","40"
+QTEMP:"mdm-vpe-usr","40"
+QTEMP:"mdm-core-usr","39"
+QTEMP:"xo-therm-usr","39"
+QTEMP:"sdx-case-therm-usr","38"
'
+ T=40
+ '[' -n 40 ]
+ addon 10 Temperature '40 °C'
+ '[' -n ]
+ ADDON='{"idx":10,"key":"Temperature","value":"40 °C"}'
+ '[' 1 '=' 0 ]
+ '[' x7 '=' x11 ]
+ '[' 1 '=' 1 ]
+ sms_tool -d /dev/ttyUSB2 at 'at+qnwinfo;+qcainfo;+qeng="servingcell";+qspn'
+ O='at+qnwinfo;+qcainfo;+qeng="servingcell";+qspn
+QNWINFO: "FDD LTE","26001","LTE BAND 3",1300
+QENG: "servingcell","NOCONN"
+QENG: "LTE","FDD",260,01,330B68,25,1300,3,5,5,12D15,-79,-12,-45,18,-
+QENG:"NR5G-NSA",260,01,452,-92,225,-11
+QSPN: "Cyfrowy Polsat","CP","",0,"26001"
'
+ xargs
+ awk '-F[,:]' '/^\+QSPN/ {print $2}'+ echo 'at+qnwinfo;+qcainfo;+qeng="servingcell";+qspn
+QNWINFO: "FDD LTE","26001","LTE BAND 3",1300
+QENG: "servingcell","NOCONN"
+QENG: "LTE","FDD",260,01,330B68,25,1300,3,5,5,12D15,-79,-12,-45,18,-
+QENG:"NR5G-NSA",260,01,452,-92,225,-11
+QSPN: "Cyfrowy Polsat","CP","",0,"26001"
'
+ T='Cyfrowy Polsat'
+ '[' -n 'Cyfrowy Polsat' ]
+ '[' -z ]
+ COPS='Cyfrowy Polsat'
+ grep -q -i '+QCAINFO.*SCC'
+ echo 'at+qnwinfo;+qcainfo;+qeng="servingcell";+qspn
+QNWINFO: "FDD LTE","26001","LTE BAND 3",1300
+QENG: "servingcell","NOCONN"
+QENG: "LTE","FDD",260,01,330B68,25,1300,3,5,5,12D15,-79,-12,-45,18,-
+QENG:"NR5G-NSA",260,01,452,-92,225,-11
+QSPN: "Cyfrowy Polsat","CP","",0,"26001"
'
+ awk '-F[,:]' '/^\+QCAINFO: "(pcc|PCC)"/{print $5}'
+ echo 'at+qnwinfo;+qcainfo;+qeng="servingcell";+qspn
+QNWINFO: "FDD LTE","26001","LTE BAND 3",1300
+QENG: "servingcell","NOCONN"
+QENG: "LTE","FDD",260,01,330B68,25,1300,3,5,5,12D15,-79,-12,-45,18,-
+QENG:"NR5G-NSA",260,01,452,-92,225,-11
+QSPN: "Cyfrowy Polsat","CP","",0,"26001"
'
+ T=
+ '[' -n ]
+ '[' x7 '=' x7 ]
+ xargs
+ awk '-F[,:]' '/^\+QENG:/ {print $4}'
+ echo 'at+qnwinfo;+qcainfo;+qeng="servingcell";+qspn
+QNWINFO: "FDD LTE","26001","LTE BAND 3",1300
+QENG: "servingcell","NOCONN"
+QENG: "LTE","FDD",260,01,330B68,25,1300,3,5,5,12D15,-79,-12,-45,18,-
+QENG:"NR5G-NSA",260,01,452,-92,225,-11
+QSPN: "Cyfrowy Polsat","CP","",0,"26001"
'
+ T='260 01'
+ '[' 'x260 01' '=' xLTE ]
+ '[' x7 '=' x11 ]
+ IFS='
'
+ '[' x7 '=' x13 ]
+ awk '-F[,:]' '/^\+QCAINFO: "(pcc|PCC)"/{print $5}'
+ echo 'at+qnwinfo;+qcainfo;+qeng="servingcell";+qspn
+QNWINFO: "FDD LTE","26001","LTE BAND 3",1300
+QENG: "servingcell","NOCONN"
+QENG: "LTE","FDD",260,01,330B68,25,1300,3,5,5,12D15,-79,-12,-45,18,-
+QENG:"NR5G-NSA",260,01,452,-92,225,-11
+QSPN: "Cyfrowy Polsat","CP","",0,"26001"
'
+ T=
+ '[' -n ]
+ cat
{
"csq":"31",
"signal":"100",
"operator_name":"Cyfrowy Polsat",
"operator_mcc":"260",
"operator_mnc":"01",
"mode":"LTE",
"registration":"1",
"lac_dec":"77077",
"lac_hex":"12D15",
"cid_dec":"3345256",
"cid_hex":"330B68",
"addon":[{"idx":10,"key":"Temperature","value":"40 °C"}]
}
+ exit 0
root@OpenWrt-LTE-5G:/#