Skip to content

Instantly share code, notes, and snippets.

@dsplvd
Last active July 2, 2020 03:05
Show Gist options
  • Save dsplvd/02fccbaef275004e26bb7b064da550a3 to your computer and use it in GitHub Desktop.
Save dsplvd/02fccbaef275004e26bb7b064da550a3 to your computer and use it in GitHub Desktop.

Revisions

  1. dsplvd revised this gist Jul 2, 2020. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions sim900a
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,7 @@
    at+ipr=115200
    at&w


    /etc/ppp/peers/huawei

    /dev/ttyAMA0
  2. dsplvd renamed this gist Jan 2, 2019. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  3. dsplvd created this gist Jan 2, 2019.
    59 changes: 59 additions & 0 deletions notes
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,59 @@
    /etc/ppp/peers/huawei

    /dev/ttyAMA0
    115200
    nodetach
    connect '/usr/sbin/chat -v -f /etc/ppp/peers/huawei-on'
    disconnect '/usr/sbin/chat -v -f /etc/ppp/peers/huawei-off'
    debug
    hide-password
    # Get the IP address from ISP.
    noipdefault
    # Also get DNS entries
    usepeerdns
    # Set the route as default to the Internet
    defaultroute
    # pppd will reconnect after disconnection
    persist
    # Don't auth the remote site
    noauth
    # No need to check hardware flow on serial port
    nocrtscts
    # No need to send control lines for modem
    local

    huawei-on

    ABORT BUSY
    ABORT VOICE

    ABORT "NO CARRIER"

    ABORT "NO DIALTONE"

    ABORT "NO DIAL TONE"

    ABORT "NO ANSWER"

    ABORT "DELAYED"

    ABORT "ERROR"

    ABORT "+CGATT: 0"

    "" AT
    TIMEOUT 12
    OK ATH
    OK ATE1
    OK AT+CGATT=1
    #OK AT+FCLASS=0
    OK AT+CFUN=1
    OK AT+CGDCONT=1,"IP","bam.entelpcs.cl","",0,0
    OK AT+CGACT=1,1
    OK "ATDT*99#"
    TIMEOUT 22
    CONNECT ""

    huawei-off
    "" "\K"
    "" "+++ath"