Wifi performance poor despite strong (-9) RSSI, how debug/diagnose?

novalight
Posts: 40
Joined: Tue Apr 19, 2016 1:13 pm

Wifi performance poor despite strong (-9) RSSI, how debug/diagnose?

Postby novalight » Mon Apr 09, 2018 4:10 pm

Hello!

We are working on a product (custom PCB, plain ESP32 IC) which does data logging in some remote electrical cabinets. At some facilities we noticed very poor connection quality (ESP32 takes long to obtain IP, HTTP(S) requests timeout etc., sometimes connection fails altogether) despite having a good RSSI ( -9 to -20 mostly).
The internet connection is good and the ESP32 is in close vicinity to the router (hence the good RSSI). We have several ideas why this could be (problems with the chip-antenna, placement of the device near metal/EMI sources, signal too strong and saturation RX-Stage, etc.). The problems are hard to debug for us, because they only happen in the field and we also lack RF test equipment. We have the option though to reprogram the device remotely via a raspberry pi with reverse SSH.
The WiFi-Network worked well with several smartphones of the local technicians.

Our questions would be:

1.) Is there a possibility to diagnose the RF frontend with ESP32 internal functions, e.g. with the self calibration values?
It would be interesting if we can detect anything that is related to bad antenna matching, bad RF performance etc.

2.) Is there a possibility to debug/diagnose the link to the WiFi router in order to narrow down this problem?

It would be interesting to hear if any user or espressif-dev has some hints on what could be wrong here, or how this could be tracked down remotely (since the devices themselves are sometimes in hard reachable facilities).

novalight
Posts: 40
Joined: Tue Apr 19, 2016 1:13 pm

Re: Wifi performance poor despite strong (-9) RSSI, how debug/diagnose?

Postby novalight » Wed May 09, 2018 1:24 pm

As this is still an issue for us I'd love if anyone could shed some light on how we can resolve this issue.

I've set up on more crude test: I've connected the ESP32 to the WiFi-AP and a Raspberry PI to the same router via LAN.
On the raspberry I have reasonable good connection and use it to establish a remote SSH tunnel to a root server.

However, when I ping the ESP32 (From RasPi over LAN to Router over WiFi to ESP32) I get the following abysmal result:

Code: Select all

PING 192.168.1.56 (192.168.1.56) 56(84) bytes of data.
64 bytes from 192.168.1.56: icmp_seq=6 ttl=255 time=9493 ms
64 bytes from 192.168.1.56: icmp_seq=15 ttl=255 time=137 ms
64 bytes from 192.168.1.56: icmp_seq=17 ttl=255 time=7473 ms
64 bytes from 192.168.1.56: icmp_seq=24 ttl=255 time=4290 ms
64 bytes from 192.168.1.56: icmp_seq=28 ttl=255 time=130 ms
64 bytes from 192.168.1.56: icmp_seq=29 ttl=255 time=152 ms
^C
--- 192.168.1.56 ping statistics ---
33 packets transmitted, 6 received, 81% packet loss, time 33199ms
rtt min/avg/max/mdev = 130.441/3612.873/9493.623/3788.673 ms, pipe 10
Does anyone have an explanation what could be going on here and how it could be analyzed?

User avatar
fly135
Posts: 606
Joined: Wed Jan 03, 2018 8:33 pm
Location: Orlando, FL

Re: Wifi performance poor despite strong (-9) RSSI, how debug/diagnose?

Postby fly135 » Wed May 09, 2018 9:13 pm

Just for a comparison, I'm pinging my ESP32 with a computer running cat5 to the wifi router. My ESP is reporting about -50 rssi (router is 5' away) and ping times for 100 tries min 2ms, max 14ms, avg 3ms. And zero packet loss.

Are you in an environment where a lot of wifi activity is going on? I posted a thread in general discussion about wifi reliability vs rssi. I work from home so wifi congestion is apparently very small. But at the office wifi xfers fail with an rssi much better than it takes to fail at my house.

John A

novalight
Posts: 40
Joined: Tue Apr 19, 2016 1:13 pm

Re: Wifi performance poor despite strong (-9) RSSI, how debug/diagnose?

Postby novalight » Fri May 11, 2018 8:30 am

@fly135 that's what I notice on the other plants, only few ms of ping.

Regarding the WiFi environment: most of the (identical software and hardware) devices are installed in shielded distribution boxes alongside with the WiFi router. This is also why the RSSI is very strong. There are now other WiFi networks around in the facility in question.

I wonder if the strong signal/shielded box situation can cause trouble here (although it works in 6 other places that look the same).

Is there no information out there on how to interpret the internal RF-Frontend-Cal-Values (for example if impedance has shifted to far by metal adjacent to antenna) or are there some possibilities to diagnose the quality of the WiFi-link (many lost packages/retransmits/low data rate)?

novalight
Posts: 40
Joined: Tue Apr 19, 2016 1:13 pm

Re: Wifi performance poor despite strong (-9) RSSI, how debug/diagnose?

Postby novalight » Mon May 14, 2018 9:04 pm

No idea on this? Is there anything more I can provide to help here? Are there other support channels in order to get deeper information/documentation about the RF calibration?

User avatar
fly135
Posts: 606
Joined: Wed Jan 03, 2018 8:33 pm
Location: Orlando, FL

Re: Wifi performance poor despite strong (-9) RSSI, how debug/diagnose?

Postby fly135 » Mon May 14, 2018 10:06 pm

I'm keeping my eye out here as well. Exhibiting terrible performance in a crowded wifi environment.

John A

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: Wifi performance poor despite strong (-9) RSSI, how debug/diagnose?

Postby ESP_Angus » Wed May 16, 2018 2:13 pm

Hi novalight,

Sorry noone got back to you about this before.

It is difficult to debug a custom RF design without RF test equipment. I don't think there's anything that the ESP32 PHY can do to provide detailed enough information from a purely internal source, although I'll check with my colleagues.

Is the environment around the shielded box likely to be RF noisy? Is the shielded box adequately sealed, grounded, etc against RF?

Is it viable for you try temporarily installing your board in a more normal environment to rule out the shielded box and the very close proximity to the router?

Is it viable for you to try putting an ESP-WROOM module based board (like a dev board) in the same environment as the custom hardware, and compare performance? This will help rule out the hardware design itself.

If you have some photos of the PCB layout, schematics of the hardware, installation, etc. then this may also help.

novalight
Posts: 40
Joined: Tue Apr 19, 2016 1:13 pm

Re: Wifi performance poor despite strong (-9) RSSI, how debug/diagnose?

Postby novalight » Wed May 16, 2018 3:07 pm

Hi Angus,

thanks for your reply! Sadly as the point of installation is very remote, testing various things (with case open, WROOM32, more distance) is not easy.

This is why I was hoping for some remote testing possibilities. Regarding the RF-Cal: Since they calibrate the whole frontend and do (I think?) some limited matching, I'd guess they would be running some rudimentary diagnosis. And hence their measurements should provide some hints if something is (what it seams) _horribly_ going wrong here. Also about the WiFi: is there no way to test/characterize the actual performance of the link (not on an RF level, rather on a software level).

Regarding the installation here is some more infos:
There is no significant RF transmissions going on. The device is placed in a grounded metal distribution box inside a grounded and shielded grid transformer house. We are using multiple devices in similar locations.

Please find pictures of the unit below: we use the default 50 Ohm matching circuit from the datasheet. The device itself is mounted on a DIN-rail and has a plastic enclosure. We added an RF switch to switch between on board Antenna (which we use in this case) and an optional u.FL antenna (not connected here). The chip antenna ( https://www.mouser.de/ProductDetail/Mol ... bO62oZvg== ) works directly with 50 Ohm and is used accordingly to the Molex guidelines. They are also used in many of our boards.
Attachments
IMG_20180516_164955.jpg
IMG_20180516_164955.jpg (1.93 MiB) Viewed 16903 times
IMG_20180516_165027.jpg
IMG_20180516_165027.jpg (409.11 KiB) Viewed 16903 times

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: Wifi performance poor despite strong (-9) RSSI, how debug/diagnose?

Postby WiFive » Wed May 16, 2018 9:22 pm

What exactly is happening with that 'crystal under glass'?

novalight
Posts: 40
Joined: Tue Apr 19, 2016 1:13 pm

Re: Wifi performance poor despite strong (-9) RSSI, how debug/diagnose?

Postby novalight » Thu May 17, 2018 6:11 am

It's to protect a bodge correcting swapped pins on the oscillator (40 MHz, 2ppm TCXO).

Who is online

Users browsing this forum: No registered users and 148 guests