wireless with dhclient
I have finished LFS and now proceed to BLFS. But the first thing I'd like to do is to make wireless working. So I installed Wireless Tools-29 and DHCP-4.2.5-P1. After running:
iwconfig wlan0 essid ... and iwconfig wlan0 key ... I tried: dhclient -v wlan0 but wasn't able to connect to my router. One of the output being: execve (/sbin/dhclient-script, ...): Permission denied I google this message but most of them are related to upgrading of Ubuntu. Could anybody shed some light on how to set up wireless in LFS? Thanks. BTW, my wireless driver is working properly, I can verify that in dmesg (Intel 4965AGN) |
Hi
The Permission denied part have you run it as root And have you installed wpa http://www.linuxfromscratch.org/blfs...upplicant.html Dose iwlist "wireless adaptor" scan give you results? |
Sorry I forgot to mention that I am running it as root, actually I haven't created any user other than root yet. And iwlist wlan0 scan give me the following result:
wlan0 Scan completed : Cell 01 - Address: 00:24:01:6B:CD:1B Channel:6 Frequency:2.437 GHz (Channel 6) Quality=36/70 Signal level=-74 dBm Encryption key:on ESSID:"Magicat" Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/s 9 Mb/s; 12 Mb/s; 18 Mb/s Bit Rates:24 Mb/s; 36 Mb/s; 48 Mb/s; 54 Mb/s Mode:Master Extra:tsf=00000000822df945 Extra: Last beacon: 62ms ago IE: Unknown: 00074D616769636174 IE: Unknown: 010882848B960C121824 IE: Unknown: 030106 IE: Unknown: 0706555320010B1B IE: Unknown: 200100 IE: WPA Version 1 Group Cipher : TKIP Pairwise Ciphers (2) : CCMP TKIP Authentication Suites (1) : PSK IE: Unknown: 2A0100 IE: Unknown: 32043048606C IE: Unknown: DD180050F2020101020003A4000027A4000042435E0062322F00 IE: Unknown: DD1E00904C334C101BFFFF000000000000000000000000000000000000000000 IE: Unknown: 2D1A4C101BFFFF000000000000000000000000000000000000000000 IE: Unknown: DD1A00904C3406001900000000000000000000000000000000000000 IE: Unknown: 3D1606001900000000000000000000000000000000000000 IE: Unknown: DD0900037F01010000FF7F IE: Unknown: DD7B0050F204104A00011010440001021041000100103B00010310470010565AA94967C14C0EAA8FF349E6F5931110210006 442D4C696E6B1023000D442D4C696E6B20526F75746572102400074449522D363135104200046E6F6E651054000800060050 F204000110110006442D4C696E6B100800020084103C000101 Cell 02 - Address: 00:25:9C:FD:37:C6 Channel:6 Frequency:2.437 GHz (Channel 6) Quality=25/70 Signal level=-85 dBm Encryption key:on ESSID:"Darkness" Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/s 9 Mb/s; 12 Mb/s; 18 Mb/s Bit Rates:24 Mb/s; 36 Mb/s; 48 Mb/s; 54 Mb/s Mode:Master Extra:tsf=0000000dc97e0374 Extra: Last beacon: 1624ms ago IE: Unknown: 00084461726B6E657373 IE: Unknown: 010882848B960C121824 IE: Unknown: 030106 IE: IEEE 802.11i/WPA2 Version 1 Group Cipher : TKIP Pairwise Ciphers (1) : CCMP Authentication Suites (1) : PSK Preauthentication Supported IE: WPA Version 1 Group Cipher : TKIP Pairwise Ciphers (1) : TKIP Authentication Suites (1) : PSK IE: Unknown: 2A0100 IE: Unknown: 32043048606C IE: Unknown: DD180050F2020101020003A4000027A4000042435E0062322F00 IE: Unknown: DD930050F204104A00011010440001021041000100103B000103104700100000000000000001100000259CFD37C610210013 4C696E6B73797320436F72706F726174696F6E102300075752543132304E1024000776312E302E30341042000C4A55543030 4B3337333030331054000800060050F204000110110014576972656C65737320526F757465722857464129100800020084 IE: Unknown: DD0900037F01010000FF7F IE: Unknown: DD0A00037F04010000000000 Cell 03 - Address: 20:76:00:FC:61:2C Channel:6 Frequency:2.437 GHz (Channel 6) Quality=22/70 Signal level=-88 dBm Encryption key:on ESSID:"TELUS0131" Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 18 Mb/s 24 Mb/s; 36 Mb/s; 54 Mb/s Bit Rates:6 Mb/s; 9 Mb/s; 12 Mb/s; 48 Mb/s Mode:Master Extra:tsf=000003fdb77066aa Extra: Last beacon: 62ms ago IE: Unknown: 000954454C555330313331 IE: Unknown: 010882848B962430486C IE: Unknown: 030106 IE: Unknown: 2A0104 IE: Unknown: 2F0104 IE: IEEE 802.11i/WPA2 Version 1 Group Cipher : CCMP Pairwise Ciphers (1) : CCMP Authentication Suites (1) : PSK IE: Unknown: 32040C121860 IE: Unknown: 2D1A6C181BFFFF000000000000000000000000000000000000000000 IE: Unknown: 3D1606001700000000000000000000000000000000000000 IE: Unknown: DD730050F204104A00011010440001021041000100103B0001031047001078D97E3C7EA3E82A66C483073ADFA0FE10210008 42726F6164636F6D1023000842726F6164636F6D1024000631323334353610420004313233341054000800060050F2040001 1011000751313030304150100800020088 IE: Unknown: DD090010180204F0050000 IE: WPA Version 1 Group Cipher : CCMP Pairwise Ciphers (1) : CCMP Authentication Suites (1) : PSK IE: Unknown: DD180050F2020101800003A4000027A4000042435E0062322F00 IE: Unknown: DD1E00904C336C181BFFFF000000000000000000000000000000000000000000 IE: Unknown: DD1A00904C3406001700000000000000000000000000000000000000 Cell 04 - Address: 00:21:04:73:09:8C Channel:8 Frequency:2.447 GHz (Channel 8) Quality=49/70 Signal level=-61 dBm Encryption key:on ESSID:"G110802" Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 22 Mb/s Bit Rates:6 Mb/s; 9 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s 36 Mb/s; 48 Mb/s; 54 Mb/s Mode:Master Extra:tsf=0000000bd3b3054e Extra: Last beacon: 62ms ago IE: Unknown: 000747313130383032 IE: Unknown: 010582848B962C IE: Unknown: 030108 IE: Unknown: 2A0100 IE: Unknown: 32080C1218243048606C Cell 05 - Address: 38:60:77:8D:8C:3A Channel:11 Frequency:2.462 GHz (Channel 11) Quality=29/70 Signal level=-81 dBm Encryption key:on ESSID:"7E8E61" Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s Bit Rates:6 Mb/s; 9 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s 36 Mb/s; 48 Mb/s; 54 Mb/s Mode:Master Extra:tsf=0000003d39d4f98f Extra: Last beacon: 62ms ago IE: Unknown: 0006374538453631 IE: Unknown: 010482848B96 IE: Unknown: 03010B IE: Unknown: 2A0104 IE: Unknown: 2F0104 IE: IEEE 802.11i/WPA2 Version 1 Group Cipher : TKIP Pairwise Ciphers (2) : CCMP TKIP Authentication Suites (1) : PSK IE: Unknown: 32080C1218243048606C IE: Unknown: 2D1AFC181BFFFF000000000000000000000000000000000000000000 IE: Unknown: 3D160B080400000000000000000000000000000000000000 IE: Unknown: 4A0E14000A002C01C800140005001900 IE: Unknown: 7F0101 IE: Unknown: DD09001018020DF02C0000 IE: WPA Version 1 Group Cipher : TKIP Pairwise Ciphers (2) : CCMP TKIP Authentication Suites (1) : PSK IE: Unknown: DD180050F2020101800003A4000027A4000042435E0062322F00 Cell 04 is the one I am trying to connect to, looks like it didn't detected any encryption mode. I use WEP64 rather than WPA, is that the problem? Does wpa_supplicant-2.0 handle WEP too or do I need to install other package for WEP? Thanks. |
Quote:
The way I used to connect manually (or by script) with WEP encryption was like this example... Code:
/sbin/iwconfig wlan0 key restricted <hex_key_here> essid "<router_ssid_here>" You need to have your config file in /etc/sysconfig. You may need to add a rule for your device in /etc/udev/rules.d/70-persistent-net.rules. You know, all the usual stuff for any network connection. |
Thanks, it works! As soon as I run:
/sbin/iwconfig wlan0 key restricted <hex_key_here> essid "<router_ssid_here>" the connection is established, even without the ifup and dhclient. I didn't know that essid and key should be set in one command, instead of two separated commands. I have already had ifconfig.wlan0 in /etc/sysconfig with the following content: ONBOOT="yes" IFACE="wlan0" SERVICE="dhcpcd" DHCP_START="-b -q" DHCP_STOP="-k" and the content of 70-persistent-net.rules is like this: # net device e1000e SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:16:d3:ca:16:95", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0" # net device iwl4965 SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:13:e8:92:48:51", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan0" is that sufficient? Should I put the iwconfig wlan0 key restricted <hex_key_here> essid "<router_ssid_here>" command somewhere? I guess I can not put it in ~/.bash_profile, right? otherwise whenever I launch a bash shell it will be execute? |
Quote:
Quote:
Quote:
Quote:
|
Thanks for the explanation. You are right, it's time to create a non-root user and I will put the iwconfig command in that user's .bash_profile.
|
All times are GMT -5. The time now is 01:11 AM. |