내 Raspberry Pi 4 Model B를 다음 중 하나와 함께 사용하려고 합니다.이 ModMyPi는 Ralink RT3070 칩셋을 기반으로 합니다.USB 무선 어댑터는 AP로 전달됩니다 hostapd
.
내가 직면 한 문제는 다음과 같습니다.
- 시작
hostapd
- AP가 제대로 작동합니다(DHCP/DNS/라우팅 등).불확실한 기간
hostapd
결국에는 이런 일이 발생하는 이유를 설명하는 데 도움이 되는 로그에 유용한 정보(내가 볼 수 있음)가 거의 없이 충돌이 발생합니다.
hostapd
이 후 재부팅하면 다시 온라인 상태가 되는 것 같습니다.
USB WiFi 동글은 다음 rt2800
드라이버 제품군을 사용하여 표시됩니다.
pi@raspberrypi:/tmp $ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 046d:c52b Logitech, Inc. Unifying Receiver
Bus 001 Device 005: ID 148f:3070 Ralink Technology, Corp. RT2870/RT3070 Wireless Adapter
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
dmesg
출력은 다음과 같습니다.
...
[13591.906444] usb 1-1.1: new high-speed USB device number 6 using xhci_hcd
[13592.069548] usb 1-1.1: New USB device found, idVendor=148f, idProduct=3070, bcdDevice= 1.01
[13592.069569] usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[13592.069586] usb 1-1.1: Product: 802.11 n WLAN
[13592.069601] usb 1-1.1: Manufacturer: Ralink
[13592.069616] usb 1-1.1: SerialNumber: 1.0
[13592.177043] usb 1-1.1: reset high-speed USB device number 6 using xhci_hcd
[13592.318245] ieee80211 phy3: rt2x00_set_rt: Info - RT chipset 3070, rev 0201 detected
[13592.344614] ieee80211 phy3: rt2x00_set_rf: Info - RF chipset 0005 detected
[13592.344939] ieee80211 phy3: Selected rate control algorithm 'minstrel_ht'
[13592.351931] ieee80211 phy3: rt2x00lib_request_firmware: Info - Loading firmware file 'rt2870.bin'
[13592.352027] ieee80211 phy3: rt2x00lib_request_firmware: Info - Firmware detected - version: 0.36
...
로드된 모듈은 다음과 같습니다.
pi@raspberrypi:/tmp $ lsmod | grep rt2
rt2800usb 28672 0
rt2800lib 114688 1 rt2800usb
rt2x00usb 24576 1 rt2800usb
rt2x00lib 57344 3 rt2800lib,rt2800usb,rt2x00usb
mac80211 729088 3 rt2800lib,rt2x00lib,rt2x00usb
crc_ccitt 16384 1 rt2800lib
cfg80211 679936 3 rt2x00lib,mac80211,brcmfmac
내 hostapd
구성은 다음과 같습니다.
auth_algs=1
wpa_key_mgmt=WPA-PSK
ssid=<REDACTED>
channel=7
hw_mode=g
wpa_passphrase=<REDACTED>
interface=wlan1
wpa=2
wpa_pairwise=CCMP
country_code=AU
ignore_broadcast_ssid=0
disassoc_low_ack=0
ctrl_interface=/var/run/hostapd
iwconfig
장치가 전원 관리되지 않음을 나타냅니다.
pi@raspberrypi:/tmp $ iwconfig wlan1
wlan1 IEEE 802.11 ESSID:off/any
Mode:Managed Access Point: Not-Associated Tx-Power=36 dBm
Retry short long limit:2 RTS thr:off Fragment thr:off
Power Management:off
이것이 영향을 미치는지 확인하기 위해 cron
5분마다 실행되도록 작업을 설정했지만 그렇지 않은 것 같습니다.iwconfig wlan1 power off
다음은 귀하가 관심을 가질 만한 몇 가지 로그 항목입니다.
pi@raspberrypi:/var/log $ grep wlan1 * | grep -v CRON | grep -v dhcp | grep -v avahi | grep -v dns | grep -v "24:62:ab:fd:24:34" | grep -v "light" | grep -v "iwconfig wlan1 power off"
daemon.log:Sep 20 18:42:25 raspberrypi vnstatd[504]: Info: Interface "wlan1" disabled.
daemon.log:Sep 20 18:42:30 raspberrypi vnstatd[504]: Info: Interface "wlan1" enabled.
daemon.log.1:Sep 13 13:16:42 raspberrypi vnstatd[504]: Info: Interface "wlan1" enabled.
daemon.log.1:Sep 14 21:51:28 raspberrypi vnstatd[504]: Info: Interface "wlan1" disabled.
daemon.log.1:Sep 14 21:51:33 raspberrypi vnstatd[504]: Info: Interface "wlan1" enabled.
daemon.log.1:Sep 15 19:09:21 raspberrypi vnstatd[504]: Info: Interface "wlan1" disabled.
daemon.log.1:Sep 15 19:09:26 raspberrypi vnstatd[504]: Info: Interface "wlan1" enabled.
daemon.log.1:Sep 17 11:09:18 raspberrypi vnstatd[504]: Info: Interface "wlan1" disabled.
daemon.log.1:Sep 17 11:09:23 raspberrypi vnstatd[504]: Info: Interface "wlan1" enabled.
daemon.log.1:Sep 17 11:38:23 raspberrypi vnstatd[504]: Info: Interface "wlan1" disabled.
daemon.log.1:Sep 17 11:38:28 raspberrypi vnstatd[504]: Info: Interface "wlan1" enabled.
kern.log:Sep 20 14:08:07 raspberrypi kernel: [927055.823706] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready
kern.log:Sep 20 14:29:07 raspberrypi kernel: [928315.433328] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready
kern.log:Sep 20 14:38:19 raspberrypi kernel: [928867.033359] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready
kern.log:Sep 20 14:55:46 raspberrypi kernel: [ 8.827781] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready
kern.log:Sep 20 14:56:01 raspberrypi kernel: [ 23.574682] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready
kern.log.1:Sep 13 13:40:12 raspberrypi kernel: [320571.239666] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready
kern.log.1:Sep 13 13:57:22 raspberrypi kernel: [321601.827227] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready
kern.log.1:Sep 13 20:33:56 raspberrypi kernel: [345395.775302] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready
kern.log.1:Sep 13 20:47:40 raspberrypi kernel: [346220.238577] device wlan1 entered promiscuous mode
kern.log.1:Sep 13 20:47:43 raspberrypi kernel: [346222.405713] device wlan1 left promiscuous mode
kern.log.1:Sep 13 20:49:55 raspberrypi kernel: [346355.010522] device wlan1 entered promiscuous mode
kern.log.1:Sep 13 20:51:01 raspberrypi kernel: [346420.542532] device wlan1 left promiscuous mode
kern.log.1:Sep 14 18:16:09 raspberrypi kernel: [423530.404296] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready
kern.log.1:Sep 17 11:38:42 raspberrypi kernel: [658886.773095] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready
messages:Sep 20 14:08:07 raspberrypi kernel: [927055.823706] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready
messages:Sep 20 14:29:07 raspberrypi kernel: [928315.433328] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready
messages:Sep 20 14:38:19 raspberrypi kernel: [928867.033359] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready
messages:Sep 20 14:55:46 raspberrypi kernel: [ 8.827781] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready
messages:Sep 20 14:56:01 raspberrypi kernel: [ 23.574682] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready
messages.1:Sep 13 13:40:12 raspberrypi kernel: [320571.239666] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready
messages.1:Sep 13 13:57:22 raspberrypi kernel: [321601.827227] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready
messages.1:Sep 13 20:33:56 raspberrypi kernel: [345395.775302] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready
messages.1:Sep 13 20:47:40 raspberrypi kernel: [346220.238577] device wlan1 entered promiscuous mode
messages.1:Sep 13 20:47:43 raspberrypi kernel: [346222.405713] device wlan1 left promiscuous mode
messages.1:Sep 13 20:49:55 raspberrypi kernel: [346355.010522] device wlan1 entered promiscuous mode
messages.1:Sep 13 20:51:01 raspberrypi kernel: [346420.542532] device wlan1 left promiscuous mode
messages.1:Sep 14 18:16:09 raspberrypi kernel: [423530.404296] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready
messages.1:Sep 17 11:38:42 raspberrypi kernel: [658886.773095] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready
syslog:Sep 20 14:08:07 raspberrypi kernel: [927055.823706] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready
syslog:Sep 20 14:29:07 raspberrypi kernel: [928315.433328] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready
syslog:Sep 20 14:38:19 raspberrypi kernel: [928867.033359] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready
syslog:Sep 20 14:55:46 raspberrypi kernel: [ 8.827781] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready
syslog:Sep 20 14:56:01 raspberrypi kernel: [ 23.574682] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready
syslog:Sep 20 18:42:25 raspberrypi vnstatd[504]: Info: Interface "wlan1" disabled.
syslog:Sep 20 18:42:30 raspberrypi vnstatd[504]: Info: Interface "wlan1" enabled.
다음은 몇 가지 흥미로운 로그 항목입니다 hostapd
.
Configuration file: /etc/hostapd/hostapd.conf
wlan1: AP-ENABLED
wlan1: interface state ENABLED->DISABLED
wlan1: AP-DISABLED
wlan1: CTRL-EVENT-TERMINATING
nl80211: deinit ifname=wlan1 disabled_11b_rates=0
Configuration file: /etc/hostapd/hostapd.conf
wlan1: AP-ENABLED
wlan1: interface state ENABLED->DISABLED
wlan1: AP-DISABLED
wlan1: CTRL-EVENT-TERMINATING
nl80211: deinit ifname=wlan1 disabled_11b_rates=0
Configuration file: /etc/hostapd/hostapd.conf
wlan1: AP-ENABLED
wlan1: INTERFACE-DISABLED
wlan1: INTERFACE-ENABLED
Failed to set beacon parameters
wlan1: INTERFACE-DISABLED
wlan1: INTERFACE-ENABLED
Failed to set beacon parameters
wlan1: INTERFACE-DISABLED
wlan1: INTERFACE-ENABLED
Failed to set beacon parameters
wlan1: INTERFACE-DISABLED
Could not set interface wlan1 flags (UP): Input/output error
nl80211: Could not set interface 'wlan1' UP
Could not set interface wlan1 flags (UP): No such device
nl80211: Could not set interface 'wlan1' UP
wlan1: INTERFACE-ENABLED
Failed to set beacon parameters
wlan1: INTERFACE-DISABLED
wlan1: INTERFACE-ENABLED
Failed to set beacon parameters
wlan1: INTERFACE-DISABLED
wlan1: INTERFACE-ENABLED
Failed to set beacon parameters
wlan1: INTERFACE-DISABLED
wlan1: INTERFACE-ENABLED
Failed to set beacon parameters
wlan1: INTERFACE-DISABLED
wlan1: INTERFACE-ENABLED
Failed to set beacon parameters
wlan1: interface state ENABLED->DISABLED
wlan1: AP-DISABLED
wlan1: CTRL-EVENT-TERMINATING
nl80211: deinit ifname=wlan1 disabled_11b_rates=0
Configuration file: /etc/hostapd/hostapd.conf
wlan1: AP-ENABLED
wlan1: INTERFACE-DISABLED
Could not set interface wlan1 flags (UP): Input/output error
nl80211: Could not set interface 'wlan1' UP
Could not set interface wlan1 flags (UP): Device or resource busy
nl80211: Could not set interface 'wlan1' UP
wlan1: INTERFACE-ENABLED
Failed to set beacon parameters
wlan1: INTERFACE-DISABLED
wlan1: INTERFACE-ENABLED
Failed to set beacon parameters
wlan1: interface state ENABLED->DISABLED
wlan1: AP-DISABLED
wlan1: CTRL-EVENT-TERMINATING
nl80211: deinit ifname=wlan1 disabled_11b_rates=0
Configuration file: /etc/hostapd/hostapd.conf
wlan1: AP-ENABLED
wlan1: interface state ENABLED->DISABLED
wlan1: AP-DISABLED
wlan1: CTRL-EVENT-TERMINATING
nl80211: deinit ifname=wlan1 disabled_11b_rates=0
Configuration file: /etc/hostapd/hostapd.conf
wlan1: AP-ENABLED
wlan1: INTERFACE-DISABLED
wlan1: INTERFACE-ENABLED
Failed to set beacon parameters
wlan1: INTERFACE-DISABLED
wlan1: INTERFACE-ENABLED
Failed to set beacon parameters
wlan1: INTERFACE-DISABLED
wlan1: INTERFACE-ENABLED
Failed to set beacon parameters
wlan1: INTERFACE-DISABLED
wlan1: INTERFACE-ENABLED
Failed to set beacon parameters
wlan1: INTERFACE-DISABLED
wlan1: INTERFACE-ENABLED
Failed to set beacon parameters
wlan1: INTERFACE-DISABLED
Could not set interface wlan1 flags (UP): No such device
nl80211: Could not set interface 'wlan1' UP
Could not set interface wlan1 flags (UP): No such device
nl80211: Could not set interface 'wlan1' UP
wlan1: INTERFACE-ENABLED
Failed to set beacon parameters
wlan1: INTERFACE-DISABLED
wlan1: INTERFACE-ENABLED
Failed to set beacon parameters
wlan1: interface state ENABLED->DISABLED
wlan1: AP-DISABLED
wlan1: CTRL-EVENT-TERMINATING
nl80211: deinit ifname=wlan1 disabled_11b_rates=0
Configuration file: /etc/hostapd/hostapd.conf
wlan1: AP-ENABLED
wlan1: interface state ENABLED->DISABLED
wlan1: AP-DISABLED
wlan1: CTRL-EVENT-TERMINATING
nl80211: deinit ifname=wlan1 disabled_11b_rates=0
Configuration file: /etc/hostapd/hostapd.conf
wlan1: AP-ENABLED
wlan1: interface state ENABLED->DISABLED
wlan1: AP-DISABLED
wlan1: CTRL-EVENT-TERMINATING
nl80211: deinit ifname=wlan1 disabled_11b_rates=0
Configuration file: /etc/hostapd/hostapd.conf
wlan1: AP-ENABLED
wlan1: INTERFACE-DISABLED
wlan1: INTERFACE-ENABLED
Failed to set beacon parameters
wlan1: INTERFACE-DISABLED
wlan1: INTERFACE-ENABLED
Failed to set beacon parameters
wlan1: interface state ENABLED->DISABLED
wlan1: AP-DISABLED
wlan1: CTRL-EVENT-TERMINATING
nl80211: deinit ifname=wlan1 disabled_11b_rates=0
Configuration file: /etc/hostapd/hostapd.conf
wlan1: AP-ENABLED
wlan1: INTERFACE-DISABLED
wlan1: INTERFACE-ENABLED
Failed to set beacon parameters
wlan1: INTERFACE-DISABLED
wlan1: INTERFACE-ENABLED
Failed to set beacon parameters
wlan1: INTERFACE-DISABLED
wlan1: INTERFACE-ENABLED
Failed to set beacon parameters
wlan1: INTERFACE-DISABLED
wlan1: INTERFACE-ENABLED
Failed to set beacon parameters
wlan1: INTERFACE-DISABLED
wlan1: INTERFACE-ENABLED
Failed to set beacon parameters
wlan1: INTERFACE-DISABLED
wlan1: INTERFACE-ENABLED
Failed to set beacon parameters
wlan1: INTERFACE-DISABLED
wlan1: INTERFACE-ENABLED
Failed to set beacon parameters
wlan1: INTERFACE-DISABLED
wlan1: INTERFACE-ENABLED
Failed to set beacon parameters
wlan1: INTERFACE-DISABLED
wlan1: INTERFACE-ENABLED
Failed to set beacon parameters
wlan1: INTERFACE-DISABLED
wlan1: INTERFACE-ENABLED
Failed to set beacon parameters
wlan1: INTERFACE-DISABLED
wlan1: INTERFACE-ENABLED
Failed to set beacon parameters
wlan1: INTERFACE-DISABLED
wlan1: INTERFACE-ENABLED
Failed to set beacon parameters
wlan1: INTERFACE-DISABLED
wlan1: INTERFACE-ENABLED
Failed to set beacon parameters
wlan1: INTERFACE-DISABLED
wlan1: INTERFACE-ENABLED
Failed to set beacon parameters
wlan1: INTERFACE-DISABLED
Could not set interface wlan1 flags (UP): Input/output error
nl80211: Could not set interface 'wlan1' UP
wlan1: INTERFACE-ENABLED
Failed to set beacon parameters
wlan1: INTERFACE-DISABLED
wlan1: INTERFACE-ENABLED
Failed to set beacon parameters
wlan1: INTERFACE-DISABLED
wlan1: INTERFACE-ENABLED
Failed to set beacon parameters
wlan1: INTERFACE-DISABLED
wlan1: INTERFACE-ENABLED
Failed to set beacon parameters
wlan1: INTERFACE-DISABLED
wlan1: INTERFACE-ENABLED
Failed to set beacon parameters
wlan1: INTERFACE-DISABLED
Could not set interface wlan1 flags (UP): Input/output error
nl80211: Could not set interface 'wlan1' UP
Could not set interface wlan1 flags (UP): Input/output error
nl80211: Could not set interface 'wlan1' UP
wlan1: INTERFACE-ENABLED
Failed to set beacon parameters
wlan1: INTERFACE-DISABLED
wlan1: INTERFACE-ENABLED
Failed to set beacon parameters
wlan1: INTERFACE-DISABLED
Could not set interface wlan1 flags (UP): No such device
nl80211: Could not set interface 'wlan1' UP
wlan1: INTERFACE-ENABLED
Failed to set beacon parameters
wlan1: INTERFACE-DISABLED
wlan1: INTERFACE-ENABLED
Failed to set beacon parameters
wlan1: INTERFACE-DISABLED
wlan1: INTERFACE-ENABLED
Failed to set beacon parameters
wlan1: INTERFACE-DISABLED
wlan1: INTERFACE-ENABLED
Failed to set beacon parameters
wlan1: interface state ENABLED->DISABLED
wlan1: AP-DISABLED
wlan1: CTRL-EVENT-TERMINATING
nl80211: deinit ifname=wlan1 disabled_11b_rates=0
Configuration file: /etc/hostapd/hostapd.conf
wlan1: AP-ENABLED
wlan1: INTERFACE-DISABLED
wlan1: INTERFACE-ENABLED
Failed to set beacon parameters
wlan1: INTERFACE-DISABLED
wlan1: INTERFACE-ENABLED
Failed to set beacon parameters
wlan1: interface state ENABLED->DISABLED
wlan1: AP-DISABLED
wlan1: CTRL-EVENT-TERMINATING
nl80211: deinit ifname=wlan1 disabled_11b_rates=0
Configuration file: /etc/hostapd/hostapd.conf
wlan1: AP-ENABLED
wlan1: interface state ENABLED->DISABLED
wlan1: AP-DISABLED
wlan1: CTRL-EVENT-TERMINATING
nl80211: deinit ifname=wlan1 disabled_11b_rates=0
Configuration file: /etc/hostapd/hostapd.conf
wlan1: AP-ENABLED
운영 체제 세부정보:
pi@raspberrypi:/tmp $ cat /etc/*release*
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
pi@raspberrypi:/tmp $ uname -a
Linux raspberrypi 5.4.51-v7l+ #1333 SMP Mon Aug 10 16:51:40 BST 2020 armv7l GNU/Linux
이 시점에서는 어댑터가 불량일 수 있는지 궁금합니다. 하지만 이 문제를 해결하기 위해 또 무엇을 할 수 있는지 궁금합니다.
업데이트 21/09/20 - Hostapd 디버그 로그
나는 이 질문에 관심이 있을 것이라고 생각되는 내용을 추출했습니다.
1600641182.604187: nl80211: Drv Event 16 (NL80211_CMD_STOP_AP) received for wlan1
1600641182.604214: wlan1: Event INTERFACE_UNAVAILABLE (28) received
1600641182.604228: Interface wlan1 is unavailable -- stopped
1600641182.605808: RTM_NEWLINK: ifi_index=466 ifname=wlan1 operstate=2 linkmode=0 ifi_family=0 ifi_flags=0x1002 ()
1600641182.605920: nl80211: Interface down (wlan1/wlan1)
1600641182.605943: wlan1: Event INTERFACE_DISABLED (26) received
1600641182.605961: wlan1: INTERFACE-DISABLED
1600641182.606036: VLAN: RTM_NEWLINK: ifi_index=466 ifname=wlan1 ifi_family=0 ifi_flags=0x1002 ()
1600641182.606054: VLAN: vlan_newlink(wlan1)
1600641182.724045: RTM_DELLINK: ifi_index=466 ifname=wlan1 operstate=2 linkmode=0 ifi_family=0 ifi_flags=0x1002 ()
1600641182.724069: RTM_DELLINK: Interface 'wlan1' removed - mark if_removed=1
1600641182.724083: wlan1: Event INTERFACE_STATUS (5) received
1600641182.724092: Unknown event 5
1600641182.741668: VLAN: RTM_DELLINK: ifi_index=466 ifname=wlan1 ifi_family=0 ifi_flags=0x1002 ()
1600641182.741703: VLAN: vlan_dellink(wlan1)
1600641182.759151: nl80211: Ignored event (cmd=36) for foreign interface (ifindex -1 wdev 0x0)
1600641182.759221: nl80211: Drv Event 36 (NL80211_CMD_REG_CHANGE) received for wlan1
1600641182.759230: nl80211: Regulatory domain change
1600641182.759235: * initiator=1
1600641182.759241: * type=0
1600641182.759247: * alpha2=AU
1600641182.759258: wlan1: Event CHANNEL_LIST_CHANGED (27) received
1600641183.536944: RTM_NEWLINK: ifi_index=2081 ifname=wlan1 operstate=2 linkmode=0 ifi_family=0 ifi_flags=0x1002 ()
1600641183.538906: nl80211: Update ifindex for a removed interface
1600641183.539417: nl80211: Supported cipher 00-0f-ac:1
1600641183.539444: nl80211: Supported cipher 00-0f-ac:5
1600641183.539461: nl80211: Supported cipher 00-0f-ac:2
1600641183.539476: nl80211: Supported cipher 00-0f-ac:4
1600641183.539491: nl80211: Supported cipher 00-0f-ac:10
1600641183.539506: nl80211: Supported cipher 00-0f-ac:8
1600641183.539520: nl80211: Supported cipher 00-0f-ac:9
1600641183.539534: nl80211: Supported cipher 00-0f-ac:6
1600641183.539548: nl80211: Supported cipher 00-0f-ac:13
1600641183.539562: nl80211: Supported cipher 00-0f-ac:11
1600641183.539577: nl80211: Supported cipher 00-0f-ac:12
1600641183.539647: nl80211: Using driver-based off-channel TX
1600641183.539717: nl80211: interface wlan1 in phy phy4
1600641183.539737: nl80211: Set mode ifindex 2081 iftype 3 (AP)
1600641183.539849: nl80211: Unsubscribe mgmt frames handle 0x89823791 (start AP)
1600641183.540033: nl80211: Setup AP(wlan1) - device_ap_sme=0 use_monitor=0
1600641183.540125: nl80211: Subscribe to mgmt frames with AP handle 0x10abf18
1600641186.653836: Could not set interface wlan1 flags (UP): Input/output error
1600641186.653876: nl80211: Could not set interface 'wlan1' UP
1600641186.653899: nl80211: Found matching own interface, but failed to complete reinitialization
1600641186.654069: VLAN: RTM_NEWLINK: ifi_index=2081 ifname=wlan1 ifi_family=0 ifi_flags=0x1002 ()
1600641186.654087: VLAN: vlan_newlink(wlan1)
1600641186.713941: RTM_DELLINK: ifi_index=2081 ifname=wlan1 operstate=2 linkmode=0 ifi_family=0 ifi_flags=0x1002 ()
1600641186.713965: nl80211: if_removed already set - ignore RTM_DELLINK event for wlan1
1600641186.725633: VLAN: RTM_DELLINK: ifi_index=2081 ifname=wlan1 ifi_family=0 ifi_flags=0x1002 ()
1600641186.725659: VLAN: vlan_dellink(wlan1)
1600641187.584495: RTM_NEWLINK: ifi_index=2082 ifname=wlan1 operstate=2 linkmode=0 ifi_family=0 ifi_flags=0x1002 ()
1600641187.585759: nl80211: Update ifindex for a removed interface
1600641187.586447: nl80211: Supported cipher 00-0f-ac:1
1600641187.586483: nl80211: Supported cipher 00-0f-ac:5
1600641187.586500: nl80211: Supported cipher 00-0f-ac:2
1600641187.586525: nl80211: Supported cipher 00-0f-ac:4
1600641187.586540: nl80211: Supported cipher 00-0f-ac:10
1600641187.586554: nl80211: Supported cipher 00-0f-ac:8
1600641187.586569: nl80211: Supported cipher 00-0f-ac:9
1600641187.586583: nl80211: Supported cipher 00-0f-ac:6
1600641187.586597: nl80211: Supported cipher 00-0f-ac:13
1600641187.586831: nl80211: Supported cipher 00-0f-ac:11
1600641187.586855: nl80211: Supported cipher 00-0f-ac:12
1600641187.586932: nl80211: Using driver-based off-channel TX
1600641187.587157: nl80211: interface wlan1 in phy phy5
1600641187.587184: nl80211: Set mode ifindex 2082 iftype 3 (AP)
1600641187.587421: nl80211: Unsubscribe mgmt frames handle 0x89823791 (start AP)
1600641187.587643: nl80211: Setup AP(wlan1) - device_ap_sme=0 use_monitor=0
1600641187.587741: nl80211: Subscribe to mgmt frames with AP handle 0x10abf18
1600641188.364296: nl80211: Connect handle already created (nl_connect=0x10ac970)
1600641188.364502: nl80211: Mark if_removed=0 for wlan1 based on RTM_NEWLINK event
1600641188.364583: wlan1: Event INTERFACE_STATUS (5) received
1600641188.364658: Unknown event 5
1600641188.364744: RTM_NEWLINK: ifi_index=2082 ifname=wlan1 operstate=0 linkmode=0 ifi_family=0 ifi_flags=0x1043 ([UP][RUNNING])
1600641188.364868: nl80211: Interface up (wlan1/wlan1)
1600641188.364980: wlan1: Event INTERFACE_ENABLED (25) received
1600641188.365049: wlan1: INTERFACE-ENABLED
1600641188.365174: wpa_driver_nl80211_set_key: ifindex=2082 (wlan1) alg=3 addr=0x119324 key_idx=1 set_tx=1 seq_len=0 key_len=16
1600641188.365257: nl80211: KEY_DATA - hexdump(len=16): [REMOVED]
1600641188.365339: broadcast key
1600641188.365571: nl80211: Set beacon (beacon_set=0)
1600641188.365975: nl80211: ifindex=2082
1600641188.366043: nl80211: beacon_int=100
1600641188.366112: nl80211: beacon_rate=0
1600641188.366186: nl80211: rate_type=0
1600641188.366261: nl80211: dtim_period=2
1600641188.366333: nl80211: ssid - hexdump_ascii(len=7):
47 2d 57 41 47 4f 4e <REDACTED>
1600641188.366503: * beacon_int=100
1600641188.366581: * dtim_period=2
1600641188.366657: nl80211: hidden SSID not in use
1600641188.366735: nl80211: privacy=1
1600641188.366810: nl80211: auth_algs=0x1
1600641188.366882: nl80211: wpa_version=0x2
1600641188.366961: nl80211: key_mgmt_suites=0x2
1600641188.367043: nl80211: pairwise_ciphers=0x10
1600641188.367126: nl80211: group_cipher=0x10
1600641188.367200: nl80211: beacon_ies - hexdump(len=10): 7f 08 00 00 00 02 00 00 00 40
1600641188.367281: nl80211: proberesp_ies - hexdump(len=10): 7f 08 00 00 00 02 00 00 00 40
1600641188.367368: nl80211: assocresp_ies - hexdump(len=10): 7f 08 00 00 00 02 00 00 00 40
1600641188.367517: nl80211: Beacon set failed: -22 (Invalid argument)
1600641188.367590: Failed to set beacon parameters
1600641188.367733: RTM_NEWLINK: ifi_index=2082 ifname=wlan1 operstate=2 linkmode=0 ifi_family=0 ifi_flags=0x1003 ([UP])
1600641188.367894: VLAN: RTM_NEWLINK: ifi_index=2082 ifname=wlan1 ifi_family=0 ifi_flags=0x1002 ()
1600641188.367971: VLAN: vlan_newlink(wlan1)
1600641188.368087: VLAN: RTM_NEWLINK: ifi_index=2082 ifname=wlan1 ifi_family=0 ifi_flags=0x1043 ([UP][RUNNING])
1600641188.368156: VLAN: vlan_newlink(wlan1)
1600641188.368274: VLAN: RTM_NEWLINK: ifi_index=2082 ifname=wlan1 ifi_family=0 ifi_flags=0x1003 ([UP])
1600641188.368340: VLAN: vlan_newlink(wlan1)
1600641188.398935: RTM_NEWLINK: ifi_index=2082 ifname=wlan1 operstate=2 linkmode=0 ifi_family=0 ifi_flags=0x1003 ([UP])
1600641188.399082: VLAN: RTM_NEWLINK: ifi_index=2082 ifname=wlan1 ifi_family=0 ifi_flags=0x1003 ([UP])
1600641188.399135: VLAN: vlan_newlink(wlan1)
1600641195.734325: Unknown Microsoft information element ignored (type=8 len=8)
1600641195.734536: Ignore Probe Request due to DS Params mismatch: chan=7 != ds.chan=1
1600642515.763249: nl80211: send_mlme - da= 64:1c:b0:ef:99:22 noack=1 freq=0 no_cck=0 offchanok=0 wait_time=0 fc=0x50 (WLAN_FC_STYPE_PROBE_RESP) nlmode=3
1600642515.763274: nl80211: send_mlme -> send_frame
1600642515.763287: nl80211: send_frame - Use bss->freq=2442
1600642515.763300: nl80211: send_frame -> send_frame_cmd
1600642515.763314: nl80211: CMD_FRAME freq=2442 wait=0 no_cck=0 no_ack=1 offchanok=0
1600642515.763568: nl80211: Frame command failed: ret=-16 (Device or resource busy) (freq=2442 wait=0)
1600642515.763591: handle_probe_req: send failed
1600642515.765742: nl80211: send_mlme - da= 64:1c:b0:ef:99:22 noack=1 freq=0 no_cck=0 offchanok=0 wait_time=0 fc=0x50 (WLAN_FC_STYPE_PROBE_RESP) nlmode=3
1600642515.765860: nl80211: send_mlme -> send_frame
1600642515.765957: nl80211: send_frame - Use bss->freq=2442
1600642515.766056: nl80211: send_frame -> send_frame_cmd
1600642515.766079: nl80211: CMD_FRAME freq=2442 wait=0 no_cck=0 no_ack=1 offchanok=0
1600642515.766282: nl80211: Frame command failed: ret=-16 (Device or resource busy) (freq=2442 wait=0)
1600642515.766304: handle_probe_req: send failed
1600643055.956614: Ignore Probe Request due to DS Params mismatch: chan=7 != ds.chan=4
1600643955.647033: nl80211: send_mlme - da= 64:1c:b0:ef:99:22 noack=1 freq=0 no_cck=0 offchanok=0 wait_time=0 fc=0x50 (WLAN_FC_STYPE_PROBE_RESP) nlmode=3
1600643955.647057: nl80211: send_mlme -> send_frame
1600643955.647070: nl80211: send_frame - Use bss->freq=2442
1600643955.647084: nl80211: send_frame -> send_frame_cmd
1600643955.647097: nl80211: CMD_FRAME freq=2442 wait=0 no_cck=0 no_ack=1 offchanok=0
1600643955.647326: nl80211: Frame command failed: ret=-16 (Device or resource busy) (freq=2442 wait=0)
1600643955.647353: handle_probe_req: send failed
1600643955.649431: nl80211: send_mlme - da= 64:1c:b0:ef:99:22 noack=1 freq=0 no_cck=0 offchanok=0 wait_time=0 fc=0x50 (WLAN_FC_STYPE_PROBE_RESP) nlmode=3
1600643955.649454: nl80211: send_mlme -> send_frame
1600643955.649467: nl80211: send_frame - Use bss->freq=2442
1600643955.649480: nl80211: send_frame -> send_frame_cmd
1600643955.649493: nl80211: CMD_FRAME freq=2442 wait=0 no_cck=0 no_ack=1 offchanok=0
1600643955.649688: nl80211: Frame command failed: ret=-16 (Device or resource busy) (freq=2442 wait=0)
1600643955.649717: handle_probe_req: send failed
1600643955.652399: nl80211: send_mlme - da= 64:1c:b0:ef:99:22 noack=1 freq=0 no_cck=0 offchanok=0 wait_time=0 fc=0x50 (WLAN_FC_STYPE_PROBE_RESP) nlmode=3
1600643955.652422: nl80211: send_mlme -> send_frame
1600643955.652434: nl80211: send_frame - Use bss->freq=2442
1600643955.652447: nl80211: send_frame -> send_frame_cmd
1600643955.652460: nl80211: CMD_FRAME freq=2442 wait=0 no_cck=0 no_ack=1 offchanok=0
1600643955.652650: nl80211: Frame command failed: ret=-16 (Device or resource busy) (freq=2442 wait=0)
1600643955.652674: handle_probe_req: send failed
1600645124.882081: Add randomness: count=10240 entropy=1010
1600645124.882096: random pool - hexdump(len=128): [REMOVED]
1600645124.882111: random_mix_pool - hexdump(len=8): [REMOVED]
1600645124.882126: random_mix_pool - hexdump(len=16): [REMOVED]
1600645124.882140: random pool - hexdump(len=128): [REMOVED]
1600647135.984635: nl80211: send_mlme - da= 64:1c:b0:ef:99:22 noack=1 freq=0 no_cck=0 offchanok=0 wait_time=0 fc=0x50 (WLAN_FC_STYPE_PROBE_RESP) nlmode=3
1600647135.984658: nl80211: send_mlme -> send_frame
1600647135.984672: nl80211: send_frame - Use bss->freq=2442
1600647135.984687: nl80211: send_frame -> send_frame_cmd
1600647135.984700: nl80211: CMD_FRAME freq=2442 wait=0 no_cck=0 no_ack=1 offchanok=0
1600647135.984925: nl80211: Frame command failed: ret=-16 (Device or resource busy) (freq=2442 wait=0)
1600647135.984952: handle_probe_req: send failed
1600647135.989488: nl80211: send_mlme - da= 64:1c:b0:ef:99:22 noack=1 freq=0 no_cck=0 offchanok=0 wait_time=0 fc=0x50 (WLAN_FC_STYPE_PROBE_RESP) nlmode=3
1600647135.989510: nl80211: send_mlme -> send_frame
1600647135.989523: nl80211: send_frame - Use bss->freq=2442
1600647135.989536: nl80211: send_frame -> send_frame_cmd
1600647135.989549: nl80211: CMD_FRAME freq=2442 wait=0 no_cck=0 no_ack=1 offchanok=0
1600647135.989752: nl80211: Frame command failed: ret=-16 (Device or resource busy) (freq=2442 wait=0)
1600647135.989775: handle_probe_req: send failed
디버그 로그 완료여기.
업데이트 27/09/20 - 추가 출력
추가 세부 사항:
건배.
답변1
글쎄요, RT3070 동글을 여러 번 테스트한 후에는 그것이 설정과 관련이 있다는 것을 확실히 말할 수 있습니다 tx-power
.
여기에는 몇 가지 질문이 있습니다.
1. CRDA 규제 데이터베이스가 최근 변경된 것으로 보입니다. 허용되는 값 중 일부는 이제 EIRP를 나타내는 것으로 나타나고 다른 값은 여전히 ERP를 보고합니다.
EIRP는 유효 등방성 복사 전력에 해당하며 다음과 같이 계산됩니다.
EIRP(dBm) = [Output Power] - [Cable Loss] + [Antenna Gain]
iw reg set AU
호주 국가 코드를 사용하는 경우 iw reg get
다음과 같은 출력이 표시됩니다.
global
country AU: DFS-ETSI
(2400 - 2483 @ 40), (N/A, 36), (N/A)
(5150 - 5250 @ 80), (N/A, 23), (N/A), NO-OUTDOOR, AUTO-BW
(5250 - 5350 @ 80), (N/A, 20), (0 ms), NO-OUTDOOR, DFS, AUTO-BW
(5470 - 5600 @ 80), (N/A, 27), (0 ms), DFS
(5650 - 5730 @ 80), (N/A, 27), (0 ms), DFS
(5730 - 5850 @ 80), (N/A, 36), (N/A)
(57000 - 66000 @ 2160), (N/A, 43), (N/A), NO-OUTDOOR
첫 번째 줄에는 다음이 표시됩니다. (2.4GHz 주파수 대역@ 40MHz), (해당 사항 없음,전력 전송), 즉, 채널 선택이 1-14 채널 범위에 있는 경우 최대 전송 전력 설정은 입니다 36 dBm
. 다음을 실행하여 쉽게 확인할 수 있습니다.iwconfig wlan0 txpower 36
wlan0 IEEE 802.11 ESSID:"[SSID]"
Mode:Managed Frequency:2.412 GHz Access Point: [MAC]
Bit Rate=6.5 Mb/s Tx-Power=36 dBm
Retry short long limit:2 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
Link Quality=61/70 Signal level=-49 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:402 Invalid misc:3418 Missed beacon:0
그러나 ACMA(FCC의 AU 버전)당 호주의 규제 도메인 제한은 송신기와 안테나 이득의 합인 최대 EIRP 전력으로 36dBm을 지정합니다. 즉, 36dBm 송신기를 사용하고 상당한 이득을 갖는 안테나를 연결하는 것은 불법이며, 여러 장소에서 EIRP=40dBm(36dBm + 6dBi - 1dBm 케이블 손실)으로 라디오를 작동하면 당국에 노출될 수 있습니다. 주목.
iw reg get
AU 국가 코드에 대해 다른 값을 보고하는 이전 CRDA 데이터베이스(약 1개월 전에 마지막으로 업데이트됨)를 사용하는 다른 시스템을 확인했습니다 . 최대 전송 전력은 20dBm입니다.
이는 AU 국가 코드에만 국한되지 않고 미국의 전송 전력도 원래 20dBm에서 현재 30dBm으로 뛰어올랐습니다.
2. 연결 안정성 및 전송 전력
문제가 있는 가치를 보는 것은 tx-power
우리에게 좋은 참고점이 되지만, 그것이 전체 이야기를 말해주지는 않습니다. 따라서 다음 단계는 다양한 국가의 규제 지역을 사용하여 다양한 전송 전력 설정에서 고이득 6dBi 패널 안테나를 사용하여 연결 테스트를 실행하는 것입니다.
실제 기록된 테스트는 8.8.8.8
AU(36dBm), BO(20dBm) 및 US(30dBm) reg 도메인을 사용하여 각 tx 전력 설정이 10dBm에서 36dBm까지인 간단한 5핑 시퀀스였습니다.
로그에서 TXPOWER는 에 해당하고 iwconfig wlan0 txpower [TXPOWER]
tx-power 출력의 다음 줄은 iwconfig wlan0
자체 출력입니다. tx-power가 재구성될 때마다 sleep 5
인터페이스에는 필요한 모든 교정을 수행하는 데 5초가 주어집니다.
우리를:https://dpaste.com//CRAVMGW8S
호주:https://dpaste.com//CETUDFVHA
악:https://dpaste.com//674RUR9TT
로그에서 볼 수 있듯이 선택한 규제 도메인에 따라 매우 다른 tx-power 설정에서 오류가 발생했습니다. AU 도메인은 30dBm 미만의 연결성을 유지할 수 없는 반면 BO는 19-20dBm에서 가장 강한 연결성을 갖습니다. 마찬가지로 미국에서도 26dBm 미만의 연결 문제가 발생하기 시작합니다.
4. 인터페이스 충돌 및 이유
미국 도메인에 대한 로그를 보면 하단에 같은 이름의 인터페이스에서 충돌이 발생한 것을 볼 수 있으며, 이어서 패킷 손실 및 (손실 + 오류)가 발생합니다. 100% 재현 가능합니다.
ifup
인터페이스를 사용하고 다시 시작해도 ifdown
효과가 없으므로 오류는 일종의 스레드 잠금과 관련된 것 같습니다 . 마찬가지로 값이 올바르지 않은 경우 tx-power
관련 네트워크 및 네트워크 관리자 서비스를 모두 다시 시작해도 인터페이스가 온라인 상태가 되지 않습니다.
재설정에도 불구하고 인터페이스는 여전히 작동 중인 것처럼 보이고 iwconfig
실제로 최대 전력(예: OP iwconfig
출력)을 보고할 수도 있지만 해당 인터페이스에 연결하거나 무선 설정을 변경할 방법이 없습니다.
그러나 누군가가 다음을 수행하는 경우:
sudo ifconfig wlan0 down
sudo iw reg set BO
sudo iwconfig wlan0 txpower 20
sudo ifconfig wlan0 up
ifconfig wlan0 down
**가장 중요한 단계는 복원하기 전에 txpower를 재설정하는 것입니다. **
이렇게 하면 문제가 100% 해결됩니다.
5. 36dBm에서 AU에 연결
장기간에 걸쳐 이를 테스트하지는 않았지만 한 시간이 지나면 어댑터가 더 뜨거워지고 평균 핑 대기 시간이 iw reg set BO
20dBm보다 더 나빠지는 것 같습니다.tx-power