How to connect to a specific access point?

Questions about WIFI networks and devices
Forum rules
Before you post please read how to get help
Post Reply
UNI
Level 1
Level 1
Posts: 5
Joined: Mon May 21, 2018 1:02 pm

How to connect to a specific access point?

Post by UNI » Mon May 21, 2018 2:28 pm

I have only been using Linux for a few weeks.


[1] Search Before Posting
I have searched, but what I found dealt with connecting to a specific network (with one access point). In my case, I would like to force a connection to a specific access point (AP) when there are many access points (APs) in range and all APs are using the same SSID. I thought that I had figured out how to force a connection to a specific AP by creating/saving multiple Network Connections.

For example:
Network Connection 1 included the BSSID for AP 1
Network Connection 2 included the BSSID for AP 2
...and so on.

Within each saved Network Connection, the option to "Automatically connect to this network when it is available" was turned off (not selected).

When I wanted to connect to a specific AP, I would...
...edit the Network Connection of interest
...select "Automatically connect to this network when it is available"
...save that Network Connection
...disconnect from the current AP
...reconnect to the applicable SSID

After I was finished with the Network Connection of interest, I would edit/save it again with the option to "Automatically connect to this network when it is available" not selected. At any given time, none (or only one) Network Connection would have the option to "Automatically connect to this network when it is available" selected/saved.

This system worked for a few saved Network Connections, but as I added more - something went haywire. The laptop insisted on connecting to an AP other than the one that I had just set to "Automatically connect to this network when it is available". Disabling/enabling Wi-Fi did not help. Disabling/enabling Networking did not help. Restarting the laptop did not help. The AP that the laptop insisted on connection to was insanely far away - with a Signal level of -89 dBm (per iwconfig). Moving to another part of the building, just caused the laptop to pick another undesired, far away AP to connect to.

When I deleted the Network Connection for the AP that the laptop insisted on using, the laptop simply picked another Network Connection to get stuck on - rendering my "force a connection to a specific AP" scheme useless.


There might be better method/scheme for connecting to a specific AP, but my scheme had an additional benefit: When I don't need to connect to a specif AP, I can save all of the Network Connections with the option to "Automatically connect to this network when it is available" selected. Then (in theory) they laptop would connect to the best AP and I could just look at the "Connection Information" screen to see which AP that I was connected to. The title of the saved Network Connection tells me the AP name - instead of having to look up the BSSID and translate that to a specific AP. But alas, the laptop still insisted on connecting to a uselessly far away AP.

As indicated above, the scheme worked until I added more saved Network Connections. I don't recall the exact number of saved Network Connections where the scheme failed, but the total number of APs that I would like to save a Network Connection for is 10.

The "b43" driver limits my download/upload speeds to roughly 10 to 20 Mbps. An external D-Link USB network adapter that I have reaches closer to 50 Mbps on the same network. Perhaps I did something wrong when installing the "b43" driver. Maybe that is contributing to the laptop getting stuck on connecting to one AP.



[2] New Questions Deserve New Topics
Done.



[3] Consider Which Forum Section To Post
I hope that this is the correct Forum Section and sub-section.



[4] Use Informative Titles
I considered...
How to connect to a specific access point when there are more than one using the same SSID?
...but I opted for brevity.



[5] Details! Details! Details!

Code: Select all

System:    Kernel: 4.13.0-41-generic x86_64 (64 bit) Desktop: MATE 1.18.0
           Distro: Linux Mint 18.3 Sylvia
Machine:   System: Dell (portable) product: Vostro 1500
           Mobo: Dell model: 0NX907 Bios: Dell v: A06 date: 04/21/2008
CPU:       Dual core Intel Core2 Duo T5270 (-MCP-) speed/max: 1135/1401 MHz
Graphics:  Card: Intel Mobile GM965/GL960 Integrated Graphics Controller (primary)
           Display Server: X.Org 1.18.4 drivers: intel (unloaded: fbdev,vesa)
           Resolution: 1280x800@60.00hz
           GLX Renderer: Mesa DRI Intel 965GM GLX Version: 2.1 Mesa 17.0.7
Network:   Card-1: Broadcom BCM4401-B0 100Base-TX driver: b44
           Card-2: Broadcom BCM4311 802.11b/g WLAN driver: b43-pci-bridge
Drives:    HDD Total Size: 250.1GB (5.3% used)
Info:      Processes: 167 Uptime: 10:52 Memory: 1076.5/3936.1MB
           Client: Shell (bash) inxi: 2.2.35 
See first section for more details on what I would like to accomplish.

After restarting these Open Mesh A60 APs, some of them don't work correctly and must be restarted again. Hence, my desire to force a connection to a specific AP and test its functionality.



[6] Use Default Font Size and Colors
Done.
"Please don't use coloured text"
No colors/colours.



[7] Use Images Sparingly
Shall I use a thousand words instead :-)



[8] Do Not Cross-Post
I won't.



[9] Indicate Solved Topics
If there is a solution to be had. Perhaps another method of forcing a connection to a specif AP will be the solution, but it would be nice to know why my particular scheme failed.



Sorry for the long post, but the "How To Get Help!" post did as for "Details! Details! Details!".

Thanks in advance for your attention to this issue.


edit: typo

User avatar
JerryF
Level 10
Level 10
Posts: 3066
Joined: Mon Jun 08, 2015 1:23 pm
Location: Rhode Island, USA

Re: How to connect to a specific access point?

Post by JerryF » Mon May 21, 2018 6:32 pm

Welcome!

Details, yes, but TMI.

Connect to the network that you want as the default.

In Network Connections, click on that network, then click on Edit. At BSSID, choose the MAC address from the drop-down list.

That should make it choose the SSID with that MAC address.
IF your problem has been solved, please edit your original post and add [SOLVED] to the beginning of the Subject Line. It helps other members.

UNI
Level 1
Level 1
Posts: 5
Joined: Mon May 21, 2018 1:02 pm

Re: How to connect to a specific access point?

Post by UNI » Mon May 21, 2018 6:42 pm

Thanks for the reply. Sorry for the TMI.

I understand the steps that you mentioned, but I don't have ten BSSIDs memorized. I was hoping for a solution that did not involve repeatedly looking up the relationship between the BSSID and the English name for the AP. The method that I detailed solved that problem, until it went whacky.

User avatar
JerryF
Level 10
Level 10
Posts: 3066
Joined: Mon Jun 08, 2015 1:23 pm
Location: Rhode Island, USA

Re: How to connect to a specific access point?

Post by JerryF » Tue May 22, 2018 8:33 am

UNI wrote:
Mon May 21, 2018 6:42 pm
Thanks for the reply. Sorry for the TMI.

I understand the steps that you mentioned, but I don't have ten BSSIDs memorized. I was hoping for a solution that did not involve repeatedly looking up the relationship between the BSSID and the English name for the AP. The method that I detailed solved that problem, until it went whacky.
You shouldn't have to have them memorized. Save each connection with its BSSID as a connection with a name that makes sense to you for a particular access point.
IF your problem has been solved, please edit your original post and add [SOLVED] to the beginning of the Subject Line. It helps other members.

User avatar
JerryF
Level 10
Level 10
Posts: 3066
Joined: Mon Jun 08, 2015 1:23 pm
Location: Rhode Island, USA

Re: How to connect to a specific access point?

Post by JerryF » Tue May 22, 2018 8:50 am

Reread your original post. So the main problem is that you keep getting connected to an AP that's not the nearest?

Unfortunately, I don't know enough about this and haven't had that experience.
IF your problem has been solved, please edit your original post and add [SOLVED] to the beginning of the Subject Line. It helps other members.

User avatar
Spearmint2
Level 15
Level 15
Posts: 5720
Joined: Sat May 04, 2013 1:41 pm
Location: Maryland, USA

Re: How to connect to a specific access point?

Post by Spearmint2 » Tue May 22, 2018 1:10 pm

Have only one wifi device on the computer active at a time. If using the external, turn off the inbuilt. May have to do that in the BIOS.
All things go better with Mint. Mint julep, mint jelly, mint gum, candy mints, pillow mints, peppermint, chocolate mints, spearmint,....

UNI
Level 1
Level 1
Posts: 5
Joined: Mon May 21, 2018 1:02 pm

Re: How to connect to a specific access point?

Post by UNI » Tue May 22, 2018 1:39 pm

@JerryF,
Thanks again for your time on this.

Since the APs have a problem. I need to connect to each one to test it. For the SSID/network of interest, it looks like I'm going to have to delete each of my saved Network Connections, create one fresh Network Connection, and then use the drop down list in the BSSID field that you mentioned. But it requires looking up the AP's name by its MAC address.

At any given spot in the building, more than one AP should be in useful range. It would be nice if I could stay in one sweet spot and test each AP that is in useful range - then move to the next sweet spot. I should be able to test all ten APs from three sweet spots. Deleting my ten Network Connections for the SSID of interest might cure the issue of connecting to a far away AP. I don't think that that was happening until I started saving multiple Network Connections for one SSID.

Too bad that my method did not work, because it could have solved two issues:
Forcing a connection to a specific AP - when testing the APs.
Easily letting me know which AP that I'm connected to - when not testing the APs.
When not testing the APs, simply looking at the Connection Information screen would have let me know the name of the AP that I was connected to. Of course there are other ways to know which AP that I'm connected to: open a terminal window, use iwconfig to get the AP's MAC address, and then look up the name of the AP based on that MAC address.

I am familiar with batch files in the Windows environment. Is there a way to create one script file per AP such that when I double click on the script file of interest, I'm connected to the desired AP? This is slightly less desirable method - but it solves the issue of having to lookup the relationship between the BSSID and the AP's name. Each script file would have the AP's name in the file name.


@Spearmint2,
There is only one WiFi device active at a time.
edit: thanks for your time too.

User avatar
JerryF
Level 10
Level 10
Posts: 3066
Joined: Mon Jun 08, 2015 1:23 pm
Location: Rhode Island, USA

Re: How to connect to a specific access point?

Post by JerryF » Tue May 22, 2018 3:55 pm

UNI wrote:
Tue May 22, 2018 1:39 pm
...
Since the APs have a problem. I need to connect to each one to test it.
...
I'm curious---why do you think that the APs have a problem?

Your situation has been intrigued and I've been experimenting with this.

I noticed that even though I had "Automatically connect to this network when it is available" unchecked for two connections I setup and saved, I also had to uncheck "Connect automatically" under Network Settings. The laptop kept automatically connecting.
Shutter-001.jpg
Click on gear button to get next screen
Shutter-002.jpg
IF your problem has been solved, please edit your original post and add [SOLVED] to the beginning of the Subject Line. It helps other members.

User avatar
JerryF
Level 10
Level 10
Posts: 3066
Joined: Mon Jun 08, 2015 1:23 pm
Location: Rhode Island, USA

Re: How to connect to a specific access point?

Post by JerryF » Tue May 22, 2018 4:02 pm

So after totally turning off automatic connection, I got this screen from clicking on the tray icon for networks:
Shutter-003.jpg
SSID with submenu
Shutter-003.jpg (18.84 KiB) Viewed 382 times
From here, I would be able to see which AP has the strongest signal and click on it.

These were my setups for AP1 and AP2. The BSSID MAC addresses are made up for security reasons.
Shutter-005.jpg
AP1
Shutter-005.jpg (22.22 KiB) Viewed 382 times
Shutter-006.jpg
AP2
Shutter-006.jpg (21.78 KiB) Viewed 382 times
IF your problem has been solved, please edit your original post and add [SOLVED] to the beginning of the Subject Line. It helps other members.

UNI
Level 1
Level 1
Posts: 5
Joined: Mon May 21, 2018 1:02 pm

Re: How to connect to a specific access point?

Post by UNI » Tue May 22, 2018 10:18 pm

My guess was correct: deleting all ten of the saved Network Connections cured the issue of the laptop automatically connecting to an AP that was too far away.

Your suggestion to use one saved Network Connection and then select the BSSID from the drop down menu worked - like I knew it would - since that is what I had been doing before joining this forum. It just was not convenient when there are ten BSSIDs to pick from.

Thanks for your experimenting!

We might be using different Network Managers (if that is the correct term). I don't see the option named "Network Settings" or an option to "Rescan for wireless networks". And I've not seen a window with just the title of "Network". I cannot post an image of what I do see right now; maybe later.

When I only had three saved Network Connections for the SSID of interest, the laptop did not automatically connect to an AP --- as long as "Automatically connect to this network when it is available" was not selected inside of each of those three saved Network Connections. The weirdness of automatically connecting when I did not want it to only started after saving (5 or 6 or 7?) Network Connections. The bonus weirdness of connecting to an AP that was too far away to be useful started sometime after I already had ten Network Connections saved. I conflated the two weird things to shorten my previous posts.


After I restarting all the APs, some of them do not work. Users can connect to them, but there will be no DNS. When connected to a "bad" AP, pinging 8.8.8.8 works because there is no DNS involved - but nslookup fails to resolve google.com - and of course, surfing to a URL that requires DNS will fail. I'm running beta firmware on these APs to gain access to a feature that I needed, so some issues are to be expected. I think that the "DNS fails after rebooting some APs" issue has been resolved in the latest beta firmware, but I still want to keep checking each AP for a while to be sure.

If I find the time, I'll recreate ten saved Network Connections using my external D-Link USB network adapter. Perhaps the two weird things only happen when the "b43" drivers are in play.

User avatar
JerryF
Level 10
Level 10
Posts: 3066
Joined: Mon Jun 08, 2015 1:23 pm
Location: Rhode Island, USA

Re: How to connect to a specific access point?

Post by JerryF » Wed May 23, 2018 8:35 am

I neglected to notice that your DE is MATE---mine is Cinnamon. Sorry about that.

I enjoyed experimenting with this. Thanks for the challenge and the learning experience!

I hope that you can get everything sorted out the way you want it.
IF your problem has been solved, please edit your original post and add [SOLVED] to the beginning of the Subject Line. It helps other members.

UNI
Level 1
Level 1
Posts: 5
Joined: Mon May 21, 2018 1:02 pm

Re: How to connect to a specific access point?

Post by UNI » Mon May 28, 2018 12:44 am

I had to time to disable the internal wireless network adapter and use an external (USB) one.

The same weird things happened:
After creating about 4 or 5 Network Connections (each with a specific BSSID saved inside), the laptop connected to an AP that was to far away to be of any use. I deleted all of the saved Network Connections, restarted the laptop, and went back to using one Network connection and the drop down list of BSSIDs. However, once I added the 5th BSSID, that network connection stopped connecting to any AP.

So, is there a way to script a connection or (less desirable) a way to connect to a specific AP via the terminal window.

I had one AP that I could not connect to at all - until I restarted it. That just adds to the confusion of figuring out if the Linux Mint Mate is acting weird or the APs.

Post Reply

Return to “Wireless”