LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Need to know how to configure a Wi-Fi connection from CLI: iwconfig is not enough (http://www.linuxquestions.org/questions/linux-newbie-8/need-to-know-how-to-configure-a-wi-fi-connection-from-cli-iwconfig-is-not-enough-836028/)

Kenny_Strawn 10-04-2010 12:08 AM

Need to know how to configure a Wi-Fi connection from CLI: iwconfig is not enough
 
Is there a command I need to type from the pure CLI other than:

Code:

iwconfig wlan0 essid <SSID> key <network key>
to configure a WEP-enabled Internet connection from a pure CLI (no X running)? If so, please post it here.

rkski 10-04-2010 12:17 AM

try getting an IP?

Quote:

#dhclient wlan0

onebuck 10-04-2010 06:42 AM

Hi,

Quote:

Originally Posted by Kenny_Strawn (Post 4116865)
Is there a command I need to type from the pure CLI other than:

Code:

iwconfig wlan0 essid <SSID> key <network key>
to configure a WEP-enabled Internet connection from a pure CLI (no X running)? If so, please post it here.

I suggest that you look at 'How to Ask Questions the Smart Way' so in the future your queries provide information that will aid us in diagnosis of the problem or query. We will aid you when you help yourself to a solution. Provide us with what you have attempted and then maybe someone will be able to assist.

Assuming that your device is 'wlan0' then you should either use 'dhcp' or a static IP assignment. Your command shown assumes that the assignment has been made for an IP address.


As root you can use the below to configure a static IP for your wlan0 on your LAN;

Code:

~#ifconfig wlan0 192.168.1.18    #<<< available IP
 ~#route add default gw 192.168.1.1 #<<your gateway
 ~#iwlist wlan0 scan #<< use information to fill in for essid & ap information
 ~#iwconfig wlan0 essid "Your Wireless"
 ~#iwconfig wlan0 key your_key_here
 ~#iwconfig wlan0 ap xx:xx:xx:xx:xx:xx #<<Your _ap_from iwlist

I use the script below to setup my wireless while experimenting.
Code:

  wlan.sh;
  #!/bin/bash
 #
 #10-26-09 13:30
 #setup the wlan0 device
 #
 /sbin/ifconfig wlan0 192.168.1.18
 /sbin/route add default gw 192.168.1.1
 /sbin/iwconfig wlan0 essid "Your_Wireless_Access"
 /sbin/iwconfig wlan0 key Your_key
 /sbin/iwconfig wlan0 ap 00:00:00:00:00:00 << your AP HW address from above iwlist scan

:hattip:
The above link and others can be found at 'Slackware-Links'. More than just SlackwareŽ links!

Hangdog42 10-04-2010 06:46 AM

You might take a look at wicd as well. It now has a console version, wicd-curses that works very nicely.


All times are GMT -5. The time now is 07:19 AM.