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

Added interfaces to wifi #584

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

zanaviska
Copy link

issue

Currently, if there are several wireless interfaces, there is no way to figure it out, which connection is being used(see picture below. There is no way to determine difference between 1 and 2 or 3 and 4 or 5 and 6).
In addition to that, when trying to connect to some ssid, it will ALWAYS use the first wireless interface and so, there is no way to use the second one. So there is no actual way to connect to 2, only to 1
image

fix

Fix contains several changes:

  1. when connecting to wifi, it compares both ssid and iface of the connected wifi
  2. it displays iface for ssid that is available on several interfaces
  3. same rule applies to already connected wifi(see last image)
    image
    image

@mmstick mmstick requested a review from a team August 13, 2024 16:33
@mmstick
Copy link
Member

mmstick commented Aug 13, 2024

This'll require design input

@zanaviska
Copy link
Author

Has there been any progress on the design input since the last message?

@maria-komarova
Copy link

maria-komarova commented Aug 23, 2024

Sorry for the delay, but we have just discussed adjusting designs for multiple adapters for wireless and wired connections last week. The applet designs are described in #623
Here is the screenshot of the wireless adapters. I used the same IDs you had so that it is easier to see the suggestions:
image
The idea is to group the connections by the adapter and then display them inside the side popup menu instead of in one giant list.

@zanaviska zanaviska marked this pull request as draft August 25, 2024 18:12
@Dygear
Copy link

Dygear commented Sep 5, 2024

Sorry for the delay, but we have just discussed adjusting designs for multiple adapters for wireless and wired connections last week. The applet designs are described in #623 Here is the screenshot of the wireless adapters. I used the same IDs you had so that it is easier to see the suggestions: [snip] The idea is to group the connections by the adapter and then display them inside the side popup menu instead of in one giant list.

That looks good. My critique is that the top level should probably have the IP address instead of just the connected label. Might as well show that information up front. No need to go digging into the menu (even if it is just one layer deeper.) Looks like that detail was included in the #623 figma for the single adapter instance.

Maybe a friendly device name option for the interface, so instead of wlo1, wlx503eaa3bbf11, and adaptor3 if it's easily possible to pluck the manufacture's name then the last 3 octets of the MAC address. For Intel it would be Intel DE:AD:BE. And RealTek EF:13:37. As the first three octets of the MAC address are manufacture prefixes anyway, so omitting them won't matter much and it allows you to localize down to what adapter you want to use much more easily.

@zanaviska
Copy link
Author

zanaviska commented Sep 16, 2024

@maria-komarova I have some questions about how should it work from User perspective(all names is based on your example):

  1. In case when wlo1 and wlx503... have known networks, but adapter3 has no known network, we will still display adapters together as on your screen? Or should we rather add somehow a separator between them?
  2. If I am connected to adapter3, should I write ip address of a connection?
  3. If we are viewing wifi networks related to some adapter, how should we mark "connected" wifi? "known" wifi? Should we draw them in separate block? Should we write ip address of a connected network? Or how should it look?

@zanaviska
Copy link
Author

zanaviska commented Oct 24, 2024 via email

@maria-komarova
Copy link

Looks good from the design perspective so far, just buggy.

@zanaviska zanaviska force-pushed the Added-interfaces-to-wifi branch from 69bc740 to 0a1da71 Compare November 8, 2024 10:30
@zanaviska zanaviska force-pushed the Added-interfaces-to-wifi branch from 0a1da71 to 7287683 Compare December 4, 2024 20:35
@zanaviska zanaviska force-pushed the Added-interfaces-to-wifi branch from 7287683 to 920cdbf Compare December 4, 2024 20:38
@zanaviska
Copy link
Author

2024-12-06.21-56-16.mp4

The UI part is ready. However on lower level there are 3 bugs left: one causes a crash that can be observed at the end of a video and other occur when interaction with one device affects other one

Regarding displaying non-raw MAC addresses but rather manufacturer names. It could be done, but I need confirmation where should I get the list of manufacturer and mac-prefixes from. I found some list on cisco website, on some random github gist or this gist. However I am unsure if any of these sources have licenses or/and could be use as a part of Cosmic DE.
Another thing to mention about such proposal is naming. All mentioned lists could offer lengthy names for vendors. For example in my case name would look like this.
image
image

@zanaviska
Copy link
Author

I'd like to bring this PR back for a review. Overall it is ready. There are 3 TODOs left, but I don't thing I know your codebase good enough to handle them as well as they have little to no impact on the user. Some technical info about them:

  1. in app.rs // TODO: remove excesive column!
    In this place I have added excessive column! because toggle(in our case wifi toggle) directly after separator could create a panic! which terminates the program. So this is workaround over some bug in toggle-widget(most likely). I have spent several days researching the bug, but this is best I could find out. If you want more details I could give them to you(or even give steps how to reproduce it on your machine)
  2. in mod.rs I have added 2 todos
    I do not know how to get MAC address for cosmic_dbus_networkmanager::settings::connection::Connection. It could affect user only in cases when user either try to connect to wifi with ssid same as ssid that other wifi card is connected to or if forgetting connection on one wifi device could forget it for another also(yet this is consistent with "learning" WiFis)

@zanaviska zanaviska marked this pull request as ready for review December 7, 2024 22:36
@zanaviska
Copy link
Author

@mmstick Hello. I am done on my side. It is ready for a review. I do not know how your workflow work, but I would like to know about any status update regarding this PR.

And the question about MAC addresses asked here still exist

@wash2
Copy link
Contributor

wash2 commented Dec 23, 2024

@zanaviska Unfortunately, I don't believe there is a great way of getting the mac address from the dbus interface. You can get the mac address for a given device at /sys/class/net/{device interface}/address. Otherwise, this looks good to me after it passes the formatting check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants