A 'wireless' setting is required if no AP path was given
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
A 'wireless' setting is required if no AP path was given
i have been having a case where proper routing entries get lost in or around the access point i connect to. the wi-fi connection itself stays up, making this problem more aggravating (if it were to disconnect, i could just reconnect, again). i have found that by disconnecting and connecting back, the routes are re-established. so i have set up a script to do this. at first i had the script ping a remote host (one of mine) and detect when the routing loss happens. still, i wanted to avoid all that pinging, so i made a new script to run as a cron job and just disconnect and reconnect at certain times i have determined are before when it will lose routes.
the script executes this each time:
Code:
/usr/bin/nmcli device disconnect $interface
/usr/bin/nmcli device connect $interface
/usr/bin/ip route replace default via $ap_address dev $interface metric 600
this works most of the time. however, on occasion, the connect fails and i get this message from nmcli:
Code:
Failed to add/activate new connection: A 'wireless' setting is required if no AP path was given.
most times it connects OK with exactly these options. i'd like to know what additional "wireless setting" i could include, that it wants to have in these few cases so it would more likely succeed. is there some other issue like a weak signal that could be doing this? should i put the connection attempt in a sane loop to retry a few times and break out on success?
i do not own or administer this access point. the service is free, so i am not in the mood to complain about it if i can work around it (it's for those who live here, and their guests).
Did you recheck the script to make sure it was not doing this? I can see you host a server of some kind. I am no expert though the loopback is it not to be something like 127.0.0.1/8 or 127.0.0.1/24.
there is a remote server host that the tunnel goes to. server processes for public access run there if i'm not ready to run it on AWS. server processes here (my laptop) are only for use here. from day to day the IP address i get could change and nothing cares. i do not understand your reference to a script. i have already verified that /usr/bin/nmcli is the source of this message.
I am wondering if this a guest access point your using has a data cap by the ISP provider. I never used tunneling but I had game servers in the past. but does tunneling have to be active on the access point?
Though this message below is suggesting that the routing is being replaced by the access point address device. Times for research for that message. Why is it stating the route is being replaced?
Code:
usr/bin/ip route replace default via $ap_address dev
if the route is absent, replace will just add it. so using replace means i do not need to test if the route is already there. it usually is not there since initially disconnecting discards all the associated routes. one way or the other, i get the route put in place.
i never have seen any data cap. i am likely the heaviest user. my reverse-incremental backups of my laptop to AWS have exceeded 10 GB many times. once i get connected, it works fine. i just run the connection script, again, and all is well.
Last edited by Skaperen; 08-23-2022 at 10:22 PM.
Reason: one letter added and three words added
i'm not using a bridge. but at least the referred code shows what could be needed. this might help evaluate some possible tests. at least the SSID i need to use is fixed, so if i can force that, it may get it every time. the odd thing is, more than 95% of the time it works just fine, so something works. maybe it tries get a lists of SSIDs and this one just gets lost in air (bad packet) and it goes on with the rest. the AP is several metal framed walls away though i have gotten some good bandwidth over it (20 parallel live video streams).
Failed to add/activate new connection: A 'wireless' setting is required if no AP path was given
What I got was wifi connection issues listed no results for the errors you are experiencing. But it may be hard to fix the access point if you have no control over it.
i'll just have to make the code retry the connection a sane number of times, assuming some noise is causing things to fail at some level that is not understood as just that.
I know it is old post but maybe someone will have the same issue...
This error is poping out when you are trying to connect on disabled interface. Steps to reproduce:
nmcli r wifi off
nmcli d connect wlan0
So, if it is happening only sometimes I am guessing that NetworkManager was still initializing your interface or was not enabled on the first place.
when the timed script takes the interface down, it goes to a disabled state then within 2 seconds (next line in the main script where it invokes another script to actually bring the interface up. most of the time the interface will come back up (success). sometimes it fails (about once every 2 or 3 days) in which case the interface stays down and disabled.
i have not yet added the loop to have it try again with a specified delay (maybe 1 second) for a maximum number of times (maybe 9) that it breaks out of on success (exit code 0). maybe i should add that.
lately, the failures have been less frequent, like maybe 1 per week.
the time between restarts is a random number between about 18 minutes and 24 minutes.
when the restart is a success, the short downtime very rarely impacts a YouTube video. if the failure happens, of course the video freezes with the spinning circle.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.