I use OpenSuse 13.1 (with KDE). On my phone I can turn on a hotspot just by pushing a button. I have been researching how to do this on linux, I haven't found an easy way yet.
What I want to achieve: I have a wired connection. I want to share this through a wireless connection (so that my phone can access the internet).
I read that I could do this with an ad-hoc network. Is this correct or is this something different still? I did try this, new network (regular and shared I tried) -> mode: ad-hoc -> I gave in a ssid "hotspot".
But it is not being detected by my phones. Perhaps ad-hoc is not allowed for them?
Any suggestions?
— update
I have added the steps I have tried graphically:
- Add new network: I need to choose between wireless and shared. I have tried both. But I presume it is wireless?
- Set a name and as ad-hoc (or infrastructure) network.
-> none of the two seems to be detected by android or iphone.
- I am connected by cable, do I also need to connect to the wireless (by dubble clicking it?)
Am I missing something obvious? Or a missing host service/server? Etc… because none of the ad-hoc or infrastructure networks are showing on my cell phone.
I am using knetworkmanager now (kde). If I can do it command line, would also be ok.
–update
I have executed the following commands error free:
nmcli nm wifi off
rfkill unblock wlan
ip link set dev wlp1s0 up
ip address add 192.168.5.1/24 dev wlp1s0
iptables -t nat -A POSTROUTING -s 192.168.5.0/24 -o enp0s20u2 -j MASQUERADE
sysctl -w net.ipv4.ip_forward=1 1> /dev/null
systemctl start hostapd.service
systemctl start dnsmasq.service
My /etc/hostapd is:
interface=wlp1s0
driver=nl80211
# bridge=br0
channel=3
hw_mode=g
auth_algs=1
ssid=test
My phone sees the test network. But keeps saying "Obtaining IP address…."
I feel that I am very close now…
Best Answer
I don't know about Windows Phones or iPhones, but Android phones cannot detect ad-hoc networks out of the box. You will probably need to use infrastructure mode in order for your phone to see your network. Alternatively, search for Android add-ons that enable connections to ad hoc wifi networks (success seems dependent on the device and Android version).