Can't choose antenna with SSH, is this correct?

Hi. I'm having problems with a medium distance link (something like 300 meters). Well actually it's pretty short but anyway... This is in the countryside with visible line of sight and I'm using only one external antenna. The router seems to not be able to detect the best antenna configuration (tries to use two it seems...) and the link is always cutting off or super slow and unstable. It works ok with a good old WRT54GL, anyone remembers those ? :wink: I think a way to solve this would be to try to force it to use only one antenna. I logged in through SSH and edited /etc/config/wireless (details bellow), then after saving I restarted the network by running /etc/init.d/network restart.
My device configuration is the following:

config wifi-device 'radio1'
        option type 'mac80211'
        option hwmode '11g'
        option path 'soc/soc:pcie/pci0000:00/0000:00:02.0/0000:02:00.0'
        option cell_density '0'
        option country 'PT'
        option channel 'auto'
        option htmode 'HT20'
        option diversity '0'
        option rxantenna '2'
        option txantenna '2'
        option txpower '17'

I specifically added the options diversity (which by default is set to '1' from what I could find) and set both rxantenna and txantenna to either '1' or '2'.
My router is the Linksys WRT1200AC v2, last Linksys I'll buy given what they did to the drivers (or so I see written on the forums...).
Anyway, I always get the same result, which is the router seems to ignore the settings and keeps trying to use two antennas, resulting in super weak signal on either TX or RX (it alternates the antennas it uses for TX and RX and continues to try various combinations of speeds but it never tries with only one antenna as I set on the config).

Can someone please help, myabe it's just the driver that doesn't allow it, if you know about it please say something, I'm pulling my hair already over this and spent way too many hours searching with no results...

Thanks!
Dave

I can't comment about the specific radio settings, but I will say the following;

300m is actually very far for traditional wifi. Most typical 2.4GHz wifi is limited to ~300 ft (~90m) with a line-of-site outdoor connection with little-to-no interference. Although you are probably in a quite area with the 2.4GHz RF background noise, and you did say that you have LOS outdoors, you're still pushing 3x the distance that most standard wifi radios can manage. And it also depends significantly on the antennas in use AND the remote device+antenna (i.e. is it a laptop or phone, or is it an actual AP-type radio or even better a purpose-built PTP radio). You'll never get a phone to connect at those distances, a laptop is doubtful. If you have high gain (long range) directional antennas on both sides, you can probably establish a link, but I don't think that you're going to do so well with the typical antennas on your 1200AC. If you actually had luck with the WRT54GL, that is likely because the data rates were so low that they were a bit more robust.

Hopefully you'll get some suggestions for how to tune the wifi configuration here, but I would suggest that you actually get a set of dedicated radios for this purpose. There are a bunch of companies that make PTP radios... take a look at Ubiquiti's AirMax line as one potential option.

Hi. Thanks for your answer. The WRT54GL was connecting at 11/18mbps, although only reaching about 6 - 7 mbps real transfers. The WRT1200AC was connecting at about the same speed for one antenna and varying from 1 to 2mbps on the other (speeds of connection as indicated in Luci), and real transfers were mediocre, less than 1mbps.
Actually I just did a test with both AP (Linksys E2000) and receivers (WRT54GL and WRT1200AC) on the same room, setting power to pretty low levels on all of them. Only small original antennas on this test. The 1200AC works well but as soon as I remove one of the antennas (note that the power was low so no risk of frying the radio ;)) it produces the same behavior as it was producing outside.
On the outside link I was using one 19dbi panel (both on the 54GL and 1200AC) for one antenna and for the other antenna the original small one. On the AP side for the outside link test I have the same Linksys E2000 in AP mode in exactly the same config (software and hardware), using only internal antennas (the E2000 needs mod for external ones, not worth it....).

On both cases it works really well with the 54GL!
And by the way, if I remove the small second original antenna from the WRT1200AC on the outside link test it loses transfter completely, reassuring the idea that it is stupidly trying to use the small antenna at the same time as the 19dbi one.

I'm starting to think that it's the driver that doesn't allow choosing the antenna.
Someone please confirm ?

I do. :grinning_face_with_smiling_eyes:

Did you set distance optimization to a value greater than 300 [meters]?

...no, it doesn't, mainly because you're referring to old 802.11b technology.

I found a thread here compiled with a slightly later driver, it seems. Can someone confirm if it's possible to choose the antennas with those ?
It's very simple to test, just set the power to lower values (to avoid stressing the radio without antenna...) then verify the graph with the signal strenght on Status/Channel analysis. Then remove one antenna and set the following options on /etc/config/wireless:

        option diversity '0'
        option rxantenna '2'
        option txantenna '2'

Check the graph and set rxantenna and txantenna to '1' and check the graph again. It should have different results, in my case it doesn't.
Thanks

@lleachii
The WRT54GL is actually 802.11G but you're right... But it's the WRT1200AC that I want to choose the antenna on.
The distance, yes I did try different values, I went up to 600 meters with same result. And the short distance test without one antenna had the same result....

802.11n and later (much more pronounced in 802.11ac and 802.11ax) no longer use antennas for diversity only, all antennas are used as an array of antennas for (Mu-)MIMO to work, separating out antennas is detrimental to their operations (performance, range, reliability).

1 Like

MIMO always tries to use all the antennas. There is no setting to change that. The obvious answer is two directional antennas, especially if the other end is also 2x2. Many add-on antennas simply do not work. I would buy a CPE, or two. They are pre-engineered solutions with a more powerful transmitter, dual cross-polarized directional antenna, and outdoor compatible case, for less than buying all those parts separately.

If it is free space 5 GHz will work well. 2.4 GHz outdoors will get lots of interference from neighbors even those far away.

1 Like

Well, in that case what is the tx/rxantenna options for nowadays, are they completely ignored ?
Anway, if that's the case that explains why the 54GL works so well, although it doesn't reach today's fast speeds of course, but it's totally usable.

To be honest I don't feel like buying a CPE, I'm from the days where they were small local groups doing mods and custom antennas to test long range stuff and I hate this newer stuff :slight_smile: I never got much into into it, but what I remember guys at the time with the 54GL doing all sorts of cool stuff, including taking it with a car and external antenna to remote places and all sorts of wacky stuff :slight_smile: And there was comradery and drinks involved sometimes.. Different subject matter I know...

Anway, thanks for the info, case solved I guess.

Long range distance is usually done with 11b and directional antennas (dishes :slight_smile: ).

If you are in the mood to do some more testing you can try:

option hwmode '11b'
option htmode 'NOHT'
option distance '500'
option legacy_rates '1'

and
option wmm '0'

and see if it behaves the same. (some of the settings overlap I know, I'm assuming the best scenario here to actually try to improve the things later:p ).

If things are the same well ( highly likely if antenna_tx > antenna tx 2 ; antenna_rx > antenna rx 2 in the driver )... Maybe the driver has some parameter that can control the radio behaviour, cause that's more or less the last thing that can fix it, else well the driver needs to be patched and pray that the radio works with tx and rx antennas set the same directly in the driver (without a way to recover it, not that easy in a router case, I wouldn't try to patch the driver).

@thedukesd

Thanks dude. Just tried all that, same result :roll_eyes: It actually connects at speeds above 11g, so it's ignoring probably almost everything...

The hwmode and htmode and rate selections go in the config wifi-device block as they affect all operations on the radio, not per interface. If you really want g only, don't have an htmode line at all. I think the lower MCS of n are more effective at weak signals than any g modulation though.

@mk24
Yes, that's where I inserted them...

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.