FORUMS
Remove All Ads from XDA

[Dev] Call for test, ril wrapper for pppd, 18/11/2010: test kernel 2K and wrapper 0.7

1,690 posts
Thanks Meter: 2,346
 
By letama, Senior Member on 31st October 2010, 01:54 PM
Post Reply Email Thread
Dear All,

I modified libhtc_ril_wrapper to possibly fix the pppd disconnection problem.

As I don't have 3G at home, I'd appreciate some feedback to help me diagnose potential issues with it.

WARNING, there are reports of crash at boot, do a backup of your whole android directory before trying this!

Don't run this if don't have adb and know how to use it.

See post #2 for history and more information


To keep the thread clean, please only report problems and try to avoid unnecessary talking about it.

Don't report problem without logs, it won't help.

This is highly experimental, don't use it if you don't know what you're doing.


To install, just rename your previous wrapper and copy the attached libhtc_ril_wrapper.so to the same location.

Here are the logs I need:
Code:
logcat -d -v time -b radio > /sdcard/pppd_radiolog.txt
logcat -d -v time -s pppd:v > /sdcard/pppd_mainlog.txt
dmesg > /sdcard/pppd_dmesg.txt
/bin/ifconfig > /sdcard/pppd_if.txt
ps > /sdcard/pppd_ps.txt
Please review pppd_radiolog.txt before posting, it could show some personal stuff like phone numbers, feel free to remove these lines or refrain to post them

Wait 20 seconds to let the wrapper relaunch pppd and check connection again. If it doesn't work, please send the logs.

Grab the three files from sdcard root and post them back here.

I'm also experimenting some kernel tuning that can be activated with this:
Code:
echo 8 8 > /proc/sys/vm/lowmem_reserve_ratio
echo 8192 > /proc/sys/vm/min_free_kbytes
Nothing conclusive yet, but it seems to help.

Thanks to Hastarin, I also attached his root package that includes wrapper with ppp options and tweaks.

Thanks,

LeTama
The Following 7 Users Say Thank You to letama For This Useful Post: [ View ] Gift letama Ad-Free
 
 
31st October 2010, 01:54 PM |#2  
OP Senior Member
Thanks Meter: 2,346
 
Donate to Me
More
History

2010/11/24 Hastarin root package (ppp_tweaks_root.zip) added, it includes wrapper, ppp options and kernel tweaks.

2010/11/18 new kernel and wrapper v0.7
  • new test kernel with smd_tty trimmed to 2K.
  • wrapper fake data call list has now active=1

v0.6 - 2010/11/17
  • same as 0.5 without the stupid bug that trashed the code.

2010/11/16
  • Test kernel to diagnose the "tty_prepare_flip_string fail" error with high cpu usage, please check post here for detail
  • v0.5: delay changed for deactivate and fake data call list added.

v 0.4 - 2010/11/14
  • Changed tag to RIL_WRAP to improve log reading
  • Improved log messages
  • Signal tracking to try to find who kills wrapper monitor
  • Lower delay between AT commands
  • Sleep delays and sequence reworked
  • Tentative improvement to re-establish ppp
  • Tentative fix for wrapper monitor death with extra debug messages
  • Memory leak on deactivate fixed

v 0.3 - 2010/11/02
  • added network state detection to avoid doing ATD too early resulting in getting stuck.
  • changed nand handling, proper initialization for nand is now done by adding "nand_init" to wrapper command line in init.rc.
    (Ex: service ril-daemon /system/bin/rild -l /system/lib/libhtc_ril_wrapper.so -- -d /dev/smd0 nand_init)
  • added a wrapper command line switch "rmnet_mode" for rmnet, "active" file in /etc/ppp is no longer used nor required for ppp.

v 0.2 - 2010/10/31, first release
  • restarts pppd when it dies

Troubleshooting
  • How to verify if wrapper is running:

    In radio log (logcat -b radio -d), my wrapper write this at startup (do it quickly after boot, it disappears quite quickly over time):

    Code:
    ----------- HTC Ril Wrapper v0.7 starting ------------
    and you should have debug messages there starting with RIL_WRAP, not RILW.

  • Crash on boot (v0.2):

    Check if your kernel command line in startup.txt has "nand_boot=0". If it still doesn't boot, try to remove any other option and only keep "nand_boot=0"

  • Troubleshooting crash on boot

    Even if it crashes very early, it should be possible to grab early logs. To do that, start adb *before* starting android with this command:

    adb logcat -b radio -v time

    adb should say *waiting for device*, you can then start Android. Adb will show some logs before the device crashes. Please send me the logs if you are able to do so.

    If you see [email protected]=0 in the log, it means that the wrapper thinks you are on nand, and that's why you device crashes.

  • pppd-fix

    I saw in some logs that some are using Cass pppd-fix script with the wrapper. Cass script and wrapper are doing the same thing and are conflicting. So, if you have installed the pppd-fix, please remove it, it won't play nice with the wrapper.

Known issues
  • 2010/11/14: pppd first launch fails after boot. wrapper catch it, however it would be nice to have it working the first time. It adds few seconds to re-establish data, so be patient!
  • 2010/11/14: high cpu consumption. The issue comes from memory management in kernel, we still have to figure out what's happening.
  • 2010/11/04: pppd monitor process seems to die from time to time. I don't know why yet, looking at the code it doesn't seem possible. I'll look into it and maybe release a new version with more debug traces. You can see it in terminal by doing a 'ps', it will show one of the rild as zombie ( Z instead of S just before process name). The easiest way to restart it is to do a data off/on.
31st October 2010, 02:09 PM |#3  
Senior Member
Flag Jakarta
Thanks Meter: 383
 
Donate to Me
More
Hi letama,

Currently i'm using ppp-fix. Can I contribute here? or I have to remove the script from init.rc then I reboot the device so I can contribute?
31st October 2010, 02:09 PM |#4  
mdeejay's Avatar
Retired Recognized Developer
Flag Abakan
Thanks Meter: 12,565
 
Donate to Me
More
nice

try now
31st October 2010, 02:14 PM |#5  
Senior Member
Flag Cologne
Thanks Meter: 33
 
More
Hi LeTama,

thank you for your work.
It seems that your fix work. I don't notice any dropouts.
But that could be a reason of the issue that the phone does not start android.
It boots WM then haret and then it freezes on the black screen with the green HTC logo...
I use [UPD][BUILD][30.10.10] MDJ FroYo Revolution v.1.1 [kernel: hastarin R8] and after copying your file with ES explorer I've rebooted the phone and now it hangs on the htc screen after running haret...
But the good news are, the dropouts are gone

Sorry but I can't post logcat messages without booting android complete

Which build do you recommend?
31st October 2010, 02:32 PM |#6  
OP Senior Member
Thanks Meter: 2,346
 
Donate to Me
More
Quote:
Originally Posted by funky81

Hi letama,

Currently i'm using ppp-fix. Can I contribute here? or I have to remove the script from init.rc then I reboot the device so I can contribute?

Hi Funky81,

Well, it's better to remove ppp-fix as I do the same thing in the wrapper now. The way it's done in the wrapper is cleaner and should have the same effect.

You can just comment it in your init.rc if you want to keep it, but keeping it active could have side effects.
31st October 2010, 02:39 PM |#7  
OP Senior Member
Thanks Meter: 2,346
 
Donate to Me
More
Quote:
Originally Posted by Crusoe86

Hi LeTama,

thank you for your work.
It seems that your fix work. I don't notice any dropouts.
But that could be a reason of the issue that the phone does not start android.
It boots WM then haret and then it freezes on the black screen with the green HTC logo...
I use [UPD][BUILD][30.10.10] MDJ FroYo Revolution v.1.1 [kernel: hastarin R8] and after copying your file with ES explorer I've rebooted the phone and now it hangs on the htc screen after running haret...
But the good news are, the dropouts are gone

Sorry but I can't post logcat messages without booting android complete

Which build do you recommend?

You have adb on you pc ? You should be able to run adb even if android is not fully started.

With it, you can get logcat and even rename back the old wrapper to see if it starts booting again.
31st October 2010, 02:50 PM |#8  
noellenchris's Avatar
Inactive Recognized Developer / Retired Moderator
Flag Marlton, NJ
Thanks Meter: 889
 
More
So far it's working very nice, I will be out and about today and will try to crash your masterpiece...:P

I just wanted to publicly say a big "THANKS" for helping everyone out with the PPP issues, you have always listened when I've popped in on the IRC and asked questions and relayed info from XDA. Thanks for your time and expertise. Your DEV work has not gone unnoticed!

Now get ready to fix the wrapper after we all crash it. Or read all the post on how your wrapper has made their microwave burn their popcorn and how their wifi can now communicate with the satellites....bla....bla.......
31st October 2010, 03:00 PM |#9  
Account currently disabled
Flag Oklahoma City
Thanks Meter: 177
 
More
Quote:
Originally Posted by noellenchris

So far it's working very nice, I will be out and about today and will try to crash your masterpiece...:P

I just wanted to publicly say a big "THANKS" for helping everyone out with the PPP issues, you have always listened when I've popped in on the IRC and asked questions and relayed info from XDA. Thanks for your time and expertise. Your DEV work has not gone unnoticed!

Now get ready to fix the wrapper after we all crash it. Or read all the post on how your wrapper has made their microwave burn their popcorn and how their wifi can now communicate with the satellites....bla....bla.......

Hehe...that may not happen. At least for my copy. I am giving mine a thorough flogging with Speed Test and can't make the data freeze. And I'm seeing over 3000Kb/s HSDPA speeds...with the common, single APN settings. By the way, I'd like to thank both of you for your hard efforts.
31st October 2010, 04:09 PM |#10  
prosumerhacks's Avatar
Senior Member
Thanks Meter: 66
 
More
testing...
testing now... thanks!
31st October 2010, 04:17 PM |#11  
Senior Member
Flag Melbourne
Thanks Meter: 607
 
More
Quote:
Originally Posted by letama

You have adb on you pc ? You should be able to run adb even if android is not fully started.

With it, you can get logcat and even rename back the old wrapper to see if it starts booting again.

Sadly I got the same problem and it's the initial logo screen it's hanging at, not the boot animation, so no adb shell is possible. I did get you a dmesg via andlog though (attached).

Time to restore a copy of system.ext2 that I backed up before... Oh wait, I didn't. Oh well, time to restore the copy from the original build.

To anyone trying this I suggest first taking a copy of the system.ext2 from your Android folder, just in case. At least if you'd tweaked anything in it already (build.prop for example) like I had.

On the plus side I did setup a gscript with the commands you noted and test it before I rebooted the phone. From that I noticed I had some errors in my logs already. I've attached them in case they help. NOTE: This is on my kernel and it almost seems like your patch to hi/lo-mem and my patch to move ppp compression to hi-mem have countered each other. It's getting late here so I'll have to continue experiments tomorrow after work.
Attached Files
File Type: zip pppd_error_logs1.zip - [Click for QR Code] (26.3 KB, 12 views)
File Type: zip pppfix_crash_on_boot.zip - [Click for QR Code] (10.6 KB, 25 views)
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes