Ubuntu: Network manager start access point


I have a pcDuino and I need to start a access point using network-manager. I know this can be done by creating a new connection and setting the mode to ap. It says that this mode is not supported but I know other people have done it. The driver included with the kernel is 8192cu. But running lshw -C network gives this:

  *-network:1     description: Wireless interface     physical id: 2     bus info: usb@1:1     logical name: wlan5     serial: cc:d2:9b:5d:df:88     capabilities: ethernet physical wireless     configuration: broadcast=yes driver=rtl8188eu ip= multicast=yes wireless=IEEE 802.11bgn  

Anyone know how I can set up a ap using network-manager?


You can try, using commands in the terminal.

You need at least: Wireless PCI or USB device connected to Linux with a/b/g and WPA2 support in AP mode, suppose it is wlan0 and Wired ethernet port connected to the upstream router for the Internet access, suppose it is eth0.

Open a terminal. (Ctrl+Alt+T).

Type the following command to install the application:

$ sudo -i  # apt-get update  # apt-get install hostapd bridge-utils  

Now you must configure it by editing your file /etc/default/hostapd

$ sudo -i  # nano /etc/default/hostapd  

Uncomment and set DAEMON_CONF to the absolute path of a hostapd configuration file:


Ctrl + O, save file. Ctrl + X, close nano.

Now you need to create the text file /etc/hostapd/hostapd.conf

sudo -i  nano /etc/hostapd/hostapd.conf  

You must place these lines:

# Wireless network name - Set interface name    interface=wlan0    # Bridge name - set your bridge name    bridge=br0    # Driver nane - set driver name    driver=rtl8188eu    # Country name code - set country name code in ISO/IEC 3166-1 format. US = United Stats     country_code=US    # SSID name - set your SSID    ssid=TameHog    # Operation mode - set operation mode a=IEEE 802.11a, b=IEEE 802.11b, g=IEEE 802.11g    hw_mode=g    # Channel number - set channel number    channel=3    # wpa mode - set wpa mode to 2    wpa=2    # wpa-passphrase - set your passphrase    wpa_passphrase=YourWiFiPassword    # Key management algorithms - set key and auth optionsmanagement    wpa_key_mgmt=WPA-PSK    # Set cipher suites - TKIP and CCMP = AES in Counter mode with CBC-MAC    wpa_pairwise=TKIP    rsn_pairwise=CCMP    # Shared Key Authentication    auth_algs=1    # Accept all MAC address     macaddr_acl=0  

Ctrl + O, save file. Ctrl + X, close nano.

Now you can setup wlan0 in standalone mode or bridge it with eth0

$ sudo -i  # nano /etc/network/interfaces  

Modify or set config as follows:

auto lo br0    iface lo inet loopback    # wireless wlan0    allow-hotplug wlan0    iface wlan0 inet manual    # eth0 connected to the ISP router    allow-hotplug eth0    iface eth0 inet manual    # Setup bridge    iface br0 inet static    bridge_ports wlan0 eth0    address    netmask    network    #Isp Router IP, also runs DHCPD    gateway    dns-nameservers  

Ctrl + O, save file. Ctrl + X, close nano.

Reboot and make sure firewall is not blocking required ports:

$ sudo -i  # /sbin/iptables -L -n -v | less  


Click on the network-manager indicator and select "create new wifi network" from the dropdown menu. I first selected the wlan1 card and named the network "pineapples". I have it set to ad-hoc and under ipv4 it's set to "share connection with other computers", no security.

Also, I clicked to connect from the chromebook while "pineapples" was still resolving as soon as the network appeared; then, the two computers connected to each other.

If the laptop drops or doesn't connect to "pineapples", it should still be listed as an available network from the network-manager dropdown list. Click on "pineapples" and while it is resolving, connect to "pineapples" from the other device.

At first, nothing would resolve but I clicked on my wlan0 network to reset the connection to the router and now both computers have internet.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »