My Wi-Fi card (RTL8188CE) doesn’t have the reputation one could envy. Since I use ethernet for internet access, find below the steps to create a Wi-Fi hotspot that will allow you to share your internet connection over Wi-Fi on CentOS (I’ve also successfully tested this with Ubuntu 15).
What we want ?
Create a Wi-Fi hotspot that shares the internet connection from the ethernet cable. That’s it.
What will we need ?
I stumbled accros create_ap a few weeks ago. It’s simple, easy to use and it WORKS magi-perfectly. It has a lot of little hacks that addresses some of known issues with some adapters and wifi modes.
Steps
1. Install required packages and create_ap
1 2 3 4 |
sudo yum install haveged iw hostapd sudo cd /var/opt ; sudo git clone https://github.com/oblique/create_ap sudo cd create_ap ; sudo make install |
2. Get your network cards information and test
Since CentOS 7 uses a different naming convention for the network cards, find the label of your card by typing
1 2 |
ip a |
Once you get them, test create_ap :
1 2 |
create_ap wlp3s0 enp2s0 MyAccessPoint MyPassPhrase |
3. Make create_ap start on boot
Copy the provided .service file to the systemd folder
1 2 |
sudo cp /var/opt/create_ap/create_ap.service /etc/systemd/system/create_ap.service |
Modify the create_ap.service file to include your adapters labels and add other desired options.
1 2 |
sudo vi /etc/systemd/system/create_ap.service |
Mine looks like this :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
[Unit] Description=Create AP Service After=network.target [Service] Type=simple ExecStart=/usr/bin/create_ap -m bridge -c 7 wlp3s0 enp2s0 JMG 123456789 KillSignal=SIGINT Restart=on-failure RestartSec=5 [Install] WantedBy=multi-user.target |
Enable the create_ap daemon on boot and start it
1 2 3 |
sudo systemctl enable create_ap sudo systemctl start create_ap |
I might be wrong but after installing, you can delete the create_ap folder
1 2 |
sudo rm -rf /var/opt/create_ap |
6 November 2016 at 0 h 46 min
Doesn’t works
ERROR: Your adapter does not support AP (master) mode