kaloz / mwlwifi

mac80211 driver for the Marvell 88W8864 802.11ac chip
395 stars 119 forks source link

IOT can't connect to 2,4Ghz #298

Closed daloki83 closed 6 years ago

daloki83 commented 6 years ago

Other Router with default settings = OK WRT3200 with Linksys OS = OK WRT3200 OpenWrt SNAPSHOT r6865-419238fdb3 / LuCI Master (git-18.148.50949-a013967) =NOK Device is a Gosund Smart Plug (https://www.amazon.de/gp/product/B07B911Y6V/ref=oh_aui_detailpage_o03_s00?ie=UTF8&psc=1) I tried all different kinds of Encription/Cipher/Key/WifiName/Channel etc...but no way. The only working way is without encryption. If you need anything else, just let me know.

SYSLOG Mon May 28 21:03:02 2018 user.notice root: testLog #################################### CUT ################################################# Mon May 28 21:04:14 2018 daemon.info hostapd: wlan1: STA ec:fa:bc:93:57:c5 IEEE 802.11: associated (aid 3) Mon May 28 21:04:14 2018 daemon.notice hostapd: wlan1: AP-STA-CONNECTED ec:fa:bc:93:57:c5 Mon May 28 21:04:14 2018 daemon.info hostapd: wlan1: STA ec:fa:bc:93:57:c5 WPA: pairwise key handshake completed (RSN) Mon May 28 21:04:14 2018 daemon.info hostapd: wlan1: STA ec:fa:bc:93:57:c5 IEEE 802.11: authenticated Mon May 28 21:04:27 2018 kern.debug kernel: [13130.714789] ieee80211 phy1: staid 3 deleted Mon May 28 21:04:27 2018 daemon.info hostapd: wlan1: STA ec:fa:bc:93:57:c5 IEEE 802.11: associated (aid 3) Mon May 28 21:04:27 2018 daemon.notice hostapd: wlan1: AP-STA-CONNECTED ec:fa:bc:93:57:c5 Mon May 28 21:04:27 2018 daemon.info hostapd: wlan1: STA ec:fa:bc:93:57:c5 WPA: pairwise key handshake completed (RSN) Mon May 28 21:04:29 2018 daemon.info hostapd: wlan1: STA ec:fa:bc:93:57:c5 IEEE 802.11: authenticated Mon May 28 21:04:33 2018 daemon.warn odhcpd[1729]: DHCPV6 SOLICIT IA_NA from 00030001f8461c81370d on br-lan: ok fd7d:4600:2d4e::763/128 Mon May 28 21:04:43 2018 daemon.notice hostapd: wlan1: AP-STA-DISCONNECTED ec:fa:bc:93:57:c5 Mon May 28 21:04:43 2018 daemon.info hostapd: wlan1: STA ec:fa:bc:93:57:c5 IEEE 802.11: disassociated Mon May 28 21:04:43 2018 kern.debug kernel: [13146.623454] ieee80211 phy1: staid 3 deleted Mon May 28 21:04:44 2018 daemon.info hostapd: wlan1: STA ec:fa:bc:93:57:c5 IEEE 802.11: deauthenticated due to inactivity (timer DEAUTH/REMOVE) Mon May 28 21:04:46 2018 daemon.info hostapd: wlan1: STA ec:fa:bc:93:57:c5 IEEE 802.11: associated (aid 3) Mon May 28 21:04:46 2018 daemon.notice hostapd: wlan1: AP-STA-CONNECTED ec:fa:bc:93:57:c5 Mon May 28 21:04:46 2018 daemon.info hostapd: wlan1: STA ec:fa:bc:93:57:c5 WPA: pairwise key handshake completed (RSN) Mon May 28 21:04:46 2018 daemon.info hostapd: wlan1: STA ec:fa:bc:93:57:c5 IEEE 802.11: authenticated Mon May 28 21:05:10 2018 kern.debug kernel: [13173.807477] ieee80211 phy1: staid 3 deleted Mon May 28 21:05:10 2018 daemon.info hostapd: wlan1: STA ec:fa:bc:93:57:c5 IEEE 802.11: associated (aid 3) Mon May 28 21:05:11 2018 daemon.notice hostapd: wlan1: AP-STA-CONNECTED ec:fa:bc:93:57:c5 Mon May 28 21:05:11 2018 daemon.info hostapd: wlan1: STA ec:fa:bc:93:57:c5 WPA: pairwise key handshake completed (RSN) Mon May 28 21:05:11 2018 daemon.info hostapd: wlan1: STA ec:fa:bc:93:57:c5 IEEE 802.11: authenticated Mon May 28 21:05:39 2018 kern.debug kernel: [13202.914951] ieee80211 phy1: staid 3 deleted Mon May 28 21:05:39 2018 daemon.info hostapd: wlan1: STA ec:fa:bc:93:57:c5 IEEE 802.11: associated (aid 3) Mon May 28 21:05:40 2018 daemon.notice hostapd: wlan1: AP-STA-CONNECTED ec:fa:bc:93:57:c5 Mon May 28 21:05:40 2018 daemon.info hostapd: wlan1: STA ec:fa:bc:93:57:c5 WPA: pairwise key handshake completed (RSN) Mon May 28 21:05:40 2018 daemon.info hostapd: wlan1: STA ec:fa:bc:93:57:c5 IEEE 802.11: authenticated Mon May 28 21:06:13 2018 kern.debug kernel: [13236.917407] ieee80211 phy1: staid 3 deleted Mon May 28 21:06:13 2018 daemon.info hostapd: wlan1: STA ec:fa:bc:93:57:c5 IEEE 802.11: associated (aid 3) Mon May 28 21:06:14 2018 daemon.notice hostapd: wlan1: AP-STA-CONNECTED ec:fa:bc:93:57:c5 Mon May 28 21:06:14 2018 daemon.info hostapd: wlan1: STA ec:fa:bc:93:57:c5 WPA: pairwise key handshake completed (RSN) Mon May 28 21:06:15 2018 daemon.info hostapd: wlan1: STA ec:fa:bc:93:57:c5 IEEE 802.11: authenticated

WIRELESS_CONF `config wifi-device 'radio0' option type 'mac80211' option country 'FR' option channel '48' option hwmode '11a' option htmode 'VHT160' option path 'soc/soc:pcie/pci0000:00/0000:00:01.0/0000:01:00.0'

config wifi-iface 'default_radio0' option device 'radio0' option network 'lan' option mode 'ap' option ssid 'CR4P_2_5G' option encryption 'psk2' option key '14digits'

config wifi-device 'radio1' option type 'mac80211' option country 'FR' option channel '8' option hwmode '11g' option htmode 'HT40' option noscan '1' option txpower '20' option path 'soc/soc:pcie/pci0000:00/0000:00:02.0/0000:02:00.0'

config wifi-iface 'default_radio1' option device 'radio1' option network 'lan' option mode 'ap' option ssid 'CR4P_2_24G' option encryption 'psk2' option key '14digits'

config wifi-device 'radio2' option type 'mac80211' option channel '36' option hwmode '11a' option path 'platform/soc/soc:internal-regs/f10d8000.sdhci/mmc_host/mmc0/mmc0:0001/mmc0:0001:1' option htmode 'VHT80'

config wifi-iface 'default_radio2' option device 'radio2' option network 'lan' option mode 'ap' option ssid 'LEDE' option encryption 'none' option disabled '1' ` MWFWIFI

driver name: mwlwifi chip type: 88W8964 hw version: 7 driver version: 10.3.4.0-20180330 firmware version: 0x09030206 power table loaded from dts: no firmware region code: 0x30 mac address: 60:38:e0:bd:94:b9 2g: enable 5g: disable antenna: 4 4 irq number: 50 ap macid support: 0000ffff sta macid support: 00010000 macid used: 00000001 radio: enable iobase0: e1200000 iobase1: e1480000 tx limit: 1024 rx limit: 16384

kubrickfr commented 6 years ago

Don't set the country code to FR

https://github.com/kaloz/mwlwifi/issues/280

Leave it unset (00)

daloki83 commented 6 years ago

Then DFS will not work and my 5Ghz WiFi will be down. However, i tried it for both Wifi, and the result is still the same.

config wifi-device 'radio0' option type 'mac80211' option channel '48' option hwmode '11a' option htmode 'VHT160' option path 'soc/soc:pcie/pci0000:00/0000:00:01.0/0000:01:00.0' option country '00' option legacy_rates '1'

config wifi-iface 'default_radio0' option device 'radio0' option network 'lan' option mode 'ap' option ssid 'CR4P_2_5G' option encryption 'psk2' option key '14digits'

config wifi-device 'radio1' option type 'mac80211' option channel '8' option hwmode '11g' option htmode 'HT40' option noscan '1' option txpower '20' option path 'soc/soc:pcie/pci0000:00/0000:00:02.0/0000:02:00.0' option country '00' option legacy_rates '1'

config wifi-iface 'default_radio1' option device 'radio1' option network 'lan' option mode 'ap' option ssid 'CR4P_2_24G' option encryption 'psk2' option key '14digits'

config wifi-device 'radio2' option type 'mac80211' option channel '36' option hwmode '11a' option path 'platform/soc/soc:internal-regs/f10d8000.sdhci/mmc_host/mmc0/mmc0:0001/mmc0:0001:1' option htmode 'VHT80'

config wifi-iface 'default_radio2' option device 'radio2' option network 'lan' option mode 'ap' option ssid 'LEDE' option encryption 'none' option disabled '1'

LOG Tue May 29 13:33:52 2018 daemon.info hostapd: wlan1: STA ec:fa:bc:93:57:c5 IEEE 802.11: authenticated Tue May 29 13:34:22 2018 kern.debug kernel: [72545.956329] ieee80211 phy1: staid 1 deleted Tue May 29 13:34:22 2018 daemon.info hostapd: wlan1: STA ec:fa:bc:93:57:c5 IEEE 802.11: associated (aid 1) Tue May 29 13:34:22 2018 daemon.notice hostapd: wlan1: AP-STA-CONNECTED ec:fa:bc:93:57:c5 Tue May 29 13:34:22 2018 daemon.info hostapd: wlan1: STA ec:fa:bc:93:57:c5 WPA: pairwise key handshake completed (RSN) Tue May 29 13:34:29 2018 daemon.info hostapd: wlan1: STA ec:fa:bc:93:57:c5 IEEE 802.11: authenticated Tue May 29 13:34:56 2018 kern.debug kernel: [72579.974413] ieee80211 phy1: staid 1 deleted Tue May 29 13:34:56 2018 daemon.info hostapd: wlan1: STA ec:fa:bc:93:57:c5 IEEE 802.11: associated (aid 1) Tue May 29 13:34:56 2018 daemon.notice hostapd: wlan1: AP-STA-CONNECTED ec:fa:bc:93:57:c5 Tue May 29 13:34:56 2018 daemon.info hostapd: wlan1: STA ec:fa:bc:93:57:c5 WPA: pairwise key handshake completed (RSN) Tue May 29 13:35:00 2018 daemon.info hostapd: wlan1: STA ec:fa:bc:93:57:c5 IEEE 802.11: authenticated Tue May 29 13:35:40 2018 kern.debug kernel: [72624.055546] ieee80211 phy1: staid 1 deleted Tue May 29 13:35:40 2018 daemon.info hostapd: wlan1: STA ec:fa:bc:93:57:c5 IEEE 802.11: associated (aid 1) Tue May 29 13:35:40 2018 daemon.notice hostapd: wlan1: AP-STA-CONNECTED ec:fa:bc:93:57:c5 Tue May 29 13:35:40 2018 daemon.info hostapd: wlan1: STA ec:fa:bc:93:57:c5 WPA: pairwise key handshake completed (RSN) Tue May 29 13:35:42 2018 daemon.info hostapd: wlan1: STA ec:fa:bc:93:57:c5 IEEE 802.11: authenticated

iganeshk commented 6 years ago

I assume you're running devices powered by ESP8266 or similar. I have been battling past 2 months here: https://github.com/kaloz/mwlwifi/issues/278

iganeshk commented 6 years ago

For the time being, you can use the 3rd radio for your IoT/Embedded devices. If you don't have it installed, install "kmod-mwifiex-sdio" from the package manager. The only issue with this radio is when DFS kicks in or if you frequently disconnect/connect devices, it will stop working and rebooting the 3200ACM is the only way to fix it.

netprince17 commented 6 years ago

I can confirm I have esp8266 devices that will not connect to primary 2.4ghz radio.

daloki83 commented 6 years ago

@iganeshk i think you are right. I dismantled the smart plug, but couldn't find any marking on the part, that i suspect as wifi modem. But on the web i found someone with the same part and he says its a ESP8266EX https://forum.mysensors.org/post/87642

daloki83 commented 6 years ago

@yuhhaurlin maybe this can help you to fix this issue ? https://www.espressif.com/sites/default/files/documentation/0a-esp8266ex_datasheet_en.pdf

yuhhaurlin commented 6 years ago

I will check if we can get this device to test. However, it should be done after MU-MIMO.

iganeshk commented 6 years ago

@yuhhaurlin the camera with a Realtek RTL8188EUS chip img_20180601_050255

eduperez commented 6 years ago

@yuhhaurlin https://github.com/yuhhaurlin You just need an ESP8266-01 module (can be bought them on eBay for a few bucks) a serial adapter (you must have a bunch of them around there), and half an hour to prepare the environment to compile and install a test program.

tbludau commented 6 years ago

@yuhhaurlin did you need a device? i can send you one preconfigured one. https://www.itead.cc/smart-socket.html (European Version) configured with this firmware: https://wiki.fhem.de/wiki/Sonoff

I've the same problem since months and only my wrt3200acm can't build up a connection with them. everything other router is working normally.

daloki83 commented 6 years ago

FYI - 10.3.8.0-20180614 - Still not working

yuhhaurlin commented 6 years ago

Yes. This version of code is for 88W8997 with few minor fixes of original code.

p3x-robot commented 6 years ago

@yuhhaurlin this latest commit is it worth building it? it is a bigfix so it is better right?

yuhhaurlin commented 6 years ago

You can wait for next version.

daloki83 commented 6 years ago

@yuhhaurlin will this commit fix that issue ? https://github.com/kaloz/mwlwifi/commit/d9daa1dfd418a0a790188b805c95c99dea23f1bb

yuhhaurlin commented 6 years ago

No. Your client is ESP8266? I think I will check remaining issues after MU-MIMO is done.

daloki83 commented 6 years ago

yep, its ESP8266

yuhhaurlin commented 6 years ago

Once if MU-MIMO is done. I will check our QA to get this client and check it. BTW, I remember @eduperez can connect this client to WRT series router.

daloki83 commented 6 years ago

@eduperez could you manage it with the ESP8266 ? If yes, would you please be so kind and tell me/us how ?

eduperez commented 6 years ago

@daloki83 Please, browse my posts at issue #170, I explained all my tests and the results there.

iganeshk commented 6 years ago

@daloki83 discussion over there is mostly about trying to connect your ESPs to radio2 rather than radio1.

@yuhhaurlin So this issue has been on-going since June 2017 but why was the issue #170 marked solved?

eduperez commented 6 years ago

@iganeshk I tested the ESP on both radio1 and radio2, in hopes that will give more information and make the issue easier to debug; but in my tests the ESP could connect to radio1 (albeit with some weird log messages).

iganeshk commented 6 years ago

@eduperez with the latest driver, I've tried all the possible combinations of encryption here #278. The only time it connects is when I set the encryption/password to None.

eduperez commented 6 years ago

@iganeshk In my tests I did use encryption on radio1, and it worked. However, that was a long time ago, I now use radio2 for the ESP. Give me a couple of days, and I will repeat my tests with a more recent version of the drivers.

I want to clarify that I am not trying to defend Marvel or dismiss this issue, I just want to try to help fix it, by providing more tests.

iganeshk commented 6 years ago

@eduperez do take your time. I've also found out it's not just the ESP being affected. The low power Realtek RTL8188EUS exhibits a similar case. But the problem with radio2 is that it gets disabled if devices connect and disconnect in short interval of time and can only be fixed by restarting the whole router, bringing down and up the interface doesn't fix it.

Phil795 commented 6 years ago

I've been trying to get my ESP devices online for weeks. It works without encryption. The problem probably occurs with several IoT devices. Tested with ESP8266 and ESP8285. espressif8266 in version 1.5.0 - 1.7.0 tested.

ghost commented 6 years ago

Also having trouble with ESP8266 units here. Simply not connecting to wifi on my wrt32x at all (running davidc502's latest OpenWRT build).

The device MAC shows up in Associated Stations list on the wireless settings page, but it does not get an IP address. Setting a static address also does not work.

Some people suggest disabling legacy b rates, but that does not work for me either.

Tried multiple alternative firmwares on the ESP chips, but none solve the issue.

Phil795 commented 6 years ago

With the settings shown below I can now connect my ESP devices. WMM has to be dispensed with, which is no problem in my case, as I provide my own radio network for the IoT devices.

The following configuration is active on radio1, but this is a temporary solution and no problem solving.

wrt3200acm

wrt3200acm

BrainSlayer commented 6 years ago

if you disable you effectivily disable 802.11n in a indirect way. without wmm 802.11n is not operational. its well known that the issue an be resolved if you run the interface in 802.11g only

Phil795 commented 6 years ago

@BrainSlayer Okay, I wasn't aware of that. Thanks for the info

mwester117 commented 6 years ago

Hello,

i am having the same issue with my ESP8266 devices. Did anyone have made any progress on this issue?

Thanks.

If i can help with logs or something else just ask.

yuhhaurlin commented 6 years ago

This one is duplicated as #278. I close it and use #278 to track issue with ESP8266.