#ifconfig wlan0 list scan
to scan for networks. Set it to be used in the usual way.yeah, until you want to move between wifi hotspots, and have to edit those files every single friggin' time, and those edits don't get properly applied/refreshed. That happens even if you just move back and forth between just two wifi hotspots (like work and home).... adding a coffee shop into the mix only exacerbates the problem.After all just editing a few lines in one or two config files isn't that much of an efford.
Does anything like this exist for FreeBSD?
Maybe I am misunderstanding, but: Why do you need to edit wpa_supplicant.conf each time you move between hotspots?yeah, until you want to move between wifi hotspots, and have to edit those files every single friggin' time, and those edits don't get properly applied/refreshed. That happens even if you just move back and forth between just two wifi hotspots (like work and home).... adding a coffee shop into the mix only exacerbates the problem.![]()
Believe me, I tried that. My frustration is that even if I edit the credentials in all the right files, it's very much hit and miss on those edits getting picked up and actually applied, let alone retained across reboots.Maybe I am misunderstanding, but: Why do you need to edit wpa_supplicant.conf each time you move between hotspots?
You can add as many credentials to the file as you want and wpa_supplicant picks up the network that is available automatically.
You can even add priorities to entries in case there are more than one network available and you want to make sure it picks the one you prefer.
In the process of trying to install Arch Linux I came across a command line utility,iwctl
, for managing a wifi connection.
Does anything like this exist for FreeBSD?
iwctl
to FreeBSD?Get a hold of the upstream sources, start compiling. Fix errors & bugs until it works. At this point you should have it build & run successfully so the next step would be to create a port for it. There's an entire handbook on that subject.How would I go about portingiwctl
to FreeBSD?
iwctl
is part of the Linux source itself so it will most likely depend heavily on Linux specifics. You might be better off writing something new from scratch rather than porting it.are you willing to maintain thisHow would I go about portingiwctl
to FreeBSD?
iwctl
, or any other port you submit until death do you part?That's really weird question (no emojis, does not count as a joke!are you willing to maintain thisiwctl
, or any other port you submit until death do you part?
# bsdconfig wireless
worked a bit more reliably underneath. Why would you need something to do every time you restart your laptop?I should have to remember to do that list of chores, correctly, every time I turn my laptop on.
service netif restart wlan0
Yeah, wpa_supplicant.conf needs to be edited with correct details, and then I have to watch to make sure I don't have syntax errors, that it gets applied correctly, and if that doesn't work, it's hours of research into the error messages - on a different device, not the FreeBSD laptop. And if I go back and forth between different hotspots, I have to repeat that process of edit wpa_supplicant.conf, research, try again. Authentication details are a pain to enter correctly.Why would you need something to do every time you restart your laptop?
When you add a new AP config, you need to perform just 2 simple steps:
1. Edit wpa_supplicant.conf
2. Runservice netif restart wlan0
so now you're the rule maker on how to imply a joke? do you have credentials proving that, or is it just something you took upon yourself to be, and is this position you freely chose to take upon yourself a life long position or just something you took on a whim all depending on your mood?That's really weird question (no emojis, does not count as a joke!); you are absolutely not required to accept life-long contract to port something; if you are no longer interested in something you ported, other interested person will pick it up; if there's no interest at all (mostly fixing it if something breaks as OS goes on), it will be removed.
so now you're the rule maker on how to make rules on how to imply a joke? do you have credentials proving that, or is it just something you took upon yourself to be, and is this position you freely chose to take upon yourself a life long position or just something you took on a whim all depending on your mood?so now you're the rule maker on how to imply a joke? do you have credentials proving that, or is it just something you took upon yourself to be, and is this position you freely chose to take upon yourself a life long position or just something you took on a whim all depending on your mood?
Well, usually I just copy an existing section and edit it. It's hard to screw up the syntax in just 3-4 lines.Authentication details are a pain to enter correctly.
#!/bin/sh
WPA_CONFIG="/etc/wpa_supplicant.conf"
echo "Enter SSID":
read SSID
echo "Enter PSK (just Enter for none)":
read PSK
echo "Do you want to add the new AP configuration:"
echo " SSID: $SSID"
echo " PSK: $PSK"
echo "to $WPA_CONFIG ? Y/N"
read ANS
if [ "$ANS" = "y" ] || [ "$ANS" = "Y" ] ; then
echo "network={" >> $WPA_CONFIG
echo "ssid=\"$SSID\"" >> $WPA_CONFIG
if [ "x$PSK" = "x" ] ; then
echo key_mgmt=NONE >> $WPA_CONFIG
else
echo "psk=\"$PSK\"" >> $WPA_CONFIG
fi
echo "scan_ssid=1" >> $WPA_CONFIG
echo "priority=15" >> $WPA_CONFIG
echo "}" >> $WPA_CONFIG
echo "Done!"
fi
A successful test of that would involveWell, usually I just copy an existing section and edit it. It's hard to screw up the syntax in just 3-4 lines.
You may want to write a simple interactive script to do that, I spent a few minutes writing and testing this:Code:#!/bin/sh WPA_CONFIG="/etc/wpa_supplicant.conf" echo "Enter SSID": read SSID echo "Enter PSK (just Enter for none)": read PSK echo "Do you want to add the new AP configuration:" echo " SSID: $SSID" echo " PSK: $PSK" echo "to $WPA_CONFIG ? Y/N" read ANS if [ "$ANS" = "y" ] || [ "$ANS" = "Y" ] ; then echo "network={" >> $WPA_CONFIG echo "ssid=\"$SSID\"" >> $WPA_CONFIG if [ "x$PSK" = "x" ] ; then echo key_mgmt=NONE >> $WPA_CONFIG else echo "psk=\"$PSK\"" >> $WPA_CONFIG fi echo "scan_ssid=1" >> $WPA_CONFIG echo "priority=15" >> $WPA_CONFIG echo "}" >> $WPA_CONFIG echo "Done!" fi
ifconfig wlan0
to confirm that I connected to the hotspot I want, and then ping -c 5 google.com
to confirm that I can get out to the Internet.