Gargoyle on Ubiquiti Nano HD?

Report problems and success stories with Gargoyle on various hardware platforms.

Moderator: Moderators

emmexx
Posts: 25
Joined: Thu Sep 29, 2016 6:01 am

Re: Gargoyle on Ubiquiti Nano HD?

Post by emmexx »

pythonic wrote:
Sun Jan 28, 2024 8:10 am
There's some info you didn't give which would be helpful:
- what band, channel and bandwidth is your phone hotspot on?
On the phone I can only set the band: 5GHz
- what band, channel and bandwidth is your router's WAN set to?
5GHz, channel 36, 80MHz
- what band, channel and bandwidth is the WiFi LAN set to?
2,4Ghz, channel 12, 20 MHz
5GHz, channel 36, 80MHz
(I can't set independently the lan and WAN channel)
- what does your laptop report about both the phone and router connections?
I can connect to the phone using the 5GHz band.
I can connect to the router using the 2.4GHz band, the 5GHz band is not available/visible (no SSID).
- did you enable Gargoyle's QoS? if so what settings?
No.
If you can find a way to connect your laptop to the router via ethernet it would also be useful to check the speeds that way.
Ping 62ms, jitter 16.7ms, download 9Mbps, upload 5Mbps.
It would also be useful to sysupgrade back to OpenWrt
When I find some spare time I'll try that.
BTW the 5GHz radio apparently doesn't work with 160MHz channels at all due to limitations in the silicon, only 80MHz or smaller; you also need to set the regulatory domain for both radios to your country
I didn't try the 160MHz band and Gargoyle is set to my country (Italy).

Thank you

pythonic
Posts: 234
Joined: Mon Mar 11, 2019 5:47 am
Location: Australia

Re: Gargoyle on Ubiquiti Nano HD?

Post by pythonic »

emmexx wrote:
Sun Jan 28, 2024 11:37 am
pythonic wrote:
Sun Jan 28, 2024 8:10 am
- what does your laptop report about both the phone and router connections?
I can connect to the phone using the 5GHz band.
I can connect to the router using the 2.4GHz band, the 5GHz band is not available/visible (no SSID).
Can't you get any details about the connection (e.g. signal level, SNR, "sync rate" etc) from your laptop OS?

Re the missing 5GHz SSID for your laptop connection: I gather that not all radios can simultaneously operate as client and AP, however if you can get this working under OpenWrt that might suggest a limitation in Gargoyle.
emmexx wrote:
Sun Jan 28, 2024 11:37 am
pythonic wrote:
Sun Jan 28, 2024 8:10 am
If you can find a way to connect your laptop to the router via ethernet it would also be useful to check the speeds that way.
Ping 62ms, jitter 16.7ms, download 9Mbps, upload 5Mbps.

...

Gargoyle is set to my country (Italy).
Hmmm... so an ethernet connection is nearly as bad (though the upload seems ok)...
Is there any possibility that your phone company is throttling downstream devices (i.e. devices connected via a router tethered to the phone, not devices tethered directly to the phone)? If this is the case, similar performance would be expected with standard OpenWrt.

This is apparently common in the USA, as the phone companies there want to discourage using mobile phone plan data for fixed internet connections, but seems to be less common elsewhere though it may be spreading...

If it is throttling, the workaround usually seems to be changing the TTL value of 65 on the router WAN (instead of the default 64). See also info about changing TTL on dekstop Linux (the temporary method in this article might work for testing on Gargoyle and OpenWrt but there are probably better ways for permanently recording this).

emmexx
Posts: 25
Joined: Thu Sep 29, 2016 6:01 am

Re: Gargoyle on Ubiquiti Nano HD?

Post by emmexx »

pythonic wrote:
Sun Jan 28, 2024 6:11 pm
Can't you get any details about the connection (e.g. signal level, SNR, "sync rate" etc) from your laptop OS?
iwlist scan:

Code: Select all

          Cell 02 - Address: 74:83:C2:12:F7:5B
                    Channel:12
                    Frequency:2.467 GHz (Channel 12)
                    Quality=56/70  Signal level=-54 dBm  
                    Encryption key:on
                    ESSID:"myWifi"
                    Bit Rates:6 Mb/s; 9 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s
                              36 Mb/s; 48 Mb/s; 54 Mb/s
                    Mode:Master
                    Extra:tsf=000000495d9460d9
                    Extra: Last beacon: 11549ms ago
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : CCMP
                        Pairwise Ciphers (1) : CCMP
                        Authentication Suites (3) : PSK unknown (6) unknown (8)
Re the missing 5GHz SSID for your laptop connection: I gather that not all radios can simultaneously operate as client and AP, however if you can get this working under OpenWrt that might suggest a limitation in Gargoyle.
I'll try that...
Hmmm... so an ethernet connection is nearly as bad (though the upload seems ok)...
Is there any possibility that your phone company is throttling downstream devices (i.e. devices connected via a router tethered to the phone, not devices tethered directly to the phone)? If this is the case, similar performance would be expected with standard OpenWrt.
I don't think this is the case but I can't prove it, I don't have another router with Client+AP capabilities. But...
If it is throttling, the workaround usually seems to be changing the TTL value of 65 on the router WAN (instead of the default 64).
Changing TTL to 65 gives much better results:
Best
  • ping=62ms
  • jitter=8ms
  • download=27Mbps
  • upload=6Mbps
Average
  • ping=62ms
  • jitter=10ms
  • download=7Mbps
  • upload=3Mbps
Upload and download speed could depend on the phone network traffic... It varies a lot from time to time.

But why does changing TTL to 65 bypass throttling?

emmexx
Posts: 25
Joined: Thu Sep 29, 2016 6:01 am

Re: Gargoyle on Ubiquiti Nano HD?

Post by emmexx »

pythonic wrote:
Sun Jan 28, 2024 8:10 am

It would also be useful to sysupgrade back to OpenWrt and check the performance of the router running OpenWrt (both 22.03 as used by Gargoyle 1.14 and 23.05, possibly even 21.02).
With 21.02 I got:
laptop -> (wired) openwrt -> phone TTL = 65
  • Download = 16Mbps, upload = 1.5Mbps
  • Download = 20Mbps, upload = 2Mbps
  • Download = 16Mbps, upload = 1.6Mbps
  • Download = 8.5Mbps, upload = 3.7Mbps
laptop -> (wired) openwrt -> phone TTL = 64
  • Download = 12Mbps, upload = 2.3Mbps
  • Download = 24Mbps, upload = 2Mbps
  • Download = 19Mbps, upload = 3.5Mbps
  • Download = 30Mbps, upload = 2.3Mbps
In my opinion there's no throttling.
(I configured the 5GHz wireless wan not the AP).

With 23.05 I got:
laptop -> (wireless) openwrt -> phone TTL = 64
  • Download = 1.5Mbps, upload = 1.7Mbps
  • Download = 1.17Mbps, upload = 2.3Mbps
  • Download = 2.3Mbps, upload = 2.2Mbps
  • Download = 5Mbps, upload = 9Mbps
I configured the 5GHz band for wireless wan and for the AP.

As above with TTL = 65:
  • Download = 4.3Mbps, upload = 8.4Mbps
  • Download = 7Mbps, upload = 10Mbps
  • Download = 6Mbps, upload = 6Mbps
  • Download = 12Mbps, upload = 8Mbps

emmexx
Posts: 25
Joined: Thu Sep 29, 2016 6:01 am

Re: Gargoyle on Ubiquiti Nano HD?

Post by emmexx »

I tested the speed between my laptop and Openwrt 23.05 with iperf3 and the results are:

Code: Select all

[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.00  sec   368 MBytes   309 Mbits/sec    0             sender
[  5]   0.00-10.00  sec   366 MBytes   307 Mbits/sec                  receiver
Anyway always around 300Mbps...

Watching a Youtube video, to check the speed while the 5GHz radio is split between my laptop and my phone:

Code: Select all

[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.00  sec   258 MBytes   216 Mbits/sec    3             sender
[  5]   0.00-10.00  sec   256 MBytes   214 Mbits/sec                  receiver

pythonic
Posts: 234
Joined: Mon Mar 11, 2019 5:47 am
Location: Australia

Re: Gargoyle on Ubiquiti Nano HD?

Post by pythonic »

emmexx wrote:
Mon Jan 29, 2024 3:14 am
iwlist scan:

Code: Select all

          Cell 02 - Address: 74:83:C2:12:F7:5B
                    Channel:12
                    Frequency:2.467 GHz (Channel 12)
                    Quality=56/70  Signal level=-54 dBm  
                    Encryption key:on
                    ESSID:"myWifi"
                    Bit Rates:6 Mb/s; 9 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s
                              36 Mb/s; 48 Mb/s; 54 Mb/s
That suggests that your 2.4GHz is only configured for 802.11g (54 Mb/s) standard whereas the hardware is supposed to support 802.11n (150 Mb/s??). That is likely to limit you to about 33 Mb/s download, which I see you were getting closer to with OpenWrt 21.02.

I've not found anything definitive but there are some references to mt76 regressions between OpenWrt 21.02 and 22.03 particularly affecting the radio chips in your Nano HD, some of which may have been rectified by backports very late in the 22.03 release cycle (after 22.03.5, Gargoyle v1.14 is based on 22.03.4 or thereabouts) - which exact version of 22.03 did you test install? Which exact version of 23.05?

At this point I'm at the limit of my knowledge of WiFi so don't have any further suggestions to offer. If it were me, I'd be looking for a relatively inexpensive travel router that can tether to the phone by USB and provide an ethernet output to go to your Nano HD's WAN, leaving the WiFi disabled on the travel router (examples include the gl.iNet gl-AR150/gl-AR300/gl-MT300v2). There are other devices that could also serve this purpose too, such as Raspberry Pis (I'd suggest at least a 2B although for sub-50Mb/s like you're getting a Pi B+ might be enough) or any second hand router with a USB port - just as long as they're supported by OpenWrt/Gargoyle as many factory firmwares don't support phone USB tethering. USB tethering is probably a bit more annoying to use than WiFi tethering, but avoids some of the potential complications of WiFi.
But why does changing TTL to 65 bypass throttling?
My rough understanding is that when applied to the router WAN it boosts the TTL of packets forwarded through the phone's tether interface by 1, making it appear to the telco's equipment that the packets have come only from the phone (which have a TTL of 64) and not any tethered device (which would otherwise have a TTL of 63 when arriving at the telco). Some more aggressive telcos have gotten wise to this so it's not foolproof but it still works in many cases where the telco is using only the simple TTL detection for tethering.

emmexx
Posts: 25
Joined: Thu Sep 29, 2016 6:01 am

Re: Gargoyle on Ubiquiti Nano HD?

Post by emmexx »

pythonic wrote:
Fri Feb 02, 2024 6:13 am

That suggests that your 2.4GHz is only configured for 802.11g (54 Mb/s) standard whereas the hardware is supposed to support 802.11n (150 Mb/s??). That is likely to limit you to about 33 Mb/s download, which I see you were getting closer to with OpenWrt 21.02.
I don' t know, I don' t remember setting the 2.4GHz radio to 802.11g only. Or I did it by mistake (scrollwheel) or I unintentionally changed that setting.
When I reinstall Gargoyle I'll check that.
which exact version of 22.03 did you test install? Which exact version of 23.05?
I installed 21.02

Code: Select all

openwrt-21.02.0-ramips-mt7621-ubnt_unifi-nanohd-squashfs-sysupgrade.bin
and

Code: Select all

OpenWrt 23.05.0 r23497-6637af95aa / LuCI openwrt-23.05 branch git-23.236.53405-fc638c8

USB tethering is probably a bit more annoying to use than WiFi tethering, but avoids some of the potential complications of WiFi.
I'll go with less speed, USB tethering would be too much of a hassle. :)
But why does changing TTL to 65 bypass throttling?
Thank you for the explanation.

emmexx
Posts: 25
Joined: Thu Sep 29, 2016 6:01 am

Re: Gargoyle on Ubiquiti Nano HD?

Post by emmexx »

pythonic wrote:
Fri Feb 02, 2024 6:13 am

Code: Select all

 
                    Bit Rates:6 Mb/s; 9 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s
                              36 Mb/s; 48 Mb/s; 54 Mb/s
I restored Gargoyle and the settings I had before and radio0 was set to 802.11g+n
The bit rates listed by iwlist wlan0 scan are the same.
But in the connection manager of my laptop the connection speed is 144,4 Mbit/s

I don' t know what to say.

I'll update the thread if anything changes in the future.

pythonic
Posts: 234
Joined: Mon Mar 11, 2019 5:47 am
Location: Australia

Re: Gargoyle on Ubiquiti Nano HD?

Post by pythonic »

emmexx wrote:
Fri Feb 02, 2024 10:02 am
But in the connection manager of my laptop the connection speed is 144,4 Mbit/s
At least your laptop is connecting at 802.11n rates so that removes that potential limit - 11n should be good for 80-90 Mb/s down.

If you feel up to testing OpenWrt 22.03.6 (most recent point release of 22.03) that might give an indication whether the changes I mentioned earlier were backported. I don't expect any official Gargoyle 1.14 builds with these updates to be made, as I understand the available resources are focussed on a 23.05 based release, but the current source tree has been bumped to use 22.03.6 so if there were any gains a private build could take advantage of them.

emmexx
Posts: 25
Joined: Thu Sep 29, 2016 6:01 am

Re: Gargoyle on Ubiquiti Nano HD?

Post by emmexx »

pythonic wrote:
Sat Feb 03, 2024 12:50 am
If you feel up to testing OpenWrt 22.03.6 (most recent point release of 22.03) that might give an indication whether the changes I mentioned earlier were backported. I don't expect any official Gargoyle 1.14 builds with these updates to be made, as I understand the available resources are focussed on a 23.05 based release, but the current source tree has been bumped to use 22.03.6 so if there were any gains a private build could take advantage of them.
I can try that but I'm not sure I can get any convincing result from my setup.
The download/upload speeds are too much dependent on the connection speed of my phone provider.
The connection speed between my laptop and gargoyle/openWRT is what I expected.
It would be interesting to test the speed between openwrt and the phone but I don't know if there's an iperf3 app that I can use.

Post Reply