赞
踩
12-20210225华为海思Hi3518EV300在鸿蒙系统下测试WIFI(AP+STATION模式)
2021/2/25 10:45
【HarmonyOS HiSpark_IPC_DIY开发套件】
https://xueqiu.com/7970718062/159110439
官井想开挖掘机
来自iPhone发布于2020-09-13 15:18
$润和软件(SZ300339)$
HiSpark DIY IPC套件
l 支持鸿蒙OS、LiteOS、Linux系统,方便进行产品的原型验证和快速开发
l 板载海思Hi3518EV300芯片,内置ARM Cortex A7核心,最高运行频率900MHz,内置64MB SDRAM,内置图像处理单元(ISP),内置H265/H264硬件编解码器,内置智能视频引擎(IVE),内置硬件安全引擎
l 搭载128Mbit SPI NOR Flash,同时带有一个T-F卡槽,最大支持128GB T-F卡
l 板载Hi3881 WiFi芯片,支持IEEE 802.11 b/g/n,支持STA模式、AP模式
l 板载JX-F23A图像传感器,最大有效像素2M,视频最高支持1920x1080@25fps
https://bbs.elecfans.com/jishu_2009606_1_1.html
[经验] 【HarmonyOS HiSpark IPC DIY Camera】hi3518-wifi配置与使用
主要是修改和3518相关的wpa_supplicant.conf、hostapd.conf两个文件,对wIFi相关的ssid、passwd等进行配置。
Z:\code3518\applications\sample\camera\communication\hostapd\config\hostapd.conf
【修改ap模式的配置】将以下配置写到配置文件hostapd.conf
interface=wlan0
driver=hdf wifi
ctrl_interface=udp
ssid=testap
hw_mode=g
channel=1
ignore_broadcast_ssid=0
#下面是wpa2-psk类型加密的配置
#如果不需要加密可以删除
auth_algs=1
wpa=2
wpa_passphrase=12345678
rsn_pairwise=CCMP
Z:\code3518\applications\sample\camera\communication\wpa_supplicant\config\wpa_supplicant.conf
【修改station模式的配置】将以下配置写到配置文件wpa_supplicant.conf
country=GB
ctrl_interface=udp
network={
ssid="loveu99"
psk="loveyou99"
}
country=GB
ctrl_inteRFace=udp
network={
#要连接的SSID
ssid="example"
#如果不需要加密就写key_mgmt=NONE
#key_mgmt=NONE
#如果需要加密就写这行密码
psk="12345678"
}
Z:\code3518\applications\sample\camera\communication\wpa_supplicant\src\wpa_sample.c
【编译生成wifi可执行文件】 请参考以下示例代码编译可执行程序wpa_supplicant:(SDK里面有这些代码,不做修改)
路径./applications/sample/camera/communication/wpa_supplicant/src/wpa_sample.c
Z:\code3518\applications\sample\camera\communication\wpa_supplicant\BUILD.gn
Z:\code3518\applications\sample\camera\communication\BUILD.gn
路径./applications/sample/camera/communication/wpa_supplicant目录下面的BUILD.gn文件(不做修改)
Z:\code3518\applications\sample\camera\communication\BUILD.gn
路径./applications/sample/camera/communication目录下面的BUILD.gn文件
# Copyright (c) 2020 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import("//build/lite/config/component/lite_component.gni")
lite_component("sample") {
features = [
"wpa_supplicant:wpa_sample",
"hostapd:hostapd_sample",
]
}
generate_notice_file("communication_sample") {
module_name = "communication_sample"
module_source_dir_list = [
"//third_party/wpa_supplicant/wpa_supplicant-2.9/hostapd",
"//third_party/wpa_supplicant/wpa_supplicant-2.9/wpa_supplicant",
]
}
Z:\code3518\build\lite\product\ipcamera_hi3518ev300.json
路径./build/lite/product/ipcamera_hi3518ev300.json(不做修改)
2、【使用方法】
【WIFI设备检测】进入OHOS界面后,输入
ifconfig
检查wlan0网口是否加载正常,加载成功标识如下:
OHOS # ifconfig
wlan0 ip:0.0.0.0 netmask:0.0.0.0 gateway:0.0.0.0
HWaddr 0a:11:31:aa:7e:1a MTU:1500 Stop Link UP
lo ip:127.0.0.1 netmask:255.0.0.0 gateway:127.0.0.1
ip6: ::1/64
HWaddr 00 MTU:16436 Running Link UP
将wpa_supplicant、wpa_supplicant.conf、hostapd.conf拷贝到单板TF卡中,在系统上电之前插入到TF卡的卡槽。
【启动sta的命令】
./sdcard/wpa_supplicant -i wlan0 -c /sdcard/wpa_supplicant.conf
测试步骤,打开红米Note8 Pro的流量,并设置热点为2.4GHz模式。
SSID:loveu99
passwd:loveyou99
测试结果:可以获取局域网IP地址:192.168.43.85
但是ping百度之后内核崩溃。
最初测试我是连接公司的网络,以为公司的网络有所限制,所以特地使用手机虚拟了一个热点,还是异常。
可能是配置的问题或者华为海思新出的WIFI芯片Hi3881的驱动程序BUG所导致!
OHOS # ls
Directory /:
drwxr-xr-x 0 u:0 g:0 dev
dr-xr-xr-x 0 u:0 g:0 proc
drwxrwxrwx 0 u:0 g:0 sdcard
drwxr-xr-x 0 u:0 g:0 storage
dr-xr-xr-x 0 u:0 g:0 etc
dr-xr-xr-x 0 u:0 g:0 bin
dr-xr-xr-x 0 u:0 g:0 lib
dr-xr-xr-x 0 u:0 g:0 usr
dr-xr-xr-x 0 u:0 g:0 vendor
dr-xr-xr-x 0 u:0 g:0 system
OHOS #
OHOS #
OHOS # pwd
/
OHOS #
OHOS #
OHOS #
OHOS # cd /sdcard
OHOS #
OHOS #
OHOS # ls
Directory /sdcard:
drwxrwxrwx 0 u:0 g:0 System Volume Information
-rwxrwxrwx 15664 u:0 g:0 hostapd
-rwxrwxrwx 15668 u:0 g:0 wpa_supplicant
-rwxrwxrwx 222 u:0 g:0 hostapd.conf
-rwxrwxrwx 81 u:0 g:0 wpa_supplicant.conf
OHOS #
OHOS #
OHOS # pwd
/sdcard
OHOS #
OHOS #
OHOS #
OHOS # pwd
/sdcard
OHOS #
OHOS #
OHOS # ifconfig
wlan0 ip:0.0.0.0 netmask:0.0.0.0 gateway:0.0.0.0
HWaddr d0:11:31:50:1e:d5 MTU:1500 Stop Link UP
lo ip:127.0.0.1 netmask:255.0.0.0 gateway:127.0.0.1
ip6: ::1/64
HWaddr 00 MTU:0 Running Link UP
OHOS #
OHOS #
OHOS #
OHOS # wpa_supplicant -i wlan0 -c wpa_supplicant.conf
wpa_supplicant:command not found
OHOS #
OHOS #
OHOS # ./wpa_supplicant -i wlan0 -c wpa_supplicant.conf
OHOS # [WpaSample]init wpa_supplicant.
Successfully initialized wpa_supplicant
[HDF:I/HDF_LOG_TAG]WifiWpaCmdBlockSyncSend: cmd=18, ret=0
[plat_pm]wifi need always on,do not close!!
[ERR][HDF:E/HDF_WIFI_EAPOL]DestroyEapolData success!
[HDF:I/HDF_LOG_TAG]WifiWpaCmdBlockSyncSend: cmd=11, ret=0
[HDF:I/HDF_LOG_TAG]WifiWpaCmdBlockSyncSend: cmd=18, ret=0
[HDF:I/HDF_LOG_TAG]WifiWpaCmdBlockSyncSend: cmd=7, ret=0
[HDF:I/HDF_LOG_TAG]WifiWpaCmdBlockSyncSend: cmd=9, ret=0
[HDF:I/HDF_LOG_TAG]WifiWpaCmdBlockSyncSend: cmd=12, ret=0
WifiWpaGetHwFeatureData done
[HDF:I/HDF_LOG_TAG]WifiWpaCmdBlockSyncSend: cmd=2, ret=0
[HDF:I/HDF_LOG_TAG]WifiWpaCmdBlockSyncSend: cmd=2, ret=0
[HDF:I/HDF_LOG_TAG]WifiWpaCmdBlockSyncSend: cmd=2, ret=0
[HDF:I/HDF_LOG_TAG]WifiWpaCmdBlockSyncSend: cmd=2, ret=0
[HDF:I/HDF_LOG_TAG]WifiWpaCmdBlockSyncSend: cmd=2, ret=0
[HDF:I/HDF_LOG_TAG]WifiWpaCmdBlockSyncSend: cmd=2, ret=0
WIFI: Scan : (null) SSID : 0
[HDF:I/HDF_LOG_TAG]WifiWpaCmdBlockSyncSend: cmd=15, ret=0
[ERR][HDF:E/HDF_LOG_TAG]HdfWifiSendEvent event=5
[ERR][HDF:E/HDF_LOG_TAG]HdfWifiSendEvent event=5
[ERR][HDF:E/HDF_LOG_TAG]HdfWifiSendEvent event=5
[ERR][HDF:E/HDF_LOG_TAG]HdfWifiSendEvent event=5
[ERR][HDF:E/HDF_LOG_TAG]HdfWifiSendEvent event=5
[ERR][HDF:E/HDF_LOG_TAG]HdfWifiSendEvent event=5
[ERR][HDF:E/HDF_LOG_TAG]HdfWifiSendEvent event=5
[ERR][HDF:E/HDF_LOG_TAG]HdfWifiSendEvent event=5
[ERR][HDF:E/HDF_LOG_TAG]HdfWifiSendEvent event=5
[ERR][HDF:E/HDF_LOG_TAG]HdfWifiSendEvent event=5
[ERR][HDF:E/HDF_LOG_TAG]HdfWifiSendEvent event=5
[ERR][HDF:E/HDF_LOG_TAG]HdfWifiSendEvent event=5
[ERR][HDF:E/HDF_LOG_TAG]HdfWifiSendEvent event=5
[ERR][HDF:E/HDF_LOG_TAG]HdfWifiSendEvent event=5
[ERR][HDF:E/HDF_LOG_TAG]HdfWifiSendEvent event=4
WifiWpaDriverEventProcess event=5
WifiWpaEventScanResultProcess: ie_len=237, beacon_ie_len=237
WifiWpaEventScanResultProcess done
WifiWpaDriverEventProcess event=5
WifiWpaEventScanResultProcess: ie_len=177, beacon_ie_len=177
WifiWpaEventScanResultProcess done
WifiWpaDriverEventProcess event=5
WifiWpaEventScanResultProcess: ie_len=201, beacon_ie_len=201
WifiWpaEventScanResultProcess done
WifiWpaDriverEventProcess event=5
WifiWpaEventScanResultProcess: ie_len=249, beacon_ie_len=249
WifiWpaEventScanResultProcess done
WifiWpaDriverEventProcess event=5
WifiWpaEventScanResultProcess: ie_len=167, beacon_ie_len=167
WifiWpaEventScanResultProcess done
WifiWpaDriverEventProcess event=5
WifiWpaEventScanResultProcess: ie_len=327, beacon_ie_len=327
WifiWpaEventScanResultProcess done
WifiWpaDriverEventProcess event=5
WifiWpaEventScanResultProcess: ie_len=143, beacon_ie_len=143
WifiWpaEventScanResultProcess done
WifiWpaDriverEventProcess event=5
WifiWpaEventScanResultProcess: ie_len=189, beacon_ie_len=189
WifiWpaEventScanResultProcess done
WifiWpaDriverEventProcess event=5
WifiWpaEventScanResultProcess: ie_len=168, beacon_ie_len=168
WifiWpaEventScanResultProcess done
WifiWpaDriverEventProcess event=5
WifiWpaEventScanResultProcess: ie_len=249, beacon_ie_len=249
WifiWpaEventScanResultProcess done
WifiWpaDriverEventProcess event=5
WifiWpaEventScanResultProcess: ie_len=231, beacon_ie_len=231
WifiWpaEventScanResultProcess done
WifiWpaDriverEventProcess event=5
WifiWpaEventScanResultProcess: ie_len=231, beacon_ie_len=231
WifiWpaEventScanResultProcess done
WifiWpaDriverEventProcess event=5
WifiWpaEventScanResultProcess: ie_len=231, beacon_ie_len=231
WifiWpaEventScanResultProcess done
WifiWpaDriverEventProcess event=5
WifiWpaEventScanResultProcess: ie_len=237, beacon_ie_len=237
WifiWpaEventScanResultProcess done
WifiWpaDriverEventProcess event=4
WifiWpaGetScanResults2 done
WifiWpaEventScanDoneProcess done
wlan0: Trying to associate with b2:50:0e:1e:7e:48 (SSID='loveu99' freq=2412 MHz)
[HDF:I/HDF_LOG_TAG]WifiWpaCmdBlockSyncSend: cmd=17, ret=0
WifiWpaAssociate done ret=0
[ERR][HDF:E/HDF_LOG_TAG]HdfWifiSendEvent event=6
WifiWpaDriverEventProcess event=6
wlan0: Associated with b2:50:0e:1e:7e:48
wlan0: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0[ERR][HDF:E/HDF_LOG_TAG]HdfWifiSendEvent event=13
WifiWpaEventConnectResultProcess done
WifiWpaDriverEventProcess event=13
WifiWpaDriverEventEapolRecvProcess call
l2_packet_receive1
l2_packet_receive2
[HDF:I/HDF_LOG_TAG]WifiWpaCmdBlockSyncSend: cmd=6, ret=0
l2_packet_receive3
rx_callback
[HDF:I/HDF_LOG_TAG]WifiWpaCmdBlockSyncSend: cmd=5, ret=0
WifiWpaWpaSendEapol done ret=0
WifiWpaReceiveEapol done
[ERR][HDF:E/HDF_LOG_TAG]HdfWifiSendEvent event=13
WifiWpaDriverEventProcess event=13
WifiWpaDriverEventEapolRecvProcess call
l2_packet_receive1
l2_packet_receive2
[HDF:I/HDF_LOG_TAG]WifiWpaCmdBlockSyncSend: cmd=6, ret=0
l2_packet_receive3
rx_callback
[HDF:I/HDF_LOG_TAG]WifiWpaCmdBlockSyncSend: cmd=5, ret=0
WifiWpaWpaSendEapol done ret=0
[HDF:I/HDF_LOG_TAG]WifiWpaCmdBlockSyncSend: cmd=1, ret=0
[HDF:I/HDF_LOG_TAG]WifiWpaCmdBlockSyncSend: cmd=3, ret=0
[HDF:I/HDF_LOG_TAG]WifiWpaCmdBlockSyncSend: cmd=1, ret=0
wlan0: WPA: Key negotiation completed with b2:50:0e:1e:7e:48 [PTK=CCMP GTK=CCMP]
wlan0: CTRL-EVENT-CONNECTED - Connection to b2:50:0e:1e:7e:48 completed [id=0 id_str=]
WifiWpaReceiveEapol done
OHOS #
OHOS #
OHOS # ifconfig
wlan0 ip:192.168.43.85 netmask:255.255.255.0 gateway:192.168.43.1
HWaddr d0:11:31:50:1e:d5 MTU:1500 Running Default Link UP
lo ip:127.0.0.1 netmask:255.0.0.0 gateway:127.0.0.1
ip6: ::1/64
HWaddr 00 MTU:0 Running Link UP
OHOS #
OHOS #
OHOS #
OHOS #
OHOS # ping 192.168.43.1
[0]Reply from 192.168.43.1: time=6ms TTL=64
[1]Reply from 192.168.43.1: time=4ms TTL=64
[2]Reply from 192.168.43.1: time=4ms TTL=64
[3]Reply from 192.168.43.1: time=9ms TTL=64
--- 192.168.43.1 ping statistics ---
4 packets transmitted, 4 received, 0 loss
OHOS #
OHOS #
OHOS #
OHOS # ping www.baidu.com
[ERR]OsVmPageFaultHandler 357
##################excFrom: kernel###################!
data_abort fsr:0x5, far:0xdb40759b
Abort caused by a read instruction. Translation fault, section
excType: data abort
processName = shell
processID = 3
process aspace = 0x01000000 -> 0x3f000000
taskName = ShellTask
taskID = 19
task user stack = 0x22e01000 -> 0x22e07000
pc = 0x402277b0
klr = 0x402267dc
ksp = 0x40c76758
fp = 0x40c76778
R0 = 0xf0
R1 = 0x41cdf340
R2 = 0x40548a28
R3 = 0x35
R4 = 0x4053b39c
R5 = 0x40548a28
R6 = 0x41cdf340
R7 = 0xdb407587
R8 = 0x1a
R9 = 0xfffe
R10 = 0x4053b3ca
R11 = 0x40c76778
R12 = 0x4
CPSR = 0x20000013
*******backtrace begin*******
traceback fp fixed, trace using fp = 0x40c767c0
traceback 0 -- lr = 0x40c767f0 fp = 0x0
PID PPID PGID UID Status CPUUSE CPUUSE10s CPUUSE1s Policy Priority MTID TaskTotal Mode PName
1 -1 1 0 Pend 0.0 0.0 0.0 RR 28 18 1 user init
2 -1 2 0 Pend 1.0 0.1 0.1 RR 0 0 16 kernel KProcess
3 1 1 2 Running 0.0 0.0 0.1 RR 15 4 3 user shell
4 1 4 4 Pend 0.0 0.0 0.0 RR 28 21 1 user apphilogcat
5 1 5 7 Pend 0.1 0.0 0.0 RR 28 22 10 user foundation
6 1 6 8 Pend 0.0 0.0 0.0 RR 28 31 4 user bundle_daemon
7 1 7 5 Pend 0.0 0.0 0.0 RR 28 35 1 user media_server
8 1 8 1 Pend 0.0 0.0 0.0 RR 28 36 4 user appspawn
9 3 9 2 Pend 0.1 0.0 0.0 RR 15 41 3 user wpa_supplicant
TID PID Status StackSize WaterLine StackPoint TopOfStack EventMask SemID Policy Priority MEMUSE TaskName
18 1 Pend 0x3000 0xb9c 0x40886cb0 0x40884010 0x1 0xffffffff RR 31 0x25468 init
0 2 Pend 0x1000 0x1dc 0x40591420 0x405905f8 0xff 0xffffffff RR 5 0 ResourcesTask
2 2 Pend 0x4000 0x2a4 0x405ba410 0x405b6610 0 0xffffffff RR 0 0 Swt_Task
3 2 Pend 0x4000 0x1d4 0x405c0c90 0x405bce60 0x1 0xffffffff RR 1 0 system_wq
5 2 PendTime 0x6000 0x664 0x406c3008 0x406bd230 0 0xffffffff RR 5 0 tcpip_thread
6 2 Pend 0x3000 0x2ec 0x405ccb80 0x405c9d58 0x3 0xffffffff RR 5 0 sdmci_detect
7 2 PendTime 0x1800 0x27c 0x405ce4a0 0x405ccef8 0x4 0xffffffff RR 6 0 mmc_data_thread
8 2 Pend 0x3000 0x2fc 0x406b9fa0 0x406b7188 0xf 0xffffffff RR 12 0 bcache_async_task
9 2 Delay 0x3000 0x1a4 0x406bcff8 0x406ba198 0 0xffffffff RR 10 0 bcache_sync_task
10 2 Pend 0x4000 0x1dc 0x406dead8 0x406dacb0 0x3 0xffffffff RR 10 0 jffs2_gc_thread
11 2 Pend 0x4000 0x294 0x406e7648 0x406e3820 0x3 0xffffffff RR 10 0 jffs2_gc_thread
12 2 Pend 0x2000 0x95c 0x40839e20 0x40838010 0x2000 0xffffffff RR 4 0x1634 hisi_frw
13 2 Pend 0x4000 0x434 0x40843e28 0x40840010 0x1 0xffffffff RR 3 0 hisi_hcc_tx
14 2 Pend 0x4000 0x2d4 0x4084be28 0x40848010 0x1 0xffffffff RR 3 0 hisi_hcc_rx
15 2 Pend 0x2000 0x3cc 0x40851e30 0x40850010 0x1 0xffffffff RR 2 0 sdio_Task
16 2 Pend 0x4000 0x1d4 0x40855e58 0x40852028 0x1 0xffffffff RR 1 0 wlan_pm_wq
17 2 Pend 0x4000 0x324 0x4087be10 0x40878010 0x6 0xffffffff RR 9 0 SendToSer
4 3 Pend 0x3000 0x91c 0x40c56d10 0x40c54010 0 0xffffffff RR 31 0x6dec shell
19 3 Running 0x3000 0xefc 0x40c76268 0x40c74010 0x1 0xffffffff RR 31 0x39b4 ShellTask
20 3 Pend 0x3000 0x4f4 0x40c7ac28 0x40c78010 0x1 0xffffffff RR 31 0x140 ShellEntry
21 4 Pend 0x3000 0x91c 0x40c82c70 0x40c80010 0x1 0xffffffff RR 31 0x2c78 apphilogcat
22 5 Pend 0x3000 0x91c 0x40ca6cb0 0x40ca4010 0 0xffffffff RR 31 0x20d60 foundation
23 5 Pend 0x3000 0x54c 0x411bec98 0x411bc010 0 0xffffffff RR 15 0x30b4 thread1
24 5 Pend 0x3000 0x37c 0x411c2c98 0x411c0010 0 0xffffffff RR 15 0 thread2
25 5 Pend 0x3000 0x54c 0x411c6c98 0x411c4010 0 0xffffffff RR 15 0x3274 thread3
26 5 Pend 0x3000 0x50c 0x411cac98 0x411c8010 0 0xffffffff RR 15 0x294 thread4
27 5 Pend 0x3000 0x58c 0x411d2c98 0x411d0010 0 0xffffffff RR 15 0x3ba4 dtbschedsrv
28 5 Pend 0x3000 0x54c 0x411d6c30 0x411d4010 0 0xffffffff RR 7 0x31a8 thread6
29 5 Pend 0x3000 0x54c 0x411dac30 0x411d8010 0 0xffffffff RR 7 0 thread7
30 5 Pend 0x3000 0x454 0x411e2c30 0x411e0010 0 0xffffffff RR 7 0x70 thread8
40 5 Pend 0x3000 0x48c 0x41c5eb88 0x41c5c010 0 0x1c0 RR 15 0x140 thread10
31 6 Pend 0x3000 0xa24 0x411f6cb0 0x411f4010 0 0xffffffff RR 31 0x5ad8 bundle_daemon
32 6 Pend 0x3000 0x54c 0x41822c98 0x41820010 0 0xffffffff RR 15 0x323c thread1
33 6 Pend 0x3000 0x54c 0x41836c30 0x41834010 0 0xffffffff RR 7 0x3150 thread2
34 6 Pend 0x3000 0x3e4 0x4183ac30 0x41838010 0 0xffffffff RR 7 0 thread3
35 7 Pend 0x3000 0xa7c 0x41846c48 0x41844010 0 0xffffffff RR 31 0x12ab8 media_server
36 8 Pend 0x3000 0x934 0x41c16cb0 0x41c14010 0 0xffffffff RR 31 0x58ac appspawn
37 8 Pend 0x3000 0x54c 0x41c3ec98 0x41c3c010 0 0xffffffff RR 22 0x31bc thread1
38 8 Pend 0x3000 0x54c 0x41c52c30 0x41c50010 0 0xffffffff RR 7 0x3144 thread2
39 8 Pend 0x3000 0x3e4 0x41c56c30 0x41c54010 0 0xffffffff RR 7 0 thread3
41 9 Pend 0x3000 0xd3c 0x41c6ad10 0x41c68010 0 0xffffffff RR 31 0x4dc0 wpa_supplicant
42 9 PendTime 0x3000 0x8e4 0x41c82b90 0x41c80010 0 0x1f8 RR 31 0xd540 thread1
43 9 Pend 0x3000 0x76c 0x41cdec20 0x41cdc010 0 0x1e2 FIFO 30 0xce4 thread2
******Current process 3 vmm regions: ******
0 -> regionBase: 0x0668e000 regionSize: 0x00001000
1 -> regionBase: 0x0668f000 regionSize: 0x00004000
2 -> regionBase: 0x06693000 regionSize: 0x00001000
3 -> regionBase: 0x06694000 regionSize: 0x00001000
4 -> regionBase: 0x22d56000 regionSize: 0x00045000
5 -> regionBase: 0x22d9b000 regionSize: 0x0005e000
6 -> regionBase: 0x22df9000 regionSize: 0x00001000
7 -> regionBase: 0x22dfa000 regionSize: 0x00001000
8 -> regionBase: 0x22dfb000 regionSize: 0x00004000
9 -> regionBase: 0x22dff000 regionSize: 0x00002000
10 -> regionBase: 0x22e01000 regionSize: 0x00002000
11 -> regionBase: 0x22e03000 regionSize: 0x00004000
12 -> regionBase: 0x22e07000 regionSize: 0x00002000
13 -> regionBase: 0x22e09000 regionSize: 0x00002000
14 -> regionBase: 0x3b003000 regionSize: 0x000ff000
15 -> regionBase: 0x3b102000 regionSize: 0x00001000
stack name cpu id stack addr total size used size
---------- ------ --------- -------- --------
udf_stack 0 0x403e0000 0x28 0x0
abt_stack 0 0x403e0028 0x28 0x24
fiq_stack 0 0x403e0090 0x40 0x0
svc_stack 0 0x403e00d0 0x2000 0x73c
irq_stack 0 0x403e0050 0x40 0x14
exc_stack 0 0x403e20d0 0x1000 0x0
dump mem around R1:0x41cdf340
0x41cdf300 :00000039 0000812c 00001000 be320cf3
0x41cdf310 :0000002b 41cdf2c8 80000024 41cdf2e8
0x41cdf320 :41cdf2e8 2437f000 41cdf2d8 408576b8
0x41cdf330 :be320ccf 00000013 41cdf30c 8000008c
0x41cdf340 :00000000 41cdf39c 001f001f 00010080
0x41cdf350 :404145c0 000001b0 000001ea 48139000
0x41cdf360 :00001000 00000000 00000018 ffffffff
0x41cdf370 :00000000 18110144 000101c2 41cfd2a8
dump mem around R2:0x40548a28
0x405489e8 :00000000 00000000 00000000 00000000
0x405489f8 :00000000 00000002 406e26fc 00000000
0x40548a08 :00000000 00000000 00000000 00000000
0x40548a18 :00000000 00000000 00000000 00000000
0x40548a28 :012ba8c0 00000000 00000000 00000000
0x40548a38 :ffffff00 fe41cf00 00000000 00000000
0x40548a48 :00000000 00000000 00000000 00000000
0x40548a58 :4023590c 40c76810 00000200 00000000
dump mem around R4:0x4053b39c
0x4053b35c :00000000 00000000 00000000 00000000
0x4053b36c :00000000 00000000 00000000 00000000
0x4053b37c :00000000 00030000 00000000 00000000
0x4053b38c :00000000 00000000 00000000 00000000
0x4053b39c :00000000 00000000 00000000 00000000
0x4053b3ac :00000000 00000000 00000000 0002a9fd
0x4053b3bc :01000001 2e777777 64696162 6f632e75
0x4053b3cc :0000006d 00000000 00000000 00000000
dump mem around R5:0x40548a28
0x405489e8 :00000000 00000000 00000000 00000000
0x405489f8 :00000000 00000002 406e26fc 00000000
0x40548a08 :00000000 00000000 00000000 00000000
0x40548a18 :00000000 00000000 00000000 00000000
0x40548a28 :012ba8c0 00000000 00000000 00000000
0x40548a38 :ffffff00 fe41cf00 00000000 00000000
0x40548a48 :00000000 00000000 00000000 00000000
0x40548a58 :4023590c 40c76810 00000200 00000000
dump mem around R6:0x41cdf340
0x41cdf300 :00000039 0000812c 00001000 be320cf3
0x41cdf310 :0000002b 41cdf2c8 80000024 41cdf2e8
0x41cdf320 :41cdf2e8 2437f000 41cdf2d8 408576b8
0x41cdf330 :be320ccf 00000013 41cdf30c 8000008c
0x41cdf340 :00000000 41cdf39c 001f001f 00010080
0x41cdf350 :404145c0 000001b0 000001ea 48139000
0x41cdf360 :00001000 00000000 00000018 ffffffff
0x41cdf370 :00000000 18110144 000101c2 41cfd2a8
dump mem around R11:0x40c76778
0x40c76738 :0000001a 0000fffe 4053b3ca 40c76778
0x40c76748 :00000004 40c76758 402267dc 402277b0
0x40c76758 :db407587 41cdf340 40548a28 00000035
0x40c76768 :4053b39c 41cdf340 00000000 00000019
0x40c76778 :40c767c0 402267dc 00000000 00000000
0x40c76788 :00000000 4053b3bb 01000100 0001fda9
0x40c76798 :00000100 00000000 f991a0a1 40c76810
0x40c767a8 :00000004 405480c0 40548520 00000002
dump mem around SP:0x40c76758
0x40c76718 :000000f0 41cdf340 40548a28 00000035
0x40c76728 :4053b39c 40548a28 41cdf340 db407587
0x40c76738 :0000001a 0000fffe 4053b3ca 40c76778
0x40c76748 :00000004 40c76758 402267dc 402277b0
0x40c76758 :db407587 41cdf340 40548a28 00000035
0x40c76768 :4053b39c 41cdf340 00000000 00000019
0x40c76778 :40c767c0 402267dc 00000000 00000000
0x40c76788 :00000000 4053b3bb 01000100 0001fda9
system memcheck over, all passed!
[END] 2021/2/25 14:54:29
【启动ap的命令】
./sdcard/hostapd -i wlan0 /sdcard/hostapd.conf
OHOS # ifconfig
wlan0 ip:0.0.0.0 netmask:0.0.0.0 gateway:0.0.0.0
HWaddr 62:11:31:ef:71:0e MTU:1500 Stop Link UP
lo ip:127.0.0.1 netmask:255.0.0.0 gateway:127.0.0.1
ip6: ::1/64
HWaddr 00 MTU:0 Running Link UP
OHOS #
OHOS #
OHOS #
OHOS # ls
Directory /:
drwxr-xr-x 0 u:0 g:0 dev
dr-xr-xr-x 0 u:0 g:0 proc
drwxrwxrwx 0 u:0 g:0 sdcard
drwxr-xr-x 0 u:0 g:0 storage
dr-xr-xr-x 0 u:0 g:0 etc
dr-xr-xr-x 0 u:0 g:0 bin
dr-xr-xr-x 0 u:0 g:0 lib
dr-xr-xr-x 0 u:0 g:0 usr
dr-xr-xr-x 0 u:0 g:0 vendor
dr-xr-xr-x 0 u:0 g:0 system
OHOS #
OHOS # pwd
/
OHOS #
OHOS #
OHOS # cd /sdcard
OHOS #
OHOS # ls
Directory /sdcard:
drwxrwxrwx 0 u:0 g:0 System Volume Information
-rwxrwxrwx 15664 u:0 g:0 hostapd
-rwxrwxrwx 15668 u:0 g:0 wpa_supplicant
-rwxrwxrwx 222 u:0 g:0 hostapd.conf
-rwxrwxrwx 81 u:0 g:0 wpa_supplicant.conf
OHOS #
OHOS #
OHOS #
OHOS # ./hostapd -i wlan0 hostapd.conf
OHOS # [HostapdSample]init hostapd.
[ERR]Unsupported API openlog
Configuration file: hostapd.conf
[HDF:I/HDF_LOG_TAG]WifiWpaCmdBlockSyncSend: cmd=18, ret=0
[plat_pm]wifi need always on,do not close!!
[ERR][HDF:E/HDF_WIFI_EAPOL]DestroyEapolData success!
[HDF:I/HDF_LOG_TAG]WifiWpaCmdBlockSyncSend: cmd=11, ret=0
[HDF:I/HDF_LOG_TAG]WifiWpaCmdBlockSyncSend: cmd=18, ret=0
[HDF:I/HDF_LOG_TAG]WifiWpaCmdBlockSyncSend: cmd=7, ret=0
[HDF:I/HDF_LOG_TAG]WifiWpaCmdBlockSyncSend: cmd=9, ret=0
WifiDrvInit done
[plat_pm]wifi need always on,do not close!!
[HDF:I/HDF_LOG_TAG]WifiWpaCmdBlockSyncSend: cmd=11, ret=0
WifiWpaHapdInit done
[ERR]Unsupported API getaddrinfo
[ERR]Unsupported API freeaddrinfo
[HDF:I/HDF_LOG_TAG]WifiWpaCmdBlockSyncSend: cmd=12, ret=0
WifiWpaGetHwFeatureData done
[HDF:I/HDF_LOG_TAG]WifiWpaCmdBlockSyncSend: cmd=2, ret=0
[HDF:I/HDF_LOG_TAG]WifiWpaCmdBlockSyncSend: cmd=2, ret=0
[HDF:I/HDF_LOG_TAG]WifiWpaCmdBlockSyncSend: cmd=2, ret=0
[HDF:I/HDF_LOG_TAG]WifiWpaCmdBlockSyncSend: cmd=2, ret=0
Using interface wlan0 with hwaddr 62:11:31:ef:71:0e and ssid "testap"
[ERR][HDF:E/HDF_LOG_TAG]WalChangeBeacon: beacon info, head=0x40e032c0, headLen=57, tail=0x40e03300, tailLen=31
[HDF:I/HDF_LOG_TAG]WifiWpaCmdBlockSyncSend: cmd=0, ret=0
WifiWpaGetScanResults2 done ret=0
[HDF:I/HDF_LOG_TAG]WifiWpaCmdBlockSyncSend: cmd=1, ret=0
[HDF:I/HDF_LOG_TAG]WifiWpaCmdBlockSyncSend: cmd=3, ret=0
wlan0: interface state UNINITIALIZED->ENABLED
wlan0: AP-ENABLED
OHOS #
OHOS #
OHOS #
OHOS # ifconfig
wlan0 ip:192.168.12.1 netmask:255.255.255.0 gateway:192.168.12.1
HWaddr 62:11:31:ef:71:0e MTU:1500 Running Default Link UP
lo ip:127.0.0.1 netmask:255.0.0.0 gateway:127.0.0.1
ip6: ::1/64
HWaddr 00 MTU:0 Running Link UP
OHOS #
OHOS #
OHOS #
(红米Note8Pro连接之后)
OHOS #
OHOS #
OHOS # [ERR][HDF:E/HDF_LOG_TAG]HdfWifiSendEvent event=0
WifiWpaDriverEventProcess event=0
wlan0: STA 28:16:7f:92:34:58 IEEE 802.11: associated
[ERR]Unsupported API syslog
[ERR]Unsupported API __nl_langinfo_l
[HDF:I/HDF_LOG_TAG]WifiWpaCmdBlockSyncSend: cmd=2, ret=0
[HDF:I/HDF_LOG_TAG]WifiWpaCmdBlockSyncSend: cmd=2, ret=0
[HDF:I/HDF_LOG_TAG]WifiWpaCmdBlockSyncSend: cmd=1, ret=0
[HDF:I/HDF_LOG_TAG]WifiWpaCmdBlockSyncSend: cmd=3, ret=0
[HDF:I/HDF_LOG_TAG]WifiWpaCmdBlockSyncSend: cmd=5, ret=0
WifiWpaHapdSendEapol done, ret=0[ERR][HDF:E/HDF_LOG_TAG]HdfWifiSendEvent event=13
WifiWpaEventNewStaProcess done
WifiWpaDriverEventProcess event=13
WifiWpaDriverEventEapolRecvProcess call
l2_packet_receive1
l2_packet_receive2
[HDF:I/HDF_LOG_TAG]WifiWpaCmdBlockSyncSend: cmd=6, ret=0
l2_packet_receive3
rx_callback
[HDF:I/HDF_LOG_TAG]WifiWpaCmdBlockSyncSend: cmd=5, ret=0
WifiWpaHapdSendEapol done, ret=0
WifiWpaReceiveEapol done[ERR][HDF:E/HDF_LOG_TAG]HdfWifiSendEvent event=13
WifiWpaDriverEventProcess event=13
WifiWpaDriverEventEapolRecvProcess call
l2_packet_receive1
l2_packet_receive2
[HDF:I/HDF_LOG_TAG]WifiWpaCmdBlockSyncSend: cmd=6, ret=0
l2_packet_receive3
rx_callback
[HDF:I/HDF_LOG_TAG]WifiWpaCmdBlockSyncSend: cmd=1, ret=0
[HDF:I/HDF_LOG_TAG]WifiWpaCmdBlockSyncSend: cmd=3, ret=0
wlan0: AP-STA-CONNECTED 28:16:7f:92:34:58
wlan0: STA 28:16:7f:92:34:58 WPA: pairwise key handshake completed (RSN)
[ERR]Unsupported API syslog
[ERR]Unsupported API __nl_langinfo_l
WifiWpaReceiveEapol done
OHOS #
OHOS #
OHOS #
OHOS # ifconfig
wlan0 ip:192.168.12.1 netmask:255.255.255.0 gateway:192.168.12.1
HWaddr 62:11:31:ef:71:0e MTU:1500 Running Default Link UP
lo ip:127.0.0.1 netmask:255.0.0.0 gateway:127.0.0.1
ip6: ::1/64
HWaddr 00 MTU:0 Running Link UP
OHOS #
OHOS #
OHOS # ping 192.168.12.2
[0]Reply from 192.168.12.2: time=112ms TTL=64
[1]Reply from 192.168.12.2: time=2ms TTL=64
[2]Reply from 192.168.12.2: time=3ms TTL=64
[3]Reply from 192.168.12.2: time=4ms TTL=64
--- 192.168.12.2 ping statistics ---
4 packets transmitted, 4 received, 0 loss
OHOS #
(HP的笔记本电脑连接上之后)
OHOS #
OHOS # [ERR][HDF:E/HDF_LOG_TAG]HdfWifiSendEvent event=0
WifiWpaDriverEventProcess event=0
wlan0: STA b8:9a:2a:d2:ac:df IEEE 802.11: associated
[ERR]Unsupported API syslog
[ERR]Unsupported API __nl_langinfo_l
[HDF:I/HDF_LOG_TAG]WifiWpaCmdBlockSyncSend: cmd=2, ret=0
[HDF:I/HDF_LOG_TAG]WifiWpaCmdBlockSyncSend: cmd=2, ret=0
[HDF:I/HDF_LOG_TAG]WifiWpaCmdBlockSyncSend: cmd=5, ret=0
WifiWpaHapdSendEapol done, ret=0
WifiWpaEventNewStaProcess done[ERR][HDF:E/HDF_LOG_TAG]HdfWifiSendEvent event=13
WifiWpaDriverEventProcess event=13
WifiWpaDriverEventEapolRecvProcess call
l2_packet_receive1
l2_packet_receive2
[HDF:I/HDF_LOG_TAG]WifiWpaCmdBlockSyncSend: cmd=6, ret=0
l2_packet_receive3
rx_callback
[HDF:I/HDF_LOG_TAG]WifiWpaCmdBlockSyncSend: cmd=5, ret=0
WifiWpaHapdSendEapol done, ret=0
WifiWpaReceiveEapol done
[ERR][HDF:E/HDF_LOG_TAG]HdfWifiSendEvent event=13
WifiWpaDriverEventProcess event=13
WifiWpaDriverEventEapolRecvProcess call
l2_packet_receive1
l2_packet_receive2
[HDF:I/HDF_LOG_TAG]WifiWpaCmdBlockSyncSend: cmd=6, ret=0
l2_packet_receive3
rx_callback
[HDF:I/HDF_LOG_TAG]WifiWpaCmdBlockSyncSend: cmd=1, ret=0
[HDF:I/HDF_LOG_TAG]WifiWpaCmdBlockSyncSend: cmd=3, ret=0
wlan0: AP-STA-CONNECTED b8:9a:2a:d2:ac:df
wlan0: STA b8:9a:2a:d2:ac:df WPA: pairwise key handshake completed (RSN)
[ERR]Unsupported API syslog
[ERR]Unsupported API __nl_langinfo_l
WifiWpaReceiveEapol done
OHOS #
OHOS #
OHOS #
[END] 2021/2/25 15:00:23
HP笔记本电脑连接Hi3518EV300这个AP之后PING这个AP:
rootroot@rootroot-HP-ZHAN-66-Pro-A-14-G3:~$
rootroot@rootroot-HP-ZHAN-66-Pro-A-14-G3:~$
rootroot@rootroot-HP-ZHAN-66-Pro-A-14-G3:~$ ifconfig
enp1s0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether b0:5c:da:21:3a:e5 txqueuelen 1000 (Ethernet)
RX packets 10295 bytes 2342053 (2.3 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 8299 bytes 3084640 (3.0 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 722 bytes 67232 (67.2 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 722 bytes 67232 (67.2 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
wlp2s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.12.3 netmask 255.255.255.0 broadcast 192.168.12.255
inet6 fe80::493d:de13:baaf:3cae prefixlen 64 scopeid 0x20<link>
ether b8:9a:2a:d2:ac:df txqueuelen 1000 (Ethernet)
RX packets 5 bytes 1024 (1.0 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 40 bytes 8540 (8.5 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
rootroot@rootroot-HP-ZHAN-66-Pro-A-14-G3:~$
rootroot@rootroot-HP-ZHAN-66-Pro-A-14-G3:~$
rootroot@rootroot-HP-ZHAN-66-Pro-A-14-G3:~$ ping 192.168.12.1
PING 192.168.12.1 (192.168.12.1) 56(84) bytes of data.
64 bytes from 192.168.12.1: icmp_seq=1 ttl=255 time=7.13 ms
64 bytes from 192.168.12.1: icmp_seq=2 ttl=255 time=6.53 ms
64 bytes from 192.168.12.1: icmp_seq=3 ttl=255 time=15.1 ms
64 bytes from 192.168.12.1: icmp_seq=4 ttl=255 time=9.71 ms
64 bytes from 192.168.12.1: icmp_seq=5 ttl=255 time=7.31 ms
64 bytes from 192.168.12.1: icmp_seq=6 ttl=255 time=1003 ms
64 bytes from 192.168.12.1: icmp_seq=7 ttl=255 time=15.6 ms
64 bytes from 192.168.12.1: icmp_seq=8 ttl=255 time=253 ms
64 bytes from 192.168.12.1: icmp_seq=9 ttl=255 time=16.1 ms
^C
--- 192.168.12.1 ping statistics ---
9 packets transmitted, 9 received, 0% packet loss, time 8013ms
rtt min/avg/max/mdev = 6.534/148.134/1002.594/311.404 ms, pipe 2
rootroot@rootroot-HP-ZHAN-66-Pro-A-14-G3:~$
HP笔记本电脑连接Hi3518EV300这个AP之后PING手机:红米Note8 Pro:
rootroot@rootroot-HP-ZHAN-66-Pro-A-14-G3:~$
rootroot@rootroot-HP-ZHAN-66-Pro-A-14-G3:~$ ping 192.168.12.2
PING 192.168.12.2 (192.168.12.2) 56(84) bytes of data.
64 bytes from 192.168.12.2: icmp_seq=1 ttl=64 time=18.4 ms
64 bytes from 192.168.12.2: icmp_seq=2 ttl=64 time=85.2 ms
64 bytes from 192.168.12.2: icmp_seq=3 ttl=64 time=346 ms
64 bytes from 192.168.12.2: icmp_seq=4 ttl=64 time=30.4 ms
64 bytes from 192.168.12.2: icmp_seq=5 ttl=64 time=158 ms
^C
--- 192.168.12.2 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4007ms
rtt min/avg/max/mdev = 18.394/127.468/345.704/119.703
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。