Retrofitted antenna causing intermittent issues? - NFC Hacking

I've been replacing the NFC antenna on some MTK tablets with bigger antennas that read at a greater distance. It *seems* like this is the cause of the NFC service failing to start (or maybe crashing?) about once in every 20 device starts. When it refuses to work, a device restart resolved the issue.
Does anyone here have the technical background to make a guess on what might be causing this and a potential resolution? I need the larger antennas to work, leaving in the factory ones is not the best option!
EDIT: When it isn't working, the dumpsys nfc output has mScreenState=OFF instead of mScreenState=ON_UNLOCKED

Looks to be two problems affecting me here:
1. The NFC antenna is producing a field that sometimes interferes with the device hardware, causing it to not read any tags.
2. Nfc service occasionally incorrectly reports the screen state as OFF. This is despite PowerManager reporting the screen is ON. It seems to be a bug with NfcService within /System/app/NfcNci.apk.

Related

[Q] Motorola Bug or Defective Unit ? I need help.

Hi.
I have 2 Defys. One of them works OK. The other one is wasting battery while suspended.
No, it's not because of normal use, syncing, GSM signal strenght, settings, widgets or ROM. I've tested all of that and more, and I've compared to my other Defy that works OK, setting them up exactly the same. I've even exchanged SIM cards...
What I currently believe is happening is... that a hardware defect or a driver bug is preventing the SIM card to enter a suspend state, and this causes the suspend process to use too much CPU time and therefore wastes battery while the phone should be sleeping.
I've posted a thread at Motorola's Owner forum :
https://supportforums.motorola.com/thread/47721
There I wrote the whole story, since I believed it was a simple settings problem, until Android's Andy McFadden gave me his (informal & preliminary) oppinion.
The last messages on the 2nd page are my current findings, included some relevant lines from my kernel logs... but to fully understand it I guess reading the whole thread may help.
Anyways... I have 3 questions. Please help me:
1. Do you think this can be caused by a faulty SIM card ?
2. Do you think one of my phones might be less tolerant to "something" in my service provider's SIM cards, thus causing one phone to malfunction while the other is working OK ?
3. If you think this can be caused by a phone's hardware defect... care to elaborate your explanation ?
I have found your thread on Motorola owners' forum while googling battery drain issues.
Your bug seems similar to mine. My Defy eats about 4-5% per hour BUT even in Airplane mode with no SIM inserted. Of course, all syncing stuff/WiFi/GPS is disabled. This happened after flashing Froyo, downgrade to Eclair didn't help. I have tried to flash different ROMs, calibrated battery using different methods, but no luck, phone life can't go over 24h in standby mode. And yes, battery was replaced too.
It doesn't look like Suspend process prevents my phone from sleep (Running:1.2%, Screen on: 0.8% ) but who knows, maybe if you find a solution it can help me too. I'll keep watching your posts, good luck
Today I've got a duplicate and physically different SIM card... but the bug isn't affected by the change.

Why Is The GPS So Bad?

Ever since I've had this phone, I've not had any issues that would make me want to start a thread, except one -- the GPS. Here are the issues I've had, which are probably similar to other's experiences:
1) GPS just stops locking occasionally, and required reboot to fix. This happened at random times, but it always seemed like I had to have the phone on for a long time before it occured.
Solution: Sometimes I can use the "GPS status" program to reset the GPS state, and this would work sometimes. It doesn't always work though, and I need to reboot to get it back.
2) GPS stops turning on at all. This was traced down to my company requiring full encryption of the flash/SD card, which apparently this phone has a bug that prevents GPS from working at all when you do this. I had to remove my work email from the phone to get GPS back.
Solution: None yet, except turning encryption off.
3) The GPS icon in the notifier bar stays on in the "locked" status, even when GPS is turned off.
Solution: Reboot. Not ideal, obviously.
I've also tried replacing the gps.conf file as another user pointed out, but that doesn't appear to have fixed anything. Does anyone have a solution for these issues that I haven't already mentioned, particularly #1? It's getting very annoying when I need to use navigation and I have to reboot just to have a chance of it working.
Get your phone looked at/replaced. I literally have none of those issues.
Sent from my SPH-D710 using XDA App
I know some people have issues with GPS but mine locks INSTANTLY and I have no issues with it.
Locks WAY faster then my HTC EVO 4G ever did!
I havent had one issue with the GPS. I use it in the mornings with runkeeper and it locks nearly instantly. I would say get the phone looked at
I've had similar issues with my GPS.. it takes a long time to get a lock and afterwards it's very temperamental. Unless my phone has an absolutely clear view of the sky in my car it will lose the lock instantly. It's extremely frustrating since I'm coming from a Samsung SGS Vibrant that had a horrible GPS. Samsung needs to start putting in better GPS modules in their phones. Many HTC owners have reported that their GPS works incredible and can lock on sats in their basement etc.
Just to add to my above post about my GPS locking instantly, it even locks instantly in my basement when I have like one bar of phone service.
I'd have to say the GPS is one of the better features on this phone.
I'll echo the view that you should have the phone looked at, I'm coming from a Thundebolt which frequently, literally never locked. My E4gT locks nearly instantly even when my signal is weak.
i leave my gps/ wireless networks off 90% of the time, so sometimes when i first put it on, it takes forever to lock on. i started just putting it on and rebooting and then it locks instantly
sidebar, i love how data isnt needed. i put it on to load the map correctly then turn it off to save battery
Just to clarify, if I reboot the GPS does seem to lock MUCH quicker.. I'm going to flash the stock ROM that was leaked recently and see if my issues go away, if not.. I'll probably see if Sprint can swap my phone out with another. LOS has been driving me insane.. I'm an on-call support engineer so missing a call due to LOS would be very bad for me.
My GPS sucks as well. When it locks (hardly ever) it is super inaccurate. I went to sprint and since I don't have the insurance I had to call Samsung. I'm going to send my phone to them (no loaner). They said once they receive it, I will have it back within 6 days. I'll let you know how it goes.
No problems with gps on both of the phones that I have had. The current one is exceptional actually. I use a GOLF gps program/app WEEKLY and the accuracy is actually remarkable. From my comparing it to a friends gps (also pretty accurate) as well as a LASER rangefinder (to center pin locations) it is usually within 2 or 3 yards from our calculations, which we think is pretty acceptable for our single digit games.
It helps alot on shots inside 150 yards, especially inside 100 when we think it is 50 yard shot and it is really 70, you have a big advantage there whether its 67 or 70 yards compared to your shot of 50 if you didnt have the gps.
It does take about 10 to 15 seconds once you stop moving to catch up and give an accurate yardage, this is likely the program/app as some of them I have tried find it quicker some slower...
JC
Disable "Use sensor aiding" if it's enabled. Locks much faster.

GPS Compass really messed up!

I am really concerned about the GPS compass issue (not the magnetic one). It makes navigation applications like NDrive and Sygic unusable. While I am driving the nav app would suddenly recalculate the route on a different road then a few seconds later it comes back to my actual location, and it keeps doing that even if u are not moving.
This is really irritating, do any of u face a similar issue? Do u think its a hardware or a software problem?
mbushnaq00 said:
I am really concerned about the GPS compass issue (not the magnetic one). It makes navigation applications like NDrive and Sygic unusable. While I am driving the nav app would suddenly recalculate the route on a different road then a few seconds later it comes back to my actual location, and it keeps doing that even if u are not moving.
This is really irritating, do any of u face a similar issue? Do u think its a hardware or a software problem?
Click to expand...
Click to collapse
Install GPS status from market and clear agps data. Worked for me !
Sent from my HTC One X using xda premium
matmar said:
Install GPS status from market and clear agps data. Worked for me !
Sent from my HTC One X using xda premium
Click to expand...
Click to collapse
Can you please provide me with the market link, I really would appreciate it
EDIT: I got it, and cleared the agps data but still the same issue. The wierd thing is that while I stand still, the speed keeps increasing and descreasing at very high number.
I tested another one x and it was far more accurate and stable than mine I think mine is defective :S
Mine is quite amusing it says i'm at home then you will see it move at light speed and place my gps target in a whole other country whilst saying its got 5m accuracy, have tried clearing aps to make no diff
mbushnaq00 said:
Can you please provide me with the market link, I really would appreciate it
EDIT: I got it, and cleared the agps data but still the same issue. The wierd thing is that while I stand still, the speed keeps increasing and descreasing at very high number.
I tested another one x and it was far more accurate and stable than mine I think mine is defective :S
Click to expand...
Click to collapse
Pyung said:
Mine is quite amusing it says i'm at home then you will see it move at light speed and place my gps target in a whole other country whilst saying its got 5m accuracy, have tried clearing aps to make no diff
Click to expand...
Click to collapse
+1: GPS is unusable...
escalator said:
+1: GPS is unusable...
Click to expand...
Click to collapse
The best way to test GPS is to put the phone in airplane mode, turn off GPS, and reboot it. After it reboots then activate GPS. That way it won't be using aGPS (wireless or Wi-Fi) and be relying solely on the GPS chip for location.
Download an app from the Market called GPS Test. When I run it I see the phone's kind of screwy. It sees 16 satellites immediately (excellent) and locks on about half of them (average) but then keeps changing which satellites it's receiving from.
It will get down to 9' in accuracy which is actually very good but it's odd that it keeps shifting satellites instead of staying locked on the ones it has previously identified and read. I set a route in CoPilot using nothing but the GPS chip and it seemed fine; my origin remained stationary. When I go out later I'll actually try using it in the car for a full route.
It's really hard to say whether it's h/w or s/w at this point.
Edit: After doing all the above I noticed I lost a pretty hefty amount of battery. Looking in the battery stats Android OS was the number one battery user exceeding even the display. That's abnormal which leads me to guess the issue is probably s/w.
What is a "GPS compass", please? (There's no such thing.)
Used GPS for the first time yesterday, for a two hour trip with Sygic maps' 12.1 beta. Worked perfectly the whole way.
BarryH_GEG said:
Edit: After doing all the above I noticed I lost a pretty hefty amount of battery. Looking in the battery stats Android OS was the number one battery user exceeding even the display. That's abnormal which leads me to guess the issue is probably s/w.
Click to expand...
Click to collapse
That could be a red herring. A rather large issue has been discovered with the battery stats that it does not go down correctly when the phone is on standby (screen off). When it suddenly realises the true battery status, it plummets to the correct level.
Yeah. There is something strange going on with the compass and GPS.
Google Maps has my arrow moving around a lot and also changes direction significantly even when I'm stationary. Not sure what is going on there. There is a certain amount of uncertainty and jitter when using GPS but it should be smoothed out.
I've tried disabling the WiFi/Cell location system and only using GPS but it doesn't affect it. Resetting the AGPS data doesn't help either.
The GPS issue seems to be big and i use GPS and Navigation too often with my phone. Tonight or tomorrow i am getting my One X and i hope they will sort this out sooner.
zekit said:
The GPS issue seems to be big and i use GPS and Navigation too often with my phone. Tonight or tomorrow i am getting my One X and i hope they will sort this out sooner.
Click to expand...
Click to collapse
That's debatable. I have no noticeable issues when actually moving (even at walking pace), and get an accurate lock. When sitting still, the GPS does show slight motion, but only in the area immediately around my actual point, and even my dedicated GPS receiver does that to a degree. It's a fact of life that consumer GPS doesn't give better accuracy than a couple of yards.
I used Google navigation yesterday for a 25 mile trip. No issue. I've not tried it for walking but then I never really use it for that. Maybe I can have a go and report back.
Sent from my HTC One X using xda premium
I too am noticing an issue with GPS accuracy as detailed in my post here using sports trackers:
http://forum.xda-developers.com/showthread.php?t=1599057
Hard to say if its a software issue or hw issue... I havent "Tracked" myself over a long distance so it could be the GPS getting confused with only small changes in distance?
Can someone track themselves on a long-ish road that doesnt have many/any slow moving areas so we can see the accuracy of it?
I'd be curious to know what cases people with problems are using. We've already had one report of reduced wifi range with a third-party case, not beyond the realms of possibility that it could also reduce gps reception.
Sent from my Transformer TF101 using XDA
Guys, I just replaced my phone yesterday, I have to say the replacement has far more better accuracy than the old one. It seems to be a hardware defect and if you have the same problem then have it replaced asap.
To check, just download speedview, stand still outside with clear vew to the sky, and see how the speed jumps. If its between 0 to 5 and mostly 0 then you have a good unit, otherwise if goes to 20 then 40 and even 220!! then u definitely need to replace the device. I dont think any method u try will resolve this issue cuz its a hardware problem and not software.
+1: GPS is unusable...
and 1.28 yesterday did not better my gps stability
zilmer said:
and 1.28 yesterday did not better my gps stability
Click to expand...
Click to collapse
If GPS is unusable, you most likely have a hardware problem. Get the phone replaced.
Tiersten said:
Google Maps has my arrow moving around a lot and also changes direction significantly even when I'm stationary.
Click to expand...
Click to collapse
+1 to this as well, the compass isn't working correctly, maps showing me in completely different direction.
Got bored and decided to film it.
Makes me laugh
http://www.youtube.com/watch?v=hcbtRUHBo40
Sitting on my desk right under the window. Nexus one right next to it doesnt do this.....
Demented-Idiot said:
Got bored and decided to film it.
Makes me laugh
http://www.youtube.com/watch?v=hcbtRUHBo40
Sitting on my desk right under the window. Nexus one right next to it doesnt do this.....
Click to expand...
Click to collapse
That's funny to watch. Here's what I've found. When you download and view GPS Tracker you can see that the phone's not staying fixed to specific satellites and is instead bouncing around between them. The weaker the signal (indoors) the more it bounces. Outdoors with a clear signal it's fine. But because it's still locking on satellites, even randomly, it still maintains its accuracy. My accuracy indoors is 9' vs. 15' for my SGS2. I haven't compared it to another One X so can't comment on whether they all behave the same way.
You might want to run GPS Tracker on both your One X and GN to see how differently they perform. Also keep in mind that the way GPS works in flight mode (no aGPS support) is very different than when it's using Wi-Fi or a wireless signal. The former is the best way to test the GPS chips function. To really test the GPS chip put the phone in flight mode and then restart it. It'll be much slower to lock (they all are) and the results you'll be seeing are the GPS chip working on its own.

Hack to improve Defy battery life by tweaking wifi ini files

The problem
I've been using CM10 on a Defy+ for a few days now. I've quickly noticed that I'm not getting exactly stellar battery life. Checking BetterBatteryStats indicated zero deep sleep, and "wifi_wake" as king of the wakelocks.
I realise that it's probably not wifi's fault but rather inconsiderate apps using wakelocks badly, still, something needs to be done.
Who is this for
People who, when their Defy+ has wifi on and connected, get absolutely no deep sleep in BetterBatteryStats, and wifi_wake or similar tops the kernel wakelock chart.
Does this work when wifi is on but not connected to an AP?
No idea. Theoretically, wherever you come near an AP there will be beacons and DTIM's flying around so it might work. But if you're not going to be connected you might as well turn wifi off, either manually or with an app. I can recommend Wi-Fi Matic, it uses a clever trick (uses GSM cell IDs to detect proximity to a known AP).
Possible solution (*ROOT* needed. This was ONLY tested on Defy+ with CM10.)
After some research I came to the configuration files for the TI wifi module, which are located in /system/etc/wifi and called tiwlan.ini and tiwlan_ap.ini. After some digging around and reading the Texas Instruments doc for the module (sprugt8.pdf), I'm prepared to offer a hack:
In tiwlan.ini change DtimListenInterval from 1 to 30.
In tiwlan_ap.ini change BeaconListenInterval from 1 to 10.
Reboot and see if BetterBatteryStats reports better (or any) deep sleep with wifi on and connected.
This combination gives me up to 85% deep sleep. YMMV because you probably don't have the same apps & background services installed as I do, usage patterns etc.
Increasing these values even further is possible (valid range is 1-50) but with only marginal improvements to deep sleep time and increasing issues with wifi (frequent disconnects in the case of weak signal). In other words, the connectivity problems aren't worth the extra 5% of deep sleep. Even so, if you manage to increase them (beacon in particular, I haven't tested large values as thorough as I did DTIM) and still keep wifi stable, please let us know.
Here's my findings for DtimListenInterval (on its own): 10 gives 25-30% deep sleep, 20 gives 42-50%, 30 goes up to 60%. Increasing it any further is pretty much useless, 50 (max) will get you to ~67% but expect heavy disconnects.
For BeaconListenInterval: 10 seems to be an upper limit when Dtim is around 25-30. Going over will cause disconnects even with very strong APs.
I haven't documented BeaconListenInterval on its own very rigurously, OR various combinations of the two, because I got bored of rebooting. Plus the fact I don't know when which of the two ini files will be used, so it's kinda like shooting in the dark. You're welcome to contribute your own findings.
But how do I edit those files?
You need root and any file manager worth its salt that lets you see the system files and edit them.
Is this dangerous?
I have no idea and I take no responsability. It's probably a good idea to make a backup of those files, and, even better, slap the backups into a flashable zip on the root of your sdcard. In case something bad happens you can reboot in recovery and install the good versions back. Example flashable zip and tutorial here. Remember, they go into system/etc/wifi/.
Warning: I used this on CM10 and Defy+
If you attempt it on anything else all bets are off. If the files are not there, you can't find the keywords and so on, you're on your own. Still, you can read the explanations below and try to see if anything helps.
Explanations
tiwlan.ini and tiwlan_ap.ini control the behavior of the wifi module. I have no idea why there's two of them (or more, on some devices), but after poking around I've determined they must all be modified because they are used in different cases. (Different apps? Different circumstances? Different hardware parts? If anybody can enlighten us it would be super.)
These config files are similar, but different in some key aspects. Both my files have dot11PowerMode=0 which means "auto", which means that it looks at AutoPowerModeDozeMode to determine if it uses short (2) or long (3) doze mode for power saving. tiwlan.ini has short mode, tiwlan_ap.ini has long mode. This in turn means they use different listen intervals: short mode (tiwlan.ini) observes BeaconListenInterval, long doze (tiwlan_ap.ini) observes DtimListenInterval. Which is why we modify different properties in each file.
What are beacons and DTIMs? Simply put, beacons are a signal broadcasted by wifi access points periodically to let wifi clients they're there, and DTIMs are packages of special information about the AP. The most typical setup for most wifi APs is to send a beacon every 100ms i.e. 10 times a second, and a DTIM after every beacon, or at most every other beacon.
The default settings of "1" for BeaconListenInterval and DtimListenInterval means that the phone watches for these signals 5-10 times a second and, well, it's no wonder it doesn't get any sleep. Mind you, this does make for superb wifi connectivity, at the expense of battery life.
BTW, you can probably achieve similar effects by tweaking your wifi router to send beacons/DTIMs less often – all the wifi devices around your home will probably thank you. But of course you cannot control wifi APs everywhere you go, and it might backfire! Read below.
So why didn't "they" put better values on these settings?
For exactly the reason in the above paragraph: because you don't know what settings a particular AP you're trying to use has.
Here's an example. Say somebody tweaked their AP and put 10 beacons a second and a DTIM every 10 beacons. This means a DTIM once a second, then you come along and tweak your phone to only wake up the wifi connection every 30 DTIMs. That means 30 seconds, time in which the connection will most likely time out.
You cannot predict this kind of stuff so there's no safe default values other than "1", which mean "react as quickly as possible to any beacons/DTIMs we get because we don't know when we're getting another". My tweak is based on the assumption that the AP emits 10 beacons a second and DTIM with every beacon (beacon interval 100ms and DTIM interval 1). If the AP you use has been tweaked for more relaxed values these ini tweaks may backfire and cause disconnects!
Other potentially relevant ini settings
Here are some more interesting settings which could be further tweaked to get even better results:
PowerMgmtHangOverPeriod
AutoPowerModeActiveTh
AutoPowerModeDozeTh
BeaconReceiveTime
See the TI pdf for details.
That's all folks
Thanks for reading this far. Please contribute if you have insights, if I said stupid things or if you find settings that seem to work better.

Galaxy Note 2 crashes during "screen-off" and heavy load.

Dear Experts,
Long time lurker here.
I'm currently in a dispute with the dealer on whether or not the Samsung Galaxy Note 2 i bought has a hardware or software issue. If it's a hardware issue it can be repaired under warranty. The device is completely stock with no modifications what so ever, as well as no root access. If you can help me provide a sufficient explanation of why it's a hardware related issue, perhaps I do not need to purchase a brand new phone, and hopefully it could help others with similar issues.
The issue arises when the phone is under heavy load and the screen is turned off. This normally seems to happen when the phone has multiple applications running background processes at the same time while updating applications (usually when the device has been left alone for a while). The device will then crash/freeze (i.e. screen will remain off and no response on any buttons). The only way to fix this is to hard reset the phone, by either long hold the power button, or pop out the battery. It will continue to drain power and heat up in this "frozen" state, as if it is still under load, until the battery dies.
The issue will persist after doing factory resets. However, the symptoms will not occur unless it has been used actively for a while (i.e. installing apps, enabling background updates etc.). This makes it harder to replicate the issue. However the symptoms can be seemingly replicated by using Stability Test 2.7 (a stress/burn-in test available on the Play Store), buy running the Classic Stability Test (CPU/RAM) and then turn the screen off for about 20-60sec, where it will crash. The issue will not occur when running heavy loads when the screen is turned on (i.e. when using it).
From my uninformed perspective, I suspect there could be an issue with a memory component of the device, as this only occurs when the screen is turned off. Which would probably mean that (I assume) the "snapshot" of the devices' current state, which the phone saves when turning off the screen, is somehow bugged because of heavy load, and thus crashes the device. Hopefully you could make a better sense of it than me.
Yours sincerely

Categories

Resources