[android-porting] Re: invoking pppd from RIL and from command prompt led to different results

2011-09-01 Thread freakingtux
Hello,

On Tuesday, May 31, 2011 2:49:24 PM UTC+2, paldan wrote:


 Following your advice I've changed my init.rc script and now I'm 
 launching the RIL with the following lines: 

 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 vpn net_admin 

 the pppd is correctly started. 

 
Do you know why is it needed to start the daemon as root?  did you try an 
other user e.g radio or something like that?
 

-- 
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: http://groups.google.com/group/android-porting


[android-porting] Re: invoking pppd from RIL and from command prompt led to different results

2011-05-31 Thread freakingtux
Hello


On Friday, May 27, 2011 4:54:00 PM UTC+2, paldan wrote:

 Same problem here. 

 Using adb logcat for main, I read the following log: 

 E/pppd( 1017): This system lacks kernel support for PPP.  This 
 could be because 
 E/pppd( 1017): the PPP kernel module could not be loaded, or 
 because PPP was not 
 E/pppd( 1017): included in the kernel configuration.  If PPP was 
 included as a 
 E/pppd( 1017): module, try `/sbin/modprobe -v ppp'.  If that 
 fails, check that 
 E/pppd( 1017): ppp.o exists in /lib/modules/`uname -r`/net. 
 E/pppd( 1017): See README.linux file in the ppp distribution for 
 more details. 

 however this is not true, because the kernel has PPP support and I 
 succeed in starting pppd from command line. 

 Me too suspects a permission problem, but I still haven't managed to 
 find a solution. 


So perhaps I was not particularly clear in my previous post. You need a set 
of permissions to access the ppp device and at set of capabilities 
to be allowed to do things like creating interfaces. The capabilities in 
android are also gained by being part of a group. you need to be at least
to be part of net_admin radio vpn and inet

What I did for testing was a hack , I added 
  permission name=com.sample.permission.CONNECTIVITY
group gid=net_admin/
group gid=radio/
group gid=vpn/
group gid=inet/
  /permission
to /etc/permissions and created a permission called 
com.sample.permission.CONNECTIVITY and granted that to my sample application

Greetings

 I have also another problem via pppd from command line: the interface 

 is up and connected but using a ping with numeric address (no dns 
 problem) doesn't work: it seems that I cannot receive data from ppp0 
 but I can send data because I see my ping packets going to the modem 
 (using a sniffer). Another strange thing is that LCP echo packets are 
 correctly sent and received, so I suspect again a permission problem. 
 I will open a new topic for that. 

 
 


 Daniele 

 On 25 Mag, 22:57, Jeffrey jffry...@gmail.com wrote: 
  Hi all, 
  
  With exactly the same pppd command, if pppd is invoked from command 
  prompt, data connection works fine. I can browse Internet and I can 
  get ppp logs in DDMS. 
  
  Here is the command (same as that in init.gprs-pppd called by RIL) 
  C:\Program Files\Android\android-sdk-windows\platform-toolsadb shell 
  # /system/bin/pppd  /dev/ttyUSB0 115200 mru 1280 mtu 1280 nodetach 
  debug dump defaultroute usepe pdefault ipcp-accept-local ipcp-accept- 
  remote connect-delay 5000 linkname ppp0 
  
  However if I invoke pppd in Android RIL (err = 
  property_set(ctl.start, SERVICE_PPPD_GPRS); statement in reference- 
  ril.c), pppd deamon is started (no error returned) but the ppp0 link 
  is not up, and I can not get any ppp log in DDMS. Since there is no 
  log visibility, I am not able to know what is happening. 
  
  Could anyone please help 
  1)  Any suggestion on how to get ppp logs (if it is invoked by 
  RIL)? 
  2)  Any idea why invoking ppp from RIL give a different result 
  than 
  from the command prompt? 
  
  Appreciate your help in advance.

-- 
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: http://groups.google.com/group/android-porting


[android-porting] Re: invoking pppd from RIL and from command prompt led to different results

2011-05-31 Thread paldan
Hello,

On 31 Mag, 13:17, freakingtux kees.jongenbur...@gmail.com wrote:

 So perhaps I was not particularly clear in my previous post. You need a set
 of permissions to access the ppp device and at set of capabilities
 to be allowed to do things like creating interfaces. The capabilities in
 android are also gained by being part of a group. you need to be at least
 to be part of net_admin radio vpn and inet

 What I did for testing was a hack , I added
   permission name=com.sample.permission.CONNECTIVITY
     group gid=net_admin/
     group gid=radio/
     group gid=vpn/
     group gid=inet/
   /permission
 to /etc/permissions and created a permission called
 com.sample.permission.CONNECTIVITY and granted that to my sample application

 Greetings

First of all thanks for your help.

Following your advice I've changed my init.rc script and now I'm
launching the RIL with the following lines:

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 vpn net_admin

the pppd is correctly started.

I've also solved my ping issue (it was a problem with my network
operator).

Regards,
Daniele

-- 
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: http://groups.google.com/group/android-porting


[android-porting] Re: invoking pppd from RIL and from command prompt led to different results

2011-05-27 Thread paldan
Same problem here.

Using adb logcat for main, I read the following log:

E/pppd( 1017): This system lacks kernel support for PPP.  This
could be because
E/pppd( 1017): the PPP kernel module could not be loaded, or
because PPP was not
E/pppd( 1017): included in the kernel configuration.  If PPP was
included as a
E/pppd( 1017): module, try `/sbin/modprobe -v ppp'.  If that
fails, check that
E/pppd( 1017): ppp.o exists in /lib/modules/`uname -r`/net.
E/pppd( 1017): See README.linux file in the ppp distribution for
more details.

however this is not true, because the kernel has PPP support and I
succeed in starting pppd from command line.

Me too suspects a permission problem, but I still haven't managed to
find a solution.

I have also another problem via pppd from command line: the interface
is up and connected but using a ping with numeric address (no dns
problem) doesn't work: it seems that I cannot receive data from ppp0
but I can send data because I see my ping packets going to the modem
(using a sniffer). Another strange thing is that LCP echo packets are
correctly sent and received, so I suspect again a permission problem.
I will open a new topic for that.

Daniele

On 25 Mag, 22:57, Jeffrey jffrych...@gmail.com wrote:
 Hi all,

 With exactly the same pppd command, if pppd is invoked from command
 prompt, data connection works fine. I can browse Internet and I can
 get ppp logs in DDMS.

 Here is the command (same as that in init.gprs-pppd called by RIL)
 C:\Program Files\Android\android-sdk-windows\platform-toolsadb shell
 # /system/bin/pppd  /dev/ttyUSB0 115200 mru 1280 mtu 1280 nodetach
 debug dump defaultroute usepe pdefault ipcp-accept-local ipcp-accept-
 remote connect-delay 5000 linkname ppp0

 However if I invoke pppd in Android RIL (err =
 property_set(ctl.start, SERVICE_PPPD_GPRS); statement in reference-
 ril.c), pppd deamon is started (no error returned) but the ppp0 link
 is not up, and I can not get any ppp log in DDMS. Since there is no
 log visibility, I am not able to know what is happening.

 Could anyone please help
 1)      Any suggestion on how to get ppp logs (if it is invoked by
 RIL)?
 2)      Any idea why invoking ppp from RIL give a different result
 than
 from the command prompt?

 Appreciate your help in advance.

-- 
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: http://groups.google.com/group/android-porting