firecat53 / networkmanager-dmenu

Control NetworkManager via dmenu
MIT License
781 stars 74 forks source link

Hotspot. #108

Open niksingh710 opened 1 year ago

niksingh710 commented 1 year ago

Hotspot get's listed in saved connections when created by nmcli dev wifi hotspot ifname wlp4s0 ssid test password "test1234"

Disconnecting from this is not one way have to disable wifi and enable it.

and a show qr option will be great no matter which wifi conn we are connected. nmcli dev wifi show-password

better to give user a possibility to add entries manually to perform some action?

firecat53 commented 1 year ago

I want to make sure I understand your requests:

  1. Add hotspot connections to the menu so they can be turned on and off using networkmanager-dmenu.
  2. Add an option to open a terminal to view the QR code for any wifi network.

Is that correct?

firecat53 commented 1 year ago

@niksingh710 - checking on this issue. I'll need some input on my previous questions before I can work on this. Thanks!

niksingh710 commented 1 year ago

I want to make sure I understand your requests:

  1. Add hotspot connections to the menu so they can be turned on and off using networkmanager-dmenu.
  2. Add an option to open a terminal to view the QR code for any wifi network.

Is that correct?

Yes, These 2 points are what m exactly talking about.

Sry for late response.

niksingh710 commented 2 months ago

For the time i am using linux-wifi-hotspot it uses create_ap in to create hotspot. Is it possible to list that entry?

firecat53 commented 1 month ago

@niksingh710 networkmanager_dmenu already will prompt you for which adapter to manage if you have ap0 defined using linux-wifi-hotspot. I was able to disable and enable ap0 using nmdm. Is this what you were looking for?

niksingh710 commented 1 month ago

@firecat53 i am unable to disable ap0

i get image and then these in ap0 entries of ap0 is as same as the wlp one image

What i want if i create hotspot using create_ap it get's listed in networkmanager_dmenu in my trial of implementation i realized that this goes out of scope with the project as the project cores to Network manager.

ig this idea should be ignored.

if you think so you can close this issue.

firecat53 commented 1 month ago

If you click 'Disable Wifi' after selecting ap0 it will disable ap0. I know that's not a very intuitive interface, but it does work.

When I add networkmanager hotspot support I will consider if the ap0 interface from linux-wifi-hotspot can also be included.

niksingh710 commented 1 month ago

For me, this doesn't work. Have started hotspot from linux-wifi-hotspot and after selecting ap0 and disabling Wi-Fi, nothing happens to it.

firecat53 commented 1 month ago

It looks like when I select Disable Wifi it's actually enabling the rfkill soft block which disables any wireless interfaces.

sudo create_ap --freq-band 2.4  wlp0s20f3 wlp0s20f3 testing password
[sudo] password for firecat53:
Config dir: /tmp/create_ap.wlp0s20f3.conf.gDK7cA0n
PID: 2999953
Network Manager found, set ap0 as unmanaged device... DONE
Custom frequency band set with 2.4Ghz with channel 1
Creating a virtual WiFi interface... ap0 created.
Sharing Internet using method: nat
hostapd command-line interface: hostapd_cli -p /tmp/create_ap.wlp0s20f3.conf.gDK7cA0n/hostapd_ctrl
WARN: Low entropy detected. We recommend you to install `haveged'
ap0: interface state UNINITIALIZED->ENABLED
ap0: AP-ENABLED
ap0: INTERFACE-DISABLED --> This is where I select `Disable Wifi`
rfkill: WLAN soft blocked
rfkill: WLAN unblocked --> This is where I select `Enable Wifi`
ap0: INTERFACE-ENABLED
firecat53 commented 1 month ago

Please try out the hotspot branch and see if it works for you. I added a list of hotspots and the ability to toggle a hotspot on and off. Thanks!