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

t2 wifi needs filling out #82

Closed
4 of 7 tasks
Frijol opened this issue May 4, 2015 · 19 comments
Closed
4 of 7 tasks

t2 wifi needs filling out #82

Frijol opened this issue May 4, 2015 · 19 comments

Comments

@Frijol
Copy link
Member

Frijol commented May 4, 2015

Current status:

  • tessel wifi -l lists networks
  • tessel wifi -n -p copies the wifi network into the configuration file, but doesn't check to see if the network/password are valid or if we connect

Spec: T2 CLI spec
tessel wifi

$ tessel wifi -h
> Usage: tessel wifi [-l] [-n <ssid>] [-p <pass>] [-s <security>] [--off] [-t]
>  -l:          list available networks
>  -n <ssid>:   name of the network to connect with
>  -p <pass>:   password to access network
>  -s <security>:   security protocol to connect with (i.e. WEP, WPA, PSK)
>  -t:          attempt to connect for the provided number of seconds
>  --off:       disconnect from a wifi connection
$ 

$ tessel wifi
> Connected to "technicallyWifi"
> IP Address: 192.168.128.149
> Signal Strength: 27/70
> Bitrate: 145mbps up / 24 mbps down

$ tessel wifi
> Not Connected (run 'tessel wifi -l' to see available networks)

$ tessel wifi -l
> INFO Requesting wifi status...
> Currently visible networks (10):
>   Gaumenkitzel (47/127)
>   XFBSECA7HE6H (30/127)
>   HP-Print-8f-LaserJet 200 color (49/127)
>   technicallyWifi (40/127)
>   tessel (38/127)
>   KeetsaBerkeley (37/127)
>   ATT219_EXT (38/127)
>   xfinitywifi (38/127)
>   CableWiFi (32/127)
>   Max4 (30/127)

$ tessel wifi -n test-network
> Connecting to network “test-network”...
> Connected to network “test-network”
$ 

$ tessel wifi -n test-network -p super-secret
> Connecting to network “test-network”...
> Failed to connect to “test-network” (ssid or password incorrect)
$ tessel wifi -n test-network -p secret
> Connecting to network “test-network”...
> Connected to network “test-network”
$ 

$ tessel wifi -n test-network -p secret -s WPA
> Connecting to network “test-network”...
> Connected to network “test-network”
$ 

$ tessel wifi -n test-network -t 1
> Connecting to network “test-network”...
> Failed to connect to “test-network” (timeout)
$

$ tessel wifi --list
> Currently connected to “test-network”
> Scanning for wifi connections...
>  technicallyWifi (67/75)
>  test-network (65/75) [connected]
>  Gaumenkitzel (33/75)
$

To do:

  • tessel wifi
  • tessel wifi --help
  • -s flag
  • -t flag
  • --off flag
  • check whether network/password authenticate and whether the Tessel connects
  • Show connection status, IP address, signal strength, bitrate
@Frijol Frijol added the spec-cli label May 4, 2015
@Frijol Frijol mentioned this issue May 4, 2015
15 tasks
@Frijol
Copy link
Member Author

Frijol commented May 4, 2015

@johnnyman727 did you have further ideas for the -l command, re bitrate etc?

@johnnyman727
Copy link
Contributor

According to the spec, there is no bitrate log for -l. I was mistaken (it's part of tessel wifi).

@Frijol
Copy link
Member Author

Frijol commented May 5, 2015

I'm referring to your comment that tessel status -c is redundant with tessel wifi -l.
They are currently not redundant (tessel status -c shows a fair amount more information than tessel wifi -l), but it might make more sense to move that functionality over to tessel wifi -l. What do you think?

@johnnyman727
Copy link
Contributor

Ah I understand now. I think we should leave tessel wifi -l and remove tesse status -c. I can't think of a time when I actually tried to go looking for the bitrate.

@nplus11
Copy link
Contributor

nplus11 commented May 5, 2015

We already agreed somewhere to remove tessel status -c. I think it was in the doc.

@johnnyman727
Copy link
Contributor

Just adding a note for anyone that's looking that connecting to an open network doesn't work yet!

@johnnyman727
Copy link
Contributor

Another note that a recently flashed image of OpenWRT doesn't by default have encryption set as psk and the current wifi credential setting logic doesn't set it either. I had to go in and manually add that. Once this feature is completed, this shouldn't be an issue.

@johnnyman727
Copy link
Contributor

@kteza1 What's the best way to confirm that setting the WiFI credentials was successful with openWRT? We could parse ifconfig after some timeout but that seems hacky.

@tekjar
Copy link

tekjar commented Jul 26, 2015

@johnnyman727 How do you make sure if connection is successful using ifconfig? By checking for ip address on wlan0 interface? I've tried some uci commands but none them shows ip address on wlan interface on my raspberry pi running openwrt. Will check if there is any other way to get this other than using ifconfig

@tekjar
Copy link

tekjar commented Jul 28, 2015

@johnnyman727 Here is what I tried on my raspberry pi which is in client mode

Before connection

ubus call wireless.network status

Output:

{
    "radio0": {
        "up": true,
        "pending": false,
        "autostart": true,
        "disabled": false,
        "config": {
            "channel": "11",
            "hwmode": "11g",
            "path": "platform\/bcm2708_usb\/usb1\/1-1\/1-1.2\/1-1.2:1.0",
            "htmode": "HT20",
            "txpower": 20,
            "country": "00"
        },
        "interfaces": [

        ]
    }
}

After connecting it to my router

ubus call wireless.network status

Output:

{
    "radio0": {
        "up": true,
        "pending": false,
        "autostart": true,
        "disabled": false,
        "config": {
            "channel": "11",
            "hwmode": "11g",
            "path": "platform\/bcm2708_usb\/usb1\/1-1\/1-1.2\/1-1.2:1.0",
            "htmode": "HT20",
            "txpower": 20,
            "country": "00"
        },
        "interfaces": [
            {
                "section": "@wifi-iface[0]",
                "ifname": "wlan0",
                "config": {
                    "ssid": "OpenWrt",
                    "encryption": "psk",
                    "mode": "sta",
                    "bssid": "E8:94:F6:68:59:8E",
                    "key": "abc@12345",
                    "network": [
                        "wwan"
                    ]
                }
            }
        ]
    }
}

@johnnyman727
Copy link
Contributor

Thanks @kteza1! So you're suggestion is to poll the ubus call wireless.network.status until it shows connected. Do you know if it's possible to tell if the password for a network is incorrect (rather than poor signal strength)?

@johnnyman727
Copy link
Contributor

Also, @kteza1 do you know other security options folks might be interested in besides psk2?

@johnnyman727
Copy link
Contributor

@Frijol there is no simply way to utilize nomnom's built in usage print out if no arguments/flags are provided.

What do you think about just printing:

ERR! No arguments provided. Type tessel wifi -h for usage information. 

if a user tries t2 wifi.

The other alternative is to do the same as t2 wifi -l.

@Frijol
Copy link
Member Author

Frijol commented Sep 2, 2015

I'm confused. From the spec above, this is what tessel wifi is meant to do with no flags:

$ tessel wifi
> Connected to "technicallyWifi"
> IP Address: 192.168.128.149
> Signal Strength: 27/70
> Bitrate: 145mbps up / 24 mbps down

$ tessel wifi
> Not Connected (run 'tessel wifi -l' to see available networks)

@johnnyman727
Copy link
Contributor

@Frijol Yes, you're correct. Not sure how I misread that!

@johnnyman727
Copy link
Contributor

@MrNice is going to take a stab at this one!

@MrNice
Copy link
Contributor

MrNice commented Sep 7, 2015

@Frijol #282 Implements "tessel wifi", but doesn't do any bitrate log analysis, only reports what iwinfo reports when invoked.

@Frijol
Copy link
Member Author

Frijol commented Oct 23, 2015

the PR moved to #362

@Frijol
Copy link
Member Author

Frijol commented Oct 23, 2015

Closing in favor of the three bite-sized issues linked above ^

@Frijol Frijol closed this as completed Oct 23, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants