ratgdo / homekit-ratgdo

A native HomeKit implementation of a Security+ 2.0 garage door controller based on ratgdo hardware
https://ratgdo.github.io/homekit-ratgdo/
GNU General Public License v3.0
197 stars 20 forks source link

Not connecting to Wifi #217

Open seanpopke opened 1 month ago

seanpopke commented 1 month ago

I ordered two ratgdos last fall. I installed both and both were working correctly. I recently noticed that neither were showing up in Apple HomeKit (I had installed the native HomeKit firmware.) When trying to reboot both, the blue light flashed once, which seems to indicate that they had lost their firmware?

I’ve taken one into my office and reflashed it with the latest HomeKit firmware (1.6). The flash seems to work, but when I try to connect to Wifi, it isn’t successful. The logs show:

[58915119] RATGDO: WiFi disconnected SSID: iot24, BSSID: 6a:d7:9a:24:fa:6a, Reason: 203

I’ve tried erasing before re-flashing, but no change. Nothing has changed on my network or wifi access points. I’m using a Unifi system with a dedicated 2.4Ghz IOT SSID.

Any thoughts?

dkerr64 commented 1 month ago

The reason code 203 maps to WIFI_DISCONNECT_REASON_ASSOC_FAIL. The ratgdo should continue to try and reconnect.

I suggest looking at your Unifi logs to see if it gives any clues.

jgstroud commented 1 month ago

Do you have them locked to an AP? A lot of users did this early on, but it seems to be causing issues lately. I recommend not locking the devices.

jgstroud commented 1 month ago

Also, did you enable PMF on your wifi network?

seanpopke commented 1 month ago

Thanks for the responses so far. They are not locked to an AP and PMF is disabled. I've made no changes to the wireless network between when I first set them up and now.

marylegz90 commented 1 month ago

I, too, am having a similar issue. I've updated my 2.5 to 1.6.0 after finding it "No Response" in HomeKit. Took a bit and a few reboots, but finally got the firmware web installer to get it "connected" to wifi. I found that it still is unresponsive in HomeKit but does show to be up in my Unifi console (Dream Machine Pro SE running 4.0.6). It doesn't stay connected hardly at all though, very randomly will it even ping.

PMF and AP locking is turned off on my network. No multicast or IGMP snooping is enabled either - as I had seen someone else say that worked for them. image

Logs every once and a while throws back "Reason: 4" followed by multiple "Reason:203s" before cycling back through. image

Latency doesn't even report on the device sitting a few feet away from a U6-LR AP that is running a dedicated 2.4ghz network. image

jgstroud commented 1 month ago

Just searching on the association fail, there seems to be a lot of results but no answers that really point me in the right direction. Without being able to reproduce, I'm at a loss. Anything at all in your unifi logs? If you can get it to connect at all to wifi, you can try forcing 802.12g or try reducing your wifi power level. One comment said dropping to 8.5 helped. https://community.home-assistant.io/t/unable-to-connect-to-wifi-auth-expired-and-association-expired/678570/3

marylegz90 commented 1 month ago

Just searching on the association fail, there seems to be a lot of results but no answers that really point me in the right direction. Without being able to reproduce, I'm at a loss. Anything at all in your unifi logs? If you can get it to connect at all to wifi, you can try forcing 802.12g or try reducing your wifi power level. One comment said dropping to 8.5 helped. https://community.home-assistant.io/t/unable-to-connect-to-wifi-auth-expired-and-association-expired/678570/3

Thanks for the reply. It ended up randomly connecting at 1:35am (I was asleep), so not sure what caused it to make the connection. Since then it dropped out twice on it's own. I got home from work and it was connected, so I ended up going in and doing the following: lowered the RAGTDO's Wifi TX Power to 8, reducing my AP's 2ghz transmit power to low, rebooted the RAGTDO and it successfully connected.

Monitoring it in my Unifi controller I see lots of TX Retries, from this device only. It bounces from 0% to 75% and in-between often. image

So far, it's at least staying connected and I can see it in my Homekit app now, even controlled the door and light successfully. I'll see it stays up for an extended period of time.

jgstroud commented 1 month ago

That says "WiFi 1". Did you also change the wifi standard to 802.11b?

marylegz90 commented 1 month ago

That says "WiFi 1". Did you also change the wifi standard to 802.11b?

I did not, it's setup for auto, still. image

So far today it still has not dropped off the network according to Unifi console and it still in Homekit as a responsive device. image

jgstroud commented 1 month ago

Progress I suppose. I also use auto mode and Unify reports my device as WiFi 4. I am by no means any kind of wifi or RF expert, but the fact that you had to dial down the power and its showing up as WiFi 1 makes me think you are having some sort of interference. How does your channel scan look? Is channel 11 crowded? Do you have anything in or near your garage that might be causing interference on 2.4G?

I see you have an LR access point. I can't say I really know what makes these devices LongRange other than maybe upping the TX power on them. I have some of the AC-LRs in my office and had to turn the power down on them. You said you turned yours down as well and I think that may actually be what fixed it. You may just be over-saturating the receiver on the ratgdo. I don't think they have the greatest DSP's in the world and may be struggling recovering the signal.

That's probably a whole lot of not very helpful information.