OpenIntelWireless / HeliPort

Intel Wi-Fi Client for itlwm
https://OpenIntelWireless.github.io/HeliPort
BSD 3-Clause "New" or "Revised" License
1.12k stars 122 forks source link

[Bug] Problem with WIFI auto connect and keychain access. #88

Closed naveenkrdy closed 4 years ago

naveenkrdy commented 4 years ago

Heliport doesn't automatically connect to last remembered/connected network and needs to be done manually on every boot. And also i think there is a bug with the keychain implementation as it sometimes ask keychain access password even before it asks wifi network password. And whenever it does ask keychain access password before wifi access password ,i cant type anything in the keychain access password box and thus i have to click deny to make it disappear and only after that the wifi network password box pops up.

AX200 10.15.6

Regards !

williambj1 commented 4 years ago

CC @Goshin @igorkulman

ErrorErrorError commented 4 years ago

it sometimes ask keychain access password even before it asks wifi network password

That's how it is supposed to work, well according to Catalina permissions regarding to accessing Keychain info.

And whenever it does ask keychain access password before wifi access password ,i cant type anything in the keychain access

Yeah this is something I have experienced for a while now.

igorkulman commented 4 years ago

it sometimes ask keychain access password even before it asks wifi network password

Not a bug, the app first checks the keychain if a password for the network you are trying to connect to is already saved so it will not ask you if not needed

And whenever it does ask keychain access password before wifi access password ,i cant type anything in the keychain access password box and thus i have to click deny to make it disappear and only after that the wifi network password box pops up.

This is a bug.

naveenkrdy commented 4 years ago

Yeah this is something I have experienced for a while now.

And whenever it does ask keychain access password before wifi access password ,i cant type anything in the keychain access password box and thus i have to click deny to make it disappear and only after that the wifi network password box pops up.

This is a bug.

good to know. thanks !

Goshin commented 4 years ago

@naveenkrdy it should be fixed in #90. Can you test it?

naveenkrdy commented 4 years ago

@naveenkrdy it should be fixed in #90. Can you test it?

the second issue is now fixed but the first issue i.e auto connect still doesnt work. thanks for the fix .

Goshin commented 4 years ago

@naveenkrdy try cleaning up all the saved passwords of HeliPort in Keychain Access, and save your network again.

naveenkrdy commented 4 years ago

@naveenkrdy try cleaning up all the saved passwords of HeliPort in Keychain Access, and save your network again.

Tried that too and also rebuilt heliport with latest commit and tried again after clearing heliport from keychain but still no dice. doesnt auto connect to last connected network on launch.

1Revenger1 commented 4 years ago

I noticed that connectSavedNetworks isn't called when I last put print statements in there. I did see a reference to it in init for one of the classes, but that was the only place I saw it.

Goshin commented 4 years ago

Would it be possible that Itlwm has already connected to a network?

https://github.com/OpenIntelWireless/HeliPort/blob/0103648b56a2eae2b83e0be00f77d1246e02ca09/HeliPort/Appearance/StatusMenu.swift#L384-L389

1Revenger1 commented 4 years ago

Yep, doesn't run. I restarted macOS, loaded itlwm, waiting a minute, then opened HeliPort. It didn't autoconnect or attempt to do so.

GetDeviceInfo is ran, but get_station_info appears to return KERN_SUCCESS

ErrorErrorError commented 4 years ago

The if statement is just checking if the station was able to access itlwm.kext, which is why it returns success. We should call get_80211_state instead of get_sta_info and check if the retVal != ITL80211_sRUN (or the state that checks if it has a connection or not)

Edit: After changing that to the correct method it now seems to work fine now

Goshin commented 4 years ago

OK, have made a fix in master and hope it works. @zxystd told me get_station_info will return an error if not connected, but anyway it would be better to double-check the state.

1Revenger1 commented 4 years ago

Yep, that works (Edit: Latest commit works for auto-connect). Any reason why it's only called in init for now? It'd make sense to try and connect to other networks possibly if they are in the scan list and the user moves to another network.

ErrorErrorError commented 4 years ago

OK, have made a fix in master and hope it works. @zxystd told me get_station_info will return an error if not connected, but anyway it would be better to double-check the state.

Oh in that case then well we should test a bit more maybe there is a reason. I just got a bit used to relying get_80211_state, but lets see if other people are able to autojoin. Maybe we can use get_80211_state as a work around while get_sta_info gets checked in the meantime

Edit: You already did the checkings already nice!

Yep, that works. Any reason why it's only called in init for now? It'd make sense to try and connect to other networks possibly if they are in the scan list and the user moves to another network.

I guess since it's better to see if it works well then it can go to other implementations, i.e. if it does not detect the network nearby.

naveenkrdy commented 4 years ago

now it auto connects on login : )

closing issue as resolved ! thanks !