All interfaces, I didn't insert my ethernet cable. So all RX/TX packets are 0.
root@OpenWrt:/# ifconfig -a
br-lan Link encap:Ethernet HWaddr 02:81:88:7D:DA:55
inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fd10:5fcd:75f6::1/60 Scope:Global
UP BROADCAST MULTICAST MTU:1500 Metric: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)
eth0 Link encap:Ethernet HWaddr 02:81:88:7D:DA:55
UP BROADCAST MULTICAST MTU:1500 Metric: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)
Interrupt:32
hwsim0 Link encap:UNSPEC HWaddr 12-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
BROADCAST MULTICAST MTU:1500 Metric: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)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:10 errors:0 dropped:0 overruns:0 frame:0
TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:684 (684.0 B) TX bytes:684 (684.0 B)
wlan0 Link encap:Ethernet HWaddr 02:00:00:00:00:00
UP BROADCAST MULTICAST MTU:1500 Metric: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:Ethernet HWaddr 02:00:00:00:01:00
UP BROADCAST MULTICAST MTU:1500 Metric: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)
wlan2 Link encap:Ethernet HWaddr E8:4E:06:26:BC:D6
UP BROADCAST MULTICAST MTU:1500 Metric: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)
Initialized my wireless configuration
root@OpenWrt:/# rm /etc/config/wireless
root@OpenWrt:/# wifi config
root@OpenWrt:/# cat /etc/config/wireless
config wifi-device 'radio0'
option type 'mac80211'
option path 'virtual/mac80211_hwsim/hwsim0'
option channel '36'
option band '5g'
option htmode 'HE80'
option disabled '1'
config wifi-iface 'default_radio0'
option device 'radio0'
option network 'lan'
option mode 'ap'
option ssid 'OpenWrt'
option encryption 'none'
config wifi-device 'radio1'
option type 'mac80211'
option path 'virtual/mac80211_hwsim/hwsim1'
option channel '36'
option band '5g'
option htmode 'HE80'
option disabled '1'
config wifi-iface 'default_radio1'
option device 'radio1'
option network 'lan'
option mode 'ap'
option ssid 'OpenWrt'
option encryption 'none'
config wifi-device 'radio2'
option type 'mac80211'
option path 'platform/soc/1c1b000.usb/usb1/1-1/1-1.2/1-1.2:1.0'
option channel '1'
option band '2g'
option htmode 'HT20'
option disabled '1'
config wifi-iface 'default_radio2'
option device 'radio2'
option network 'lan'
option mode 'ap'
option ssid 'OpenWrt'
option encryption 'none'
And remove
option htmode 'HT20'
option disabled '1'
from the config file under radio2 and execute wifi up
root@OpenWrt:/# wifi up
'radio0' is disabled
'radio1' is disabled
'radio0' is disabled
'radio1' is disabled
root@OpenWrt:/# ifconfig -a
br-lan Link encap:Ethernet HWaddr 02:81:88:7D:DA:55
inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fd10:5fcd:75f6::1/60 Scope:Global
UP BROADCAST MULTICAST MTU:1500 Metric: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)
eth0 Link encap:Ethernet HWaddr 02:81:88:7D:DA:55
UP BROADCAST MULTICAST MTU:1500 Metric: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)
Interrupt:32
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:250 errors:0 dropped:0 overruns:0 frame:0
TX packets:250 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:19404 (18.9 KiB) TX bytes:19404 (18.9 KiB)
wlan0 Link encap:Ethernet HWaddr 02:00:00:00:00:00
UP BROADCAST MULTICAST MTU:1500 Metric: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:Ethernet HWaddr 02:00:00:00:01:00
UP BROADCAST MULTICAST MTU:1500 Metric: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)
wlan2 interface disappeared
USB wifi adapter(0bda:8176) still exist
root@OpenWrt:/# lsusb
Bus 001 Device 003: ID 0bda:8176 Realtek 802.11n WLAN Adapter
Bus 001 Device 002: ID 1a40:0101 USB 2.0 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux 5.4.124 ehci_hcd EHCI Host Controller
Bus 002 Device 002: ID 05e3:0718 USB Storage
Bus 002 Device 001: ID 1d6b:0002 Linux 5.4.124 ehci_hcd EHCI Host Controller
No logs in dmesg
I have no idea about this issue, I want to enable ap mode via my wifi adapter
It's ok to use this adapter connect my router, so no problem with my adapter .
# remove config file
root@OpenWrt:/# rm /etc/config/wireless
# reboot to restore my wlan2 interface
root@OpenWrt:/# reboot
# set my wpa_supplicant config file
root@OpenWrt:/# cat /etc/wpa_supplicant.conf
network={
ssid="my SSID in my home"
psk="password"
}
# start
root@OpenWrt:/# wpa_supplicant -B -iwlan2 -c /etc/wpa_supplicant.conf -Dnl80211,wext
# it's ok
root@OpenWrt:/# ifconfig wlan2
wlan2 Link encap:Ethernet HWaddr E8:4E:06:26:BC:D6
inet addr:192.168.0.140 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::90d5:2a91:ce33:c76c/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:157 errors:0 dropped:0 overruns:0 frame:0
TX packets:88 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:29558 (28.8 KiB) TX bytes:9501 (9.2 KiB)
# network is ok
root@OpenWrt:/# ping www.microsoft.com
PING www.microsoft.com (122.224.45.50): 56 data bytes
64 bytes from 122.224.45.50: seq=0 ttl=55 time=15.204 ms
64 bytes from 122.224.45.50: seq=1 ttl=55 time=24.293 ms
64 bytes from 122.224.45.50: seq=2 ttl=55 time=22.973 ms
My wifi adapter is RTL8188CU
more details in https://www.szedup.com/product-item/150mbps-super-mini-usb-wifi-adapter/#tab-id-2-active
root@OpenWrt:/# lsmod | grep rtl81
cfg80211 483328 9 rtlwifi,rtl8xxxu,rtl8187,mt76x02_usb,mt76x02_lib,mt7601u,mt76,mac80211_hwsim,mac80211
compat 16384 12 rtl8192cu,rtlwifi,rtl8xxxu,rtl8187,mt7601u,mac80211_hwsim,mac80211,cfg80211,lib80211_crypt_wep,lib80211_crypt_tkip,lib80211_crypt_ccmp,lib80211
eeprom_93cx6 16384 1 rtl8187
mac80211 638976 12 rtl8192cu,rtl_usb,mt76x0u,mt76x0_common,rtlwifi,rtl8xxxu,rtl8187,mt76x02_usb,mt76x02_lib,mt7601u,mt76,mac80211_hwsim
rtl_usb 20480 1 rtl8192cu
rtl8187 40960 0
rtl8192c_common 49152 1 rtl8192cu
rtl8192cu 77824 0
rtlwifi 86016 3 rtl8192cu,rtl8192c_common,rtl_usb
I'm new comer about openWrt