Ask Your Question
1

How to create and configure a hotspot in Fedora 20

asked 2014-01-30 19:16:26 -0500

fcoelho gravatar image

updated 2014-02-02 22:54:30 -0500

Hi, I'm using Fedora 20 and I'm having trouble properly setting up a WiFi hotspot. By "properly", I mean I want to be able to change the hotspot configuration.

My card does support AP mode (checked with iw list) and although the default-created hotspot works, I can't:

  • Change its SSID;
  • Change the password; and most importantly
  • Change the security protocol, which defaults to WEP.

When I click the "Use as hotspot" button, the connection is automatically set up for me, and there is no other option besides the on/off switch. No button, no right-click menus, nothing.

How can I configure this AP in Fedora 20?

UPDATE (Feb 3): journalctl logs

I've followed @FranciscoD_ suggestion to use nm-connection-editor and created my hotspot network from there. When I tried to use the "Connect to hidden network" button of NM though, it couldn't connect to it. nmcli showed the same behaviour. Here are the logs from journalctl from the moment I tried to connect to the network until it failed:

Fev 03 02:36:28 Quinto NetworkManager[730]: <info> Activation (wlp18s0) starting connection 'MeuSuperHotspot'
Fev 03 02:36:28 Quinto NetworkManager[730]: <info> (wlp18s0): device state change: disconnected -> prepare (reason 'none') [30 40 0]
Fev 03 02:36:28 Quinto NetworkManager[730]: <info> NetworkManager state is now CONNECTING
Fev 03 02:36:28 Quinto NetworkManager[730]: <info> Activation (wlp18s0) Stage 1 of 5 (Device Prepare) scheduled...
Fev 03 02:36:28 Quinto NetworkManager[730]: <info> Activation (wlp18s0) Stage 1 of 5 (Device Prepare) started...
Fev 03 02:36:28 Quinto NetworkManager[730]: <info> Activation (wlp18s0) Stage 2 of 5 (Device Configure) scheduled...
Fev 03 02:36:28 Quinto NetworkManager[730]: <info> Activation (wlp18s0) Stage 1 of 5 (Device Prepare) complete.
Fev 03 02:36:28 Quinto NetworkManager[730]: <info> Activation (wlp18s0) Stage 2 of 5 (Device Configure) starting...
Fev 03 02:36:28 Quinto NetworkManager[730]: <info> (wlp18s0): device state change: prepare -> config (reason 'none') [40 50 0]
Fev 03 02:36:28 Quinto NetworkManager[730]: <info> Activation (wlp18s0/wireless): access point 'MeuSuperHotspot' has security, but secrets are required.
Fev 03 02:36:28 Quinto NetworkManager[730]: <info> (wlp18s0): device state change: config -> need-auth (reason 'none') [50 60 0]
Fev 03 02:36:28 Quinto NetworkManager[730]: <info> Activation (wlp18s0) Stage 2 of 5 (Device Configure) complete.
Fev 03 02:36:28 Quinto NetworkManager[730]: <info> Activation (wlp18s0) Stage 1 of 5 (Device Prepare) scheduled...
Fev 03 02:36:28 Quinto NetworkManager[730]: <info> Activation (wlp18s0) Stage 1 of 5 (Device Prepare) started...
Fev 03 02:36:28 Quinto NetworkManager[730]: <info> (wlp18s0): device state change: need-auth -> prepare (reason 'none') [60 40 0]
Fev 03 02:36:28 Quinto NetworkManager[730]: <info> Activation (wlp18s0) Stage 2 of 5 (Device Configure) scheduled...
Fev 03 02:36:28 Quinto NetworkManager[730]: <info> Activation (wlp18s0) Stage 1 of 5 (Device Prepare) complete.
Fev 03 02:36:28 Quinto NetworkManager[730]: <info> Activation (wlp18s0) Stage 2 of 5 (Device Configure) starting ...
(more)
edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
1

answered 2014-07-09 09:19:47 -0500

con flatulence gravatar image

Hello, I recently ran into this as well. What I've found is when the hotspot is created the first time, it creates the file /etc/NetworkManager/system-connections/Hotspot, it's just a text file (NetworkManager calls it a keyfile, high level doc, key description doc).

nm-connection-editor modifies /etc/NetworkManager/system-connections/Hotspot but puts the wrong value for mode in the wifi section, mode should be ap. I've put the content of my working Hotspot keyfile below.

[connection]
id=Hotspot
uuid=8dac3c14-9fa6-4303-ba2e-db187e44b79f
type=wifi
autoconnect=false
timestamp=1404911645

[wifi]
ssid=YouWantInternet
mode=ap
mac-address=64:70:02:25:E9:0C
security=802-11-wireless-security
hidden=true

[wifi-security]
key-mgmt=wpa-psk
psk=GimmeInternet

[ipv4]
method=shared

[ipv6]
method=auto

A second problem is that NetworkManager doesn't appear to pick up the changes to the Hotspot keyfile unless it's restarted.

I don't understand the conditions that cause NetworkManager to create a new Hotspot file. Sometimes clicking the "Use as Hotspot" button gets the modified Hotspot file and sometimes a new Hotspot file is created with default settings. It seems more reliable to use nmcli. So in a terminal:

# change the settings how you like
sudo vim /etc/NetworkManager/system-connections/Hotspot
#restart NetworkManager
sudo systemctl restart NetworkManager
# bring up the AP
nmcli con up Hotspot ifname wlp0s29u1u1
edit flag offensive delete link more

Comments

At one point, NetworkManager did dynamically apply changes to these config files, but it meant that if you saved the file before having a complete, working configuration the connection would break. There might still be a setting to turn that back on, but it's probably best to just restart NetworkManager to reload configuration files - like every other service does.

randomuser gravatar imagerandomuser ( 2014-07-09 10:47:58 -0500 )edit

Cheers randomuser. I noticed today nmcli has a command to reload the connection files "nmcli con reload" so that can avoid nm restart.

con flatulence gravatar imagecon flatulence ( 2014-07-10 08:09:01 -0500 )edit

I get an error: Error: Connection 'Hotspot' does not exist. if I try to run the command nmcli con up Hotspot ifname wlp0s29u1u1. What is wrong?

BuZZ-dEE gravatar imageBuZZ-dEE ( 2015-10-08 07:04:55 -0500 )edit

I have deleted all Hotspot files in the connection folder and created a new one with hotspot creation in the network manager gui. Then I edited the Hotspot file to my needs. Then I get the error: Fehler: Aktivierung der Verbindung ist gescheitert: Connection 'Hotspot' is not available on the device wlp0s29u1u1 at this time..

BuZZ-dEE gravatar imageBuZZ-dEE ( 2015-10-08 07:29:45 -0500 )edit
0

answered 2014-07-25 23:57:00 -0500

If you want to use WPA encryption with your hotspot, you should follow this way:

https://bugzilla.redhat.com/show_bug.cgi?id=985041#c8

Anyway, use Use As Hotspot (with WEP encryption) works fine with wifi settings but I don't want to use this ;-).

edit flag offensive delete link more
0

answered 2014-01-30 20:02:28 -0500

FranciscoD_ gravatar image

The wireless settings dialog is still not completely finished. At the moment, you cannot customize your hotspot from here. If you want to customize it, you'll have to use nm-connection-editor.

I'm not sure if all the features of nm-connection-editor will be incorporated into the wireless dialogue in the future. They may keep nm-connection-editor a separate, advanced tool for power users.

edit flag offensive delete link more

Comments

1

Thanks, I've used nm-connection-editor and changed the configuration of the "Hotspot" connection, but it didn't work as expected:

Clicking the "Use as access point" button in the network config dialog again creates a new "Hotspot" connection, but with WEP again.

I've tried to use nmcli connection up <uuid> but then an error message saying "connection activation failed" appeared (the message might not be exactly this in English)

Do you know how I can debug this?

fcoelho gravatar imagefcoelho ( 2014-01-30 22:21:57 -0500 )edit

Instead of clicking "Use as hotspot", which creates a new configuration each time, use "Connect to hidden network" and select "Hotspot" from there. That should work.

FranciscoD_ gravatar imageFranciscoD_ ( 2014-01-31 01:05:38 -0500 )edit

@FranciscoD_ tried to use that, but unfortunately NM tries to connect for a few seconds and nothing else happens. Also tried nmcli again with the same results. I've posted my journalctl logs to the original question, so far I couldn't find a way to make it work

fcoelho gravatar imagefcoelho ( 2014-02-02 22:57:18 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2014-01-30 19:16:26 -0500

Seen: 23,529 times

Last updated: Jul 25 '14