[Solved] R6400v2 R̶6̶2̶5̶0̶ and ESP8266 devices

Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware
Author Message
lexridge
DD-WRT Guru


Joined: 07 Jun 2006
Posts: 964
Location: WV, USA

PostPosted: Thu Apr 28, 2022 18:39    Post subject: [Solved] R6400v2 R̶6̶2̶5̶0̶ and ESP8266 devices Reply with quote
Up until recently I have not been able to upgrade (over the air via ESPHome) my EPS8266 devices that are connected to a Netgear R6250. I had this problem before, back last November and setting it to G only mode fixed it. However, this time it's still set to G Only and not working. Not sure when it stopped again. I am currently on r48741 of DDWRT.

ESP8266 devices connected to my Linksys E8500 works as expected so the problem does seem to be something with either the BCM chipset, recent builds, or most likely, a configuration issue. I have it configured to the recommended settings per the sticky thread with the exception that I have reduced the transmit power from 999 to 299 (this makes no difference).

Any suggestion as to what to check/change would be greatly appreciated.

_________________
Linksys EA8500 (Internet Gateway, AP/VAP) - DD-WRT r53562
Features in use: WDS-AP, Multiple VLANs, Samba, WireGuard, Entware: mqtt, mlocate

Netgear R7800 (WDS-AP, WAP, VAP) - DD-WRT r53562
Features in use: multiple VLANs over single trunk port

Linksys EA8500 WDS Station x2 - DD-WRT r53562

Netgear R6400v2 WAP, VAP 2.4ghz only w/VLANs over single trunk port.

OSes: Fedora 38, 9 RPis (2,3,4,5), 20 ESP8266s: Straight from Amiga to Linux in '94, never having owned a Windows PC.

Forum member #248


Last edited by lexridge on Tue Mar 26, 2024 18:00; edited 2 times in total
Sponsor
lexridge
DD-WRT Guru


Joined: 07 Jun 2006
Posts: 964
Location: WV, USA

PostPosted: Thu Apr 28, 2022 23:06    Post subject: Reply with quote
A few more small details. All the devices are connected and working fine with ~1ms ping times. It is only the OTA updates that no longer works due to timing out. Here is the output from ESPHome when attempting to update:

Code:

INFO Reading configuration /config/esphome/PowerMon1.yaml...
WARNING 'energy_1': Using the '_' (underscore) character in the hostname is discouraged as it can cause problems with some DHCP and local name services. For more information, see https://esphome.io/guides/faq.html#why-shouldn-t-i-use-underscores-in-my-device-name
INFO Detected timezone 'EST' with UTC offset -5 and daylight saving time from 12 March 02:00:00 to 05 November 02:00:00
INFO Generating C++ source...
INFO Compiling app...
INFO Running:  platformio run -d /config/esphome/energy_1
Processing energy_1 (board: esp8285; framework: arduino; platform: platformio/espressif8266@2.6.2)
--------------------------------------------------------------------------------
HARDWARE: ESP8266 80MHz, 80KB RAM, 1MB Flash
PACKAGES:
 - framework-arduinoespressif8266 3.20704.0 (2.7.4)
 - tool-esptool 1.413.0 (4.13)
 - tool-esptoolpy 1.20800.0 (2.8.0)
 - toolchain-xtensa 2.40802.200502 (4.8.2)
Library Manager: Installing Update
Library Manager: Already installed, built-in library
Dependency Graph
|-- <ESPAsyncTCP-esphome> 1.2.3
|   |-- <ESP8266WiFi> 1.0
|-- <ESP8266WiFi> 1.0
|-- <ESP8266mDNS> 1.2
|   |-- <ESP8266WiFi> 1.0
Retrieving maximum program size /data/energy_1/.pioenvs/energy_1/firmware.elf
Checking size /data/energy_1/.pioenvs/energy_1/firmware.elf
RAM:   [====      ]  39.6% (used 32456 bytes from 81920 bytes)
Flash: [====      ]  37.8% (used 386908 bytes from 1023984 bytes)
========================= [SUCCESS] Took 6.08 seconds =========================
INFO Successfully compiled program.
INFO Resolving IP address of energy_1.local
INFO  -> 10.2.0.124
INFO Uploading /data/energy_1/.pioenvs/energy_1/firmware.bin (391056 bytes)
Uploading: [=                                                           ] 1%
ERROR Error sending data: timed out

_________________
Linksys EA8500 (Internet Gateway, AP/VAP) - DD-WRT r53562
Features in use: WDS-AP, Multiple VLANs, Samba, WireGuard, Entware: mqtt, mlocate

Netgear R7800 (WDS-AP, WAP, VAP) - DD-WRT r53562
Features in use: multiple VLANs over single trunk port

Linksys EA8500 WDS Station x2 - DD-WRT r53562

Netgear R6400v2 WAP, VAP 2.4ghz only w/VLANs over single trunk port.

OSes: Fedora 38, 9 RPis (2,3,4,5), 20 ESP8266s: Straight from Amiga to Linux in '94, never having owned a Windows PC.

Forum member #248
lexridge
DD-WRT Guru


Joined: 07 Jun 2006
Posts: 964
Location: WV, USA

PostPosted: Mon Mar 25, 2024 4:01    Post subject: Reply with quote
Well, nearly two years later and after shutting off my 2.4ghz on the EA8500 and replacing the 2.4ghz with a R6400v2 (r53562) the problem has returned. This was one of the reasons I gave away my R6250. Was very surprised to see the issue return with the R6400v2. So it's most certainly an issue with Broadcom chipsets, or specifically, this one which I think is the same that was in my R6250 (Northstar).

While the ESP8266 devices do connect and report properly, they cannot accept firmware updates or real time log monitoring due to timeouts. If I unplug them and carry the devices to my garage which is covered in 2.4ghz by a Netgear R7800, they works fine and fast, both fw updates and logs.

So I am giving this router away soon too, or does anyone know of any setting(s) to attempt to fix it? I already tried G only (again) and that didn't fix it. All settings are per the BCM Wifi Settings Guide. 5ghz is not used on this router. It is a dedicated 2.4ghz AP.

_________________
Linksys EA8500 (Internet Gateway, AP/VAP) - DD-WRT r53562
Features in use: WDS-AP, Multiple VLANs, Samba, WireGuard, Entware: mqtt, mlocate

Netgear R7800 (WDS-AP, WAP, VAP) - DD-WRT r53562
Features in use: multiple VLANs over single trunk port

Linksys EA8500 WDS Station x2 - DD-WRT r53562

Netgear R6400v2 WAP, VAP 2.4ghz only w/VLANs over single trunk port.

OSes: Fedora 38, 9 RPis (2,3,4,5), 20 ESP8266s: Straight from Amiga to Linux in '94, never having owned a Windows PC.

Forum member #248
Mile-Lile
DD-WRT Guru


Joined: 24 Feb 2013
Posts: 1634
Location: Belgrade

PostPosted: Mon Mar 25, 2024 6:39    Post subject: Reply with quote
lol... last time I used brcm wifi recommended settings from sticky I softbricked my router...
with all due respect to @msoengeneer...

I doubt yours r6250 had any problem, it was probably misconfigured... I have one r6250... great router...

give me screenshot of ESP8266 wifi setting and r6400v2 settings... maybe you will need nvram erase
lexridge
DD-WRT Guru


Joined: 07 Jun 2006
Posts: 964
Location: WV, USA

PostPosted: Mon Mar 25, 2024 17:10    Post subject: Reply with quote
The ESP8266 has no GUI to post. It is part of YAML from Home Assistant ESPHome plugin. Here is the only wifi code within it:
Code:

esphome:
  name: livingroom-temp-humidity
  platform: ESP8266
  board: nodemcuv2

wifi:
  ssid: "redacted"
  password: "password"
  power_save_mode: none

Pretty basic. These devices are 2.4ghz only. Also, this unit was just set up from a full reset, so that should not be needed again.
Here are the settings for the R6400v2:



2.4ghz-wireless01.png
 Description:
 Filesize:  147.07 KB
 Viewed:  232 Time(s)

2.4ghz-wireless01.png



2.4ghz-wireless02.png
 Description:
 Filesize:  60.39 KB
 Viewed:  232 Time(s)

2.4ghz-wireless02.png



_________________
Linksys EA8500 (Internet Gateway, AP/VAP) - DD-WRT r53562
Features in use: WDS-AP, Multiple VLANs, Samba, WireGuard, Entware: mqtt, mlocate

Netgear R7800 (WDS-AP, WAP, VAP) - DD-WRT r53562
Features in use: multiple VLANs over single trunk port

Linksys EA8500 WDS Station x2 - DD-WRT r53562

Netgear R6400v2 WAP, VAP 2.4ghz only w/VLANs over single trunk port.

OSes: Fedora 38, 9 RPis (2,3,4,5), 20 ESP8266s: Straight from Amiga to Linux in '94, never having owned a Windows PC.

Forum member #248
Mile-Lile
DD-WRT Guru


Joined: 24 Feb 2013
Posts: 1634
Location: Belgrade

PostPosted: Tue Mar 26, 2024 4:58    Post subject: Reply with quote
I would suggest to reset r6400 to factory defaults without restoring settings. And setting up from scratch. Don't touch anything on ddwrt wifi settings, but if you use DFS channels on ESP8266, on ddwrt change typc mitigation factor to 4 and mode loose (reg domain settings)...
lexridge
DD-WRT Guru


Joined: 07 Jun 2006
Posts: 964
Location: WV, USA

PostPosted: Tue Mar 26, 2024 17:55    Post subject: Reply with quote
While I did not do a full reset, as it was reset and set up from scratch less than a week ago. Not sure if these ESP8266s use DFS or not from ESPHome programming, but some research told me they do support it.

I tried the settings you recommended, and they did partially work. I could read the real times logs from them, which I was not able to do before, however attempting to send them a firmware update failed with a time out and totally disconnected the device(s) from wifi.

So I set both your recommended settings back to Off and started messing with some of the other settings I had changed from the "BCM Best Wifi Settings", moving them back to stock, one by one and testing. These allowed me to find the problem.

Changing the Fragmentation Threshold from recommended setting of 784 back to the default setting of 2346 fixed the issue. I can now read real-time logs and upload firmware updates to the devices. EDIT: I ended up settling on a value of 1538 after experimenting a bit. Should the RTS Threshold value match this?

Thank you for your help. I never would have considered the recommended settings would have been wrong for my use case, as they do work fine for most. Not all use cases are the same and I am surprised nobody else has experienced this problem with ESP8266 devices on 2.4ghz Broadcom routers.

_________________
Linksys EA8500 (Internet Gateway, AP/VAP) - DD-WRT r53562
Features in use: WDS-AP, Multiple VLANs, Samba, WireGuard, Entware: mqtt, mlocate

Netgear R7800 (WDS-AP, WAP, VAP) - DD-WRT r53562
Features in use: multiple VLANs over single trunk port

Linksys EA8500 WDS Station x2 - DD-WRT r53562

Netgear R6400v2 WAP, VAP 2.4ghz only w/VLANs over single trunk port.

OSes: Fedora 38, 9 RPis (2,3,4,5), 20 ESP8266s: Straight from Amiga to Linux in '94, never having owned a Windows PC.

Forum member #248
Mile-Lile
DD-WRT Guru


Joined: 24 Feb 2013
Posts: 1634
Location: Belgrade

PostPosted: Wed Mar 27, 2024 8:00    Post subject: Reply with quote
I undestand that not all defaults are suitable for everyone. I can undestand that someone change/tweak some setting... but brcm recommeded settings from sticky are horrible... If they were so good, Sebastian would included them as new defaults... And look at any hostapd.conf on any linux distro... you will see that they are similiar... look at stock (OEM) fw, openwrt, FT... even mikrotik (RouterOS)

people changing Fragmentation Threshold on modern routers signals me that something is very wrong... this is not G only mode era anymore... drivers and equipments imroved... so I would still reset if I were you...
Mile-Lile
DD-WRT Guru


Joined: 24 Feb 2013
Posts: 1634
Location: Belgrade

PostPosted: Wed Mar 27, 2024 8:06    Post subject: Reply with quote
and about TPC mitigation... I told you to change it ONLY if you wold use DFS channels (e.g. 100)... it is mandatory for DFS... otherwise I wouldn't change anything...
lexridge
DD-WRT Guru


Joined: 07 Jun 2006
Posts: 964
Location: WV, USA

PostPosted: Wed Mar 27, 2024 17:14    Post subject: Reply with quote
Mile-Lile wrote:
but brcm recommeded settings from sticky are horrible... If they were so good, Sebastian would included them as new defaults

I have often wondered about this.
Quote:

people changing Fragmentation Threshold on modern routers signals me that something is very wrong... this is not G only mode era anymore... drivers and equipments imroved... so I would still reset if I were you...

I am pretty much back to stock settings as is (I did a full reset which was a PiTA because of all my vlans) and it works much better across the board. Even some of my ESP8266s in fringe areas are no longer randomly disconnecting 5-6 times per day. The only change from stock is I kept the Fragmentation Threshold at 1568 because sending FW updates to the ESP8266s is about 10% faster than the stock setting.

Regarding DFS, I do not believe these ESP8266s support it. Everything I could find points to DFS being a function of 5ghz and not 2.4ghz.

_________________
Linksys EA8500 (Internet Gateway, AP/VAP) - DD-WRT r53562
Features in use: WDS-AP, Multiple VLANs, Samba, WireGuard, Entware: mqtt, mlocate

Netgear R7800 (WDS-AP, WAP, VAP) - DD-WRT r53562
Features in use: multiple VLANs over single trunk port

Linksys EA8500 WDS Station x2 - DD-WRT r53562

Netgear R6400v2 WAP, VAP 2.4ghz only w/VLANs over single trunk port.

OSes: Fedora 38, 9 RPis (2,3,4,5), 20 ESP8266s: Straight from Amiga to Linux in '94, never having owned a Windows PC.

Forum member #248
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum