luci-app-qmodem: fix: Foxconn set_imei
This commit is contained in:
parent
31665b7153
commit
fb90356b81
@ -163,7 +163,7 @@ check_dial_prepare()
|
||||
get_sim_status "$cpin"
|
||||
[ "$manufacturer" = "neoway" ] && {
|
||||
local res
|
||||
res=$(at $at_port 'AT$MYCCID' | grep -q "ERROR")
|
||||
res=$(at $at_port 'AT+SIMCROSS=1,1;$MYCCID' | grep -q "ERROR")
|
||||
if [ $? -ne 0 ]; then
|
||||
sim_state_code="1"
|
||||
else
|
||||
|
@ -39,6 +39,7 @@ function set_imei(){
|
||||
# 两位分组加逗号,并转小写
|
||||
formatted=$(echo "$swapped" | sed 's/../&,/g' | sed 's/,$//' | tr 'A-Z' 'a-z')
|
||||
|
||||
at $at_port $at_pre'nv=550,"0"'
|
||||
at_command=$at_pre'nv=550,9,"'$formatted'"'
|
||||
res=$(at $at_port "$at_command")
|
||||
json_select "result"
|
||||
|
@ -154,7 +154,7 @@ sim_info()
|
||||
#SIM Slot(SIM卡卡槽)
|
||||
at_command="AT+SIMCROSS?"
|
||||
sim_slot=$(at $at_port $at_command | grep "+SIMCROSS:" | awk -F'[ ,]' '{print $2}' | sed 's/\r//g')
|
||||
m_debug "SIM Slot: $sim_slot"
|
||||
# m_debug "SIM Slot: $sim_slot"
|
||||
#IMEI(国际移动设备识别码)
|
||||
at_command="AT+CGSN"
|
||||
imei=$(at $at_port $at_command | sed -n '3p' | awk -F'"' '{print $2}')
|
||||
|
Loading…
x
Reference in New Issue
Block a user