GPRS with Nokia 9300i, Gentoo and China mobile

Perhaps somebody else will find this useful. The relevant part of my /etc/conf.d/net:

(assuming Bluetooth works)

### GPRS ###

config_ppp0=( "ppp" )

link_ppp0="/dev/rfcomm0"

pppd_ppp0=(
        "noauth"        # Do not require the peer to authenticate itself
        "nomagic"
        "debug"
        "local"         # Ignore carrier detect signal from the modem

        "defaultroute"  # Make this PPP interface the default route
        "usepeerdns"    # Use the DNS settings provided by PPP

        "lcp-echo-interval 15"  # Send a LCP echo every 15 seconds
        "lcp-echo-failure 3"    # Make peer dead after 3 consective
                                # echo-requests

        "lock"                          # Lock serial port
        "115200"                        # Set the serial port baud rate
        "crtscts"                       # Enable hardware flow control
)

chat_ppp0=(
        'TIMEOUT' '5'
        'ECHO' 'ON'
        'ABORT' '\nBUSY\r'
        'ABORT' '\nERROR\r'
        'ABORT' '\nNO ANSWER\r'
        'ABORT' '\nNO CARRIER\r'
        'ABORT' '\nNO DIALTONE\r'
        'ABORT' '\nRINGING\r\n\r\nRINGING\r'
        '' '\rAT'
        'TIMEOUT' '12'
        'SAY' 'Press CTRL-C to close the connection at any stage!'
        'SAY' '\ndefining PDP context...\n'
        'OK' 'ATH'
        'OK' 'ATE1'
        'OK' 'AT+CGDCONT=1,"IP","cmnet"'
        'OK' 'ATD*99#'
        'TIMEOUT' '22'
        'SAY' '\nwaiting for connect...\n'
        'CONNECT' ''
        'SAY' '\nConnected.'
        'SAY' '\nIf the following ppp negotiations fail,\n'
        'SAY' 'try restarting the phone.\n'
)

Dependency on closed source software

A good example for why using closed source software (and thus depend on it) is a bad thing, can be seen in the newest development around X.org:
There is a new version of the X server, which contains ABI changes, and now all users of the closed source ATI and NVIDIA graphics drivers can’t upgrade to the newest X.org version, because those closed source software providers didn’t provide a new version of their drivers yet.

–> Avoid closed source software whenever you can.