1.Wi-Fi hotspot cannot be used normally
问题描述:
android P – Settings – Network & internet – Hotspot & tethering – Wi-Fi hotspot – turn on the switch.
it will switch off automatically after a few seconds.
Logcat has been uploaded & one error has been found.
12-26 08:48:19.442 291 291 W hwservicemanager: getTransport: Cannot find entry android.hardware.wifi.hostapd@1.0::IHostapd/default in either framework or device manifest.
QC解决流程:
Created By: Uwen Zhang (1/2/2020 9:59 PM)
Dear Jianjun.
it means doesn't change in the right config.xml.
there are many config.xml defined config_wifi_softap_acs_supported.
search your code to check which XML define its value as true.
----------
Created By: Duan Jianjun (1/2/2020 9:45 PM)
i add log to print context.getResources().getBoolean(R.bool.config_wifi_softap_acs_supported)
it always true
frameworks/base/core/res/res/values/config.xml:700: <bool translatable="false" name="config_wifi_softap_acs_supported">false</bool>
vendor/qcom/proprietary/resource-overlay/common/Frameworks/res/values/config.xml:165: <bool translatable="false" name="config_wifi_softap_acs_supported">false</bool>
i donnot know why ?
can you find out other way to set it to true ?
Created By: Duan Jianjun (1/2/2020 8:20 PM)
it worked.
i just set
mEnableAcs = false;
however, default value is
<!-- Wifi driver supports Automatic channel selection (ACS) for softap -->
<bool translatable="false" name="config_wifi_softap_acs_supported">false</bool>
i don't understand.
pls check log.
logcat_20200103.txt & dmesg_20200103.txt
----------
Created By: Uwen Zhang (1/2/2020 6:48 PM)
Dear Customer,
#1 Please share the wlan driver log to check why ACS fail.
#2 the ACS flag config_wifi_softap_acs_supported already enabled from your 2 logs.
set blew to verify
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/HostapdHal.java#104
public HostapdHal(Context context) {
// mEnableAcs = //context.getResources().getBoolean(R.bool.config_wifi_softap_acs_supported);
mEnableAcs = false;
mEnableIeee80211AC =
context.getResources().getBoolean(R.bool.config_wifi_softap_ieee80211ac_supported);
}
The funtcion @
vendor/qcom/opensource/softap/softap/sdk/
2427 static int qsap_set_channel(s32 channel, s8 *tbuf, u32 *tlen)
2428 {
2429 u32 ulen;
2430 s8 *pcfgval;
2431 s8 schan[MAX_INT_STR+1];
2432 s8 *pcfg = pconffile;
2433
2434 ulen = *tlen;
2435
2436 /* Do not worry about hw_mode if intention is to use ACS (channel=0) */
2437 if (channel == 0)
2438 goto end;
----------
Created By: Duan Jianjun (1/2/2020 5:51 PM)
Hi QC,
pls check log, ap still disable.
1.WCNSS_qcom_cfg.ini
i set gApAutoChannelSelection=1
2.config_wifi_softap_acs_supported = true
3.argv[3] (channel=0)
i cannot find how to set channel.
Created By: Uwen Zhang (1/2/2020 12:32 AM)
01-02 02:21:57.010 E/QCSDK ( 6338): Cmd: acs_exclude_dfs Argument :0
01-02 02:21:57.010 D/QCSDK ( 6338): cmd=acs_exclude_dfs, Val:0, INI:0
01-02 02:21:57.013 D/QCSDK ( 6338): Adding a new line in hostapd.conf file: [acs_exclude_dfs=0
01-02 02:21:57.013 D/QCSDK ( 6338): ]
01-02 02:21:57.014 D/QCSDK ( 6338): CMD OUTPUT [success]
01-02 02:21:57.014 D/QCSDK ( 6338): len :7
01-02 02:21:57.014 D/QCSDK ( 6338):
01-02 02:21:57.014 D/QCSDK ( 6338): argv[2] (set)
01-02 02:21:57.014 D/QCSDK ( 6338): argv[3] (channel=0)
01-02 02:21:57.014 D/QCSDK ( 6338): QCCMD data ()
01-02 02:21:57.014 D/QCSDK ( 6338): CMD INPUT [ set channel=0][256]
01-02 02:21:57.016 E/QCSDK ( 6338): Cmd: channel Argument :0
01-02 02:21:57.016 D/QCSDK ( 6338): cmd=channel, Val:0, INI:0
01-02 02:21:57.017 D/QCSDK ( 6338): Updated:channel=0
01-02 02:21:57.017 D/QCSDK ( 6338):
----------
Created By: Uwen Zhang (1/2/2020 12:23 AM)
uwen
010-58324315
Created By: Uwen Zhang (1/2/2020 12:23 AM)
have you enable config_wifi_softap_acs_supported ?
from current log, it use ACS to set channel,but ACS nothing, so SAP failed
----------
Created By: Duan Jianjun (1/2/2020 12:19 AM)
1. channel=6
# Channel number (IEEE 802.11)
# (default: 0, i.e., not set)
# Please note that some drivers (e.g., madwifi) do not use this value from
# hostapd and the channel will need to be configuration separately with
# iwconfig.
channel=6
Now i modify it to 1.
2 & 3 default value is the same as you provide.
Is it necessary to verify the new version?
----------
Created By: Uwen Zhang (1/1/2020 11:20 PM)
log show ACS failed.
try blew.
1.hostapd.conf channel =1
2.in WCNSS_qcom_cfg.ini , make below :
gApAutoChannelSelection=0
3.config_wifi_softap_acs_supported = false
<!-- Enable ACS (auto channel selection) for Wifi hotspot (SAP) -->
<bool translatable="false" name="config_wifi_softap_acs_supported">false</bool>
if you want to use ACS channel, try blew.
WCNSS_qcom_cfg.ini
========================
gApAutoChannelSelection=1
----------
Created By: Duan Jianjun (1/1/2020 9:23 PM)
hotspot button can be switch on, but it cannot be found.
pls check log.
----------
Created By: Uwen Zhang (1/1/2020 6:52 PM)
Full
----------
Created By: Duan Jianjun (1/1/2020 6:32 PM)
make systemimage or full version?
----------
Created By: Uwen Zhang (1/1/2020 6:01 PM)
add it in your manifest.xml and re-test.
----------
Created By: Duan Jianjun (12/31/2019 12:23 AM)
i got it in /device/qcom/msm8909go_p10pi/manifest.xml
android.hardware.wifi.hostapd can not be found.
pls check attachment of manifest
how to modify?
thanks
----------
Created By: Duan Jianjun (12/31/2019 12:18 AM)
could you provider the full path of manifest.xml ?
----------
Created By: Uwen Zhang (12/30/2019 11:45 PM)
Try add below codes into your current prj manifest.xml,
<hal format="hidl">
<name>android.hardware.wifi.hostapd</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>IHostapd</name>
<instance>default</instance>
</interface>
</hal>
----------
Created By: Uwen Zhang (12/30/2019 11:44 PM)
Dear customer,
as the log mention, please check if android.hardware.wifi.hostapd@1.0::IHostapd
in your binary or device manifest.
最终解决方案:
Index: device/qcom/common/device/overlay/frameworks/base/core/res/res/values/config.xml
===================================================================
--- device/qcom/common/device/overlay/frameworks/base/core/res/res/values/config.xml (版本 2968)
+++ device/qcom/common/device/overlay/frameworks/base/core/res/res/values/config.xml (工作副本)
@@ -123,7 +123,7 @@
<bool translatable="false" name="config_wifi_background_scan_support">true</bool>
<!-- Enable ACS (auto channel selection) for Wifi hotspot (SAP) -->
- <bool translatable="false" name="config_wifi_softap_acs_supported">true</bool>
+ <bool translatable="false" name="config_wifi_softap_acs_supported">false</bool> <!-- @ modify for BUG # -->
<!-- Enable 802.11ac for Wifi hotspot (SAP) -->
<bool translatable="false" name="config_wifi_softap_ieee80211ac_supported">true</bool>
Index: device/qcom/msm8909go_p10pi/manifest.xml
===================================================================
--- device/qcom/msm8909go_p10pi/manifest.xml (版本 2968)
+++ device/qcom/msm8909go_p10pi/manifest.xml (工作副本)
@@ -427,6 +427,24 @@
</interface>
</hal>
<hal format="hidl">
+ <name>android.hardware.wifi.hostapd</name>
+ <transport>hwbinder</transport>
+ <version>1.0</version>
+ <interface>
+ <name>IHostapd</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl">
+ <name>vendor.qti.hardware.wifi.hostapd</name>
+ <transport>hwbinder</transport>
+ <version>1.0</version>
+ <interface>
+ <name>IHostapdVendor</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl">
<name>vendor.qti.hardware.radio.ims</name>
<transport>hwbinder</transport>
<version>1.0</version>
Index: packages/apps/Settings/res/xml/network_and_internet.xml
===================================================================
--- packages/apps/Settings/res/xml/network_and_internet.xml (版本 2968)
+++ packages/apps/Settings/res/xml/network_and_internet.xml (工作副本)
@@ -48,7 +48,7 @@
android:targetClass="com.android.phone.MobileNetworkSettings" />
</com.android.settingslib.RestrictedPreference>
- <!-- <com.android.settingslib.RestrictedPreference
+ <com.android.settingslib.RestrictedPreference
android:fragment="com.android.settings.TetherSettings"
android:key="tether_settings"
android:title="@string/tether_settings_title_all"
@@ -57,7 +57,7 @@
android:summary="@string/summary_placeholder"
settings:keywords="@string/keywords_hotspot_tethering"
settings:userRestriction="no_config_tethering"
- settings:useAdminDisabledSummary="true" /> -->
+ settings:useAdminDisabledSummary="true" />
<!-- <com.android.settingslib.RestrictedPreference
android:key="manage_mobile_plan"
Index: packages/apps/Settings/src/com/android/settings/network/NetworkDashboardFragment.java
===================================================================
--- packages/apps/Settings/src/com/android/settings/network/NetworkDashboardFragment.java (版本 2968)
+++ packages/apps/Settings/src/com/android/settings/network/NetworkDashboardFragment.java (工作副本)
@@ -107,7 +107,7 @@
final List<AbstractPreferenceController> controllers = new ArrayList<>();
controllers.add(mobileNetworkPreferenceController);
// @ modify for bug# {
- // controllers.add(new TetherPreferenceController(context, lifecycle));
+ controllers.add(new TetherPreferenceController(context, lifecycle));
controllers.add(vpnPreferenceController);
controllers.add(new ProxyPreferenceController(context));
//controllers.add(mobilePlanPreferenceController);
Index: packages/apps/Settings/src/com/android/settings/network/TetherPreferenceController.java
===================================================================
--- packages/apps/Settings/src/com/android/settings/network/TetherPreferenceController.java (版本 2968)
+++ packages/apps/Settings/src/com/android/settings/network/TetherPreferenceController.java (工作副本)
@@ -117,12 +117,12 @@
@Override
public boolean isAvailable() {
//@ 20190616 -+ {
- /*final boolean isBlocked =
+ final boolean isBlocked =
(!mConnectivityManager.isTetheringSupported() && !mAdminDisallowedTetherConfig)
|| hasBaseUserRestriction(mContext, DISALLOW_CONFIG_TETHERING,
UserHandle.myUserId());
- return !isBlocked;*/
- return false;
+ return !isBlocked;
+ //return false;
//@ 20190616 -+ }
}
2.No available channels on 5GHz band
问题描述:
switch ap band to 5GHz and open hotspot, it turn off automatically.
03-05 08:32:59.536 E/ApConfigUtil( 1069): No available channels on 5GHz band
03-05 08:32:59.536 E/ApConfigUtil( 1069): Failed to get available channel.
03-05 08:32:59.536 E/SoftApManager( 1069): Failed to update AP band and channel
03-05 08:32:59.537 V/WifiManager( 3577): SoftApCallbackProxy: onStateChanged: state=14, failureReason=1
03-05 08:32:59.539 E/WifiController( 1069): SoftAP start failed
QC解决流程:
Created By: Beibei Zhang (3/11/2020 11:23 PM)
Dear customer
你们默认国家码是00,然后用户侧又没有命令来改动(没有插卡什么的)那00的国家码注定用不了5G。一般客户默认国家码是US,然后手机插入哪个国家sim卡,国家码是会变的。回到本问题,你们在问题出现的时候直接输入以下命令,看看国家码是多少
iw reg get
然后用以下命令改一下国家码再看看能不能使用
wpa_cli -i wlan0 DRIVER COUNTRY US
-----------
Created By: Beibei Zhang (3/10/2020 3:53 AM)
country code 修改可以参考KBA -180706005928
<regDomain>3</regDomain>
<countryCode>
<countryCode_value Index="0">67</countryCode_value>
<countryCode_value Index="1">78</countryCode_value>
<countryCode_value Index="2">73</countryCode_value>
</countryCode>
</defaultCountryTable>
注意<regDomain>3</regDomain> 这个决定了DUT 的domain, 不管设置哪个国家代码,必须遵循这个domain=3(world ) 下的规则
参考:KBA-180706005928
country code决定是否能用5G,默认是00,不支持5G,在插卡后会改变country code。