What?
Say you have two systems: system A
has some WiFi connection, and the
other (system B
) is not connected to the internet. How can we share
the connection of A
to B
?
I assume A
is using some Linux installation (preferably Arch but
that doesn’t really matter at all); so is B
. Furthermore, I assume
that A
has an AP enabled wireless card (i.e. it can act as an
access point)
How?
- Check that
A
has AP capabilities. To do so, installiw
and runiw list
. Under “Supported interfaces
” should beAP
. If not, sorry. - Create a separate, managed wireless interface based on your card:
- Find the name of your card in relation to
iw
by runningiw dev
and looking at the first line of output (should bephy0
or something like that). Call it NAME - Then run
iw $(NAME) interface add $(NAME)_ap type managed
- Find the name of your card in relation to
- Create an access point using that interface:
- Install
linux-wifi-hotspot
(AUR link), which gives you thecreate_ap
script - Let
$SSID
and$PASSWORD
be what they obviously mean - Run
create_ap $(NAME)_ap $(NAME) $(SSID) $(PASSWORD)
- Install
Why?
Having recently setup my desktop in my room, I quickly realised the internet connection was abysmal. While near the router I measured a download rate around 1/10th a gigabit per second, in my room it dropped to 0.8 megabits! Even funnier, my laptop was getting an average download rate of 80 MiB per second in the same area! So obviously there was a lot of interference between my desktop and the router.
Now I could setup the desktop closer to the router (i.e. outside my room) or run a 100m Ethernet cable from the router to my room but both those options were not desirable. Instead, why not piggyback on the pretty good connection of my laptop?
With this solution I get a 10MiB connection, which isn’t great, but it’s much better than before.