Project

General

Profile

Bug #781

Entering sim code problem on a Huawei E1752

Added by Perry Mason almost 9 years ago. Updated almost 5 years ago.

Status:
New
Priority:
Low
Assignee:
-
Category:
PPP
Target version:
-
Start date:
08/01/2010
Due date:
% Done:

0%

Estimated time:
Affected Version:
Affected Architecture:

Description

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
/etc/inc/interfaces.inc
/usr/local/sbin/mpd.script
/var/etc/mpd.script
/var/etc/mpd_opt4.conf

History

#1 Updated by Chris Buechler almost 9 years ago

is the SIM PIN in the GUI not adequate for this?

#2 Updated by Perry Mason almost 9 years ago

No, My guess is that SIM Pin doesn't run at the right time in the script.

#3 Updated by Ermal Luçi almost 9 years ago

Can you please show your ppp log on this?
Or the mpd log on system log?

You can otherwise use the init script box on the GUI to use your own script.

#4 Updated by Perry Mason over 8 years ago

ppp.log

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=?

#5 Updated by Ermal Luçi over 8 years ago

Can you add to line 1487

 log $modemQuery

of /usr/local/sbin/mpd.script the line above and give me the log again of ppp.
The scripts expects an OK from the card when issued AT+CPIN=? otherwise fails.

#6 Updated by Ermal Luçi over 8 years ago

  • Target version deleted (2.0)
  • Affected Version deleted (2.0)

I will leave this open though not a target for 2.0.
Usually this is a pilot error and the modem should respond with the expected result from the mpd.script.

#7 Updated by Christian Schwarz almost 8 years ago

Having same problem here with a novatel eu850d minipcie card, although PIN is deactivated.
When removing the "GetOK lines" the connection comes up
##GetOK:
  1. match "OK\r\n" GotOK
  2. wait 3
  3. log "The modem did not respond with \"OK\"."
  4. failure
    ##GotOK:
  5. return

#8 Updated by Yoann Simon over 7 years ago

Hello,
I have got same problem with my 3g modem ...
On france in business connexion ...

Crdt
Poustiquet

#9 Updated by Yoann Simon over 7 years ago

Yoann Simon wrote:

Hello,
I have got same problem with my 3g modem ...
On france in business connexion ...

Crdt
Poustiquet

For your information, my 3g modem works perfectly with my Ubuntu 11.4

Best regard
Poustiquet

#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'.

#11 Updated by Christophe Prevotaux almost 5 years ago

I had a similar problem with a HUAWEI E1752 after a cold boot.

Warm reboot works everytime.

Not sure what the problem is

Any idea ?

#12 Updated by Christophe Prevotaux almost 5 years ago

I forgot to mention this is with a

2.1.3-RELEASE (amd64)
built on Thu May 01 15:52:13 EDT 2014
FreeBSD 8.3-RELEASE-p16

#13 Updated by Christophe Prevotaux almost 5 years ago

running a PC Engines APU

Also available in: Atom PDF