Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MainUI] - Feature Request : a flag to trigger hotspot icon in top bar #4

Open
Aemiii91 opened this issue Jun 2, 2023 · 1 comment

Comments

@Aemiii91
Copy link
Member

Aemiii91 commented Jun 2, 2023

As the hotspot feature was not in MainUI Miyoo354 we have re-created it. But we have some difficulties with the hotspot MainUI top bar icon.

A flag to trigger hotspot icon in top bar (will overwrite WiFi icon even if wpa_supp is running)

@XK9274
Copy link
Member

XK9274 commented Jun 2, 2023

The feature request:

It would be useful for us to have some sort of flag we can set in a config file that would allow us to manually force the WIFI icon OFF and the hotspot icon ON. This is due to how we're having to run the hotspot.

If we could set hotspot: 1 in system.json and ask MainUI to respect this flag when it's set to 1, then show the hotspot icon regardless of whether the hotspot is running or not. This would give us manual control over the icons (in our hotspot launch function we could just set hotspot to 1 and we're done, no need to kill anything apart from putting wlan0 down to stop the wifi connection)

The reasoning behind it:

The problem arises from how we're having to run the hotspot, if we kill wpa_supplicant and run hostapd on wlan1 or 0 then the hotspot works fine and the icon shows but this has the side effect of MainUI noticing wpa_supplicant is not running, causing it to be relaunched, killing the hotspot and restarting wifi. The compromise is to run the hotspot on wlan1 but leave the wpa_supplicant running, putting wlan0 down.

Testing

From my experiments it seems MainUI will show:

The Wi-Fi icon if:

  • wlan0/1 is up (whichever wpa_supplicant is bound against)
  • wpa_supplicant is running against the wlan
  • iw shows wlan0 in managed mode
  • hostapd can be running or not, MainUi seems to prioritise the wifi icon.

The hotspot icon if:

  • wlan0/1 is up (whichever the hotspot is bound against)
  • wpa_supplicant is not running
  • hostapd is running
  • iw shows wlan0 in __ap mode

No icon (but hotspot working) if :

  • wlan0 is down, wlan1 is up
  • wpa_supplicant is running (to stop main relaunching wifi)
  • hostapd is runnning
  • iw shows wlan0 in __ap mode

@Aemiii91 Aemiii91 transferred this issue from OnionUI/Onion Jul 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

2 participants