Find your kernel driver module in use by issuing the below command: Here are the per-requisites you will need to use hostapd in this manner:Ībility of your wireless card to support infrastructure mode.
I'm sharing my mobile broadband connection (Tata Photon) with my android phone using this very method on ubuntu 12.04!
To make your ubuntu machine act as a wifi hot-spot for any device, install and configure the hostapd package. You can note that since the connection also appears in the available connections, you can enable/disable it from graphical interface. To enable it again, you will just need to use the last command of the 4 lines command. When you do not need it anymore, disable it with : nmcli connection down my-hotspot # Enable it (run this command each time you want to enable the access point) Nmcli connection modify my-hotspot 802-11-wireless-security.key-mgmt wpa-psk 802-11-wireless-security.psk myhardpassword
# Set a WPA password (you should change it) Nmcli connection modify my-hotspot 802-11-wireless.mode ap 802-11-wireless.band bg thod shared
Nmcli connection add type wifi ifname '*' con-name my-hotspot autoconnect no ssid my-local-hotspot Just run the following lines to create and enable the access point : # Create a connection If it does not work, you should try the 3 line solution here : Three lines solution, without additional program Just run nmcli device wifi hotspot con-name my-hotspot ssid my-hotspot band bg password jesuisunmotdepasseĪnd it should create the access point and connect to it. One line solution, without additional program Once it's set up, you can just use the graphical interface to toogle the access point. It is very straight forward, works with WPA and Access Point Mode (so it works on smartphones), and do not need complex set up. Here are two very similar methods based on the great command line tool of NetworkManager. Now you can search and connect the access point from your Android mobile. If not, select "Connect to Hidden Wi-Fi Network" and select it from the drop-down box.
It should automatically connect to the hotspot you created. When everything's done, enable WIFI from Network Manager icon on the panel. When the file opens, search for the line mode=infrastructure and change it to mode=ap. Replace wifi-hotspot with the connection name you types in step 4. gksudo gedit /etc/NetworkManager/system-connections/wifi-hotspot When it opens, paste the commands below and hit Enter to edit the configuration file. Now press Ctrl+Alt+T on keyboard to open terminal. File name is same to the connection name you typed in step 4.
Go to IPv4 Settings tab, from Method drop-down box select Shared to other computers.Īfter above steps, a configuration file created under /etc/NetworkManager/system-connections directory. Go to Wi-Fi Security tab,select security type WPA & WPA2 Personal and set a password.