Hello,
I am trying to port a RIL driver from Android 4.4 (Kitkat) to Android 5 (Lollipop) and got stuck with establishing a data connection using a LTE radio.
Under Android 4.4 the procedure was going like this:
Android calls the RIL with RIL_REQUEST_SETUP_DATA_CALL. The RIL will do the following steps:
The RIL configures the radio to start a data connection. The data connection will become available as an Ethernet card (“eth0”) to the system.
The RIL calls “netcfg dhcp eth0” to get the IP addresse, DNS, etc.
The RIL calls “ndc resolver setdefaultif eth0” to make the radios data connection the default connection.
The RIL calls “ndc resolver setifdns eth0 x.x.x.x y.y.y.y” to the set the DNS.
This works very well in Android 4.4, the internet connection is available on the Android browser and on the Linux command shell.
In Android 5 I have got the problem that the two “ndc resolver” commands no longer exist. While browsing through the Android source code (CommandListener.cpp) I noticed that there is a new command “ndc resolver setnetdns”. This command looks like it is a replacemend for the “setifdns”, but this command wants a numeric “netID” instead of the interface name and I don’t know where I could get that netID or how it maps to my “eth0” device. For the “setdefaultif” command I didn’t find any kind of replacement.
As a result the data connection is active in the radio, “netcfg” shows a valid IP-address, “getprop” shows, that the IP-Address and DNS server are known to Android, but the data connection is still not usable. Neither the Android Browser gets an internet connection nor is the internet available on the shell. Commands like “ping www.google.com” or “ping 173.194.113.19” (valid IP address) on the Linux shell always fail.
How can I get my internet connection working? How do I use the new “ndc resolver” commands?
I would appreciate any help I could get.
Thanks,
Peter