I have just completed this part of work recently so here are some advice. 1, get the ppp source code(I am using ppp-2.4.4) and compile "chat" . (android has pppd but doesn't have chat . Maybe there are some other ways to attach the net without chat )
2, modify ppp-2.4.4/scripts/ppp-on according to your own platform. ( take care about the arguments of pppd in the script ) 3,test your ppp-on under command line. (eg: pppd call your_dial_script_file_name) 4, If you can attatch to the net successfully ,then you can call the script in RIL. 5, in order to call the script in RIL,you need to: a, add a service in init.rc. eg: service pppd_gprs /etc/ppp/init.gprs-pppd user root group radio cache inet misc disabled b, when you receive :RIL_REQUEST_SETUP_DATA_CALL , use property_set("ctl.start", SERVICE_PPPD_GPRS); to activate the script ( you have tested the scrpit at step 3 so you can probably attach to the net ) c, add permisions in enable the RIL to call the script. ( froyo_source_code/system/core/init/property_service.c , struct { const char *service; unsigned int uid; unsigned int gid; } control_perms[]) 6, you probably can attach to the internet but still need to do some work to make the mechanism robust. I think you will find some places need to be improved. On 5月31日, 下午10时08分, Adrien <ferre.adr...@gmail.com> wrote: > Hi, > > I need to use ppp in Froyo. I need some pointers on how to do this. > > What i know for now: > > === init.rc === > > Need to add > setprop ro.radio.use-ppp yes > > service pppd_gprs /etc/ppp/init.gprs-pppd > user root > group radio cache inet misc > disabled > > Thing is i don't have init.gprs-pppd. I searched a bit and found > several scripts but i don't know which one i should use. > > Plus when i try to launch ppp using /system/bin/pppd, i have this nice > error : > FIX ME! implement ttyname() bionic/libc/bionic/stubs.c:360 > > and when i use /dev/ppp as the device : > > E/pppd ( 1269): no device specified and stdin is not a tty > E/pppd ( 1271): tcgetattr: Not a typewriter (line 909) > > Any hints is appreciated -- unsubscribe: android-porting+unsubscr...@googlegroups.com website: http://groups.google.com/group/android-porting