pppd chat scripts

Hi there, by public demand, and with all credit due to WinnerGold, here are the chat scripts used by us to connect 3G USB modems on the Adam.

/etc/ppp/gprs-connect-chat—-

ABORT ‘BUSY’
ABORT ‘NO CARRIER’
ABORT ‘ERROR’
ABORT ‘+CME ERROR: 100’
SAY “GPRS modem init: press <ctrl>-C to disconnect\n”
“” AT
OK AT
OK ATDT#777
CONNECT
——

/etc/ppp/peers/gprs—–

/dev/ttyUSB0
115200
nocrtscts
nocdtrcts
local
usepeerdns
defaultroute
noipdefault
ipcp-accept-local
ipcp-accept-remote
user YOURUSERID
password YOURPASSWORD
debug
kdebug 7
#connect “/usr/sbin/chat -v -t 50 -f /etc/ppp/chat/cmtc-isp”
connect “/system/bin/chat-ril -v -t 500 -s -f /etc/ppp/gprs-connect-chat”

—–

/etc/ppp/ip-up—–

#!/system/bin/sh
case $1 in
ppp1)
/android/bin/iptables –flush;
/android/bin/iptables –table nat –flush;
/android/bin/iptables –delete-chain;
/android/bin/iptables –table nat –append POSTROUTING –out-interface ppp0 -j MASQUERADE;
/android/bin/iptables –append FORWARD –in-interface ppp1 -j ACCEPT;
echo 0 > /proc/sys/net/ipv4/ip_forward;
echo 1 > /proc/sys/net/ipv4/ip_forward;
echo $PPPD_PID > /etc/ppp/ppp1.pid;
;;
ppp0)
echo $PPPD_PID > /data/ppp/ppp0.pid;
;;
esac

# Use interface name if linkname is not available
NAME=${LINKNAME:-“$1”}

/system/bin/setprop “net.$NAME.dns1” “$DNS1”
/system/bin/setprop “net.$NAME.dns2” “$DNS2”
/system/bin/setprop “net.$NAME.local-ip” “$IPLOCAL”
/system/bin/setprop “net.$NAME.remote-ip” “$IPREMOTE”
/system/bin/setprop “net.$NAME.gw” “$IPREMOTE”

/system/bin/setprop “net.dns1” “$DNS1”
/system/bin/setprop “net.dns2” “$DNS2”
counter=`/system/bin/getprop net.dnschange`
counter=$[counter+1]
/system/bin/setprop “net.dnschange” $counter

—–

Use them together. Use them in peace.

Advertisements

About ND

carbon-based life form, prefers science, rationality and freedom
This entry was posted in Uncategorized. Bookmark the permalink.

16 Responses to pppd chat scripts

  1. Nishit
    Thanks for your time.
    You can not configure this tablet.
    Da signal mounts OK but not dev/ttyUSB0.
    Therefore it does not connect.
    Wait to come out with a firmware 2.3 or android android 3 already will have 3G support
    regards

    • Nishit says:

      Hi Manuel, please try to see if you can get an updated kernel or modules for usb-serial support (if it is not present). Once you get the module you can insert it at run time with ‘insmod modulename.ko’ and then try the rest.

  2. Mi kernel tine el driver usb.serial.
    En cuanto al firmware he probado tres y con ninguno trabaja

  3. My kernel driver usb.serial tine.
    As for the firmware I tried three and none work

  4. My kernel has the driver usb.serial.

  5. mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system OK
    mount -t usbfs usbfs /proc/bus/usb No such filr or directory ????
    i have /proc/bus/input
    also /sys/bus/usb and here folders devices drivers uevent,,,,,,,,
    tablet zt_180 7″ kernel 2.6.32.9

  6. if there is a path /sys/bus/usb-serial/drivers/option1

  7. md /proc/bus/usb not fount (es mkdir)
    mkdir /proc/bus/usb failes for /proc/bus/usb no such file or directory
    with rootexplorer with r / w dir not believe me

  8. I Intended all, I think may be the libusb not found in android. I can not think otherwise

  9. Nishit has oido hablar de putty, crea una conexion serial = que wvdial en ubuntu

    • Nishit says:

      Hi sorry, I’ve been busy at work, and testing out the various ROMs we have on tabletrom.com where hackers have been able to integrate 3G USB modem capability successfully. I am not sure what is wrong with your tablet. If all else fails, please get a personal wifi hotspot. It would be easier on your tablet’s battery life.

  10. Hi Nishit

    Can you please put all the required scripts for download..
    How you read the APN settings and modify the gprs-connect-chat script?

    • Nishit says:

      What’s the device on which you’re using it? What’s your service provider?

      The three scripts listed above are all that I need. You can just copy them in individual text files, modify what you want (e.g. the OK ATDT#777 in gprs-connect-chat may need to be changed to OK ATDT*99# if you are using a GSM/WCDMA modem instead of an EVDO one). Then save the files under the respective paths on your system. Make sure you mark them executable.

      A better way is to remount your /system folder as rewritable, and then open the existing files on your system with a text editor. You need to have root access for this.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s