yashsingh1/xdaforums huggingface dataset:
[Defy Q&A, Help & Troubleshooting] polsh:
Logcat with 3G drop

it seems that RIL periodically polls the radio module.

In my case 3G stops working after a recent survey (does not respond to a request [0463]).

.....
D/RILJ ( 2903): [UNSL]< UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED
D/RILJ ( 2903): [0456]> OPERATOR
D/RILJ ( 2903): [0457]> DATA_REGISTRATION_STATE
D/RILJ ( 2903): [0456]< OPERATOR {MegaFon, MegaFon, 25002}
D/RILJ ( 2903): [0458]> VOICE_REGISTRATION_STATE
D/RILJ ( 2903): [0457]< DATA_REGISTRATION_STATE {1, 1e50, 009e0da6, 11}
D/RILJ ( 2903): [0458]< VOICE_REGISTRATION_STATE {1, 1e50, 009e0da6, 11, null, null, null, null, null, null, null, null, null, null, 47}
D/RILJ ( 2903): [0459]> QUERY_NETWORK_SELECTION_MODE
D/RILJ ( 2903): [0459]< QUERY_NETWORK_SELECTION_MODE {0}
D/GSM ( 2903): [GsmSST] Poll ServiceState done: oldSS=[0 home MegaFon MegaFon 25002 HSPA CSS not supported -1 -1 RoamInd=-1 DefRoamInd=-1
.....
.....
D/RILJ ( 2903): [UNSL]< UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED
D/RILJ ( 2903): [0460]> OPERATOR
D/RILJ ( 2903): [0461]> DATA_REGISTRATION_STATE
D/RILJ ( 2903): [0460]< OPERATOR {MegaFon, MegaFon, 25002}
D/RILJ ( 2903): [0461]< DATA_REGISTRATION_STATE {1, 1e50, 009e0da6, 11}
D/RILJ ( 2903): [0462]> VOICE_REGISTRATION_STATE
D/RILJ ( 2903): [0463]> QUERY_NETWORK_SELECTION_MODE
D/RILJ ( 2903): [0462]< VOICE_REGISTRATION_STATE {1, 1e50, 009e0da6, 11, null, null, null, null, null, null, null, null, null, null, 47}
D/GSM ( 2903): [GsmDCT] onReceive: action=com.android.internal.telephony.gprs-data-stall
D/GSM ( 2903): [GsmDCT] handleMessage msg={ what=270353 when=-7ms arg1=126971 obj=com.android.internal.telephony.gprs-data-stall }
.....

Edit:

In the case when I installs CM 7/10 without GAPS, I have no problems with 3g.

(gapps-gb-20110828-signeg for cm7 and gapps-jb-20120726-minimal for cm10)
[Defy Q&A, Help & Troubleshooting] SeneKa82:
So... if you install CM10+minimal gapps... you don't experience the connectivity bug? If yes, do you have auto switch 2G/3G or manual mode?
[Defy Q&A, Help & Troubleshooting] gamerxxxn:
I sorta had this bug since the first day i had got my phone, used to reboot in middle of calls and used to reboot while using data

So i rooted and flashed cm9,data used to work for 5 mins and then it just didnt respond,always stuck at the upward arrow. So i tried cm10 and moto ice gun,same prob. Although this happened less frequently on AOKP and cm7 was perfect

And airplane mode toggle never worked for me ,have to reboot in each ROM
[Defy Q&A, Help & Troubleshooting] polsh:
The problem with the 3G begin when I install GAPS (If to trust log file that RIL is not working properly. After that interface rmnet transmit packages, but do not recieve). Without an installed GAPS I have a stable 3G in auto 2g\3g mode. Whether google synchronization is hangs off radio part? I do not know how to debug it.
[Defy Q&A, Help & Troubleshooting] sbE:
Very interesting! I hope someone with more technical background can check this.
[Defy Q&A, Help & Troubleshooting] ssmahadik:
Logcat app report for play store app download / update failure issue

I am using a Defy + with CM10 03 Sep 2012, and I find issue with play store while using 3G connectivity . The issue encountered is that application remains in downloading state and never gets downloaded , effectively never installed / updated.

On Wifi it works seamlessly .

I tried logcat app to get a sense of issue and found something interesting

Aborting request for download 85: while trying to execute request: org.apache.http.conn.ConnectTimeoutException: Connect to /10.11.206.82:9401 timed out

Not sure why it is trying to connect apache while the whole process....

Hope that this click to some senior developer or contributor

I was added attachments from My device..............
[Defy Q&A, Help & Troubleshooting] je198ß:
With maniac103 - CM7 (https://github.com/maniac103/android_device_motorola_jordan/downloads) I don`t have this connectivity bug.

Probably have some drop outs too, but the CM7-3G-modul reconnects itself :confused:
[Defy Q&A, Help & Troubleshooting] polsh:
dmesg and lsusb

Hello,

Tried to diagnose the problem in Linux.

Noticed that the connection via 3g stops working at loss USB devices

Normal mode:

# lsusb
lsusb
Bus 001 Device 001: ID 1d6b:0002
Bus 001 Device 002: ID 22b8:40e6
#

Once the connection is broken:

# lsusb
lsusb
Bus 001 Device 001: ID 1d6b:0002
Bus 001 Device 003: ID 22b8:6023

part of the log (dmesg):

<3>[ 1596.984039] NOHZ: local_softirq_pending 08
<3>[ 1637.052703] NOHZ: local_softirq_pending 08
<3>[ 1638.982971] NOHZ: local_softirq_pending 08
<3>[ 1639.281951] NOHZ: local_softirq_pending 08
<3>[ 1639.443359] NOHZ: local_softirq_pending 08
<3>[ 1639.602996] NOHZ: local_softirq_pending 08
<3>[ 1642.273162] NOHZ: local_softirq_pending 08
<3>[ 1642.393341] NOHZ: local_softirq_pending 08
<3>[ 1651.604614] NOHZ: local_softirq_pending 08
<3>[ 1651.702789] NOHZ: local_softirq_pending 08
<4>[ 1659.233367] qtaguid: ctrl_cmd_tag(): User space forgot to open /dev/xt_qta
guid? pid=3284 tgid=2658 uid=10016
<6>[ 1665.775024] usb 1-3: USB disconnect, address 2
<3>[ 1665.946533] ehci: suspend failed!
<3>[ 1665.979309] ehci: suspend failed!
<3>[ 1666.008453] ehci: suspend failed!
<3>[ 1666.039916] ehci: suspend failed!
<6>[ 1666.289489] usb 1-3: new high speed USB device using ehci-omap and address
3
<6>[ 1666.464752] usb 1-3: configuration #1 chosen from 1 choice
<6>[ 1666.470245] cdc_acm 1-3:1.0: ttyACM0: USB ACM device
<6>[ 1669.461700] hw_ctrl_ipc_write_ex2: Error: channel unavailable
<4>[ 1669.461822] IPC Link Driver failed to send data to IPC: 1
<6>[ 1720.805664] request_suspend_state: sleep (0->3) at 1713586822499 (2012-09-
10 08:15:13.118102965 UTC)
<4>[ 1725.260284] qtaguid: ctrl_cmd_untag(): User space forgot to open /dev/xt_q
taguid? pid=3284 tgid=2658 uid=10016

Full output of dmesg in the attached file.

Does this sound like a hardware problem?
[Defy Q&A, Help & Troubleshooting] NishantM:
I don't think this bug exists on GB ROMs like CM7 or MIUI. I never had drops when I'm on CM7 or MIUI.
[Defy Q&A, Help & Troubleshooting] pulser_g2:
I've seen dropouts on CM7, and it was fixed by adding the soft unlock. If I remove the soft unlock, data dropout returns. If I re-add the soft unlock, data dropouts are gone.
[Defy Q&A, Help & Troubleshooting] je198ß:
Maybe you have network related dropouts e.g. in regions with poor connection, but your CM can handle this and reconnects the data-connection as soon as possible/within seconds. So you would not notice it.

That's maybe the difference to CM9/10. There the data-connections stops/hangs but it cannot reconnect because of a bug.

---------- Post added at 11:37 AM ---------- Previous post was at 11:33 AM ----------

Do you have more information?

I tried to google this without success.
[Defy Q&A, Help & Troubleshooting] NishantM:
Was this happening on defy/defy+ or some other android phone?
[Defy Q&A, Help & Troubleshooting] nikhil.t:
I faced the same problem on cm7 but it was not that bad, i used to have dropouts every 4 to 6 hours.... but with the latest build of cm10 the data connection dropout is every 15 to 20 mins... the connection checker app log shows that at present it toggles my connection every 15 mins!!!

---------- Post added at 11:20 PM ---------- Previous post was at 11:14 PM ----------

Under settings-system-status bar- signal status style, if i change that to text.. it shows signal strength but theres no indication of whether i have a data connection or not...!!!
[Defy Q&A, Help & Troubleshooting] gamerxxxn:
Drop seems to happen less frequently on 2g,every 6 hrs

Otherwise on 3G it would happen in 15 minutes..
[Defy Q&A, Help & Troubleshooting] nikhil.t:
Ive set my network to 2g only... dropouts still happen every 20 to 30 mins..
[Defy Q&A, Help & Troubleshooting] je198ß:
Other devices with CM too.

http://code.google.com/p/cyanogenmo...on Model Network Owner Summary Stars Priority

---------- Post added at 04:02 PM ---------- Previous post was at 03:53 PM ----------

Can we export RIL and Baseband files from "Stock 2.2.sbf " and

import these drivers in our CM 7/10?
[Defy Q&A, Help & Troubleshooting] ktmbikerman:
I've tried using the RIL and baseband files from my stock SBF already, without success.
[Defy Q&A, Help & Troubleshooting] SlugZero:
I did some investigation on that bug the last few weeks and here is what I came up with based on my findings and what others have posted in this thread previously:

The bug seems to be somewhere inside the Motorola RIL implementation and appears to be present in all available RIL versions, i.e. there is no way to fix it

I believe the bug is also present in stock ROMs, but they recover automatically within at most a couple of minutes

The built-in data connection recovery in CM9/10 does not play well with the Defy, but it can be modified easily

With a slightly modified version of Quarx's ROM, I have fairly stable connectivity for one week now (longest dropouts around 2 to 3 minutes) and none that required toggling mobile data or flight mode. With a stock GB Defy+, I have temporary dropouts of similar length in my area. Without the patch I had dropouts almost every hour in some areas.

Here are some more details on what I figured:

The data connection seems to go down but the RIL implementation does not send any event to notify us. We therefore assume that data is still connected. It seems to be common that something like this happens, therefore there is a OnDataStallAlarm function that is called periodically to check if the connection is still alive. It does this by counting the number of sent packages and the number of received answers, assuming that something is broken if you do not get any data packets back for a while.

As soon as a data stall is detected, this routine starts a whole cascade of recovery actions.

However for our bug, these recovery functions get never activated because the number of sent packages is also not increasing any more. The simple solution I found is just to send a notification for a data connection change if there was no traffic at all during the last cycle.

This does not hurt because if the connection was still alive, this notification should do nothing. However if the connection was lost previously, it triggers a reconnect. I compared the connection tracker to older versions of Android, and it even seems like in older Android versions, this was done periodically to work around bad RIL implementations that did not report connectivity loss properly.

I think that this portion of the code (the connection recovery) was significantly modified from Android 2.6 to 4.0, and it probably did the recovery properly in earlier versions. This is why there were no persistent data connection dropouts although the actual RIL bug probably always has been there.

I attached my patched version of /system/framework/framework.jar which should work with Quarx's 0903 MB525 build (I suppose you know what you're doing when using this file, but in case you get stuck on boot, you can always go back to one of Quarx's ROMs by reflashing) and a patch for the source code.

I am sure there is a more elegant way to work around this bug and fix the data stall alarm, but at least I hope this is pointing to the right direction..

Edit: Patch is integrated in latest Quarx 12.09 build, no need to apply it manually any more :)
[Defy Q&A, Help & Troubleshooting] SeneKa82:
@SlugZero: I'm trying your solution now, let's hope it works! :)

Did you send the patch to Quarx?

Many thanks!!!
[Defy Q&A, Help & Troubleshooting] ktmbikerman:
Looks very promising... thanks so much for your efforts!

I'm on Quarx 0904 MB526 build, although I'm not sure if the framework is any different? I'll give it a try anyway.

To all those who try the fix, please give feedback.

Thanks
[Defy Q&A, Help & Troubleshooting] phobos_1984:
Hi to all!

Installing "sim unlock" worsen my situation. Now the connection drops are really frequent. I'm on the last (04/09) Quarx build.

By the way, how I uninstall a .zip package? If I reainstall the build again, will it remove it or just over write and leave all the added .zips?
[Defy Q&A, Help & Troubleshooting] ktmbikerman:
OK, I installed the framework.jar on my MB526, 0409 build and it seems to be all fine... just copied the framework.jar file to system/framework/ and set the permissions to rwx rxx rxx

I've disable Connection Checker, so I'll be able to in time if this fix works for me too
[Defy Q&A, Help & Troubleshooting] ktmbikerman:
If you install the cm10 zip again it should get rid of the sim unlock zip.
[Defy Q&A, Help & Troubleshooting] gamerxxxn:
There seems to be various types of data drops, as seen by me on all forums,most people's signal bar just turns grey and an airplane mode toggle seems to fix it for them. However for me,the bar remains blue however the connection is stuck in the upward arrow sign and no downward arror sign comes,and airplane mode doesnt do anything ,i just have to reboot to make it proper.
[Defy Q&A, Help & Troubleshooting] ktmbikerman:
Are you sure you're using the correct baseband?
[Defy Q&A, Help & Troubleshooting] AnTerNoZ:
NICE WORK!

i think it worked great, don't had such big problems as without the patched framework.jar on latest Quarx build 0409.

have made a update zip with ur framework patch for those users that dont want to-do it manual (such lazy ppl like me)
[Defy Q&A, Help & Troubleshooting] SeneKa82:
SlugZero's patch is working very well for me, no disconnections in 2h!!! :laugh::laugh::laugh:

I'm using CM10 experimental (04/09) on MB525 + patch.

Thanks!!!

PD: please somebody send this patch to Quarx.
[Defy Q&A, Help & Troubleshooting] royale1223:
Great work. I just told quarx. You should better post this in the dev forum.
[Defy Q&A, Help & Troubleshooting] ktmbikerman:
I posted a link to this from the Quarx JB thread.
[Defy Q&A, Help & Troubleshooting] ktmbikerman:
It works for me!

Not sure if anyone else has anything to feed back yet, but I have a pretty sure-fire way of testing this fix. I'm able to connect to 2 different networks and the phone is usually set to auto switch between the 2, this is where the disconnects happen. If I manually switch between the 2, I can force the switch and the disconnect, so I did this...

When the phone registered on the "second" network, the grey signal bars appeared and no up/down arrows could be seen i.e. the bug had shown it's nasty head... BUT, after a few seconds (about 30sec), the "H" disappeared momentarily, then reappeared and data started up again... SlugZero's fix works for me!!!

Any other feedback?
[Defy Q&A, Help & Troubleshooting] SeneKa82:
Yes, it also works for me :D
[Defy Q&A, Help & Troubleshooting] ktmbikerman:
I see SlugZero was thanked by Quarx... very good chance that we'll have the fix in the next build I guess :D

Edit: The commit has just happened, woohoo!

Edit 2: I unlocked my phone and saw the dreaded grey signal bars, force of habit made me want to toggle Airplane mode, but I resisted the urge. Checked a few minutes later and they were blue again... the fix definitely works, as in the past this would never recover, Huge thanks to SlugZero!
[Defy Q&A, Help & Troubleshooting] htcmaxx:
testing patch on Defy+ Quarx nightly 2012-09-04 using Baseband 3.4.x in O2 Germany network (2G/3G auto)

I wonder whether it could have negative impact on battery usage.
[Defy Q&A, Help & Troubleshooting] hm9:
Works on 2012/9/12 ??

i just update to 9/12+ Quarx on my 525 red lens, i apply the zip version and only gets loop on the cm10 intro... i flashed again the rom and starts usually (wipe cache/dalvik)

I don't know if the patch still or if i have to patch again... somebody already try on the recent nightly and tell us if this works as reported on 9/04 version?

Thanks
[Defy Q&A, Help & Troubleshooting] Quarx:
This patch and some more fixes for it are included in latest version of cm10
[Defy Q&A, Help & Troubleshooting] o_mas:
I think 12.09 Quarx build already have this pach included and you don't need reflash it again...
[Defy Q&A, Help & Troubleshooting] hm9:
Thank you, already notice that a few minutes after but i cant edit my post ( i'm junior member). Anyway great work here!!! im so happy =D
[Defy Q&A, Help & Troubleshooting] SlugZero:
I believe I am not allowed to post there, but obviously the right people have also found it here, so thanks for telling Quarx:)

Quarx, I feel honoured that you integrated my patch in your awesome ROM, keep up your great work - and everyone else thank you for testing, :good:

I'm glad if I could help.

When I messed around with that recovery, I first tried a "brute force" version which triggered a reconnect every couple of seconds which caused heavy battery drain. The way it is working right now, the function is only called once every 5 minutes or so, and only if there was absolutely no data traffic within that time (which is basically never the case if you have some apps running). So there should be no noticeable battery drain, at least I did not notice a change. On the downside, this means that dropouts up to a couple of minutes can still occur (I notice about one per day)
[Defy Q&A, Help & Troubleshooting] ktmbikerman:
I was asked to move this thread to the Dev section a couple of times... good thing I didn't :)

You've certainly hit the XDA forum on a seriously high note, sir SlugZero.
[Defy Q&A, Help & Troubleshooting] htcmaxx:
updated to Defy+ Quarx nightly 2012-09-12 (which includes patch) using baseband 3.4.x on O2 Germany network (2G/3G auto)

I already had three data dropout todays: mobile data icon switching from blue to grey (staying blue one time while bluetooth tethering), still showing H for HSPA, no arrows and no data transferred. After 2 or 3 minutes the H disappers and re-appers after seconds, data transferred again. So the patch works, action seems to be similar to manually switching mobile data off and on again. Thanks a lot, SlugZero!

How do you know, how often it’s called?

Have you been able to check whether the method is called while Wi-Fi ist connected (and thus mobile data disabled automatically)?

htcmaxx
[Defy Q&A, Help & Troubleshooting] diogolm.adm:
Fantastic!

This make me like my Defy a little bit more again! :laugh:

That bug was very disappointing and we are suffering with this since may if i'm not wrong!

Many thanks to SlugZero, ktmbikerman and every one that contributes to get untill this!

See ya!
[Defy Q&A, Help & Troubleshooting] SkyKOG:
Amazing work ... simply awesome ... for certain reasons im still on epsy cm9 5 July ...

can this patch work for us ICS users too ...if so ...pls tell how ...

Thnx :) ....
[Defy Q&A, Help & Troubleshooting] PPBottle:
Great job with the fix guys! This was probably the most annoying bug I had on CM10.

Even tho the bug was already addressed by Quarx's in his last build, can someone post this fix into skeevy420's 2.x PA ROM Dev thread? Im not allowed to post in the dev section yet, but it would be just wonderful to have this working fix in as many CM10 ROMs as possible (specially in one as good as PA, whoever tried it can assure it's quality) :good:
[Defy Q&A, Help & Troubleshooting] SlugZero:
Time will come when I will be also allowed to post there.. Only 7 more posts to go:) And thank you for our appreciation, but that was really nothing compared to all the amazing work all of you are doing here all the time. I was simply "lucky" enough to have this bug quite frequently and reproducible to be able to test stuff.

The fix piggybacks on the periodic connection recovery that already comes with android, and uses all the functionality this already brings with it. That also means it is only running periodically when on mobile data (but, to answer your question, I did not check, just looked at the code). It uses fixed cycle times that seem to be configurable, but I did not modify the default cycle times this was using.

I just looked them up, default is actually 6 minutes if screen is off/ 1 minute if screen is on or if we already suspect a broken connection:

DATA_STALL_ALARM_NON_AGGRESSIVE_DELAY_IN_MS_DEFAULT = 1000 * 60 * 6;

DATA_STALL_ALARM_AGGRESSIVE_DELAY_IN_MS_DEFAULT = 1000 * 60;

That means in the worst case (screen is off and connection drops right after last check) it would actually take up to 6 minutes until the connection checked again. So there is definitely some room for improvement :)

Yes, GsmDataConnectionTracker has not changed much from ICS to JB, patch should also work with ICS ROMs.
[Defy Q&A, Help & Troubleshooting] ktmbikerman:
I recon if you get 50+ thanks on your very first post in XDA that you should be given SuperHero status instantly :)
[Defy Q&A, Help & Troubleshooting] gamerxxxn:
Yep,i live in India and i have got a choice of 4 basebands,i first try them all out as a routine after flashing any new ROM and same problem happens. Sometimes i even try out Europe baseband,no luck.

The fix given by slugzero is great! seems to stabilise my data connection. Although my phone rebooted while downloading an app from play store,now its working flawlessly
[Defy Q&A, Help & Troubleshooting] SeneKa82:
May be possible change the default values in a config file without recompile?
[Defy Q&A, Help & Troubleshooting] SlugZero:
Thanks, but I believe that even then I would not be allowed to post there before having at least 10 posts ;)

Actually yes, I think there is no recompiling necessary, since the hard-coded defaults are overridden by values from system settings (Settings.Secure.DATA_STALL_ALARM_AGGRESSIVE_DELAY_IN_MS / Settings.Secure.DATA_STALL_ALARM_NON_AGGRESSIVE_DELAY_IN_MS). But since I am quite new to this Android development stuff myself, I have no idea how to set these (maybe somebody else does).

However I think that changing the timeout is not the best way to improve data connectivity further. I do have some ideas for improvement, like checking/triggering connection on screen on (mostly better user experience) and/or modifying the packet sums in TrafficStats (could also fix other data connectivity issues). I don't have much time in the next few weeks to look into this, but if there is still need for improvement afterwards, I'm going to try some things.
[Defy Q&A, Help & Troubleshooting] ktmbikerman:
You're very welcome to post here as much as you like to make up the 10 :)
[Defy Q&A, Help & Troubleshooting] SlugZero:
That would be 5 more posts, not including this one..

I will gratefully accept your offer, but I will at least try to fill these posts with some useful information (I believe the 10 posts limit is rather a good way to spam non-dev threads with useless posts than to prevent people from posting in dev). I'll be back in 2 weeks..
[Defy Q&A, Help & Troubleshooting] pulser_g2:
I already removed the 10 post limit on your account :)
[Defy Q&A, Help & Troubleshooting] sudipt123:
@SlugZero - you're the Man!

I went back to the GB ROM because of this connectivity bug, now will try the CM 9/ 10 builds.
[Defy Q&A, Help & Troubleshooting] Zeplot:
Well here come the bad news : this patch does not work for everyone :'(
[Defy Q&A, Help & Troubleshooting] htcmaxx:
Who are you thinking of? People choosing the wrong baseband, causing complete loss of signal or phone restarts? Any other possible reasons?
[Defy Q&A, Help & Troubleshooting] sudipt123:
How can i apply this on the ICS ROM? please guide. Sorry for being a Noob:cyclops:
[Defy Q&A, Help & Troubleshooting] evertjr:
Please someone can make a update to apply on latest CM9 Quarx Defy+ build?
[Defy Q&A, Help & Troubleshooting] PinkyFloyd:
Can this even be applied to CM9? or is it a CM10 patch only? :confused:
[Defy Q&A, Help & Troubleshooting] Zeplot:
I am thinking about me : I still have problems, I did not change my baseband ;)
[Defy Q&A, Help & Troubleshooting] ktmbikerman:
Note that SlugZero's fix does not stop data disconnects, but it does stop the disconnect from being permanent. Worst case scenario will be a 5-6 minute dropout which is totally acceptable.