rv1126 softap打开热点功能
本帖最后由 xinzhiling111 于 2021-10-14 10:57 编辑按照Rockchip_Developer_Guide_Linux_WIFI_BT_CN这个文档里面的3.2 Wi-Fi AP热点验证介绍,menuconfig中打开softapDemo,在板子上用这个demo生成热点,demo都是采用默认设置,ifconfig信息如下:
wlan0 Link encap:EthernetHWaddr D4:9C:DD:76:04:BA
UP BROADCAST MULTICASTMTU:1500Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B)TX bytes:0 (0.0 B)
wlan1 Link encap:EthernetHWaddr D6:9C:DD:76:04:BA
inet addr:192.168.88.1Bcast:192.168.88.255Mask:255.255.255.0
UP BROADCAST RUNNING MULTICASTMTU:1500Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:9 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B)TX bytes:2153 (2.1 KiB)
用手机连接这个ap的时候,连接之后获取不到ip,用pc去链接这个ip的时候获取到的ip不对,pc获取的ip如下:
麻烦路过的大佬帮忙看下。
继续排查,贴上启动softapdemo的log如下:
# softapDemo rockchip_ap
DEBUG 287:
softap_version: 1.0
DEBUG 261: Can't open /sys/class/rkwifi/chip, errno = 2DEBUG 290:
wifi type:
DEBUG 33: cmdline = killall dnsmasq
killall: dnsmasq: no process killed
DEBUG 33: cmdline = killall hostapd
wlan1: interface state ENABLED->DISABLED
wlan1: AP-DISABLED
nl80211: deinit ifname=wlan1 disabled_11b_rates=0
DEBUG 33: cmdline = killall udhcpc
killall: udhcpc: no process killed
DEBUG 322: start softap with name: rockchip_ap---DEBUG 33: cmdline = ifconfig wlan1 down
DEBUG 33: cmdline = rm -rf /userdata/bin/wlan1
DEBUG 33: cmdline = iw dev wlan1 del
DEBUG 33: cmdline = ifconfig wlan0 up
DEBUG 33: cmdline = iw phy0 interface add wlan1 type managed
DEBUG 33: cmdline = killall dnsmasq
killall: dnsmasq: no process killed
DEBUG 33: cmdline = ifconfig wlan1 up
DEBUG 33: cmdline = ifconfig wlan1 192.168.88.1 netmask 255.255.255.0
DEBUG 33: cmdline = dnsmasq -C /userdata/bin/dnsmasq.conf --interface=wlan1
dnsmasq: failed to create listening socket for port 53: Address already in use
DEBUG 33: cmdline = hostapd /userdata/bin/hostapd.conf &
# Configuration file: /userdata/bin/hostapd.conf
Using interface wlan1 with hwaddr d6:9c:dd:76:04:ba and ssid "rockchip_ap"
wlan1: interface state UNINITIALIZED->ENABLED
wlan1: AP-ENABLED
从log里面看到下面的信息:
dnsmasq: failed to create listening socket for port 53: Address already in use
提示53端口被占用,然后netstat查了下,结果板子默认带的是busybox的,不支持-p参数,只能看到确实被占用,但是看不到被谁占了:
tcp 0 0 0.0.0.0:41925 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:42119 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:5037 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:1935 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:5555 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:37239 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:6010 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:6011 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:6012 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:41121 0.0.0.0:* LISTEN
修改了下netstat的配置,支持-p了,然后看了下:是被887/connmand占用了,这是网络管理的进程,softap跟这冲突了,该咋解决呢? 我们的设备没有 wifi 模块呀 板蓝根 发表于 2021-10-25 09:31
我们的设备没有 wifi 模块呀
rv1126上有啊,AP6236,这个问题解决了,刚看到帖子,多谢 xinzhiling111 发表于 2021-11-4 11:04
rv1126上有啊,AP6236,这个问题解决了,刚看到帖子,多谢
你确定的是 CAM-C1126S2U ? 问题解决了没有 运行这个softapDemo,手机上看不到热点楼主这边是什么状态 xinzhiling111 发表于 2021-11-4 11:04
rv1126上有啊,AP6236,这个问题解决了,刚看到帖子,多谢
请问你这个问题怎么解决的 可否分享一下 多谢
页:
[1]