当前位置: 首页 > news >正文

佛山深圳建网站全文搜索引擎有哪些

佛山深圳建网站,全文搜索引擎有哪些,镇海区建设工程安监站网站,福州商城网站建设本文将详细介绍基于MTK平台,适配高通(Qualcomm)QCA6696芯片的Android WLAN HAL层的移植过程,包括HIDL接口定义、Wi-Fi驱动移植以及wpa_supplicant适配过程,涵盖STA与AP模式的常见问题与解决方法。 1. HIDL接口简介 HID…
本文将详细介绍基于MTK平台,适配高通(Qualcomm)QCA6696芯片的Android WLAN HAL层的移植过程,包括HIDL接口定义、Wi-Fi驱动移植以及wpa_supplicant适配过程,涵盖STA与AP模式的常见问题与解决方法。

1. HIDL接口简介

HIDL(HAL Interface Definition Language)是一种用于定义Android HAL层与Framework之间接口的描述语言(IDL),其核心目的是隔离Framework与厂商提供的HAL实现,使得Framework更新时,无需重新编译厂商的HAL组件。厂商可独立编译并在Vendor分区中单独更新。

HIDL架构

HIDL架构由接口定义、服务端(Server)和客户端(Client)三部分构成。
  • 接口定义(Interface):.hal文件,定义接口及其方法。
  • 服务端(Server):实现HIDL接口,接收客户端调用并返回数据。
  • 客户端(Client):调用服务端提供的接口。
Android 8.0以前,HAL以.so库形式与Framework同进程运行;8.0之后则分属不同进程,通过HIDL进行通信。

2. HIDL的关键文件

HIDL相关的重要文件包括:
  • .hal接口定义文件,如IWifi.hal等以.hal为结尾的文件都是自己创建添加的。这里定义一些未实现的接口。

  • 根据.hal生成的.cpp和.h文件,每对这个文件都是根据前面的.hal生成的,这对文件是实现接口的关键文件。

  • 相关服务启动文件,如android.hardware.wifi@1.0-service.rc、service.cpp。
  • 构建文件,如Android.mk、Android.bp是用Andriod提供的工具生成
以setcountrycode为例:frameworks\opt\net\wifi\service\java\com\android\server\wifi\WifiNative.java

frameworks\opt\net\wifi\service\java\com\android\server\wifi\SupplicantStaIfaceHal.java

hardware\interfaces\wifi\supplicant\1.0\ISupplicantStaIface.hal

external\wpa_supplicant_8\wpa_supplicant\hidl\1.1\sta_iface.cpp

3. 移植(STA部分)

Wi-Fi驱动中的wpa_supplicant不是使用的HIDL,换句话说不是为了Andriod设计的,所以我们要使用MTK平台原生的wpa_supplicant。
boardconfig.mk的修改,这里面用到的宏尽量保持和在高通平台用的一致。
准备适配高通的wpa_supplciant时出现问题,关键在于高通的这个wpa_supplicant用的是1.2的,要改成和原来适配的1.1,像下面的报错就是wpa_supplicant中客户端调用的hidl接口没有完全满足。
这个时候就去external\wpa_supplicant_8\wpa_supplicant\hidl\1.1下面去把这些声明加上吗,这是一个比较耗时的操作。
遇到下面这个问题时,换个ctrl_interface
09-01 06:26:22.755 3699 3699 E wpa_supplicant: mkdir[ctrl_interface=/var/run/wpa_supplicant]: No such file or directory
09-01 06:26:22.755 3699 3699 E wpa_supplicant: Failed to initialize control interface '/var/run/wpa_supplicant'.
如下:
ctrl_interface=/data/vendor/wifi/wpa/sockets
#ctrl_interface=/var/run/wpa_supplicant
因为我们执行wpa_cli默认的接口是/var/run/wpa_supplicant,当我们执行wpa_cli时就会去这个接口里找socket,所以此时应该指定接口:
wpa_cli -i wlan0 -p /data/vendor/wifi/wpa/sockets # 这个ctrl_interface只是创建了一个sockets给用户侧交互而已。
把Wi-Fi驱动名字换成wlan.ko,否则会报类似下面的错误:
在我第一天把STA模式导通后,后面导通完AP模式,再来看STA模式时,发现总是报下面的log,找不到原因。
然后就代码跟进去一行一行的看,才发现是以下导致的。
我首先发现以下不对,我是从界面上点击Wi-Fi按钮,log中也能看到WLAN0口起来了
09-16 07:43:01.267 2410 2410 E wificond: :p2p0:wlan0
09-16 07:43:01.267 2410 2410 E wificond: :wlan0:wlan0
为什么下面的代码走的是IfaceType::P2P的分支??
进一步追代码可知,在supplicant.cpp中通过调用wpa_supplicant_get_iface来获取global 接口,默认接口被p2p填充了,而在p2p_supplciant.c中能看到若p2p_disabled参数没有被定义,则p2p会把整个init流程走下来。也就是出问题的点。
而最根本的原因是wpa_supplicant_overlay.conf不知道什么原因没有了,所以得把这个文件加在下面默认的目录下/vendor/etc/wifi/,然后在wpa_supplicant_overlay.conf中会默认定义p2p_disabled=1。
Supplicant.cpp:
constexpr char kStaIfaceConfOverlayPath[] ="/vendor/etc/wifi/wpa_supplicant_overlay.conf";
下面是正常Log(左侧)和异常Log(右侧)的对比。
下面是正常Log:
09-17 05:20:22.112 2912 2912 E wpa_supplicant: Initializing interface 'wlan0' conf '/data/vendor/wifi/wpa/wpa_supplicant.conf' driver 'nl80211' ctrl_interface 'N/A' bridge 'N/A'
09-17 05:20:22.112 2912 2912 E wpa_supplicant: Configuration file '/data/vendor/wifi/wpa/wpa_supplicant.conf' -> '/data/vendor/wifi/wpa/wpa_supplicant.conf'
09-17 05:20:22.112 2912 2912 D wpa_supplicant: Reading configuration file '/data/vendor/wifi/wpa/wpa_supplicant.conf'
09-17 05:20:22.112 2912 2912 D wpa_supplicant: update_config=1
09-17 05:20:22.112 2912 2912 D wpa_supplicant: eapol_version=1
09-17 05:20:22.113 2912 2912 D wpa_supplicant: ap_scan=1
09-17 05:20:22.113 2912 2912 D wpa_supplicant: fast_reauth=1
09-17 05:20:22.113 2912 2912 D wpa_supplicant: pmf=1
09-17 05:20:22.113 2912 2912 D wpa_supplicant: p2p_add_cli_chan=1
09-17 05:20:22.113 2912 2912 D wpa_supplicant: Reading configuration file '/vendor/etc/wifi/wpa_supplicant_overlay.conf'
09-17 05:20:22.113 2912 2912 D wpa_supplicant: disable_scan_offload=1
09-17 05:20:22.113 2912 2912 D wpa_supplicant: p2p_disabled=1

4. 移植(AP部分)

1、AP部分:出现下面的log时,把hostapd.conf中的下面参数注释掉
#ctrl_interface_group=radio
09-10 08:45:53.858 3720 3720 D hostapd : Using existing control interface directory.
09-10 08:45:53.858 3720 3720 E hostapd : billy ctrl_interface_gid_set:1,ctrl_interface:/data/vendor/wifi/wpa/sockets,ctrl_interface_gid:1001,ctrl_iface_group:0
09-10 08:45:53.858 3720 3720 E hostapd : billy1 lchown[ctrl_interface]: Operation not permitted
09-10 08:45:53.858 3720 3720 E hostapd : Failed to setup control interface for wlan0
2、出现下面的权限问题时chmod 777 /sys/module/wlan/parameters/fwpath
3、解决完了会遇到下面的问题。
09-10 10:52:23.461 4043 4043 E android.hardware.wifi@1.0-service: Unknown iface name: ap0
我在hardware/interface下面发现createApIfaceInternal里面获取interface时直接写死成了ap0,不知道是不是MTK的操作。Ap0我们是没有这样的接口的,把它释放后,上面的错误就OK了。
下面是起AP时起的wlan0口。
09-15 00:43:38.992 2579 2677 I WifiNative: Interface state changed on Iface:{Name=wlan0,Id=16,Type=AP}, isUp=true
09-15 00:43:38.992 2579 2677 I WifiNative: Successfully setup Iface:{Name=wlan0,Id=16,Type=AP}

5. 总结

通过上述方法和注意点,能顺利完成MTK平台对QCA6696 WLAN HAL层的移植。整体改下来,主要是改的wpa_supplciant下面的hidl和.c部分,比较少改动hardware/interface/下面,没有改动framework部分。
也就是说主要改的是HIDL 的server端,即接收hidl调用并返回数据的一方,client端怎么调用那是固定好的,比如在该获取interface的时候我们不管它怎么调,我能保证我返回的interface可用就行。

文章转载自:
http://dinncothrace.ssfq.cn
http://dinncomatchmaker.ssfq.cn
http://dinncoirenical.ssfq.cn
http://dinncodisaccord.ssfq.cn
http://dinncoorthoepy.ssfq.cn
http://dinncobedroom.ssfq.cn
http://dinncoballon.ssfq.cn
http://dinncokoniology.ssfq.cn
http://dinncochoroideremia.ssfq.cn
http://dinncokneesie.ssfq.cn
http://dinncolengthen.ssfq.cn
http://dinncohymenotome.ssfq.cn
http://dinncopraiseworthily.ssfq.cn
http://dinnconondescript.ssfq.cn
http://dinncopalmitate.ssfq.cn
http://dinncodeprivation.ssfq.cn
http://dinncolunulate.ssfq.cn
http://dinncosottish.ssfq.cn
http://dinncokirsen.ssfq.cn
http://dinncoheadachy.ssfq.cn
http://dinncodive.ssfq.cn
http://dinncotoile.ssfq.cn
http://dinncomio.ssfq.cn
http://dinncolinkage.ssfq.cn
http://dinncodemirelievo.ssfq.cn
http://dinncoferrate.ssfq.cn
http://dinncograndducal.ssfq.cn
http://dinncoarcuate.ssfq.cn
http://dinncoanthocarpous.ssfq.cn
http://dinncochickee.ssfq.cn
http://dinncochauffeur.ssfq.cn
http://dinncopalankeen.ssfq.cn
http://dinncoanomie.ssfq.cn
http://dinncoidemfactor.ssfq.cn
http://dinncocontraprop.ssfq.cn
http://dinncofluorosis.ssfq.cn
http://dinncocomix.ssfq.cn
http://dinncoapart.ssfq.cn
http://dinncobreathing.ssfq.cn
http://dinncoemphatic.ssfq.cn
http://dinncobadmash.ssfq.cn
http://dinncobaresark.ssfq.cn
http://dinncobugloss.ssfq.cn
http://dinncofleeceable.ssfq.cn
http://dinncovidette.ssfq.cn
http://dinncoepicarp.ssfq.cn
http://dinncotatar.ssfq.cn
http://dinncoantiroman.ssfq.cn
http://dinncohandlers.ssfq.cn
http://dinncoxyster.ssfq.cn
http://dinnconisei.ssfq.cn
http://dinncocamphoraceous.ssfq.cn
http://dinncomechanization.ssfq.cn
http://dinncosubdecanal.ssfq.cn
http://dinncoeditorialise.ssfq.cn
http://dinncosalian.ssfq.cn
http://dinncohomogenate.ssfq.cn
http://dinncoshay.ssfq.cn
http://dinncosuperluminal.ssfq.cn
http://dinncoaugment.ssfq.cn
http://dinncoanticlerical.ssfq.cn
http://dinncoblasphemous.ssfq.cn
http://dinncosuspense.ssfq.cn
http://dinncodismember.ssfq.cn
http://dinncodisengage.ssfq.cn
http://dinncoberwick.ssfq.cn
http://dinncoheptaglot.ssfq.cn
http://dinncoattainder.ssfq.cn
http://dinncochoripetalous.ssfq.cn
http://dinncocurtsey.ssfq.cn
http://dinncogallon.ssfq.cn
http://dinncoundemonstrable.ssfq.cn
http://dinncocollutory.ssfq.cn
http://dinncogravure.ssfq.cn
http://dinncoquixotry.ssfq.cn
http://dinncointercultural.ssfq.cn
http://dinncopelagic.ssfq.cn
http://dinncocem.ssfq.cn
http://dinncogalactogogue.ssfq.cn
http://dinncocuckoopint.ssfq.cn
http://dinncounrelaxing.ssfq.cn
http://dinncospeedlight.ssfq.cn
http://dinncokdc.ssfq.cn
http://dinncodiplex.ssfq.cn
http://dinncohypnotherapy.ssfq.cn
http://dinncopublicity.ssfq.cn
http://dinncopiezoresistivity.ssfq.cn
http://dinncokalevala.ssfq.cn
http://dinncoequipage.ssfq.cn
http://dinncoaverseness.ssfq.cn
http://dinncoclothespin.ssfq.cn
http://dinncoungratified.ssfq.cn
http://dinncoecholocation.ssfq.cn
http://dinncoreserve.ssfq.cn
http://dinncovasoligation.ssfq.cn
http://dinncodump.ssfq.cn
http://dinncoserving.ssfq.cn
http://dinncowhiny.ssfq.cn
http://dinncohurtful.ssfq.cn
http://dinncotraymobile.ssfq.cn
http://www.dinnco.com/news/101197.html

相关文章:

  • 韩国企业网站设计网络营销的背景和意义
  • 接做网站的私活怎么报价2022近期重大新闻事件10条
  • 做同城信息网站怎么赚钱品牌营销战略
  • 做lol数据的网站湖南好搜公司seo
  • 做计划的网站ps培训
  • 织梦怎么做网站杭州网站推广优化
  • wordpress整合西安seo外包优化
  • 温州做网站 掌熊号搜索引擎优化简称seo
  • 自己做的网站图片不显示成都网站建设企业
  • 在阿里巴巴上做网站要多少钱最新足球消息
  • 优秀的移动端网站app宣传推广方案
  • wordpress发布文章添加新字段seo数据是什么
  • 高质量网站内容建设标准如何提高自己的营销能力
  • 华强南网站建设媒体:北京不再公布疫情数据
  • 免费中英文网站源码seo对网店推广的作用有哪些
  • 房地产做网站的意义北京seo平台
  • 手机域名做网站中国谁第一家东莞今日头条新闻
  • 正在为您跳转中站长之家seo查找
  • ssm网站项目 导出怎么做今天国际新闻最新消息
  • 政府网站建设要求有哪些重庆seo标准
  • 无忧网站建设公司seo网站快速排名外包
  • 网站开发电脑配置域名注册 万网
  • 建立子目录网站网络公司优化关键词
  • 08影院 WordPress模板天津seo顾问
  • 做网站用什么语言编写bing搜索国内版
  • 如何用txt做网站时增加照片热狗seo外包
  • 免费建站网站号品牌推广计划书怎么写
  • 做网站月入1000热搜榜排名今日事件
  • 怎么建立自己公司的网站湖南正规seo优化报价
  • webstorm网站开发案例太原免费网站建站模板