Page MenuHomeSolus

Hotspot not working
Closed, ResolvedPublic

Assigned To
None
Authored By
elliot007
Aug 7 2016, 1:32 PM
Referenced Files
None
Tokens
"Manufacturing Defect?" token, awarded by Waqar144."Like" token, awarded by baimafeima."Like" token, awarded by ghishadow."Love" token, awarded by Timalex.

Description

I've installed Solus OS this morning and noticed the first thing about it that Hotspot is not working.
When I go to settings>Networks>Wifi and clicked the use as hotspot option I does nothing.

Using Atheros Communications AR9271 wifi card

Also tried by right clicking on the NetworkManager icon on panel and create new network but that didn't work as well.

Event Timeline

Same result since release of Solus. Have Intel Centrino Wireless-N 2230.

Confirmed locally:

(gnome-control-center:3949): network-cc-panel-WARNING **: Failed to add new connection: (32) Connection 'Hotspot' is not available on the device wlp2s0 at this time.
ikey triaged this task as High priority.Aug 7 2016, 2:13 PM

Broken due to lack of hostapd:

http://w1.fi/hostapd/

Must package this for inclusion into repo, and add as runtime dependency of network-manager

I tried compiling hostapd frrom source.

Build Dependancies :

llibnl-devel

Runtime Dependancies:
ldd output for "hostapd" :

linux-vdso.so.1 (0x00007ffe58999000)
librt.so.1 => /usr/lib64/librt.so.1 (0x00007f3995019000)
libnl-3.so.200 => /usr/lib64/libnl-3.so.200 (0x00007f3994dfc000)
libnl-genl-3.so.200 => /usr/lib64/libnl-genl-3.so.200 (0x00007f3994bf5000)
libssl.so.1.0.0 => /usr/lib64/libssl.so.1.0.0 (0x00007f3994986000)
libcrypto.so.1.0.0 => /usr/lib64/libcrypto.so.1.0.0 (0x00007f3994543000)
libc.so.6 => /usr/lib64/libc.so.6 (0x00007f399417d000)
libpthread.so.0 => /usr/lib64/libpthread.so.0 (0x00007f3993f5f000)
libm.so.6 => /usr/lib64/libm.so.6 (0x00007f3993c55000)
libdl.so.2 => /usr/lib64/libdl.so.2 (0x00007f3993a51000)
/usr/lib64/ld-linux-x86-64.so.2 (0x00007f3995221000)

ldd output of "hostapd_cli" :

linux-vdso.so.1 (0x00007ffe68f06000)
librt.so.1 => /usr/lib64/librt.so.1 (0x00007f9e2b4f6000)
libc.so.6 => /usr/lib64/libc.so.6 (0x00007f9e2b130000)
libpthread.so.0 => /usr/lib64/libpthread.so.0 (0x00007f9e2af12000)
/usr/lib64/ld-linux-x86-64.so.2 (0x00007f9e2b6fe000)

Built using guide : https://www.howtoforge.com/tutorial/how-to-install-a-wireless-hotspot-with-captive-page-in-linux-using-coovachilli/

It's now able to launch from commandline. but not from Network Manager. Also It authenticates but is unable to assign IP to the clients. I'm guessing dnsmasq service is not running(Well there is no systemd service files for that..)

There is a service file spec for dnsmasq : https://jamielinux.com/docs/libvirt-networking-handbook/appendix/run-dnsmasq-with-systemd.html

No Idea how to proceed from here.

Packaging may be a pain :

The source only gives binaries for daemon and cli. We have to make all the var and pid directories also config in /etc manually. Also the config file should be edited accoringly.

EDIT:
After a reboot, I was able to create a hotspot ( script) with previous comments ^ with no issues, still no NM managed.


Following a blog post[1] I was able to get the hotspot to work (outside of NM), but I got the following output:

# ./hotspot.sh wlp2s0 enp1s0
modprobe: ERROR: ctx=0x2165010 path=/lib/modules/4.8.6/kernel/net/netfilter/x_tables.ko error=No such file or directory
modprobe: ERROR: ctx=0x2165010 path=/lib/modules/4.8.6/kernel/net/netfilter/x_tables.ko error=No such file or directory
modprobe: ERROR: could not insert 'ip_tables': Unknown symbol in module, or unknown parameter (see dmesg)
iptables v1.4.18: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
modprobe: ERROR: ctx=0xa4a010 path=/lib/modules/4.8.6/kernel/net/netfilter/x_tables.ko error=No such file or directory
modprobe: ERROR: ctx=0xa4a010 path=/lib/modules/4.8.6/kernel/net/netfilter/x_tables.ko error=No such file or directory
modprobe: ERROR: could not insert 'ip_tables': Unknown symbol in module, or unknown parameter (see dmesg)
iptables v1.4.18: can't initialize iptables table `nat': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
modprobe: ERROR: ctx=0x25c1010 path=/lib/modules/4.8.6/kernel/net/netfilter/x_tables.ko error=No such file or directory
modprobe: ERROR: ctx=0x25c1010 path=/lib/modules/4.8.6/kernel/net/netfilter/x_tables.ko error=No such file or directory
modprobe: ERROR: could not insert 'ip_tables': Unknown symbol in module, or unknown parameter (see dmesg)
iptables v1.4.18: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
modprobe: ERROR: ctx=0x807010 path=/lib/modules/4.8.6/kernel/net/netfilter/x_tables.ko error=No such file or directory
modprobe: ERROR: ctx=0x807010 path=/lib/modules/4.8.6/kernel/net/netfilter/x_tables.ko error=No such file or directory
modprobe: ERROR: could not insert 'ip_tables': Unknown symbol in module, or unknown parameter (see dmesg)
iptables v1.4.18: can't initialize iptables table `nat': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
modprobe: ERROR: ctx=0x1167010 path=/lib/modules/4.8.6/kernel/net/netfilter/x_tables.ko error=No such file or directory
modprobe: ERROR: ctx=0x1167010 path=/lib/modules/4.8.6/kernel/net/netfilter/x_tables.ko error=No such file or directory
modprobe: ERROR: could not insert 'ip_tables': Unknown symbol in module, or unknown parameter (see dmesg)
iptables v1.4.18: can't initialize iptables table `nat': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
modprobe: ERROR: ctx=0xece010 path=/lib/modules/4.8.6/kernel/net/netfilter/x_tables.ko error=No such file or directory
modprobe: ERROR: ctx=0xece010 path=/lib/modules/4.8.6/kernel/net/netfilter/x_tables.ko error=No such file or directory
modprobe: ERROR: could not insert 'ip_tables': Unknown symbol in module, or unknown parameter (see dmesg)
iptables v1.4.18: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
net.ipv4.ip_forward = 1

Content of hotspot.sh is the same as blog post suggests:

#!/bin/bash
#Initial wifi interface configuration
ifconfig $1 up 10.0.0.1 netmask 255.255.255.0
sleep 2

###########Start dnsmasq, modify if required##########
if [ -z "$(ps -e | grep dnsmasq)" ]
then
         dnsmasq
 fi
 ###########

 #Enable NAT
 iptables --flush
 iptables --table nat --flush
 iptables --delete-chain
 iptables --table nat --delete-chain
 iptables --table nat --append POSTROUTING --out-interface $2 -j MASQUERADE
 iptables --append FORWARD --in-interface $1 -j ACCEPT

 #Thanks to lorenzo
 #Uncomment the line below if facing problems while sharing PPPoE, see lorenzo's comment for more details
 #iptables -I FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu

 sysctl -w net.ipv4.ip_forward=1

 #start hostapd
 hostapd /etc/hostapd/hostapd.conf 1> /dev/null
 killall dnsmasq

Running iptables I get:

# iptables -L
modprobe: ERROR: ctx=0x1729010 path=/lib/modules/4.8.6/kernel/net/netfilter/x_tables.ko error=No such file or directory
modprobe: ERROR: ctx=0x1729010 path=/lib/modules/4.8.6/kernel/net/netfilter/x_tables.ko error=No such file or directory
modprobe: ERROR: could not insert 'ip_tables': Unknown symbol in module, or unknown parameter (see dmesg)
iptables v1.4.18: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.

[1]-https://nims11.wordpress.com/2013/05/22/using-hostapd-with-dnsmasq-to-create-virtual-wifi-access-point-in-linux/

4.8.6? O_O OK update and reboot ..

Any solution to make a hotspot? Still working in a solution?

simple tool to create a AP with hostapd https://github.com/oblique/create_ap

example: create_ap wlan0 eth0 MyAccessPoint MyPassPhrase

i'm trying to use the hostapd but no sucess

i used

hostapd ./hostapd-t.conf

the error:

Configuration file: ./hostapd-t.conf
nl80211: Could not configure driver mode
nl80211: deinit ifname=wlp0s29f7u4u4 disabled_11b_rates=0
nl80211 driver initialization failed.
wlp0s29f7u4u4: interface state UNINITIALIZED->DISABLED
wlp0s29f7u4u4: AP-DISABLED 
hostapd_free_hapd_data: Interface wlp0s29f7u4u4 wasn't started

How is this still an issue? Solus is a pretty big project now, stuff like this should be fixed :(

I took a look at it and tried my best. D2878 is a commit of hostapd including KRACK patches which works quite well, although you have to kill networkmanager for it and create a config file first.
That's why I took @leandromrs tool recommendation create_ap (which is just a shell script) in D2879 and it's really easy. Just enter sudo create_ap wlp3s0 enp2s0 My-AP 12345678 and it handles all the other programs, configs and settings.
I don't know what's necessary to make hostapd work with the gnome-control-center, but that didn't look very promising.

.I maked a tutorial to compile and test the hostapd, I just could not create an access point because my adapter does not support AP

who wants to test and see if it's working, I believe it is.

https://solus-project.com/forums/viewtopic.php?f=11&t=12157

I will be doing some further testing, but soon I believe I will have an update for this against wpa_supplicant and NetworkManager packages to fix this, at least from NM side of things to be able to do it. I've got it working so far, but I'm not able to test it out as needed. :)

Awesome! Thanks for making this work.