一.vendor仓要适配的内容:

二.设置国家码失败问题解决

问题现象:在打开热点时,设置国家码失败了!

01-01 08:03:34.125  4954  6294 I C01561/WifiApService: StartAP is ok.
01-01 08:03:34.125  4954  6294 I C01560/HalDeviceManager: SetWifiCountryCode, ifaceName:wlan0
01-01 08:03:34.126  4954  6294 E C02510/chip_iface_proxy: SetCountryCode_ failed, error code is -1
01-01 08:03:34.126  4954  6294 E C01560/HalDeviceManager: SetWifiCountryCode, call SetCountryCode failed! ret:-1 
01-01 08:03:34.126  4954  6294 E C01561/WifiApStartedState: set countryCode=CN failed

当前走chip proxy这条路不通。要调整为走hostapd进行下发:具体修改patch如下:

foundation\communication\wifi:

drivers\peripheral


drivers\interface:

三.手机连接热点无法获取ip问题解决

问题现象:手机能搜索到个人热点,也能连接上,但是显示无法获取ip。之后手机会主动断连。

    行  4327: 01-01 08:01:08.118  4005  6279 I C05200/wpa_supplicant: wlan0: AP-ENABLED  ---softap启动成功!
    行  4328: 01-01 08:01:08.118  4005  6279 I C05200/wpa_supplicant: hostapd_setup_interface_complete_sync HOSTAPD_EVENT_AP_STATE AP-ENABLED 0
    行  4332: 01-01 08:01:08.119  4005  6279 I C05200/wpa_supplicant: wlan0: Setup of interface done.
    行  4336: 01-01 08:01:08.119  4913  4965 I C01561/WifiApStateMachine: Enter:StopDhcpServer
    行  4337: 01-01 08:01:08.120  4913  4965 I C01565/WifiDhcpdInterface: StopDhcp ifaceName:wlan0, flag:0
    行  4338: 01-01 08:01:08.120  4913  4965 E C01565/WifiDhcpdInterface: StopDhcp return!
    行  4339: 01-01 08:01:08.120  4913  4965 E C01561/WifiApStateMachine: Close dhcpd fail.
    行  4340: 01-01 08:01:08.120  4913  4965 I C01561/WifiApStateMachine: Enter:StartDhcpServer leaseTime:21600 ---启动DHCP服务器
    行  4341: 01-01 08:01:08.120  4005  6279 I C05200/wpa_supplicant: nl80211: Drv Event 60 (NL80211_CMD_FRAME_TX_STATUS) received for wlan0
    行  4343: 01-01 08:01:08.123  4913  4965 I C01565/DhcpServerImpl: DhcpServerImpl()
    行  4344: 01-01 08:01:08.123  4913  4965 I C01565/DhcpServerImpl: DhcpServerImpl enter Init!
    行  4345: 01-01 08:01:08.123  4913  4965 I C01565/DhcpServer: init successfully! --DHCP服务器初始化成功
    行  4369: 01-01 08:01:08.126  4913  4965 I C01565/DhcpSaLoadManager: DhcpSaLoadManager LoadWifiSa
    行  4370: 01-01 08:01:08.126  4913  4965 I C01565/DhcpSaLoadManager: DhcpSaLoadManager wait_for
    行  4405: 01-01 08:01:08.135  4913  6303 I C01565/DhcpServerServiceImpl: enter Server OnStart
    行  4406: 01-01 08:01:08.136  4913  6303 I C01565/DhcpServerServiceImpl: enter server Init
    行  4423: 01-01 08:01:08.137  4913  5617 I C01565/DhcpSaLoadManager: DhcpSaLoadManager Load SA success, systemAbilityId = [1127]
    行  4425: 01-01 08:01:08.137  4913  5617 I C01565/DhcpSaLoadManager: DhcpSaLoadManager LoadSystemAbilitySuccess notify_one
    行  4427: 01-01 08:01:08.137  4913  4965 I C01565/DhcpSaLoadManager: DhcpSaLoadManager wait_for
    行  4428: 01-01 08:01:08.137  4913  6303 I C01565/DhcpServerServiceImpl: success to publish dhcp server service!
    行  4429: 01-01 08:01:08.137  4913  4965 I C01565/DhcpSaLoadManager: DhcpSaLoadManager WaitLoadStateChange ok
    行  4430: 01-01 08:01:08.137  4913  6303 I C01565/DhcpServerServiceImpl: Server Service has started.
    行  4432: 01-01 08:01:08.137  4913  4965 I C01565/DhcpServerImpl: DhcpServerImpl GetDhcpClientProxy ok
    行  4451: 01-01 08:01:08.148  4913  4965 I C01565/DhcpPermissionUtils: VerifyPermission uid pid has permission!
    行  4452: 01-01 08:01:08.158  4913  4965 I C01565/DhcpPermissionUtils: VerifyPermission uid pid has permission!
    行  4453: 01-01 08:01:08.158  4913  4965 I C01565/DhcpServerServiceImpl: PutDhcpRange tag:wlan0.
    行  4454: 01-01 08:01:08.158  4913  4965 I C01565/DhcpServerServiceImpl: PutDhcpRange m_mapTagDhcpRange no find tagName:wlan0, need emplace.
    行  4455: 01-01 08:01:08.159  4913  4965 I C01565/DhcpServerServiceImpl: SetDhcpRange m_mapInfDhcpRange no find ifname:wlan0, need emplace.
    行  4456: 01-01 08:01:08.159  4913  4965 E C01565/DhcpServerServiceImpl: IsRemoteDied
    行  4457: 01-01 08:01:08.159  4913  4965 I C01565/DhcpServerImpl: DhcpServerImpl GetDhcpClientProxy ok
    行  4458: 01-01 08:01:08.159  4913  4965 I C01565/DhcpServerServiceImpl: UpdateLeasesTime

 

    行  9905: 01-01 08:01:50.969  4005  6279 I C05200/wpa_supplicant: AP-STA-CONNECTED   ---手机连接上
    行  9906: 01-01 08:01:50.969  4005  6279 I C05200/wpa_supplicant: wlan0: AP-STA-CONNECTED aa:59:**:**:**:2f
    行  9907: 01-01 08:01:50.970  4005  6279 I C05200/wpa_supplicant: wlan0: STA aa:59:**:**:**:2f WPA: pairwise key handshake completed (RSN)
    行  9908: 01-01 08:01:50.970  4005  6279 I C05200/wpa_supplicant: wlan0: EAPOL-4WAY-HS-COMPLETED aa:59:**:**:**:2f
    行 10071: 01-01 08:01:51.623  4913  6306 I C01565/DhcpServer: start ResetSourceAddr 231
    行 10072: 01-01 08:01:51.623  4913  6306 I C01565/DhcpServer: start recv from
    行 10073: 01-01 08:01:51.623  4913  6306 I C01565/DhcpServer: recv over
    行 10074: 01-01 08:01:51.623  4913  6306 I C01565/DhcpServer: start ReceiveDhcpMessage 316  return success
    行 10075: 01-01 08:01:51.623  4913  6306 I C01565/DhcpServer: start ParseMessageOptions 1750
    行 10076: 01-01 08:01:51.623  4913  6306 E C01565/DhcpServerOption: failed to create option node.
    行 10077: 01-01 08:01:51.623  4913  6306 I C01565/DhcpServer: start InitReply 322
    行 10078: 01-01 08:01:51.623  4913  6306 I C01565/DhcpServer: start MessageProcess 421
    行 10079: 01-01 08:01:51.623  4913  6306 I C01565/DhcpServer: received 'Discover' message from:??:59:??:??:22:2f ---收到DHCP Discover报文
    行 10080: 01-01 08:01:51.624  4913  6306 E C01565/DhcpServerAddressPool: get lease address binding pointer is null.
    行 10081: 01-01 08:01:51.624  4913  6306 I C01565/DhcpServerAddressPool: insert lease info.
    行 10082: 01-01 08:01:51.624  4913  6306 I C01565/DhcpServer: new binding ip
    行 10083: 01-01 08:01:51.624  4913  6306 E C01565/DhcpServerAddressPool: get lease address binding pointer is null.
    行 10084: 01-01 08:01:51.624  4913  6306 I C01565/DhcpServer: Discover add lease, binging ip:192.168.43.* mac:??:59:??:??:22:2f
    行 10085: 01-01 08:01:51.624  4913  6306 I C01565/DhcpServerAddressPool: insert lease info.
    行 10086: 01-01 08:01:51.624  4913  6306 I C01565/DhcpServer: Discover reply offer
    行 10087: 01-01 08:01:51.624  4913  6306 E C01565/DhcpServerOption: failed to create option node. 
    行 10088: 01-01 08:01:51.624  4913  6306 I C01565/DhcpServer: TransmitOfferOrAckPacket, broadCastFlag: 1
    行 10089: 01-01 08:01:51.624  4913  6306 I C01565/DhcpServer: send reply offer, length:<private>
    行 10090: 01-01 08:01:51.624  4913  6306 I C01565/DhcpServer: NotifyConnetDeviceChanged replyType:1
 

解决方案patch: 对应的仓是foundation\communication\dhcp

Logo

社区规范:仅讨论OpenHarmony相关问题。

更多推荐