Entering sim code problem on a Huawei E1752
Had some problem using my 3g modem and it turns out to be a pin code problem. After setting pin off I can now use it with the Telenor basic settings.
http://borderworlds.dk/notes/huawei.html and http://www.shapeshifter.se/2008/04/30/list-of-at-commands/ was very handy in troubleshooting the problem.
With trail by error I found out where to enter AT+CPIN in the borderworlds.dk conf.
AT+CFUN=1 OK-AT-OK \
AT+CPIN="1234" OK \
AT+CSQ OK \
Related files I could find
#4 Updated by Perry Mason over 8 years ago
Aug 28 00:53:51 pfsense ppp: [opt3_link0] chat: +CPIN=? Aug 28 00:53:54 pfsense ppp: [opt3_link0] chat: The modem did not respond with "OK". Aug 28 00:53:54 pfsense ppp: [opt3_link0] MODEM: chat script failed Aug 28 00:53:54 pfsense ppp: [opt3_link0] Link: DOWN event Aug 28 00:53:54 pfsense ppp: [opt3_link0] LCP: Down event Aug 28 00:53:54 pfsense ppp: [opt3_link0] Link: reconnection attempt 14 in 3 seconds Aug 28 00:53:57 pfsense ppp: [opt3_link0] Link: reconnection attempt 14 Aug 28 00:53:57 pfsense ppp: [opt3_link0] chat: Detected Hayes compatible modem. Aug 28 00:53:57 pfsense ppp: [opt3_link0] chat: +CPIN=?
#7 Updated by Christian Schwarz almost 8 years ago
When removing the "GetOK lines" the connection comes up
- match "OK\r\n" GotOK
- wait 3
- log "The modem did not respond with \"OK\"."
#10 Updated by Rüdiger Greeb almost 7 years ago
I had this problem today with a Huawei E173-u2. For some reasons the Windows software refused to disable the PIN check, so I solved the problem in /var/etc/mpd.script
This is what's happening at the moment:
The Huawei stick answers the "AT+CPIN=?" in DialPeerSetPin directly with "OK". The function ModemQuery stores this "OK" in $modemQuery and calls GetOK afterwards, as it expects two separate replies. GetOK runs into timeout and prints 'chat: The modem did not respond with "OK".'
The problem can simply be resolved by removing the '=' in "AT+CPIN=?". I think there is also a 'goto' missing before a label that lead to another problem. Maybe I accidentially deleted it myself while trying. Nevertheless I changed the function to this working version:
DialPeerSetPin: set $modemCmd "+CPIN?" log $modemCmd call ModemQuery log $modemQuery if $modemQuery match ".*READY.*" goto PinReady set $modemCmd "+CPIN=\"$SimPin\"" call ModemCmd2 wait $PinWait PinReady: return
Please note the missing '=' and the 'goto' before 'PinReady'.