3

I have two computers running Ubuntu 14.04 (ok, one is actually Mint 17.1, but that's based on Ubuntu 14.04), and I am looking to use one as a wi-fi hotspot for the other. Both computers have identical USB Wi-fi dongles supporting dual-band (2.4/5 GHz) 802.11a/b/g/n modes. Although I have managed to set up a hotspot, it seems limited to 54 Mbps in either g or a mode, even though the dongles are capable of 300 Mbps in n mode. It is important to me to unlock the full speed of the devices.

What I have tried:

On Computer 1 (which creates a hotspot):

Open NetworkConnections, click Add, select Wi-Fi, click Create. Then fill in the SSID, set Mode to Ad-hoc, leave Band on Automatic (although I have also tried limiting to "A (5 GHz)" or "B/G (2.4 GHz)", chosse Device MAC address. In Wi-Fi Security tab, I select "WPA & WPA2 Personal", and enter a password. in "IPv4 Settings" tab, I select Method "Shared to other computers". Click Save, and connect to it.

On Computer 2 (joins the hotspot):

I cannot use a GUI so I set it up with nmcli.

# nmcli dev wifi connect SSID password <password>

and I'm off to the races!

... except I lose the race because nmcli dev wifi reports the rate as 54 Mb/s, and scp on a large file reports ~3.3 MB/s, which corresponds to 54 Mb/s at half-duplex.


I have also tried setting up the hotspot with ap-hotspot after disabling NetworkManager on Computer 1, and I have also tried using wicd instead of Network Manager on Computer 2, but no combination seems to give me N mode/speed greater than 54 Mbps.


Some debug output

Computer 1

user@computer1:$ iwconfig wlan1
wlan1     IEEE 802.11abgn  ESSID:"MY_SSID"  
          Mode:Ad-Hoc  Frequency:2.412 GHz  Cell: AE:68:F9:9C:EA:00   
          Tx-Power=20 dBm   
          Retry  long limit:7   RTS thr:off   Fragment thr:off
          Power Management:on
user@computer1:$ nm-tool

NetworkManager Tool

State: connected (global)

- Device: wlan1  [MY_SSID-hotspot] --------------------------------------------
  Type:              802.11 WiFi
  Driver:            rt2800usb
  State:             connected
  Default:           no
  HW Address:        7C:DD:90:79:F2:89

  Capabilities:

  Wireless Properties
    WEP Encryption:  yes
    WPA Encryption:  yes
    WPA2 Encryption: yes

  Wireless Access Points (* = current AP)
    *MY_SSID:       Ad-Hoc, AE:68:F9:9C:EA:00, Freq 2412 MHz, Rate 54 Mb/s, Strength 100 WPA2
    <snip other networks, all reporting Rate 54 Mb/s>

  IPv4 Settings:
    Address:         10.42.0.1
    Prefix:          24 (255.255.255.0)
    Gateway:         0.0.0.0

Computer 2

user@computer2:$ iwconfig wlan1
wlan1     IEEE 802.11abgn  ESSID:"MY_SSID"  
          Mode:Ad-Hoc  Frequency:2.412 GHz  Cell: AE:68:F9:9C:EA:00   
          Tx-Power=20 dBm   
          Retry  long limit:7   RTS thr:off   Fragment thr:off
          Power Management:off
user@computer2:$ nm-tool

NetworkManager Tool

State: connected (global)

- Device: wlan1  [MY_SSID] ----------------------------------------------------
  Type:              802.11 WiFi
  Driver:            rt2800usb
  State:             connected
  Default:           yes
  HW Address:        7C:DD:90:6C:2B:23

  Capabilities:

  Wireless Properties
    WEP Encryption:  yes
    WPA Encryption:  yes
    WPA2 Encryption: yes

  Wireless Access Points (* = current AP)
    *MY_SSID:       Ad-Hoc, AE:68:F9:9C:EA:00, Freq 2412 MHz, Rate 54 Mb/s, Strength 100 WPA2

  IPv4 Settings:
    Address:         10.42.0.88
    Prefix:          24 (255.255.255.0)
    Gateway:         10.42.0.1

    DNS:             10.42.0.1
5
  • Have you tried limiting the hotspot to N only and giving it a fixed channel?
    – Fabby
    Feb 11, 2015 at 6:10
  • @Fabby I haven't seen any way to select N mode. Also, N only gets a performance boost over G or A when using multiple channels, and my understand is that it somehow auto-selects the least congested ones, so I don't think I would have anything to gain by limiting the channel selection. Feb 11, 2015 at 6:29
  • What is the output of iwconfig and nm-tool (Use paste.ubuntu.com to paste info and provide link back into comments)
    – Fabby
    Feb 11, 2015 at 6:44
  • @Fabby See edit. Feb 13, 2015 at 18:09
  • Weird. What encryption are you using? AES?
    – Fabby
    Feb 14, 2015 at 18:49

2 Answers 2

4

To have 802.11n mode, in your /etc/hostapd.conf you need the directives:

hw_mode=g
ieee80211n=1
ht_capab=[SHORT-GI-40][HT40+][HT40-][DSSS_CCK-40]

So basically, you need support for g mode, with 802.11n extensions, and the ht_capab directive is for enabling support for 40MHz. If your chipset does not support 40MHz bandwidth, comment it out.

Beware that for 40MHz bandwidth, you would better look out which channel you are using. I would suggest using a program to listen to and analyse the use of the wifi spectrum in the neighbourhood.

You can also run a command line to scan the networks being used:

sudo iwlist wlan0 scan

You can also try to put in /etc/hostapd.conf

wme_enabled=1

If it is supported, it will be faster, however some chipsets have stability problems with this last directive.

From https://en.wikipedia.org/wiki/Wireless_Multimedia_Extensions

"Wireless Multimedia Extensions (WME), also known as Wi-Fi Multimedia (WMM), is a Wi-Fi Alliance interoperability certification, based on the IEEE 802.11e standard. It provides basic Quality of service (QoS) features to IEEE 802.11 networks. WMM prioritizes traffic according to four Access Categories (AC) - voice, video, best effort, and background."

4
  • Thanks, I'll give this a try when I get a chance, maybe next week. Regarding WME, how does the driver/wifi chip know what kind of data is going through? Is there a way for me to indicate the type of data? Nov 26, 2015 at 6:56
  • It seems to work automagically. The fact is that listening to wifi (and/or tcpdump, cant remember at the moment), you see new data (the QoS) there. Even in single use it turns the browsing experience faster, as it avoids using up all the bandwidth of the medium. Nov 26, 2015 at 7:56
  • I don't think you can pair up both [HT40+] and also [HT40-] like that. The documentation here w1.fi/cgit/hostap/plain/hostapd/hostapd.conf seems to suggest you would use one or the other. Aug 24, 2017 at 18:16
  • @GilesBathgate I am using that setup in an old hostapd server that is not running anymore. Aug 24, 2017 at 18:20
0

ap-hotspot works for me in 14.04. Hostapd and ap-hotspot don't mix well on 14.04 so you need to downgrade hostapd.

64 bit:

sudo apt-get purge hostapd
cd /tmp
wget http://archive.ubuntu.com/ubuntu/pool/universe/w/wpa/hostapd_1.0-3ubuntu2.1_amd64.deb
sudo dpkg -i hostapd*.deb
sudo apt-mark hold hostapd

32 bit:

sudo apt-get purge hostapd
cd /tmp
wget http://archive.ubuntu.com/ubuntu/pool/universe/w/wpa/hostapd_1.0-3ubuntu2.1_i386.deb
sudo dpkg -i hostapd*.deb
sudo apt-mark hold hostapd

From http://www.webupd8.org/2013/06/how-to-set-up-wireless-hotspot-access.html

2
  • I already tried ap-hotspot, and the hotspot worked, but it was limited to G (54 Mbps) mode. How do I use N mode? Feb 13, 2015 at 17:57
  • Sorry didn't read that part, I don't know how to use n mode
    – texasflood
    Feb 13, 2015 at 18:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .