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

wpa_supplicant icd2 plugin #73

Closed
MerlijnWajer opened this issue Feb 17, 2018 · 19 comments
Closed

wpa_supplicant icd2 plugin #73

MerlijnWajer opened this issue Feb 17, 2018 · 19 comments
Assignees

Comments

@MerlijnWajer
Copy link
Member

Seeing that we're probably going to switch to icd2 soon, we have to look at wpa_supplicant plugin.

There's this thread: http://maemo.org/community/maemo-developers/libicd-network-wpa/?org_openpsa_qbpager_net_nemein_discussion_posts_page=1

I downloaded the repo from http://web.archive.org/web/20090310161342/http://svn.javispedro.com:80/libicd-network-wpa/trunk/

Everything is there, except for gconf/network-type.xml

There are also 5 revisions missing (there is a revision 16 somewhere on archive.org, but that's also not a complete snapshot and more useless).

Does anyone else have a more recent version? Or shall we just take inspiration from this repo and start hacking a new one?

@MerlijnWajer
Copy link
Member Author

Maybe the guy is still around, and we can just ask him.

@sicelo
Copy link
Collaborator

sicelo commented Feb 17, 2018

Yes, he is around (at least on Twitter - same username)

@MerlijnWajer
Copy link
Member Author

Want to direct him to our webpage/maemo-thread and/or IRC? :)

@sicelo
Copy link
Collaborator

sicelo commented Feb 17, 2018

Let me see if I can :)

@MerlijnWajer
Copy link
Member Author

@javispedro
Copy link

Yes, I mirrored everything to the Garage git repository.

However, take into an account I didn't have much idea how ICD worked at the time, nor there is any GUI for configuring it or anything.

@MerlijnWajer
Copy link
Member Author

@javispedro I see - thanks. Do you have any interest in perhaps working on this? We have open source icd2 and also connui.

@javispedro
Copy link

Sadly no -- too busy.

@MerlijnWajer MerlijnWajer self-assigned this Mar 5, 2018
@MerlijnWajer
Copy link
Member Author

I will see if I can have a basic thing working on wednesday.

@MerlijnWajer
Copy link
Member Author

Maybe take this https://github.com/community-ssu/libicd-network-wlan and convert it to wpa_supplicant.

@MerlijnWajer
Copy link
Member Author

Very much wip, doesn't do anything yet, but compiles, when I verify it does the right things icd2-api wise, I will add in my wpa_supplicant code. https://github.com/maemo-leste/libicd-network-wpasupplicant

@MerlijnWajer
Copy link
Member Author

OK, I got it to respond to scans. For my own reference, there are python dbus examples here: https://w1.fi/cgit/hostap/tree/wpa_supplicant/examples

@parazyd - could you reflect on what would be the best way to start wpasupplicant with dbus enabled? It cannot be set from config, and I currently just edited the devuan networking scripts. We need a better solution.

@MerlijnWajer
Copy link
Member Author

Oh, and there is the API doc: https://w1.fi/wpa_supplicant/devel/dbus.html

@MerlijnWajer
Copy link
Member Author

Made some progress by flensing libicd-network-wlan and adding basic wpa supplicant support. This is just a synthetic test:

N900 supplicant

Some notes to self:

@MerlijnWajer
Copy link
Member Author

22:48 < Wizzup> do you perhaps have a list/clue for wlancond properties
22:48 < Wizzup> or 'capabilities'
22:48 < Wizzup> the wlan plugin just has a few defines that pali added that come out of nowhere
22:49 < freemangordon> would that help https://github.com/maemo-leste/connui-wlan/blob/master/wizard/wlan.c#L20
22:49 < freemangordon> I've copied those from wlan plugin
22:51 < freemangordon> Wizzup: this https://github.com/maemo-leste/connui-internet/blob/master/src/settings/easy-wlan.c#L434 should help as well imo
22:51 < Wizzup> ok
22:51 < Wizzup> I am trying to figure out what properties I need to set (and where exactly) to have the settings wizard recognise it as EAP
22:52 < Wizzup> I think now the header that you linked me last time with the huge ascii table comes into play
22:52 < Wizzup> but maybe this is yet again different from the int values in gconf
22:52 < freemangordon> see https://github.com/maemo-leste/connui-internet/blob/master/src/settings/easy-wlan.c#L587 as well
22:52 < Wizzup> I am unhappy with keeping all this wlancond mess
22:52 < Wizzup> but I don't see a better way for now
22:52 < freemangordon> :nod:
22:53 < Wizzup> WLAN_CAP_SECURITY_WPA_EAP aha
22:53 < Wizzup> this is mentioned neither in the wlan plugin nor in icd2
22:53 < Wizzup> I suspect that this is part of higher bits of nwattrs
22:54 < Wizzup> and only the settings wizard and easy-wlan deal with it
22:54 < Wizzup> so this is part of connui header
22:55 < freemangordon> maybe we should make https://github.com/maemo-leste/connui-common/blob/master/include/iap-network.h#L13 64 bit or add
                       another var in that structure
22:55 < freemangordon> and use (if 64 bits) high 32 for whatever needed
22:56 < Wizzup> well, I am not sure if we have to
22:56 < Wizzup> I do not need more space for now
22:56 < Wizzup> so I think we can do it later
22:56 < freemangordon> ok
22:57 < freemangordon> Wizzup: in the meanwhile if you manage to find where those
                       https://github.com/maemo-leste/connui-internet/blob/master/src/settings/easy-wlan.c#L613 values come from, it would be great
22:58 < freemangordon> so we would be able to use defines instead of the values I hardcoded
22:58 < Wizzup> ok
22:59 < Juesto> a ide would be excellent to figure that out easily
23:01 < Wizzup> freemangordon: I think I know
23:01 < freemangordon> hmm?
23:01 < Wizzup> sec
23:02 < Wizzup> hm, maybe nvm
23:02 < Wizzup> I thought it was from connui/wlan-common.h with some extra shifts
23:04 < Wizzup> from here https://github.com/maemo-leste/connui-common/blob/master/include/wlan-common.h#L11
23:05 < freemangordon> could be
23:05 < freemangordon> maybe I should feed eapd in ida, it might give some clue
23:06 < Wizzup> I would not do that
23:06 < Wizzup> I got this
23:08 < Wizzup> I don't understand why they had to do all this bitshifting
23:08 < Wizzup> it's not like this is where they will really save on memory
23:10 -!- Juest- [~AndC@rev190-105-167-003.pccp.net.ar] has joined #maemo-leste
23:10 -!- Juest- [~AndC@rev190-105-167-003.pccp.net.ar] has quit [Changing host]
23:10 -!- Juest- [~AndC@unaffiliated/juest] has joined #maemo-leste
23:10 -!- Juest- is now known as Juest
23:13 -!- Juesto [~AndC@unaffiliated/juest] has quit [Ping timeout: 256 seconds]
23:14 < Wizzup> freemangordon: I think these two together are key https://github.com/maemo-leste/connui-common/blob/master/include/wlan-common.h
                https://github.com/maemo-leste/connui-common/blob/master/include/libicd-network-wlan-dev.h for
                https://github.com/maemo-leste/connui-internet/blob/master/src/settings/easy-wlan.c#L434
23:15 < Wizzup> this is confusing:
23:15 < Wizzup> return ~((unsigned int)~(iap_security << 12) >> 12);
23:17 < Wizzup> freemangordon: I think that values from https://github.com/maemo-leste/connui-wlan/blob/master/wizard/wlan.c#L20 can be placed here
                for example https://github.com/maemo-leste/connui-internet/blob/master/src/settings/easy-wlan.c#L485
23:17 < Wizzup> and here https://github.com/maemo-leste/connui-internet/blob/master/src/settings/easy-wlan.c#L515
23:17 < Wizzup> freemangordon: let's pick this up after vkbd
23:18 < Wizzup> I can let WPA_EAP rest for a bit anyway
23:18 < Wizzup> mind if I paste this in the wlan issue?
23:18 < freemangordon> no, why should I
23:19 < Wizzup> just think it's nice to ask
23:19 < Wizzup> :)
23:19 < freemangordon> :)

@MerlijnWajer
Copy link
Member Author

btw, wlan-ng has working open, WEP (I think) and WPA-PSK networking with wpa_supplicant.

It doesn't work nicely with the easy-wlan wizard yet, but when configured from settings->internet connectivity, it works fine.

@MerlijnWajer
Copy link
Member Author

MerlijnWajer commented May 20, 2018

There is now libicd-network-wpasupplicant in the repos. It's less than alpha quality, but if you know how to use it, it works stable. It's pre-alpha quality, but if you know how to use it, it works quite well. I will be working on making it stable quality - main things right now are missing eap support and the fact that you should not use the status area applet to connect to a new, unknown network. Just do it from settings->internet connectivity.

@MerlijnWajer
Copy link
Member Author

There are definitely things to improve here still, but I'm going to close this ticket, since I think the state of this plugin is good enough for the alpha.

@MerlijnWajer
Copy link
Member Author

Oh, and just for the record, easy-wlan (adding/connecting directly from scan results) should not also work.

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

No branches or pull requests

3 participants