Changeset 10774


Ignore:
Timestamp:
2008-04-09T17:35:34+02:00 (8 years ago)
Author:
nbd
Message:

fix the 3g interface configuration

The first problem is the "chat" command which misses "-E", so the
environment variable addressed inside the script is never used and
the script breaks.

The second problem is the that you cannot assume an Option card when
you did "not discover a Novatel".
In my case the script tried to set the mode with the Option
AT-command which failed on the Huawei stick.
Unfortunaltely I don't have a correct command for that device, so I
just want to start the connection without any mode set before thus using
the defaults.

Signed-off-by: Markus Wigge <mwigge@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/package/comgt/files/3g.sh

    r10396 r10774  
    5656                cdma|evdo) chat="/etc/chatscripts/evdo.chat";; 
    5757        *) 
    58                 if gcom -d "$device" -s /etc/gcom/getcardinfo.gcom | grep Novatel 2>/dev/null >/dev/null; then 
     58                cardinfo=$(gcom -d "$device" -s /etc/gcom/getcardinfo.gcom) 
     59                if echo "$cardinfo" | grep Novatel; then 
    5960                        case "$service" in 
    6061                                umts_only) CODE=2;; 
     
    6364                        esac 
    6465                        mode="AT\$NWRAT=${CODE},2" 
    65                 else 
     66                elif echo "$cardinfo" | grep Option; then 
    6667                        case "$service" in 
    6768                                umts_only) CODE=1;; 
     
    7172                        mode="AT_OPSYS=${CODE}" 
    7273                fi 
     74                # Don't assume Option to be default as it breaks with Huawei Cards/Sticks 
    7375                 
    7476                PINCODE="$pincode" gcom -d "$device" -s /etc/gcom/setpin.gcom || { 
     
    7779                        return 1 
    7880                } 
    79                 MODE="$mode" gcom -d "$device" -s /etc/gcom/setmode.gcom 
     81                test -z "$mode" || { 
     82                        MODE="$mode" gcom -d "$device" -s /etc/gcom/setmode.gcom 
     83                } 
    8084        esac 
    8185        set_3g_led 1 0 0 
    8286 
    83         config_set "$config" "connect" "${apn:+USE_APN=$apn }/usr/sbin/chat -t5 -f $chat" 
     87        config_set "$config" "connect" "${apn:+USE_APN=$apn }/usr/sbin/chat -t5 -v -E -f $chat" 
    8488        start_pppd "$config" \ 
    8589                noaccomp \ 
Note: See TracChangeset for help on using the changeset viewer.