[SOLVED] WRT32X and Smart Plug Problems

Hello Everyone,

IoS is here. And it works well.

Did anyone manage to get Sonoff S20 Smart Plug working with WRT32X?


The only thing that works is NO ENCRYPTION. I have fiddled with all options on 2nd and 3rd radio.

19:19:45 .info hostapd: wlan2: STA ec:fa:bc:8a:aa:48 IEEE 802.11: associated
19:19:45 .notice hostapd: wlan2: AP-STA-POSSIBLE-PSK-MISMATCH ec:fa:bc:8a:aa:48
19:19:46 .notice hostapd: wlan2: AP-STA-POSSIBLE-PSK-MISMATCH ec:fa:bc:8a:aa:48
19:19:47 .notice hostapd: wlan2: AP-STA-POSSIBLE-PSK-MISMATCH ec:fa:bc:8a:aa:48
19:19:48 .notice hostapd: wlan2: AP-STA-POSSIBLE-PSK-MISMATCH ec:fa:bc:8a:aa:48
19:19:49 .info hostapd: wlan2: STA ec:fa:bc:8a:aa:48 IEEE 802.11: disassociated

This device works with many other routers with stock firmware with no problems (Did not try stock WRT32X since I won't be using it).

I'd appreciate any input from those who made it work.

1 Like

Someone reported same here: Ap-sta-possible-psk-mismatch

Nobody seems to have offerred a solution.

Likely you need to run WPS to configure IoT devices. Once one has been configured to one AP it should work on other APs if the SSID, encryption method, and PSK are exactly the same.

Do not use radio2 for anything. It was designed for radar monitoring only.

1 Like

Past repeating the apparently ignored statements that the third radio should never be used for anything but passive reception...

As I recall, the Sonoff S20 uses an ESP8266 internally (as having some serious safety issues).

I believe that the ESP8266 stack has problems with 802.11n APs unless the firmware is explicitly compiled to use 802.11n. See, for example https://github.com/kaloz/mwlwifi/issues/278

I believe that there is third-party firmware available for the Sonoff S20. For example, https://github.com/arendst/Sonoff-Tasmota/wiki/Sonoff-S20-Smart-Socket

I chose not to pursue it due to my understanding of the inadequacy of the internal design and lack of certification. https://www.cnx-software.com/2018/06/03/sonoff-s26-smart-socket-review-teardown/, for example states

We can also see the CE logo but nothing for FCC. Interesting for a supposedly US plug, but maybe that’s because they are in the process of applying for FCC certification. The company has not done any TUV, ETL or UL safety certification yet, so at this point, it’s the job of the community to check for any safety issues, and it may cause trouble with your home insurance in case of big problem (like fire).

1 Like

Jeff, I have 5GHz off.. and that radio is working just fine for normal traffic. As I explained in my initial post, I am trying to get this work, so I am trying any and every options. It is for testing. I do not understand why 3rd radio became an issue here.

I don't understand what you mean by 802.11n APs? I have the radio running on legacy. I even have "802.11b" allowed.

Device works fine with no encrption.

Thank you for the sonoff link. I don't think you can get any kind of certifications from most Chinese products.

I checked Tasmota before, it is complicated for me.

I just double checked and the TP-Link HS-series units I use are both UL and FCC certified (and made in China). They are well supported by the open-source https://github.com/GadgetReactor/pyHS100 Python library, and, as I understand it, many open-source home-automation packages.

Jeff, TP-Link devices costs 3 times more where I am. At 6 units, it makes $200 difference.

Sonoff devices work with everything. I had them connected to Linksys E1200, Xiamo Wifi Router 3, etc.
The only thing that does not work is OpenWRT.

I am also drawing 0.5A, I don't really care much about certifications. These people burning their units seem to be the ones that are connecting 15A waterheaters.

But had I come across your post first, I'd definitely be choosing TP-Link HS-series. I already have Sonoff devices and they are working flawlessly many years now.

There are several threads on how to connect ESP based wireless cards to the Wrt32x.

Two solutions I have used are=

  1. set the radio to 2.4ghz band and create a second network on here just for the esp devices They will connect without a problem

  2. create a second said on radio 1 for the esp devices only and turn off WMM on this ssid ( in advanced options from memory). They will connect but turning off wmm limits this ssid to g speeds so don’t do it but n your main 2,4 ghz ssid as you will limit the speeds for everything.


Thanks Roger! I have done all these. Does not connect. The only way is with NO ENCRYPTION.

I don't care about speed limiting now. Even 1 Mbps is fine. I am just trying to make this connect WITH ENCRYPTION and I could not be successful.

Which ESP Device do you have and which OpenWRT firmware are you using?

They’re Teckins which are Sonoff clones. Got them connected with openwrt current snapshot, gargoyle ( based on 18.06) and dd-wrt


So it should work with this?

If not, which is the most recent one I should download for WRT32X?

I upgraded firmware from 1.5 to 3.0 on Sonoffs, still no go.

I wonder if someone can post a working hostapd config file for Sonoff S20. Perhaps I will try that.

Mine was like this at last try (but i tried almost all options):

cat /var/run/hostapd-phy2.conf


The hostapd config file is created in RAM from the settings in /etc/config/wireless. Editing it directly is not recommended.

In /etc/config/wireless, use option wmm 0 in the interface section. Also consider that removing the htmode setting from the radio section would force the whole radio down to b/g.

Make sure you also have an option country with a real country code (preferably the one you live in) for best results.

1 Like

Thanks for this mk24. hostpad.conf has more options in them, I wanted to compare those.

Please keep in mind, this exercise is FOR ONLY MAKING ESP WORK. It doesn't have any other aim or purpose, anything else is irrelevant (speed, function, etc).


config wifi-device 'radio2'
        option type 'mac80211'
        option path 'platform/soc/soc:internal-regs/f10d8000.sdhci/mmc_host/mmc0/mmc0:0001/mmc0:0001:1'
        option legacy_rates '1'
        option channel 'auto'
        option hwmode '11g'
        option country 'XX'

config wifi-iface 'default_radio2'
        option device 'radio2'
        option network 'lan'
        option mode 'ap'
        option ssid 'XXXX'
        option disassoc_low_ack '0'
        option key 'xxxxxxxxx'
        option encryption 'psk-mixed'
        option wmm '0'

OK the red flag here is you're using radio2, (despite being repeatedly told not to). Try it on the real 2 GHz radio which I think is radio1.


As I explained before in the very first post, I DID TRY RADIO1. Please leave aside this radio 2 obsession, there are others who make it work there.

For me, it doesnt matter what radio it is for as long as it works on anything. But it does not.

Perhaps you should follow that advice yourself. Transmission on the third radio is non-certified operation.

Consider purchasing an AP or other device for these clients.

1 Like

Operation without WMM and falling back to b/g likely has not been tested very much. I would monitor the packets with a third device to confirm the driver is working as expected.

1 Like

No, I don't want to follow that advice. LEAVE IT. I paid for this device, you did not.