Changeset 872d810 in freewrt


Ignore:
Timestamp:
Feb 7, 2007, 3:40:04 PM (19 years ago)
Author:
Markus Wigge <markus@…>
Branches:
freewrt_1_0, freewrt_2_0
Children:
b9a704c
Parents:
1b91c61
Message:

this adds a short delay/check loop to give UMTS cards some time
for initialization.

additionaly I added a sanity check before sending an empty PIN
to the SIM card.

I still have a problem with some SIM cards which initialize to
slow. In certain circumstance you already have a serial interface
but get an error "SIM NOT READY".

git-svn-id: svn://www.freewrt.org/branches/freewrt_1_0@1892 afb5a338-a214-0410-bd46-81f09a774fd1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • package/ppp/files/ppp.pre-up

    r1b91c61 r872d810  
    22
    33[ "$METHOD" == "ppp" ] || exit 0
     4[ "$IF_USE_TEMPLATE" ] || exit 0
     5
    46[ -d /var/lock ] || mkdir /var/lock
    5 
    6 [ "$IF_USE_TEMPLATE" ] || exit 0
    77
    88[ -f "/etc/ppp/templates/$IF_USE_TEMPLATE" ] || {
     
    3131        echo $((LED | 8)) > /proc/sys/diag
    3232
     33        # wait for card to initialize
     34        COUNT=0
     35        while [ $((COUNT++)) -lt 20 ]; do
     36                [ -c "$IF_PPP_DEVICE" ] && break
     37                [ $COUNT -eq 20 ] && {
     38                        logger "$0: '$IF_PPP_DEVICE' not found"
     39                        exit 1
     40                }
     41                sleep 1
     42        done
     43
    3344        # set pincode
    34         COMGTPIN="$IF_UMTS_PINCODE" comgt PIN -d $IF_PPP_DEVICE || ERROR=1
     45        if [ "$IF_UMTS_PINCODE" ]; then
     46                COMGTPIN="$IF_UMTS_PINCODE" comgt PIN -d $IF_PPP_DEVICE || ERROR=1
     47        fi
    3548
    3649        # set APN
Note: See TracChangeset for help on using the changeset viewer.