Skip to content

Commit

Permalink
Fix device support for CM9 SamsungRIL.
Browse files Browse the repository at this point in the history
Changes include:

- Removing hardcoded properties that are now provided by SamsungRIL and
  pppd_cdma.
- Use "ril.cdma.data_state" property instead of "ril.cdma.data_ready" to
  signal (re)start/stop of pppd_cdma service.
- No hardcode DNS addresses in pppd_runner, since they're now forwarded to
  SamsungRIL.
- /system/etc/ip-up script to pass network parameters to SamsungRIL.

Change-Id: Iac2669d4d5df047451d1da94faa13a411c2c8157
  • Loading branch information
mkasick committed Jan 30, 2012
1 parent 3885ec4 commit 45a18c1
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 9 deletions.
5 changes: 2 additions & 3 deletions epicmtd.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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 += \
Expand Down Expand Up @@ -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 \
Expand Down
6 changes: 3 additions & 3 deletions init.victory.rc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 4 additions & 3 deletions prebuilt/bin/pppd_runner
Original file line number Diff line number Diff line change
@@ -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
12 changes: 12 additions & 0 deletions prebuilt/etc/ppp/ip-up
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 45a18c1

Please sign in to comment.