[Ovmsdev] Poor wifi performance

Stephen Casner casner at acm.org
Fri Jul 6 07:48:41 HKT 2018


I find the wifi performance of OVMS v3 to be poor, and I'm wondering
how it might be improved.  I have a mix of thoughts here.

For both my own unit and that of Timothy Rodgers, wifi reception in
our garages was unusable.  You can blame that on too much distance
from the access point, but my iPhone and MacBook both access the wifi
just fine from my garage.  The wifi antenna in the OVMS is probably
smaller and its location within the metal framework around the car's
firewall may impede radio transmission.  Perhaps it would be feasible
to switch to an ESP32-WROVER-I with an external antenna to improve
performance, but that would be a big deal.  If there is a transmit
power adjustment, perhaps that could be increased?

When Timothy parks his car next to his house, which is about 50 feet
closer than the garage, then the wifi reception was good enough for
the update to 3.1.008 to succeed.  But when he tries to connect with
the browser, page updates often time out, so it is close to unusable.
Perhaps we could improve usability by increasing the timeout in our
javascript to allow more time for TCP to retransmit?

For my own unit, I switched from AP+client to just client mode and at
first it seemed that had improved the client performance.  But still
the next day I had no access from the iPhone app.  When I connected to
the console to find out why I saw that server v2 was repeatedly trying
to connect and failing.  I'm presuming that the cause was poor wifi
connectivity since I was also not able to reach the web server on the
client address, although I have not proven that.  But since the client
wifi was associated with the home AP and had an address, the OVMS
network routing preferred the wifi and did not try to use the modem.
For now I have resorted to turning off wifi.  I suggest that the
network routing algorithm be enhanced to back off to use the modem if
some number of attempts to connect to the server over wifi have
failed.  The iPhone will do this for itself (there is a setting to
enable this called Wi-Fi Assist).

The behavior of repeated connection attempts and failures by server v2
seems to induce a more serious failure after a while, perhaps due to
some resource starvation.  At that point there is a failure message
"mg_connect(api.openvehicles.com:6867) failed: cannot parse address"
every time server v2 tries to connect.  I expect that is a bug that
could be fixed.

Lastly, since we may encounter situations where network communication
is not working, we should facilitate access to the console.  When I
was trying to help Timothy change a location radius setting remotely
by phone and the web browser was timing out, I suggested that he find
a micro-USB cable so he could connect to the console.  But then I
realized he would not have any application on his laptop that would
allow him to connect to the console.  Developers use "make monitor" in
the software development cycle, but users won't have that tool.  I
have my own program on the MacBook that I use as an alternative when I
don't want to induce a reset when I connect.  But is there a simple
program for Windows suitable for non-developer users that can connect
to the OVMS console?

                                                        -- Steve


More information about the OvmsDev mailing list