Trouble with WPA wifi [SOLVED]

Discussion in 'UDOO NEO' started by Krista Hill, Jun 13, 2017.

  1. Krista Hill

    Krista Hill New Member

    Joined:
    May 26, 2017
    Messages:
    20
    Likes Received:
    4
    The University here has two WIFI networks, one connects via WEP and the other with WPA. I can connect with the WEP network, but its a pain, as there is a second login step. I have to open a browser and enter my credentials there. This means that after the Neo boots, I can't immediately login.

    The second network supports WPA only, which eliminates having the second login step. But the Neo doesn't seem to support WPA. In connecting the first time only, I should be asked for my user name and password. But I'm not asked for the user name so the password has no association with a user. Any ideas?

    Krista
     
    Last edited: Jun 13, 2017
  2. jas-mx

    jas-mx Active Member

    Joined:
    Dec 31, 2013
    Messages:
    407
    Likes Received:
    118
    From the command line you should be able to connect via WEP using the iw command, example below:

    Code:
    iw dev wlan0 connect <essid> key 0:<key>
    
    key is hexadecimal or ASCII value
     
  3. Krista Hill

    Krista Hill New Member

    Joined:
    May 26, 2017
    Messages:
    20
    Likes Received:
    4
    I'll be digging to learn more about the iw command. As it stands now though, when the Neo boots it appears to reconnect to its last WiFi connection using the same credentials. So there is no issue with connecting with WEP a following time.

    Just fixed a typo in the original note. It's WPA that the Neo seems to have issues with
     
  4. Gorgo

    Gorgo UDOOer

    Joined:
    Nov 9, 2016
    Messages:
    159
    Likes Received:
    17
    Do you use 'eduroam' or another university network?
    Did you try wpa_supplicant?
     
  5. Krista Hill

    Krista Hill New Member

    Joined:
    May 26, 2017
    Messages:
    20
    Likes Received:
    4
    Hi Gorgo,I haven't heard of eduroam before so I'll have to dig some to find out what that is. I have seen some vague references to wpa_supplicant, but I don't know what that is, yet.
     
  6. Gorgo

    Gorgo UDOOer

    Joined:
    Nov 9, 2016
    Messages:
    159
    Likes Received:
    17
    Hi Krista,
    Eduroam is a World Wide Education Roaming Wifi but it's available only for the universities that joined the project.
    If your university has a common WPA network with SSID and a password you can use wpa_supplicant.
    In order to connect to it change:

    Code:
    sudo nano /etc/network/interfaces
    add:
    Code:
    auto wlan0
    iface wlan0 inet dhcp
    wpa-conf /etc/wpa_supplicant.conf
    and then create /etc/wpa_supplicant.conf with:

    Code:
    ctrl_interface=/var/run/wpa_supplicant
    
    network={
      ssid="YOUR_WIFI_NAME"
      proto=RSN
      key_mgmt=WPA-PSK
      pairwise=CCMP TKIP
      group=CCMP TKIP
      psk="YOUR_WIFI_PASSWORD"
    }
    Save. Reboot and you should see wlan0 connected with a ipv4.
    Check it with 'ifconfig'
     
  7. Krista Hill

    Krista Hill New Member

    Joined:
    May 26, 2017
    Messages:
    20
    Likes Received:
    4
    Thanks Gorgo, things almost makes sense, but our WPA network doesn't have a global network password. Rather, the password is per user. According to our documentation the following are the minimum credentials:
    Network name: NetworkName
    Username: Your email name (without the part following "@")
    Password: Your email password

    The documentation also says that the following may be needed:
    Connection type: Infrastructure
    Security type: WPA2-Enterprise
    Encryption type: AES
    Authentication method: PEAP
     
  8. Gorgo

    Gorgo UDOOer

    Joined:
    Nov 9, 2016
    Messages:
    159
    Likes Received:
    17
    Ok, in that case we're talking about WPA2-Enterprise that may be more difficult than WPA2-PSK. Eduroam has this kind of configuration.
    Do you have a certificate too? Sometimes the university gives it to you in a .pem file.
    For example, my wpa_supplicant for university (UPMC in Paris) is:

    Code:
    ctrl_interface=/var/run/wpa_supplicant
    
    network={
      ssid="NETWORK_NAME"
      key_mgmt=WPA-EAP
      pairwise=CCMP
      group=CCMP TKIP
      eap=TTLS
      ca_cert="/home/udooer/.cat_installer/ca.pem"
      identity="USER@upmc.fr"
      domain_suffix_match="radius.upmc.fr"
      phase2="auth=PAP"
      password="MY_PASSWORD"
      anonymous_identity="anonymous@upmc.fr"
    }
    First try without ca_cert, domain_suffix_match and anonymous_identity.
    If it doesn't work, check which are your configuration element. In my case we had a website with all the details.
    In case you have a certificate, be sure to address the correct ca_cert path to your .pem file.
     
  9. Gorgo

    Gorgo UDOOer

    Joined:
    Nov 9, 2016
    Messages:
    159
    Likes Received:
    17
    Try also:

    Code:
    ctrl_interface=/var/run/wpa_supplicant
    network={
         ssid="NETWORK_NAME"
         key_mgmt=WPA-EAP
         eap=PEAP
         identity="user@example.com"
         password="password"
         ca_cert="/etc/cert/ca.pem" (your certificate file)
         phase2="auth=MSCHAPV2"
    }
     
  10. Krista Hill

    Krista Hill New Member

    Joined:
    May 26, 2017
    Messages:
    20
    Likes Received:
    4
    Thanks Gorgo, let's see... in the first cases, after rebooting I wasn't able to reconnect using the network but was able to communicate through the CDC-serial and make changes. In the second case I can connect to 192.168.7.2, but the WPA network is not up. In looking at the ifconfig output I see nothing sent or received, no IP address. One change I made was to remove the ca_cert line.
     
  11. Gorgo

    Gorgo UDOOer

    Joined:
    Nov 9, 2016
    Messages:
    159
    Likes Received:
    17
    Yes from your university website, it seems you don't have certificate.
    Do you get an IP removing ca_cert from the second example?
     
  12. Gorgo

    Gorgo UDOOer

    Joined:
    Nov 9, 2016
    Messages:
    159
    Likes Received:
    17
    Remove also phase2 because you don't have it.
     
    Krista Hill likes this.
  13. Krista Hill

    Krista Hill New Member

    Joined:
    May 26, 2017
    Messages:
    20
    Likes Received:
    4
    Hi, thanks so far. What I'm seeing is that the board sits there for a while, I gather that while it's trying to connect the WiFi, other network interfaces are held up. The output from ifconfig doesn't show an inet4 IP address.
     
  14. Gorgo

    Gorgo UDOOer

    Joined:
    Nov 9, 2016
    Messages:
    159
    Likes Received:
    17
    Hmm that means it's not connecting...
    Do 'dmesg' and copy the output. Even /var/log/syslog may be useful.
    Did you try to remove phase2 too?
     
  15. Krista Hill

    Krista Hill New Member

    Joined:
    May 26, 2017
    Messages:
    20
    Likes Received:
    4
    Yes, I did remove the phase2 entry as well. Let's see, dmesg produces a significant amount of text so I attached that as a file, the syslog file is even longer.
     

    Attached Files:

  16. Gorgo

    Gorgo UDOOer

    Joined:
    Nov 9, 2016
    Messages:
    159
    Likes Received:
    17
    If you can copy your wpa_supplicant.conf ( hide password :) )
     
  17. Krista Hill

    Krista Hill New Member

    Joined:
    May 26, 2017
    Messages:
    20
    Likes Received:
    4
    ctrl_interface=/var/run/wpa_supplicant
    network={
    ssid="NetName"
    key_mgmt=WPA-EAP
    eap=PEAP
    identity="name@TheRest"
    password="MYPASSWORD"
    }
     
    Last edited: Jun 16, 2017
  18. Gorgo

    Gorgo UDOOer

    Joined:
    Nov 9, 2016
    Messages:
    159
    Likes Received:
    17
    Be carefull, according to your university's website, your identity is "Your UofH email name (without the "@hartford.edu" part)".
    So retry all the combinations we tested, with the new identity.
     
  19. Krista Hill

    Krista Hill New Member

    Joined:
    May 26, 2017
    Messages:
    20
    Likes Received:
    4
    Ahhh, you are so right. I just retried with the new identity and the Neo came right up, without delay. I can ping off a few off-site URLs. It appears to be working. This makes a difference, thanks much!

    Besides that, I'm also curious about how the utilities that we just made are related to the desktop tools. I just used VNC to open the desktop and selected Preferences => Network-Connections and don't see the established connection.
     
    Gorgo likes this.
  20. Gorgo

    Gorgo UDOOer

    Joined:
    Nov 9, 2016
    Messages:
    159
    Likes Received:
    17
    So which was the correct configuration at the end?
    I think if you swap to wpa_supplicant (through /etc/network/interfaces changed) you stop using networkManager. So you won't see an established connection with VNC, even if you're connected.

    Change the title with [SOLVED] if you can.
     

Share This Page