Devices won't connect to Wi-Fi (Smart Life/Tuya)

The mobile app is used to configure the networking on the device, so it can connect to the WiFi. The mobile app sends a UDP broadcast packet or a multicast packet containing the WiFi SSID, username and password. The device can receive the UDP packet, as long as the UDP organization form is known (not sure what that means!). After that the device (should) connect to the SSID.

Like I said the device works with the stock firmware (which is also OpenWrt). So there's some difference in the stock firmware.
I used the same SSID, username and password on both stock and my install of OpenWrt. I even tried an SSID with no spaces just to make sure.

If I configure the device in the stock firmware, then switch over to my install of OpenWrt (which has the same SSID, username and password), the device is listed under the associated stations, but missing the IP, signal, and rx/tx rate information (as shown in the screenshot above) and has frequent disassociated messages in the System Log.

  • Is this the default Android/Apple WiFi manager?
  • If not, can you uninstall the add-on app and use the default network manager?
1 Like

I just have no clue how that works. It seems to me a little bit like the chicken and egg scenario. The mobile app needs to use the WLAN to send the connection info to these devices so they can connect. But how can it send it to them if they are not already connected to the WLAN? Are you sure there's not some step missing about connecting the phone or tablet with the app via USB or Bluetooth to these devices? Are they actively snooping the 2.4ghz band before receiving this information and the app sends some unencrypted packet out and they detect it? I'm kind of stumped on how this occurs.

My best advice at this point would be to generate a backup of your configuration for this build. Revert back to stock firmware (since it is OpenWRT) and get it working. Generate a backup of that when it's working. Extract the '/etc/config' folder from each of your backup tarballs. Go over specifically the 'wireless', 'dhcp', and 'network' files and compare each section, looking for significant changes between the working and non working backups.

1 Like

No, it's the Smart Life app from Tuya: https://play.google.com/store/apps/details?id=com.tuya.smartlife&hl=en_GB

Some other links...
What is the difference between EZ distribution mode and AP distribution mode?
How to set the device to config mode ?
How to add device in App for Internet connection?(WiFi)
Device-connection failure?
What is specification for the Wi-Fi name and password of the device connection?

I have no idea either!
There is definitely no missing steps. With the stock firmware it really is as simple as putting the device in config mode, running the mobile app, clicking the + button to add a new device, and then it finds it, and the device connects to the WiFi with the credentials given.

You know what... I think that's a great idea!
The WRT32X has dual partitions, so I can easily swap between the two with a simple reboot.

I'm not worried about the app, I'm saying its your issue!!! DELETE IT and use stock Android with stock OpenWrt!

:hushed:

:+1:

1 Like

I've fixed the problem by disabling WMM using option wmm '0' - I don't know why this fixes the problem. :thinking:

If anyone else stumbles upon this thread because they are having the same problem, the following configuration in /etc/config/wireless works for me:

config wifi-iface
        option device 'radio1'
        option mode 'ap'
        option network 'lan'
        option disassoc_low_ack '0'
        option ssid 'My SSID Name'
        option encryption 'psk2+ccmp'
        option key 'xxxxxxxxxxxxxxxx'
        option wpa_disable_eapol_key_retries '1'
        option wmm '0'

Many thanks for your help @mj5030, @lleachii, @marcelodiaz, @mbo2o, @slh ! :sparkling_heart:

3 Likes

Interesting (your app may not properly negotiate things like power and QoS)...just recall that WMM must be enabled for 801.11n.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.