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

check whether network/password authenticate and whether the Tessel connects #395

Closed
Frijol opened this issue Oct 23, 2015 · 6 comments
Closed

Comments

@Frijol
Copy link
Member

Frijol commented Oct 23, 2015

Currently t2 wifi sets credentials in a file, but it doesn't do anything to check whether the network/password authenticate or connection is successful.

moved from #82

@Frijol Frijol added this to the Complete Speculation milestone Oct 23, 2015
@Frijol
Copy link
Member Author

Frijol commented Nov 14, 2015

I'll take a stab at this

@Frijol
Copy link
Member Author

Frijol commented Nov 14, 2015

Relevant docs:

@Frijol
Copy link
Member Author

Frijol commented Nov 14, 2015

dterm'd into T2, in a ubus listen:

giving it the creds for a network that doesn't exist (after it was on a network):

[ 1051.420000] wlan0: deauthenticating from e8:33:81:cc:5f:e0 by local choice (Reason: 3=DEAUTH_LEAVING)
{ "network.interface": {"action":"ifdown","interface":"wifi"} }
[ 1051.940000] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready

giving it the right creds:

[ 1073.360000] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 1074.990000] wlan0: authenticate with e8:33:81:cc:5f:e0
[ 1075.020000] wlan0: send auth to e8:33:81:cc:5f:e0 (try 1/3)
[ 1075.020000] wlan0: authenticated
[ 1075.040000] wlan0: associate with e8:33:81:cc:5f:e0 (try 1/3)
[ 1075.050000] wlan0: RX AssocResp from e8:33:81:cc:5f:e0 (capab=0x411 status=0 aid=19)
[ 1075.060000] wlan0: associated
[ 1075.060000] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
{ "network.interface": {"action":"ifup","interface":"wifi"} }

(it's not always this clean, sometimes you get deauthentication events and reauthentications mixed in)

giving it a real network but the wrong password:

[ 1204.570000] wlan0: deauthenticating from e8:33:81:cc:5f:e0 by local choice (Reason: 3=DEAUTH_LEAVING)
{ "network.interface": {"action":"ifdown","interface":"wifi"} }
[ 1205.090000] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready

@Frijol
Copy link
Member Author

Frijol commented Nov 14, 2015

no such network & real network but wrong password have the same output, so this does not produce a complete solution.

However, we could do a quick & dirty listen for "ifup" within a certain timeframe after setting credentials to determine if the network is providing a connection.

@Frijol
Copy link
Member Author

Frijol commented Nov 15, 2015

Instead of listening for "ifup", wouldn't it be better to just run/output t2 wifi after setting credentials? This gives the user more information about the connection & doesn't duplicate code functionality.

@johnnyman727
Copy link
Contributor

@Frijol I think the question is how long to wait after setting credentials. For example, if a wifi signal is relatively weak, the connection may not happen on the first or second attempt but maybe the third.

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

2 participants