Ubuntu – Wifi hotspot to connect to Android using Broadcom 43xx

androidbroadcomnetwork-managernetworkingwireless

I'm running Ubuntu 13.10 64b on a Dell Inspiron N5010.

My wireless device (found using lspci) is Broadcom Corporation BCM4313 802.11bgn Wireless Network Adapter (rev 01).

I bought a new android phone and want to connect to Internet by using the laptop as a Wireless Access Point (ad-hoc doesn't work with Android).

I tried following tutorials like the one at How to setup an Access Point mode Wi-Fi Hotspot?. The relevant output from iw list was

    Supported interface modes:
     * IBSS
     * managed

Running sudo hostapd /path/to/conf/file gave me (eth1 is the wireless, verified by iwconfig)

Failed to create interface mon.eth1: -95 (Operation not supported)
Could not set channel for kernel driver
eth1: Unable to setup interface.
Could not connect to kernel driver.

I am able to use Connectify and Virtualrouter on Windows, and the phone works great.
How do I get an access point running on Ubuntu? I'm open to other alternatives as well.

Best Answer

Switching to an open source driver did it

Short Version

Using an open source driver (brcmsmac in my case) instead of the Proprietary Broadcom STA Wireless driver (wl) and installing ap-hotspot did the trick


Long version for Broadcom Users

  1. Go to Ubuntu Broadcomm WifiDocs. See if an open source alternative exists.

  2. The Linux drivers page should tell you if it supports AP mode

    • If so yay!
    • If not, I can't help. Sorry.
  3. Temporarily switch to the open- driver source to check if it does what you want

    #unload all drivers
    sudo modprobe -r b43 bcma
    sudo modprobe -r brcmsmac bcma
    sudo modprobe -r wl
    
    #load the corresponding open-source driver (brcmsmac in my case)
    sudo modprobe brcmsmac
    

    If it works, you can edit the blacklists to make sure only the required driver works. An easier option would be to simply uninstall the proprietary drivers using sudo apt-get purge bcmwl-kernel-source

  4. Install ap-hotspot. Remember, there are some issues in 14.04, and rolling back must be done as shown in the page. Else, use hostapd as described here

  5. Run sudo ap-hotspot start. Your android phone should work with this conection.

  6. Open source wins again