Cannot get static IP to take, still using DHCP address

that’s the weird thing (that was one of my first thoughts too)…the logs seem to think the wifi signal is pretty good:

[17:50:53][I][app:102]: ESPHome version 2022.11.5 compiled on Jan  5 2023, 01:59:03
[17:50:53][C][wifi:504]: WiFi:
[17:50:53][C][wifi:362]:   Local MAC: [redacted]
[17:50:53][C][wifi:363]:   SSID: [redacted]
[17:50:53][C][wifi:364]:   IP Address: 192.168.88.90
[17:50:53][C][wifi:366]:   BSSID: [redacted]
[17:50:53][C][wifi:367]:   Hostname: 'office'
[17:50:53][C][wifi:369]:   Signal strength: -48 dB ▂▄▆█

i’ll see if i can figure out how to manipulate the LED that is on the board. right now it’s just solid red when the board has power, i’ve never messed around with trying to change it.

Hm… red ones are usually for power supply… you can’t change them. Maybe there’s another one onboard…
But, if signal is good, then my only thought would go to either strong disturbances or badly configured router (or bad/veeery cheap) router. How to set up router can be quite painfull process…you must do a lot of testing to see…
But, if you have router available at site (i mean a free LAN port nearby), then another option is to go into ethernet system: aliexpress -->wt32-eth1. For BLE is a better option anyway. ESP’s antenna is shared between wifi and BT. with ethernet you release wifi part and you get a better BLE reception.

router shouldn’t be the issue…i’ve got a pfsense box set up and unifi APs. plus, the weird thing is that this just started happening in the past week or so. after i got it set up and working with everyone’s help a few months ago, it was rock solid until recently. it’s so frustrating. i do actually have ethernet available where this particular device is, so i could go that route…but there are other locations in the house where i plan to put others that won’t have that option. i’d much rather get this sorted out using wifi if possible.

Don’t be so 100% sure about router. I have Asus RT_AX88U as main and two RT-AC86U as Mesh points, and i’ve had quite problems. Main problems with (expensive) routers is tons of settings you don’t know what they are for and how to set them… Even now i don’t know what i did to get rid of my problems…

But, if it started recently - did you perhaps update router’s FW? It could be bad router’s FW edition (it hapenned to me before).
Or someone near you started a business, connected a device (weather station…) which is “chinese” origin… Could be YOU: did you connect any LED light recently? Possibly chinese origin?

An example: i’ve had internet-over-powerline adapters from my house to garage (gigabit, not cheap ones). Distance was not big, so it worked perfectly UNTIL i changed old lights in garage with cheap chinese LED versions. From then on the moment i powered my lights in garage adapter’s connection dropped immediately, and also my FM radio was receiving nothing but noise… when i killed lights connection was re-established after a few seconds.

hmm…i updated the access points recently, but i think it was a few weeks ago (i.e. long before the issuees started). nothing else has changed in house that i can think of…i’m more than willing to put in the work to get this set up right, if you can tell me exactly what i need to do to make that happen. mDNS itself doesn’t seem to be the issue at this point, i can ping office.local and get a response aside from the insane packet loss and horrible response times.

edit: i moved the ESP device in question literally right next to one of my APs, and it still is doing the same thing. so it definitely doesn’t seem to have anything to do with the wifi strength…could still be a network issue, but it’s definitely not an issue with wifi signal.

i THINK i might have figured this out - i turned off BSS on my 2.4ghz network (which is what the ESP is connecting to), and i haven’t had it drop since. has been up for about an hour now. fingers crossed.

you can see here from my unifi dashboard how the wifi experience score jumped when i turned it off, so i’m hoping this will fix it…

the setting in unifi (for anyone else this might help) is under wifi networks → select your wifi network → advanced configuration (manual) → BSS transition

i’ll update here tomorrow as to whether or not this holds up.

1 Like

Yeah, that’s what i was talking about… some routers have so many wifi settings that it’s pretty hard to find correct config. What’s even worse is that many functions are called differently among companies, so there’s no “universal” instructions, just try-and-see. As an example: Asus has setting “modulation scheme” for 2.4GHz: beside normal (802.11n) also has “TurboQAM” and “NitroQAM”, which are best avoided, since they are not standardized, so they can be incompatible with some devices. What i managed to find is that this function supposely boosts speeds on 2.4GHz. But, there are many similar settings, so best is to try one-per-one and see the results. I think that it took me over 2 weeks to find settings which “work” for me on my routers… i changed one and waited a day or two. Changed second one and again waited… etc. It’s possible to find on google various “guides” from various people, but they are generally so different that they are more or less useless… one guy has this best settings, other guy has totally different ones…

Anyway, i’m glad that it’s looking good… hoping for the best!

1 Like

Routers get shipped for consumers to that being plugged in they should work without much hassle.
Since so their DHCP server is most enabled and covers the compelte range of IP addresses.
This means in fact you can’t simply declare a device being static …well you could do so, but the DHCP server wont’ bother since still being allowed to serve that IP to anyone asking for.

Limit the IP range on the DHCPserver so that it covers IPs from let say xxx.xxx.xxx.101 to the end.
This gives you 100 IPs in your subnet which will never get populated with dynamic IPs. And this ensures that if yoir device is declared being statip within the range up to IP 100 that this it reserved for it.

Otherwise the DHCP could accidently pass an IP to any other device since you neber told the DHCP that this ip is reserved to be static.

And yes it’s always a good idea to tell the serverside about what’s static and what isn’t. Only defining static on the device level if risky.

I recently changed my mask to /23. DHCP server now runs on 1.2 to 1.254, while all my static devices go to 0.2 to 0.254.
But, routers generally do check IP occupancy before giving a certain IP away, so IP conflict can’t happen. Main problem is if certain “static IP device” is offline for a while, in that case router CAN give that IP to another device (many times that offline time is 24 hours). What would happen when that fixed IP deveice comes back and claims (now occupied) IP…? I guess depends on router (cost)…some will give it anyway, some will decline it, renering that device offline, i guess.

But, in any case i agree with justone, router MUST know which IP’s are fixed. Fixing on device only is not enough/bad idea/asking for troubles.

It has been clarified over 9000 times by now that OP has chosen a static IP outside of the dhcp range. That is not the issue.

1 Like

There’s not much other chances then. IPs don’t auto-generate themselves.
It’s either a DHCP issue or a miss-understanding about what use_address really does and what it doesn’t if you ask me.

Since the above thread only shows 2 differnt IPs I would bet it’s use_address related
One should simply forget about the IP defined there. This IP it for 1 special thing which is the next OTA update target.
Means if I define use_address 192.168.1.123 it’s more but likely that after the power cycle there won’t be any device using this IP address. simply because
a) the device got an IP from a DHCP server
b) it was defined to use a static_ip which isn’t the same as the use_address

Can’t think of anything else, sorry and yes I missed the part that it was outside the DHCP range.

the IP address was resolved months ago, although it was a combination of me not understanding how use_address works as well as some issues with the board itself. i couldn’t get it to clear the last little bit of the originally assigned address until i left it sit without power for 24 hours or so. not sure exactly what caused that, or if me pulling the power for an extended period even helped, but eventually i got it to stick at .90.

this particular issue was just my wifi being a PITA - i just came back and posted on this thread in case they were related, but they don’t seem to be. my apologies on that.

as for the current issue, fingers crossed but the BSS setting on unifi APs seems to have been the culprit here. i’m now at over 13 hours since i turned that off, and it hasn’t dropped once.

not a single drop since Thursday at 9 when I turned BSS off…I think we can probably safely say that was the culprit. thanks again for the assistance, everyone…sorry for the confusion by coming back to comment on my old post.

I had never heard of BSS until I installed a new router last week. BSS was defaulted “on”, but since it’s only used with WiFi 6, I turned it off.

ugh. problem has returned, even with BSS still off. it was rock solid for two weeks and after restarting my network last night (and the ESP today), the issue is back. it keeps dropping off the network.

this is so frustrating…

more info on this: this seems to be an issue with a bad neighbor running an AP on channel 9. i have three APs in my house, on the standard 1/6/11 layout. if i set up my ESP to connect to channel 1, it seems to work (for now). if i connect to either 6 or 11, it keeps dropping like i mentioned here.

coincidentally, there’s a rogue AP somewhere in the neighborhood that is running on channel 9 right now, which would overlap with both 6 and 11 (but not 1) and could explain the behavior i’m seeing.

frustratingly, this guy is probably just running auto channel and it’s going to bounce all over the place, so i have no way of knowing which channel i need to connect to at any given time.

Argh so glad I am a good distance from neighbours.

it gets better…there’s some clown running a 40mhz 2.4ghz channel overlapping the entire bottom half of the spectrum. luckily it seems to be far enough away from me that it’s not causing me any issues…yet. wifi explorer only shows it pop up occasionally, and it’s very weak.

if i were his neighbor though, i’d be pissed…

Mostly it’s not neighbour’s fault… These guys just connect router or even worse, internet provider connects modem/router and voila. Provider’s routers are mostly pretty “dumb” and they doesn’t have many functions. Better routers see if band is congested and extend channel to 40 MHz only if it’s free. Bad ones doesn’t…

hello @crackers8199

i have the same config : 4 Unifi APs, (1 UAP-AC-PRO and 3 UAP-AC-LR) and i have before a lot of connexion issues with my device (i have about 150 devices connected through APs).

What i do is to use the same channel of 2.4Ghz on all my Aps. same with 5Ghz:

  • make a portable wifi scanner with an esp32 +ILI9341 coded with arduino IDE (you can use an app and your phone)
  • go everywhere in my house to check wich channel are used by others (seems channel 11 was the most freechannel)
  • set ALL my Aps with the same channel (11) in 2.4Ghz and in the 5Ghz (channel 36), radio power to “medium” or “low”, and with same SSID (hiden) and Password.

RESULT : No more issues.

My static adress are in the DHCP range of my router, but no issues, i reserved them each time a new device is connected to my router.

BSS not check for me too. Multicast optimization (IGMPv3) is checked.