android ril module for huawei 3g - new version - many changes by ejtagle
C C++
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Android.mk
MODULE_LICENSE_APACHE2
NOTICE Import version from 31.08.2012 as released by ejtagle Sep 1, 2012
README
agc.c
agc.h
at_error.h
at_tok.c Import version from 31.08.2012 as released by ejtagle Sep 1, 2012
at_tok.h
atchannel.c Import huawei-generic-29sept.rar from ejtagle Oct 1, 2012
atchannel.h
audiochannel.cpp Compilation fix for Android 4.2 by ejtagle Jan 24, 2013
audiochannel.h Updated to ejtagle's huawei-generic-23set.rar Sep 29, 2012
audioqueue.c
audioqueue.h Updated to ejtagle's huawei-generic-23set.rar Sep 29, 2012
echocancel.c
echocancel.h Updated to ejtagle's huawei-generic-23set.rar Sep 29, 2012
fcp_parser.c
fcp_parser.h Import version from 31.08.2012 as released by ejtagle Sep 1, 2012
gsm.c Import version from 31.08.2012 as released by ejtagle Sep 1, 2012
gsm.h initial commit Feb 24, 2012
huaweigeneric-ril.c
llaudio.c
misc.c Import version from 31.08.2012 as released by ejtagle Sep 1, 2012
misc.h Import version from 31.08.2012 as released by ejtagle Sep 1, 2012
net-utils.c
net-utils.h
requestdatahandler.c Fix compilation for CM10 Sep 29, 2012
requestdatahandler.h
ril_commands.h
sms.c Import version from 31.08.2012 as released by ejtagle Sep 1, 2012
sms_gsm.c
sms_gsm.h initial commit Feb 24, 2012

README

The modules has still a few problems:

* required modify init.rc add:
	on device-added-/dev/ttyUSB0
	chmod 0777 /dev/ttyUSB0
	on device-added-/dev/ttyUSB1
	chmod 0777 /dev/ttyUSB1
	on device-added-/dev/ttyUSB2
	chmod 0777 /dev/ttyUSB2
	on device-added-/dev/ttyUSB3
	chmod 0777 /dev/ttyUSB3
	on device-added-/dev/ttyUSB4
	chmod 0777 /dev/ttyUSB4
	on device-added-/dev/ttyUSB5
	chmod 0777 /dev/ttyUSB5


	on boot
	service ril-daemon /system/bin/rild
	socket rild stream 660 root radio
	socket rild-debug stream 660 radio system
	user root
	group radio cache inet misc audio


* Edit system/build.prop ,add:
	# for 3g
	rild.libpath=/system/lib/libhuaweigeneric-ril.so
	rild.libargs=-d /dev/ttyUSB2 -v /dev/ttyUSB1
	keyguard.no_require_sim=1


----

	pppd must be suid ROOT, and kernel must include ppp support compiled in
	/system/etc/ppp/ip-up and also /system/etc/ppp/ip-down must also be suid ROOT
	
----

	You also need the following files in /system/etc/ppp

----	
/system/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;
	;;
    ppp0)
    /system/bin/setprop "net.interfaces.defaultroute" "$LINKNAME";
    ;;
esac

/system/bin/setprop "net.$LINKNAME.dns1" "$DNS1"
/system/bin/setprop "net.$LINKNAME.dns2" "$DNS2" 
/system/bin/setprop "net.$LINKNAME.local-ip" "$IPLOCAL" 
/system/bin/setprop "net.$LINKNAME.remote-ip" "$IPREMOTE" 
/system/bin/setprop "net.$LINKNAME.gw" "$IPREMOTE"
/system/bin/setprop "net.$LINKNAME.if" "$IFNAME"


----
/system/etc/ppp/ip-down:

#!/system/bin/sh
case $1 in
    ppp1)
	echo 0 > /proc/sys/net/ipv4/ip_forward;
	;;
esac

/system/bin/setprop "net.$LINKNAME.dns1" ""
/system/bin/setprop "net.$LINKNAME.dns2" "" 
/system/bin/setprop "net.$LINKNAME.local-ip" "" 
/system/bin/setprop "net.$LINKNAME.remote-ip" "" 
/system/bin/setprop "net.$LINKNAME.gw" ""
/system/bin/setprop "net.$LINKNAME.if" ""