Skip to content

Disabling AP feature #5

@jvaubourg

Description

@jvaubourg

Currently, Hotspot configures hostapd in this way:

  • the wifi device (e.g. wlan0) is used for broadcasting the first AP ("Hotspot 1" on the web admin)
  • new interfaces (hotspot1, hotspot2, hotspot3, ...) are created for broadcasting the following AP ("Hotspot 2", "Hotspot 3", "Hotspot 4", ...)

The dependent apps (e.g. VPN Client, Tor Client, ...) use the "multissid" setting from Hotspot for knowing the AP to display in their own web admin. They consider that the first AP corresponds to the "wifi_device" interface and the other ones to "hotspot+id" interfaces. When the user chose an AP in the web admin, the apps save the corresponding id (0, 1, 2, ...).

So, disabling an AP in the Hotspot web admin means to not change the id of the other APs. E.g. the third AP must still correspond to the interface "hotspot2" for avoiding breaking the setup of the dependent apps. In other words, e.g. disabling the second AP simply means tell hostapd to not create the interface "hotspot1". This should be easy to implement.

But, Hostapd requires to set an AP directly on the wifi device. So, disabling the first AP is problematic.

In conclusion, we need to find a workaround for harmonizing the name of all the interfaces and not directly using the wifi device for the first AP. The wifi device set in Hostapd should be "hotspot0" instead of e.g. "wlan0". If the first AP is disabled, the wifi device must be "hotspot1" and so on. The workaround implies to find a way to have a fake wifi interface, aliasing the native wifi device.

Renaming the wifi device with "ip link set name" is not an appropriate solution because the user has the possibility to switch from a wifi device to another in the Hotspot web admin. Using "ip link set alias" also seems to be an inadequate solution. A solution could be to use a bridge to obtain a kind of mirroring interface, without affecting the native device.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions