Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 12
This is how I connect to a secured network: Code: # ip link set wlan0 up # wpa_supplicant -B -i wlan0 -c <(wpa_passphrase "essid" password) #dhcpcd -A wlan0 This works ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jul 2013
    Posts
    8

    Can only connect to networks with passwords


    This is how I connect to a secured network:
    Code:
    # ip link set wlan0 up
    # wpa_supplicant -B -i wlan0 -c <(wpa_passphrase "essid" password)
    #dhcpcd -A wlan0
    This works and I am connected

    When I try to connect to a network that does not require a password I execute
    Code:
    #ip link set waln0 down
    
    #ip link set wlan0 up
    
    #iwconfig wlan0 "MyEssid"
    
    #dhcpcd wlan0
    I get a timed out response every time.

    I have read and tried a few other things but can't seem to figure it out.
    I used to use ifconfig but did not install network management tools with this install, I recall reading somewhere it is better to not install them.
    Should I install network management tools or is there a way to do this with wpa_supplicant?
    Thanks

  2. #2
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    hello and welcome, demoreal!

    can you indicate which command it is that you are executing that gives you the error, and also, the exact text of the error message?

    also, anything helpful in dmesg?

    can you "see" the ssid in the output of this command?

    Code:
    iwlist wlan0 scanning
    do you need to set the channel or mode using iwconfig first?

  3. #3
    Just Joined!
    Join Date
    Jul 2013
    Posts
    8
    Hi, thanks for welcome
    Code:
     iwlist wlan0 scanning
    shows all of the networks I can connect to and with the code I posted previously I can connect to networks which require a passcode
    but can not connect to ones that do not.
    On my old set up I used to use

    Code:
     
    ifconfig set eth0 up
    this would set my dev eth0 up
    NOTE: The dev was named eth0
    I changed the name of my dev on my arch install to wlan0 (following wiki)
    ---Not sure if this has anyt

    hing to do with it
    this was my old way (ubuntu) of connecting:
    Code:
    ifconfig 
    iwconfig 
    dhclient
    this worked for both private and public networks

    On my arch install I did not install network management tools.
    I am wanting to manage my network settings with wpa_supplicant and the ip link tools (I think...)
    So far I have not had any problem connecting to private networks.
    I use the code above ( the wpa_supplicant code )
    When I am in an area with a public network I use the code posted below the wpa_supplicant code to try to connect.
    I am unable to connect. This fails during the:
    Code:
    dhcpcd wlan0
    I get a connection timed out response.
    Now after this response I decide to disconnect then try again so I initiate:
    Code:
     ip link set dev wlan0 down
    Then after that I check the status with
    Code:
    iwconfig
    Code:
    I notice that it shows ESSID: "Public_Network"
    Like if it never set the dev down
    So i am guessing it was never up in the first place.

    -----------------------------
    Another thing I notice is when I use
    Code:
     ip link show wlan0
    It does shows the dev is up (this is after setting it to up)
    and of course if I set it to down, it shows the dev is down
    -----------------------------------------------------------------------
    It is hard to explain, I do not know much about networks.
    I am on a private one right now and can only check the exact outputs of these commands when I am around a public one.
    I will do this next week while in school.
    -------------
    This is strange that I can only get on a private network
    Let me kn ow the exact commands you would like to see.
    I have tried setting the mode to auto and it did not work.
    Also now that i think of it i should check what
    Code:
    iwconfig
    says as output after issuing
    Code:
    ip link set dev wlan0 up
    I am starting to wonder if this is just not interacting with the iwconfig command

    An easy fix for me would be to install network management tools......
    But I would like to find a way to do this without them


    Is there some wpa_supplicant command to connect to a public network?
    I think i tried leaving password blank but it did not work
    Last edited by demoreal; 07-07-2013 at 12:16 AM.

  4. #4
    Just Joined!
    Join Date
    Jul 2013
    Posts
    8
    The problem is that I do not know enough about wireless networks.
    I need to read the netcfg documentation. I will do this later in the week then post back here what I did.

  5. #5
    Just Joined!
    Join Date
    Jul 2013
    Posts
    8
    I have no idea how to copy text from emacs into conkeror but I am sure I will figure it out soon.
    I was able to split emacs screen and open a shell and execute a bunch of wifi commands.
    I demonstrated how I connect to the network at the coffee house and the open network at school that I can"t connect to.
    I am sorry about the text file, I could not figure it out anyother way.
    this text file (i think it is, a txt file, i just named it that, its written in whatever the default emacs is set too.)
    Is it ok like that?
    I kinda wanted to just past it here.
    Attached Files Attached Files

  6. #6
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    Hi,

    Do you have to consent to some sort of agreement on their webpage before continuing? i've noticed that at some wi-fi hotspot places. so you first associate with their ESSID, then fire up a browser which should automatically redirect to their agreement webpage, then you click on it and are then granted an ip address/default gw/DNS, etc.

    just a thought.

  7. #7
    Just Joined!
    Join Date
    Jul 2013
    Posts
    8
    Quote Originally Posted by atreyu View Post
    Hi,

    Do you have to consent to some sort of agreement on their webpage before continuing? i've noticed that at some wi-fi hotspot places. so you first associate with their ESSID, then fire up a browser which should automatically redirect to their agreement webpage, then you click on it and are then granted an ip address/default gw/DNS, etc.

    just a thought.
    Yeah, I was thinking it might be that, because I know for sure you need to do that at the school, but I remember before, when I used dhclient and ifconfig that it would at least log me on first and I could even ping Google. Then after being connected I would open the browser and go through that process.

    This is really strange but the only network I have ever been able to connect to is at that coffee shop. That is also the place where I configured my computer. I still have not been able to get on my network at home.
    I found new documentation on wpa_supplicant that I am reading through.

    I am almost positive it is an issue with me not configuring wpa_supplicant properly.

    During this week (while going through wpa_supplicant documentation) I will spend time at my house trying to get on my network both secure and insecure.

    I need to pace myself because I get really addicted to configuring my computer.

  8. #8
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    Quote Originally Posted by demoreal View Post
    Yeah, I was thinking it might be that, because I know for sure you need to do that at the school, but I remember before, when I used dhclient and ifconfig that it would at least log me on first and I could even ping Google. Then after being connected I would open the browser and go through that process.
    okay, makes sense, really.

    I am almost positive it is an issue with me not configuring wpa_supplicant properly.
    yeah, you're probably right. i've not had any issues with wpa_supplicant when configuring my wireless from the command line in the past, so i'm not much help.

    one other idea: you can try booting your laptop with a Live version of the distro you are using, with the idea that it will have a more complete set of the networking packages installed. then see if you can get that distro online using the graphical methods, and if that works, see if you can get the same working just from the command line. be sure you are doing it with console-only tools by booting into text-only mode (run level 2 or 3, depending on your distro).

    good luck, and be sure to post back any (hopefully positive) results.

  9. #9
    Just Joined!
    Join Date
    Jul 2013
    Posts
    8
    Quote Originally Posted by atreyu View Post
    yeah, you're probably right. i've not had any issues with wpa_supplicant when configuring my wireless from the command line in the past, so i'm not much help.
    Do you remember the commands you used? Or was it a thing you did and it worked so you moved on to a more automatic way.

    I am positive this would work if I installed "Network Management tools", and went about this the ifconfig, iwconfig, dhclient method, but I am very interested in getting it to work the wpa_supplicant way. I am sure my card supports this method since I am able to get on one network so far.

    I will eventually figure it out and post any progress.

    I am sure how to do it is described in the /etc/wpa_supplicant/wpa_supplicant.conf file. Yet this file is a bit complicated for me to understand. I am slowly making my way through it...

    I will post what I do as I work it out, and I will make sure it is displayed properly and not in a random file I uploaded. Sorry, that was kind of an accident. I now have cut and past working with emacs and conkeror...

  10. #10
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    Quote Originally Posted by demoreal View Post
    Do you remember the commands you used? Or was it a thing you did and it worked so you moved on to a more automatic way.
    wpa_supplicant never came into it for me. it was something like:

    Code:
    iwconfig wlan0 essid MY_WIRELESS_NETWORK
    iwconfig wlan0 key XXXXXXXXX
    ifconfig wlan0 192.168.1.2 netmask 255.255.255.0 up
    route add default gw 192.168.1.1 dev wlan0
    echo "nameserver 8.8.8.8" > /etc/resolv.conf

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •