OnePlus 3T Automatically Connects to BLE Device Without Being Told To - Android Q&A, Help & Troubleshooting

I originally posted this question on Stackoverflow, but thought y'all might have some more insight.
I have a BLE device and app that I am developing. When I use my OP3T to connect to the device and then disconnect, the system goes through this cycle of connecting and disconnecting every 5-ish seconds.
This is what I have tried:
Tried testing on other phones, both previous Android versions and the same version, but different hardware. No other phones exhibit this behavior.
Connected to the device through my app, through the nRF Connect app and by pairing to the device through the Bluetooth settings screen. No matter what, the issue appears. When using the apps, I would connect, then disconnect and then immediately kill the app by opening the app switcher and swiping the app away. I confirmed that the app was dead by searching for the pid with adb shell ps | grep and also ensured logcat wasn't showing that pid.
Loaded my own firmware onto the device as well as an example application from the manufacturer with the same results.
Ensured that the UUIDs for the services are different from the ones set aside by the Bluetooth SIG. I am using the company ID of 0xFFFF, btw.
Ensured that the autoconnect flag is false.
Inspected the hci log to ensure that the device was indeed connecting and disconnecting.
I am leaning towards the idea that the Android system believes the device is a headset and therefore connects to it when it can. However, I don't think this explains why it also disconnects. I have this theory due to some log messages referencing Avrcp (Audio/Video Remote Control Profile), HeadsetStateMachine and pbap (Phone Book Access Profile) that surround a connecting or disconnection event.
Here is the logcat log with the filter "connect". I can supply a full log capture from turning Bluetooth on, to a few cycles of the connect/disconnect behavior, if needed.
Code:
07-25 16:39:59.435 2896-3336/? V/AlarmManager: Triggering alarm #0: 2 when =859680625 package=com.google.android.gmsoperation =*walarm*:null.CONNECTION_ALARM
07-25 16:40:02.544 2896-3336/? V/AlarmManager: Triggering alarm #0: 2 when =859682773 package=com.google.android.gmsoperation =*walarm*:null.CONNECTION_ALARM
07-25 16:40:04.441 5709-5752/? W/bt_btif: bta_gattc_conn_cback() - cif=3 connected=0 conn_id=3 reason=0x0016
07-25 16:40:04.442 5709-5752/? W/bt_btif: bta_gattc_conn_cback() - cif=4 connected=0 conn_id=4 reason=0x0016
07-25 16:40:04.442 5709-5752/? I/bt_btm_sec: btm_sec_disconnected clearing pending flag handle:10 reason:22
07-25 16:40:04.459 5709-5709/? D/AvrcpBipRsp: onReceive: android.bluetooth.device.action.ACL_DISCONNECTED
07-25 16:40:04.460 5709-5709/? D/BluetoothMapService: onReceive: android.bluetooth.device.action.ACL_DISCONNECTED
07-25 16:40:04.472 4077-4077/? I/TrustAgent.Tracker: [BluetoothConnectionTracker] Bluetooth disconnect broadast for Prototype-Device F3:93:9C:88:3B:66
07-25 16:40:05.181 5709-5709/? D/BluetoothPbapReceiver: PbapReceiver onReceive action = android.bluetooth.device.action.ACL_DISCONNECTED
07-25 16:40:05.198 5709-5709/? I/BluetoothPbapReceiver: Exit - onReceive for intent:android.bluetooth.device.action.ACL_DISCONNECTED
07-25 16:40:05.199 5709-5709/? D/BluetoothPbapService: action: android.bluetooth.device.action.ACL_DISCONNECTED
07-25 16:40:05.214 5709-5709/? V/BluetoothFtpService: PARSE INTENT action: android.bluetooth.device.action.ACL_DISCONNECTED
07-25 16:40:05.231 5709-5709/? D/BluetoothDunService: parseIntent: action: android.bluetooth.device.action.ACL_DISCONNECTED
07-25 16:40:05.606 5709-5752/? W/bt_smp: smp_br_connect_callback is called on unexpected transport 2
07-25 16:40:05.651 4077-4077/? I/TrustAgent.Tracker: [BluetoothConnectionTracker] Bluetooth connect broadast for Prototype-Device F3:93:9C:88:3B:66
07-25 16:40:06.640 2896-3336/? V/AlarmManager: Triggering alarm #0: 2 when =859687830 package=com.google.android.gmsoperation =*walarm*:null.CONNECTION_ALARM
07-25 16:40:11.641 5709-5752/? W/bt_btif: bta_gattc_conn_cback() - cif=3 connected=0 conn_id=3 reason=0x0016
07-25 16:40:11.642 5709-5752/? W/bt_btif: bta_gattc_conn_cback() - cif=4 connected=0 conn_id=4 reason=0x0016
07-25 16:40:11.642 5709-5752/? I/bt_btm_sec: btm_sec_disconnected clearing pending flag handle:11 reason:22
07-25 16:40:11.656 5709-5709/? D/AvrcpBipRsp: onReceive: android.bluetooth.device.action.ACL_DISCONNECTED
07-25 16:40:11.657 5709-5709/? D/BluetoothMapService: onReceive: android.bluetooth.device.action.ACL_DISCONNECTED
07-25 16:40:11.666 4077-4077/? I/TrustAgent.Tracker: [BluetoothConnectionTracker] Bluetooth disconnect broadast for Prototype-Device F3:93:9C:88:3B:66
07-25 16:40:12.342 5709-5709/? D/BluetoothPbapReceiver: PbapReceiver onReceive action = android.bluetooth.device.action.ACL_DISCONNECTED
07-25 16:40:12.355 5709-5709/? I/BluetoothPbapReceiver: Exit - onReceive for intent:android.bluetooth.device.action.ACL_DISCONNECTED
07-25 16:40:12.356 5709-5709/? D/BluetoothPbapService: action: android.bluetooth.device.action.ACL_DISCONNECTED
07-25 16:40:12.370 5709-5709/? V/BluetoothFtpService: PARSE INTENT action: android.bluetooth.device.action.ACL_DISCONNECTED
07-25 16:40:12.380 5709-5709/? D/BluetoothDunService: parseIntent: action: android.bluetooth.device.action.ACL_DISCONNECTED
07-25 16:40:12.761 5709-5752/? W/bt_smp: smp_br_connect_callback is called on unexpected transport 2
07-25 16:40:12.800 4077-4077/? I/TrustAgent.Tracker: [BluetoothConnectionTracker] Bluetooth connect broadast for Prototype-Device F3:93:9C:88:3B:66
07-25 16:40:13.790 2896-3336/? V/AlarmManager: Triggering alarm #0: 2 when =859694981 package=com.google.android.gmsoperation =*walarm*:null.CONNECTION_ALARM
07-25 16:40:15.927 2896-3336/? V/AlarmManager: Triggering alarm #0: 2 when =859697117 package=com.google.android.gmsoperation =*walarm*:null.CONNECTION_ALARM
How can I stop the system from automatically connecting and disconnecting?

xlaffer said:
I originally posted this question on Stackoverflow, but thought y'all might have some more insight.
I have a BLE device and app that I am developing. When I use my OP3T to connect to the device and then disconnect, the system goes through this cycle of connecting and disconnecting every 5-ish seconds.
This is what I have tried:
Tried testing on other phones, both previous Android versions and the same version, but different hardware. No other phones exhibit this behavior.
Connected to the device through my app, through the nRF Connect app and by pairing to the device through the Bluetooth settings screen. No matter what, the issue appears. When using the apps, I would connect, then disconnect and then immediately kill the app by opening the app switcher and swiping the app away. I confirmed that the app was dead by searching for the pid with adb shell ps | grep and also ensured logcat wasn't showing that pid.
Loaded my own firmware onto the device as well as an example application from the manufacturer with the same results.
Ensured that the UUIDs for the services are different from the ones set aside by the Bluetooth SIG. I am using the company ID of 0xFFFF, btw.
Ensured that the autoconnect flag is false.
Inspected the hci log to ensure that the device was indeed connecting and disconnecting.
I am leaning towards the idea that the Android system believes the device is a headset and therefore connects to it when it can. However, I don't think this explains why it also disconnects. I have this theory due to some log messages referencing Avrcp (Audio/Video Remote Control Profile), HeadsetStateMachine and pbap (Phone Book Access Profile) that surround a connecting or disconnection event.
Here is the logcat log with the filter "connect". I can supply a full log capture from turning Bluetooth on, to a few cycles of the connect/disconnect behavior, if needed.
How can I stop the system from automatically connecting and disconnecting?
Click to expand...
Click to collapse
Hey, did you ever find a solution for this? I'm now facing the same issue

JoshJ22 said:
Hey, did you ever find a solution for this? I'm now facing the same issue
Click to expand...
Click to collapse
Hey Josh,
No, I did not find a solid solution to this exact problem. I got more or less the desired outcome eventually. I believe it was something to do with setting/clearing the autoconnect flag or similar upon initial connection. I can't remember if this actually solved the disconnect/reconnect issue, however. I will need to dig back in to give a solid answer. Are you working with the same hardware or something else?

Related

[Q] Keeps asking for Sim PIN at random intervals?

Hi
I've been having problems with my X10 Mini Pro for the last couple of days. It keeps asking for the SIM-pincode every so often.
To be clear: It's asking for Sim PINCODE, not PUK.
Phone: X10 Mini Pro, Android 2.1-update1, rooted with SuperOneClick.
Searched google for solutions, found a thread about Backup & Restore causing this. Followed instructions and deleted it. But I'm still having random SIM-lockups.
In the meantime i've made a small app that checks the sim-state periodically and warns me right away when something's wrong. Was able to get a LogCat-dump (attached)
Phone asked for pin @ 11:56:27
It looks like the com.android.stk (SimToolKit) was terminated a couple of seconds earlier. Right after that the ActivityMinitor prompts it's restarting com.android.stk and -.phone:
D/Zygote ( 1098): Process 22219 terminated by signal (11)
I/ActivityManager( 1194): Process com.android.phone (pid 22219) has died.
W/ActivityManager( 1194): Scheduling restart of crashed service com.android.stk/.StkAppService in 5000ms
W/ActivityManager( 1194): Scheduling restart of crashed service com.android.phone/.DataTrafficExceptMmsNotifier in 15000ms
W/ActivityManager( 1194): Scheduling restart of crashed service com.android.phone/.BluetoothHeadsetService in 25000ms
Hmmm. And just a bit later i've got like 10 lines of error-discription:
E/WifiService( 1194): Could not get PLMN!
I/WifiService( 1194): Nunmber off channels decreased
I/WifiService( 1194): Starting channel cache timer
D/dalvikvm(24867): GC freed 3560 objects / 239520 bytes in 98ms
E/DeviceMonitor( 1672): Could not create crash message java.lang.NullPointerException
E/JavaBinder(24867): *** Uncaught remote exception! (Exceptions are not yet supported across processes.)
E/JavaBinder(24867): java.lang.RuntimeException: android.os.DeadObjectException
E/JavaBinder(24867): at android.os.Parcel.writeException(Parcel.java:1177)
E/JavaBinder(24867): at android.os.Binder.execTransact(Binder.java:293)
E/JavaBinder(24867): at dalvik.system.NativeStart.run(Native Method)
E/JavaBinder(24867): Caused by: android.os.DeadObjectException
E/JavaBinder(24867): at android.os.BinderProxy.transact(Native Method)
E/JavaBinder(24867): at android.content.IIntentReceiver$Stub$Proxy.performReceive(IIntentReceiver.java:121)
E/JavaBinder(24867): at android.app.ActivityThread$ApplicationThread.scheduleRegisteredReceiver(ActivityThread.java:1573)
E/JavaBinder(24867): at android.app.ApplicationThreadNative.onTransact(ApplicationThreadNative.java:325)
E/JavaBinder(24867): at android.os.Binder.execTransact(Binder.java:291)
E/JavaBinder(24867): ... 1 more
E/CheckinService( 1194): Can't find package com.spritemobile.backup.semc2
E/EONS (24867): Invalid sstPlmnOplValue -1
E/WifiService( 1194): Could not get PLMN!
I/WifiService( 1194): Nunmber off channels decreased
I/DumpStateReceiver( 1194): Added state dump to 1 crashes
E/WifiService( 1194): Could not get PLMN!
I/WifiService( 1194): Nunmber off channels decreased
E/EONS (24867): Invalid sstPlmnOplValue -1
This is about the point I re-entered the pincode.
Since especially .STK has a lot to do with your sim-card (it should be the only service having access to it) the problem should be related to it's shutdown.
But what's shutting it down? And why?
And how do I prevent this!
>> PS: The app i've made for checking sim-state: http://forum.xda-developers.com/showthread.php?p=10479098
>> PS2: Found a possible (temp) solution. Disable the Sim-lock alltogether. Great...
Instructions:
1 From the Home screen, drag upwards.
2 Find and tap Settings > Security & location > Set up SIM card lock > Lock SIM
card.
3 Enter the SIM card PIN and tap OK.
i have a similar problem with my 2.1 x10 mini (both versions), starting about one week ago.
but i haven't found a solution either.
Do you actually need Stk? Because if you don't, remove it, I have and everything works OK for a month or more (backup first if you want).
Removing the service? Hmm. Would rather not since it is (or should be?) an android native app.
Btw an update: this morning alone my phone went to 'sim_state_unavailable' and/or -_absent at least 5 times:
6:30, 6:39, 6:49, 7:00, 8:50
(can't see further in history, but I guess 6:30 wasn't the first time)
the weird thing is that at night/early morning it seems to do it all the time, but during the day it only happens like 2-3 times. I mean... my phone's not doing ANYTHING so early in the morning. I'm still sleeping!
Rejh said:
Removing the service? Hmm. Would rather not since it is (or should be?) an android native app.
Btw an update: this morning alone my phone went to 'sim_state_unavailable' and/or -_absent at least 5 times:
6:30, 6:39, 6:49, 7:00, 8:50
(can't see further in history, but I guess 6:30 wasn't the first time)
the weird thing is that at night/early morning it seems to do it all the time, but during the day it only happens like 2-3 times. I mean... my phone's not doing ANYTHING so early in the morning. I'm still sleeping!
Click to expand...
Click to collapse
When I first saw it, I thought is was a branded app, since it was useless for me (it has been so long, I don't remember what the app offers). I don't know why it does what it does, sorry.
i also experienced the sms/mms app closing with an error caused by "com.sonyericsson.conversations".
i have the feeling that this is related to the PIN-problem but am not sure.
what do you think about it?
hmm, do u use some type of task killing app?
no, i don't
I have the same problem with my Huawei Ascend P1 (U9200).
And what's more irritating is that I just got it back from service a couple of weeks ago, where they allegedly fixed that problem.
No root, haven't been messing around with anything on this device.
I found that many devices have the same problem... any idea about it afer 4 years.....? I have the same problem with my wileyfox storm.
https://forums.oneplus.net/threads/sim-card-pin-asked-multiple-times-during-the-day.266529/

[Q] Bluetooth slowly responding

Hi all,
I think I’ve broken the bt functionality of my alcatel ot 995 by installing and applying fixes that were told to solve issues with headsets. Well, they did so: since then I haven’t been able to use it at all.
How could I restore the original settings of Bluetooth Share? I tried and cleared data in app manager but still, I can’t even pair my phone to other devices because of its slow reaction. It displays the pairing code only after the other device has given up the pairing request. I tried to look at logcat and bt seems to generate a lot of events even after turning it off. But so much that I feel like Neo in Matrix as the lines are scrolling down in cmd.
While bt is turned off, I received error messages such as:
I/ActivityManager( 186): Start proc com.broadcom.bt.app.system for restart com.
broadcom.bt.app.system: pid=29110 uid=1002 gids={3001, 3002}
V/WindowManager( 186): Layout: mDisplayFrozen=false holdScreen=null
D/AndroidRuntime(29110): Get string from web_user_agent Mozilla/5.0 (Linux; U; A
ndroid 2.3.6; en-gb; ALCATEL_one_touch_995 Build/GINGERBREAD) AppleWebKit/533.1
(KHTML, like Gecko) Version/4.0 Mobile Safari/533.1
W/ActivityManager( 186): Unable to start service Intent { cmp=com.android.music
/.MediaPlaybackService }: not found
I/InputManager-Callbacks( 186): No input device calibration properties found fo
r device AVRCP.
V/WindowManager( 186): Layout: mDisplayFrozen=false holdScreen=null
I/ActivityManager( 186): Process com.broadcom.bt.app.system (pid 29110) has die
d.
W/ActivityManager( 186): Scheduling restart of crashed service com.broadcom.bt.
app.system/.OppService in 20000ms
I/ActivityManager( 186): Start proc com.broadcom.bt.app.system for restart com.
broadcom.bt.app.system: pid=29119 uid=1002 gids={3001, 3002}
Whereas, after turning bt off, I get these lines:
V/BluetoothPbapService(27835): Accept exception: java.io.IOException: Software c
aused connection abort
V/BluetoothPbapService(27835): Accept exception: java.io.IOException: Software c
aused connection abort
This endless flow can be stopped by disabling and re-enabling CREATE_LIVE_FOLDER event of Bluetooth Share and then android won’t consume a lot of energy any more.
Could you please give me some tips what I could reset or fix in order to get the system work properly again? Unfortunately I haven’t made any backups (except for a One Touch backup but restoring that did not work)
I have resolved this by reinstalling the default music app. Sorry for starting a new thread, it could be deleted.

disable wifi battery optimisation and sleep, keeps disconnecting when off.

Hi!
This is a real problem making the phone almost unusable. It seems people had this kind of problem with older versions, but particularly with Oreo.
When my screen turns off (or is turned off) wifi seems to disconnect. I have a phone app working with my local PBX that immediately disconnects from the PBX system - although sometimes it doesn't. (It doesn't actively disconnect, but stops talking to the PBX and thus if you try calling it leads to an error unreachable in the PBX).
All other messaging apps like Whatsapp and Skype have similar problems - I get to the phone and turn it on only to get messages and missed calls from hours ago. Unusable.
Sometimes I can even see a little X next to the wifi symbol that disappears within a few second, sometimes the wifi symbol is missing altogether for a few seconds.
There is no more setting "keep wifi on during sleep" in Oreo. I disabled Battery optimisation for affected apps, I allowed background usage for them. The only thing I can't do is disable battery optimisation for wifi - which is displayed in the battery stats - but there is NO app "wifi" in app manager where I could flip this switch....
Any other ideas? I'm running AEX on the Note 5+. Thanks!!!
Seems like problem with kernel or maybe gapps, try different versions of gapps or kernel.
Oh, really? Gapps could affect that? How, why? It's getting insane. I wish there was an alternative to android phones - every time I need a new one it's months till it is fully usable and all for no good reason.
So far it sounds its the same problem many people report related to doze. "adb shell dumpsys deviceidle disable" should help as all the problems I have are described here:
http://forums.androidcentral.com/android-pie/904647-notifications-delayed-stopped-4.html
Unfortunately it doesn't seem to work on my system.
Just blurting this out here because matters have improved at least for the first minutes of screen off now...
I changed from "no notifications" on lockscreen to "show but hide sensitive info" and that seems to have improved things.
Really, a new phone system that doesn't work for what it's supposed to do - I'm not just speaking of delayed notifications - the worst part is that 3 voip apps and 3 messenger apps did not receive any calls when people tried calling me. The ONE thing a phone is supposed to do. UN-BE-LIEVABLE. It's so time somebody makes a proper Linux phone without focus on surveillance and spying. If it just worked as I need it to I'd pay up to 400 for it or 100 annually (just the OS!) - especially if I get requested features implemented and bugs removed.
Molvol said:
Hi!
When my screen turns off (or is turned off) wifi seems to disconnect. I have a phone app working with my local PBX that immediately disconnects from the PBX system - although sometimes it doesn't. (It doesn't actively disconnect, but stops talking to the PBX and thus if you try calling it leads to an error unreachable in the PBX).
Any other ideas? I'm running AEX on the Note 5+. Thanks!!!
Click to expand...
Click to collapse
Surprisingly, on Xiaomi devices some bugs are fw specific, means you face some weird bugs which are related to your firmware and not the system you are on. Try the latest 9.3.24 firmware from latest China, as I personally had the issue, I tried fixing it with different implementations but the bug was persistent, but I guess that issue seems to disappear every now and then when I use different firmwares. So give it a try!
AmulyaX said:
Surprisingly, on Xiaomi devices some bugs are fw specific, means you face some weird bugs which are related to your firmware and not the system you are on. Try the latest 9.3.24 firmware from latest China, as I personally had the issue, I tried fixing it with different implementations but the bug was persistent, but I guess that issue seems to disappear every now and then when I use different firmwares. So give it a try!
Click to expand...
Click to collapse
So you mean I should flash the latest MIUI China developer? And it will rewrite special partitions (like Modem) that other ROMS don't touch and therefore afterwards I may not have issues any more? Can I flash this with TWRP or something else and do I have to re-unlock afterwards or re-install TWRP? Thanks!!
Facing the same problem and can't fix the issue with anything.
I have a similar problem with the factory rom and firmware, so if I read it right, I have to flash another firmware?
i have the same problem, even flashing fastboot rom and going back to pie didn't fix it.
Same, it happened sometimes in Oreo, but is all the time in Pie.
Tried everything, but seems like a Xiaomi wide modem problem.
any updates? i have this issue too.. is "hide sensitive info" thing still works on yours?
So I have somewhat improved my problem with editing the wifi configuration file. People have this problem on the Pixel as well - it's partly an Android problem. It's so time somebody forks that **** from Google - they don't know what they are doing - and makes something stable for a phone to work like a phone should.
https://forum.xda-developers.com/oneplus-5/themes/magisk-pixel-2-wifi-mod-t3752321
For me the solution there didn't work at all, kept crashing. My current WCNSS_qcom_cfg.ini i copied from my LG G3 and it works much better, it now takes about 15min until it's dead, but the first call will wake it up now, so that a second one makes it ring. Still unusable and ridiculous, but at least it doesn't turn off with the screen.
This is how mine looks now:
Code:
# This file allows user to override the factory
# defaults for the WLAN Driver
# Enable IMPS or not
gEnableImps=1
# Enable/Disable Idle Scan
gEnableIdleScan=0
# Increase sleep duration (seconds) during IMPS
# 0 implies no periodic wake up from IMPS. Periodic wakeup is
# unnecessary if Idle Scan is disabled.
gImpsModSleepTime=0
# Enable BMPS or not
gEnableBmps=1
# Enable suspend or not
# 1: Enable standby, 2: Enable Deep sleep, 3: Enable Mcast/Bcast Filter
gEnableSuspend=3
# Phy Mode (auto, b, g, n, etc)
# Valid values are 0-9, with 0 = Auto, 4 = 11n, 9 = 11ac
gDot11Mode=0
# CSR Roaming Enable(1) Disable(0)
gRoamingTime=0
# Assigned MAC Addresses - This will be used until NV items are in place
# Each byte of MAC address is represented in Hex format as XX
Intf0MacAddress=000AF58989FF
Intf1MacAddress=000AF58989FE
Intf2MacAddress=000AF58989FD
Intf3MacAddress=000AF58989FC
# Set/Clear UAPSD mask
UapsdMask=0
# UAPSD service interval for VO,VI, BE, BK traffic
InfraUapsdVoSrvIntv=0
InfraUapsdViSrvIntv=0
# Flag to allow STA send AddTspec even when ACM is Off
gAddTSWhenACMIsOff=1
# Make 1x1 the default antenna configuration
gNumRxAnt=1
# Beacon filtering frequency (unit in beacon intervals)
gNthBeaconFilter=50
# Enable WAPI or not
# WAPIIsEnabled=0
# Flags to filter Mcast abd Bcast RX packets.
# Value 0: No filtering, 1: Filter all Multicast.
# 2: Filter all Broadcast. 3: Filter all Mcast abd Bcast
McastBcastFilter=0
#Flag to enable HostARPOffload feature or not
hostArpOffload=1
hostnsoffload=1
#SoftAP Related Parameters
# AP MAc addr
gAPMacAddr=000AF589dcab
# 802.11n Protection flag
gEnableApProt=1
#Enable OBSS protection
gEnableApOBSSProt=1
#Enable/Disable UAPSD for SoftAP
gEnableApUapsd=1
# Fixed Rate
gFixedRate=0
# Maximum Tx power
# gTxPowerCap=30
# Fragmentation Threshold
# gFragmentationThreshold=2346
# RTS threshold
RTSThreshold=2347
# Intra-BSS forward
gDisableIntraBssFwd=0
# WMM Enable/Disable
WmmIsEnabled=0
# 802.11d support
g11dSupportEnabled=0
# CCX Support and fast transition
EseEnabled=0
FastTransitionEnabled=1
ImplicitQosIsEnabled=0
gNeighborScanTimerPeriod=200
# default value of this parameter is zero to enable dynamic threshold allocation
# to set static roming threshold uncomment below parameter and set vaule
#gNeighborLookupThreshold=78
gNeighborScanChannelMinTime=20
gNeighborScanChannelMaxTime=30
# Legacy (non-CCX, non-802.11r) Fast Roaming Support
# To enable, set FastRoamEnabled=1
# To disable, set FastRoamEnabled=0
FastRoamEnabled=1
#Check if the AP to which we are roaming is better than current AP in terms of RSSI.
#Checking is disabled if set to Zero.Otherwise it will use this value as to how better
#the RSSI of the new/roamable AP should be for roaming
RoamRssiDiff=5
# SAP Country code
# Default Country Code is 2 bytes, 3rd byte is optional indoor or out door.
# Example
# US Indoor, USI
# Korea Outdoor, KRO
# Japan without optional byte, JP
# France without optional byte, FR
#gAPCntryCode=USI
#Short Guard Interval Enable/disable
gShortGI20Mhz=1
gShortGI40Mhz=1
#Auto Shutdown Value in seconds. A value of 0 means Auto shutoff is disabled
gAPAutoShutOff=0
# SAP auto channel selection configuration
# 0 = disable auto channel selection
# 1 = enable auto channel selection, channel provided by supplicant will be ignored
gApAutoChannelSelection=0
# Listen Energy Detect Mode Configuration
# Valid values 0-128
# 128 means disable Energy Detect feature
# 0-9 are threshold code and 7 is recommended value from system if feature is to be enabled.
# 10-128 are reserved.
# The EDET threshold mapping is as follows in 3dB step:
# 0 = -60 dBm
# 1 = -63 dBm
# 2 = -66 dBm
# ...
# 7 = -81 dBm
# 8 = -84 dBm
# 9 = -87 dBm
# Note: Any of these settings are valid. Setting 0 would yield the highest power saving (in a noisy environment) at the cost of more range. The range impact is approximately #calculated as:
#
# Range Loss (dB) = EDET threshold level (dBm) + 97 dBm.
#
gEnablePhyAgcListenMode=128
#Preferred channel to start BT AMP AP mode (0 means, any channel)
BtAmpPreferredChannel=0
#Preferred band (both or 2.4 only or 5 only)
BandCapability=0
#Beacon Early Termination (1 = enable the BET feature, 0 = disable)
enableBeaconEarlyTermination=1
beaconEarlyTerminationWakeInterval=8
#Bluetooth Alternate Mac Phy (1 = enable the BT AMP feature, 0 = disable)
gEnableBtAmp=0
#SOFTAP Channel Range selection
gAPChannelSelectStartChannel=1
gAPChannelSelectEndChannel=11
#SOFTAP Channel Range selection Operating band
# 0:2.4GHZ 1: LOW-5GHZ 2:MID-5GHZ 3:HIGH-5GHZ 4: 4.9HZ BAND
gAPChannelSelectOperatingBand=0
#Channel Bonding
gChannelBondingMode24GHz=1
gChannelBondingMode5GHz=1
gEnableModulatedDTIM = 3
gMaxLIModulatedDTIM = 3
gEnableDatainactivity = 200
#Enable Keep alive with non-zero period value
gStaKeepAlivePeriod=30
#Say gGoKeepAlivePeriod(5 seconds) and gGoLinkMonitorPeriod(10 seconds).
#For every 10 seconds DUT sends Qos Null frame(i.e., Keep Alive frame if link is idle for last 10 seconds.)
#For both active and power save clients.
#Power save clients: DUT set TIM bit from 10th second onwards and till client honors TIM bit.
#If doesn't honor for 5 seconds then Driver remove client.
#Active clients: DUT send Qos Null frame for 10th seconds onwards if it is not success still DUT try on
#11th second if not tries on 12th and so on till 15th second. Hence before disconnection DUT will send 5 NULL frames.
#Hence in any case DUT will detect client got removed in (10+5) seconds. i.e., (gGoKeepAlivePeriod +gGoLinkMonitorPeriod)..
#gGoLinkMonitorPeriod/ gApLinkMonitorPeriod is period where link is idle and it is period
#where we send NULL frame.
#gApLinkMonitorPeriod = 10
#gGoLinkMonitorPeriod = 10
#gGoKeepAlivePeriod/gApKeepAlivePeriod is time to spend to check whether frame are succeed to send or not.
#Hence total effective detection time is gGoLinkMonitorPeriod+ gGoKeepAlivePeriod/gApLinkMonitorPeriod+ gApKeepAlivePeriod.
gGoKeepAlivePeriod = 10
gApKeepAlivePeriod = 30
#If set will start with active scan after driver load, otherwise will start with
#passive scan to find out the domain
#gEnableBypass11d=1
#If set to 0, will not scan DFS channels
gEnableDFSChnlScan=1
gEnableLogp=1
# Enable Automatic Tx Power control
gEnableAutomaticTxPowerControl=0
# 0 for OLPC 1 for CLPC and SCPC
gEnableCloseLoop=1
#Data Inactivity Timeout when in powersave (in ms)
gDataInactivityTimeout=200
gEnableLpwrImgTransition=1
# Scan Timing Parameters
# gPassiveMaxChannelTime=110
# gPassiveMinChannelTime=60
# Enable Tx LDPC
#gTxLdpcEnable = 1 for HT mode, 2 for VHT mode,3 for both HT and VHT
gTxLdpcEnable=3
# gActiveMaxChannelTime=40
# gActiveMinChannelTime=20
# Valid values are 2048,4096,8192 and so on
# Please don't use values other than the ones mentioned above
gMaxMediumTime=4096
# 802.11K support
gRrmEnable=1
gRrmOperChanMax=8
gRrmNonOperChanMax=8
gRrmRandIntvl=100
#Scan offload
gEnableDirectedScanOffload=0
#FlexConnect Power Factor
#Default is set to 0 (disable)
gFlexConnectPowerFactor=0
gVhtChannelWidth=2
# VHT Tx/Rx MCS values
# Valid values are 0,1,2. If commented out, the default value is 0.
# 0=MCS0-7, 1=MCS0-8, 2=MCS0-9
gVhtRxMCS=2
gVhtTxMCS=2
# Enable Tx beamforming
gTxBFEnable=1
#Enable/Disable TDLS Feature
gEnableTDLSSupport=1
#Enable/Disable TDLS Implicit Trigger
gEnableTDLSImplicitTrigger=0
#Enable/Disable TDLS WMM Mode
gEnableTDLSWmmMode=1
#Enable/Disable TDLS Buffer Sta
gEnableTDLSBufferSta=1
#Enable/Disable Mgmt Frame Logging
gEnableMgmtLogging=1
#Enable/Disable MAc Spoofing
gEnableMacAddrSpoof=1
#Set RPS CPU mask
rps_mask=0f
# wifi ping test
gEnableDynSplitScan=0
gEnableLLStats=1
#Enable Power Save offload
gEnablePowerSaveOffload=1
isandroidpsen=1
END
# Note: Configuration parser would not read anything past the END marker
I have the same problem
Is there any fix j had tried to flash fm but nothing
The problem still not fixed
i wonder if it's related with router. What are yours? Mine is huawei hg630a and i also didn't try another wifi yet. But it's working good with miui roms..
Mine is ZTE and I don't think it's related to router
I think it related to fm or rom or modem
I don't know
mahmoud ayman said:
Mine is ZTE and I don't think it's related to router
I think it related to fm or rom or modem
I don't know
Click to expand...
Click to collapse
i tried almost every aosp pie rom and firmwares but nothing changes. (redmi 5 plus)
And I tried most Oreo Roms I could find. I did get different behavior with different routers/Wifi APs, but that only proves that the phone really has a problem. ALL other devices I tried have no problem whatsoever with any of these (Samsung, LG, Sony...). It's is not a hardware problem (in the sense that it can't be fixed by a setting). The problem is known to thousands of people struggling with android phones - although some are just similar, not identical.
We only need to find the right setting, maybe in the WCNSS_qcom_cfg.ini or possibly related to kernel/power management. Unfortunately I have not found proper documentation about either of these. Could also be a modem setting, but that is even more obscure and less documented. We either need incredible luck randomly trying things or someone who knows their way around android qualcom hw interaction.
i enabled gps and no problems with wifi while screen is locked. Tested it for 2 days. (9.4.11 firmware, twrp 3.3.0, gapps mini, resurrection remix and viper both works fine so other ones should too.)
hi, i actually have the opposite problem. i want to my wifi to go off auto when the phone goes off (the screen) not the mobile data but the wifi so i can always have connection but save battery with the wifi.
My phone's battery seems to barely get to 12 or 14 hs in a normal (to low) use. and ending the day with no battery at all, i had a samsung that get me to the night with 50% or even more most days. and i remember to have the option on wifi setting to turn wifi off when phone sleeps to save battery. any suggetions?
Hi, I have a Samsung S5, however, I think that it's a problem universal to a lot of Android phones (6 months+ googling on issues that ultimately seem to be caused by the wifi being switched off and going through xda threads for so many different phones). Eventually I found that my (CM based) ROM installation (Resurrection Remix 7.02) seems to be missing (or more likely has dispersed the relevant files into other locations) the /system/csc folder.
I found a thread on android central from a user alexceltare2 suggesting a line to add to /system/csc/others.xml (or features.xml if that exists) which is:
<CscFeature_Wifi_SupportAutoReconnect>TRUE</CscFeature_Wifi_SupportAutoReconnect>
I added this folder from an old ROM installation I happened to have (and modified the file content to remove the old ROM references) with a root file explorer to get the csc folder, added that line to my now existing features.xml file, rebooted and found I went from wifi sleeping after ~15 minutes or so to 7+ hours of wifi stability.
I don't know whether this helps anybody but I haven't found many references to missing csc folders or the features/other.xml files.

SMS does not show up in SMS APP, but can be catched with Tasker in Blackview BV9900 Pro

Hi,
recently I bought a new Blackview BV9900 Pro with Android 10. I rooted it with Magisk and was able to install MicroG on stock ROM.
So far almost everything is working fine, after setting ro.freeme_freemanager and ro.hct_autostart_manager to 0 in built.prop (known problem for newer Blackview devices).
(If these parameters are set to 1, no apps will start at boot. With these set to 0, at least the running apps at shutdown will be restarted)
But I really have a strange problem with receiving SMS messages.
If someone sends me a SMS, sometimes it will not pop up notfication and does not show up in my SMS app. Not in Google Messages and also not in QKSMS, which I installed for debug reasons. Also a sync in QKSMS with Android-SMS-Database doesn't shop up the message.
I installed Tasker and made a profile: If SMS gets received, it should show up a notification with the variable "%evtprm()". In this notification I can always see the SMS (text and also sender).
So, the SMS will be received by the mobile phone, but it doesn't get delivered to the SMS database of the phone.
Does anybody have a hint, how to debug that? Or has anybody solved a similar problem?
I think I found the solution and I want to share it with you.
For debugging I used the adb logcat command to display the buffers "radio" and "all".
Radio-buffer:
Code:
adb logcat -db radio
and to get all buffers:
Code:
adb logcat -db all
When viewing all buffers, I could find the following lines:
Code:
04-09 18:49:04.243 1437 1594 I ActivityManager: Force stopping com.moez.QKSMS appid=10211 user=0: from pid 1437
04-09 18:49:04.243 1437 1594 I am_uid_stopped: 10211
04-09 18:49:04.245 1437 1594 I ActivityManager: Killing 8032:com.moez.QKSMS/u0a211 (adj 930): stop com.moez.QKSMS
04-09 18:49:04.245 1437 1594 I am_kill : [0,8032,com.moez.QKSMS,930,stop com.moez.QKSMS]
04-09 18:49:04.250 1437 1594 W ActivityTaskManager: Force removing ActivityRecord{35c85d9 u0 com.moez.QKSMS/.feature.main.MainActivity t299 f}: app died, no saved state
04-09 18:49:04.250 1437 1594 I am_finish_activity: [0,56395225,299,com.moez.QKSMS/.feature.main.MainActivity,proc died without state saved]
04-09 18:49:04.266 1437 1594 I wm_task_removed: [299,removeAppToken: last token]
04-09 18:49:04.267 1437 1594 I am_remove_task: [299,53]
04-09 18:49:04.267 1437 1594 I wm_task_removed: [299,removeTask]
04-09 18:49:04.273 1437 1594 I wm_stack_removed: 53
04-09 18:49:04.295 1437 1437 I notification_cancel_all: [1000,1437,com.moez.QKSMS,0,0,0,5,NULL]
04-09 18:49:04.297 1437 1437 I sysui_multi_action: [757,128,758,5,759,5,793,2358238,794,314632,795,2358238,796,14,806,com.moez.QKSMS,857,notifications_default,858,4,947,0,1500,2358131,1641,msg,1688,1,1744,1,1745,732821530]
04-09 18:49:04.298 1437 1575 W BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.PACKAGE_RESTARTED dat=package:com.moez.QKSMS flg=0x10 (has extras) } to com.google.android.gms/org.microg.nlp.service.PackageChangedReceiver
04-09 18:49:04.298 1437 1437 I notification_canceled: [0|com.moez.QKSMS|14|null|10211,5,2358238,2358238,314632,-1,-1,NULL]
So, something was killing my SMS app (QKSMS).
After some research, I found "duraspeed" preinstalled on my phone. It is some kind of task manager or battery saver.
It has no launcher icon. You have so search for it in the Android settings. There you can open it.
I put QKSMS on the whitelist. Now it is working fine so far.
I am just a little scared because of this line:
Code:
04-09 18:49:04.298 1437 1575 W BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.PACKAGE_RESTARTED dat=package:com.moez.QKSMS flg=0x10 (has extras) } to com.google.android.gms/org.microg.nlp.service.PackageChangedReceiver
And idea, what is wrong here?
Hey,
Thanks for the tip! That solved a bunch of problems I had with apps not showing notifications and such.
I just turned it off for now, but might disable/remove it later!

Motorola G Pure (2021) sometimes goes into wifi/cellular freeze and stop receiving new data

Hello,
I got the following phone:
Moto G Pure | 2021 | 2-Day battery | Unlocked | Made for US by Motorola | 3/32GB | 13MP Camera | Deep Indigo
https://www.amazon.com/gp/product/B09BTB5MKT/
It has an Android 11 installed. The phone is typically connected to the local WiFi network and can reach 300mbps download/20mbps upload speeds when running the speedtest app.
I noticed that sometimes (once every few days or couple of weeks) the phone stops reacting to downloading new data from the internet.
So If I try to go to chrome browser and load a page, it would load the page forever. The WiFi icon will still show as it's connected to the WiFi and connected to the network. If I try to do a speedtest, the app would be stuck and not start downloading everything.
If I try to toggle the WiFi on and off, or use the cellular it doesn't seem to resolve the issue always, typically this would require a reboot of the phone.
I also noticed that sometimes this issue is even worst, when the cellular would stop working too, so if I send text messages to the phone, and go to the messages app, the new messages wouldn't show, neither the cellular internet would work or it will be really slow.
One time, I ran into this issue with the "internet freeze" when I configured a VPN (software-defined mesh virtual private network), and I set the VPN to always be on in settings, the internet still worked, but when I tried to reboot the phone, although the VPN got automatically connected as expected after reboot, it went into the "internet freeze", and only way I was able to resolve it is when I turned the VPN off. Still, the VPN by itself shouldn't be an issue with the internet still working, as evident when I turned on the VPN when the internet was already working and no problem there, but somehow the turn VPN always might have been the trigger point to the get "internet freeze" issue. Previous times the issue happened, I didn't run any VPNs so I'm suspecting there could be multiple trigger points that could cause this issue.
When I spoke with Motorola tech support, there wasn't really much troubleshooting other than making sure the software is up to date and keeping track of when the issue happens or how often. They did show me how to generate a bug report, so when the issue happens again, I could send it to them for further investigation. I was able to get bug report when the issue happened today - Actually Android automatically identified that there was an issue and generated the report. I know it might have some private sensitive information so I might not want to share it, but are there parts in it that I could safely share? For example, in the file dumpstate_log.txt when I search for the word "wifi" I can see this message repeatedly:
######################################################################
Warning: Skipping "[email protected]::ISupplicant/default": cannot be fetched from service manager (null)
and similar messages to it such as:
Warning: Skipping "[email protected]::IAllocator/ashmem": cannot be fetched from service manager (null)
######################################################################
Here are some other suspicious lines:
######################################################################
*** command 'lshal debug -E [email protected]::ISupplicant/default' failed: exit code 128
[email protected]::IAllocator/ashmem does not exist, or no permission to connect.
*** command 'lshal debug -E [email protected]::IMtkRadioEx/mtkRsu1' failed: exit code 128
[email protected]::IMtkRadioEx/mtkSe1 does not exist, or no permission to connect.
######################################################################
In file bugreport-ellis_retail-RRHS31.Q3-46-123-5-2-2023-05-28-20-41-03 I'm seeing these suspicious lines:
######################################################################
05-28 20:19:43.501 1000 1431 1459 W ActivityManager: Slow operation: 88ms so far, now at startProcess: returned from zygote!
05-28 20:19:43.501 1000 1431 1459 W ActivityManager: Slow operation: 88ms so far, now at startProcess: done updating battery stats
05-28 20:19:43.501 1000 1431 1459 W ActivityManager: Slow operation: 88ms so far, now at startProcess: building log message
05-28 20:19:45.625 1000 1431 1431 W Looper : Slow dispatch took 104ms main h=com.android.server.job.JobSchedulerService$JobHandler c=null m=4
05-28 20:20:34.311 1000 1431 1459 W ActivityManager: Slow operation: 272ms so far, now at startProcess: starting to update pids map
05-28 20:20:34.314 1000 1431 1459 W ActivityManager: Slow operation: 275ms so far, now at startProcess: done updating pids ma
######################################################################
Is there anything in particular in the log I should look for? I see there are additional folders such as FS, lshal-debug, proto.
I'm mostly interested to know what causes the phone to go into "internet freeze" issue - How can this issue be prevented all together, is there some setting or something? Is this a common issue with this phone or with Android? Did this happen with your phone too?
Thanks.

Categories

Resources