diff --git a/epicmtd.mk b/epicmtd.mk index d18e92b..68daf95 100755 --- a/epicmtd.mk +++ b/epicmtd.mk @@ -41,7 +41,8 @@ PRODUCT_COPY_FILES += \ # RIL PRODUCT_COPY_FILES += \ - device/samsung/epicmtd/prebuilt/bin/pppd_runner:system/bin/pppd_runner + device/samsung/epicmtd/prebuilt/bin/pppd_runner:system/bin/pppd_runner \ + device/samsung/epicmtd/prebuilt/etc/ppp/ip-up:system/etc/ppp/ip-up # WiFi PRODUCT_COPY_FILES += \ @@ -139,9 +140,7 @@ PRODUCT_PROPERTY_OVERRIDES += \ ro.cdma.home.operator.alpha=Sprint \ net.cdma.pppd.authtype=require-pap \ net.cdma.pppd.user=user[SPACE]SprintNextel \ - net.cdma.datalinkinterface=/dev/ttyCDMA0 \ net.interfaces.defaultroute=cdma \ - net.cdma.ppp.interface=ppp0 \ net.connectivity.type=CDMA1 \ mobiledata.interfaces=ppp0,uwbr0 \ ro.telephony.ril_class=SamsungRIL \ diff --git a/init.victory.rc b/init.victory.rc index da6cab3..1138fac 100644 --- a/init.victory.rc +++ b/init.victory.rc @@ -251,10 +251,10 @@ on property:persist.service.slate_mode=1 on property:persist.service.slate_mode=0 write /sys/class/power_supply/battery/slate_test_mode 0 -on property:ril.cdma.data_ready=true - start pppd_cdma +on property:ril.cdma.data_state=1 + restart pppd_cdma -on property:ril.cdma.data_ready=false +on property:ril.cdma.data_state=0 stop pppd_cdma on post-fs-data diff --git a/prebuilt/bin/pppd_runner b/prebuilt/bin/pppd_runner index 2550a6a..78beae5 100755 --- a/prebuilt/bin/pppd_runner +++ b/prebuilt/bin/pppd_runner @@ -1,5 +1,6 @@ #!/system/bin/sh -setprop net.dns1 8.8.8.8 -setprop net.dns2 8.8.4.4 -/system/bin/pppd /dev/ttyCDMA0 115200 user SprintNextel nodetach usepeerdns defaultroute +PATH="/system/bin" + +ttyname=`getprop net.cdma.datalinkinterface` +exec pppd "$ttyname" 115200 user SprintNextel nodetach usepeerdns defaultroute diff --git a/prebuilt/etc/ppp/ip-up b/prebuilt/etc/ppp/ip-up new file mode 100755 index 0000000..2fee644 --- /dev/null +++ b/prebuilt/etc/ppp/ip-up @@ -0,0 +1,12 @@ +#!/system/bin/sh + +PATH="/system/bin" + +setprop "net.cdma.ppp.interface" "$IFNAME" +setprop "net.$IFNAME.local-ip" "$IPLOCAL" +setprop "net.$IFNAME.remote-ip" "$IPREMOTE" +setprop "net.$IFNAME.dns1" "$DNS1" +setprop "net.$IFNAME.dns2" "$DNS2" + +# FIXME +setprop ril.cdma.data_state 2