Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
wpa_supplicant and dhcp help
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
crayztechnique
n00b
n00b


Joined: 03 Apr 2016
Posts: 30

PostPosted: Tue Apr 19, 2016 12:31 pm    Post subject: wpa_supplicant and dhcp help Reply with quote

I was following along on a tutorial for setting up my wireless network and I came across the following issues:

When I ran:

Code:
wpa_supplicant -B -Dwext -I wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf


I ran into the following:

Code:
Successfully initialized wpa_supplicant
ioctl[SIOCSIWENCODEEXT]: Invalid argument
ioctl[SIOCSIWENCODEEXT]: Invalid argument


Continuing on I ran:

Code:
dhcpcd wlan0


Only to get:

Code:
wlan0: waiting for carrier
timed out
dhcpcd exited


So . . . . . I could really use some direction here. There were multiple reasons for this on the searches I did and multiple answers none of which worked for me.
Back to top
View user's profile Send private message
bbgermany
Veteran
Veteran


Joined: 21 Feb 2005
Posts: 1795
Location: Oranienburg/Germany

PostPosted: Tue Apr 19, 2016 12:35 pm    Post subject: Reply with quote

1st: Please post your wpa_supplicant.conf
2nd: Please check, whether you are connected with iwconfig, after you have run wpa_supplicant.

greets, bb
_________________
1st: i5-4570, 16GB, 1.75TB
2nd: i5-4570, 16GB, 620GB
3rd: i5-4570, 16GB, 10,5TB
4th: Asus N61VN, 8GB, 240GB
5th: C2D T7200, 2GB, 16GB USB + NFS
Back to top
View user's profile Send private message
crayztechnique
n00b
n00b


Joined: 03 Apr 2016
Posts: 30

PostPosted: Tue Apr 19, 2016 1:19 pm    Post subject: Reply with quote

Code:
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel
update_config=1

network={
                 ssid="crayzteknician"
                 proto=RSN
                 key_mgmt=WPA-PSK
                 pairwise=CCMP TKIP
                 group=CCMP TKIP
                 #psk="myPassword"
                 psk=whoopsiedaisiesalongstringofnumbersandletters
}


Code:
wlan0        IEEE 802.11bg ESSID:off/any
             Mode:Managed Access Point: Not-Associated       Tx-Power=20 dBm
             Retry short limit: 7       RTS thr:off      Fragment  thr:off
             Encryption key:off
             Power Management:off


Last edited by crayztechnique on Tue Apr 19, 2016 6:02 pm; edited 1 time in total
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6228
Location: Room 101

PostPosted: Tue Apr 19, 2016 2:13 pm    Post subject: Re: wpa_supplicant and dhcp help Reply with quote

crayztechnique wrote:
Code:
ioctl[SIOCSIWENCODEEXT]: Invalid argument
ioctl[SIOCSIWENCODEEXT]: Invalid argument

crayztechnique ... these are due to the use of '-Dwext' rather than '-Dnl80211' ... though such errors can occur without the connection failing (as 'wext' will function if/when CONFIG_CFG80211_WEXT is enabled).

crayztechnique wrote:
Code:
wlan0: waiting for carrier
timed out
dhcpcd exited

That suggests you're not getting connected so focus on wpa_supplicant. The config seems ok, can you do the following add '-dd -f /var/log/wpa_supplicant.log' to the parameters and pastebin the log.

Also, you've just posted your psk, and now google has it ;)

best ... khay
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 44202
Location: 56N 3W

PostPosted: Tue Apr 19, 2016 5:37 pm    Post subject: Reply with quote

khayyam,

Google probably had it already, along with all the SSIDs they harvest when they make streetview.

Its only useful if you are within 100 yards or so of crayztechniques AP.
I know I'm not, since crayzteknician does not appear in any WiFi scans I do.

crayztechnique,
dmesg may say something useful about youe failure to associate.

wpa_supplicant does all the wireless specific things needed to pass traffic over the wireless interface.
Until dmesg show that you are both Associated and Authenticated nothing else can work. Of course, its possible to connect to some random AP, so do check you get connected to the AP you think you are.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
steveL
Watchman
Watchman


Joined: 13 Sep 2006
Posts: 5153
Location: The Peanut Gallery

PostPosted: Tue Apr 19, 2016 5:48 pm    Post subject: Reply with quote

NeddySeagoon wrote:
Google probably had it already, along with all the SSIDs they harvest when they make streetview.

Associated to the "secure" password, your personal/banking details and your address ofc, if you use an Android phone.

By all means prove me wrong about the banking details. ;)
Back to top
View user's profile Send private message
crayztechnique
n00b
n00b


Joined: 03 Apr 2016
Posts: 30

PostPosted: Tue Apr 19, 2016 6:23 pm    Post subject: Reply with quote

Code:
wpa_supplicant v2.5
random: Trying to read entropy from /dev/random
Successfully initialized wpa_supplicant
Initializing interface 'wlan0' conf '/etc/wpa_supplicant/wpa_supplicant.conf' driver 'wext' ctrl_interface 'N/A' bridge 'N/A'
Configuration file '/etc/wpa_supplicant/wpa_supplicant.conf' -> '/etc/wpa_supplicant/wpa_supplicant.conf'
Reading configuration file '/etc/wpa_supplicant/wpa_supplicant.conf'
ctrl_interface='DIR=/var/run/wpa_supplicant GROUP=wheel'
update_config=1
Line: 7 - start of a new network block
ssid - hexdump_ascii(len=14):
     63 72 61 7a 79 74 65 6b 6e 69 63 69 61 6e         crazyteknician 
proto: 0x2
key_mgmt: 0x2
pairwise: 0x18
group: 0x18
PSK - hexdump(len=32): [REMOVED]
Priority group 0
   id=0 ssid='crazyteknician'
WEXT: cfg80211-based driver detected
wext: interface wlan0 phy: phy0
rfkill: initial event: idx=0 type=1 op=0 soft=0 hard=0
SIOCGIWRANGE: WE(compiled)=22 WE(source)=21 enc_capa=0xf
  capabilities: key_mgmt 0xf enc 0x1f flags 0x0
WEXT: Driver: b43
netlink: Operstate: ifindex=4 linkmode=1 (userspace-control), operstate=5 (IF_OPER_DORMANT)
Add interface wlan0 to a new radio phy0
wlan0: Own MAC address: somethingoranother
wpa_driver_wext_set_key: alg=0 key_idx=0 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=1 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=2 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=3 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=4 set_tx=0 seq_len=0 key_len=0
ioctl[SIOCSIWENCODEEXT]: Invalid argument
Driver did not support SIOCSIWENCODEEXT
wpa_driver_wext_set_key: alg=0 key_idx=5 set_tx=0 seq_len=0 key_len=0
ioctl[SIOCSIWENCODEEXT]: Invalid argument
Driver did not support SIOCSIWENCODEEXT
wpa_driver_wext_set_countermeasures
wlan0: RSN: flushing PMKID list in the driver
wlan0: Setting scan request: 0.100000 sec
ENGINE: Loading dynamic engine
ENGINE: Loading dynamic engine
EAPOL: SUPP_PAE entering state DISCONNECTED
EAPOL: Supplicant port status: Unauthorized
EAPOL: KEY_RX entering state NO_KEY_RECEIVE
EAPOL: SUPP_BE entering state INITIALIZE
EAP: EAP entering state DISABLED
Using existing control interface directory.
ctrl_interface_group=10 (from group name 'wheel')
ctrl_iface bind(PF_UNIX) failed: Address already in use
ctrl_iface exists and seems to be in use - cannot override it
Delete '/var/run/wpa_supplicant/wlan0' manually if it is not used anymore
Failed to initialize control interface 'DIR=/var/run/wpa_supplicant GROUP=wheel'.
You may have another wpa_supplicant process already running or the file was
left by an unclean termination of wpa_supplicant in which case you will need
to manually remove this file before starting wpa_supplicant again.

Failed to add interface wlan0
wlan0: Request to deauthenticate - bssid=00:00:00:00:00:00 pending_bssid=00:00:00:00:00:00 reason=3 state=DISCONNECTED
wlan0: State: DISCONNECTED -> DISCONNECTED
wpa_driver_wext_set_operstate: operstate 0->0 (DORMANT)
netlink: Operstate: ifindex=4 linkmode=-1 (no change), operstate=5 (IF_OPER_DORMANT)
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
wpa_driver_wext_set_countermeasures
wlan0: WPA: Clear old PMK and PTK
wlan0: Cancelling scan request
wlan0: Cancelling authentication timeout
Remove interface wlan0 from radio phy0
Remove radio phy0
netlink: Operstate: ifindex=4 linkmode=0 (kernel-control), operstate=6 (IF_OPER_UP)

Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6228
Location: Room 101

PostPosted: Tue Apr 19, 2016 7:00 pm    Post subject: Reply with quote

crayztechnique ...

that basically shows that you have another instance of wpa_supplicant running. So, either the previous instance of wpa_supplicant you started is still running (in which case kill it), or you're starting net.wlan0 in the runlevel (in which case stop it).

kill/stop ... remove the log file ... and try again.

best ... khay
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6228
Location: Room 101

PostPosted: Tue Apr 19, 2016 7:16 pm    Post subject: Reply with quote

NeddySeagoon wrote:
Google probably had it already, along with all the SSIDs they harvest when they make streetview.

NeddySeagoon ... they have it if you provide it (via one or other google products/service ... or via posting it on the internet) ... I'm not going to encourage them ;)

NeddySeagoon wrote:
Its only useful if you are within 100 yards or so of crayztechniques AP. I know I'm not, since crayzteknician does not appear in any WiFi scans I do.

Right, but if you have enough of them (and you can pick up a lot via searches) you basically have a commodity, and I wouldn't be surprised if someone were doing this and selling them. Similarly its trival to wardrive a whole city and map the SSID's, this sort of data you can also find online (with metadata to google maps). Put these two together and you could effecively take your internet scam on the road ... and be fairly difficult to track down.

best ... khay
Back to top
View user's profile Send private message
axl
l33t
l33t


Joined: 11 Oct 2002
Posts: 721
Location: Romania

PostPosted: Tue Apr 19, 2016 9:25 pm    Post subject: Reply with quote

run a dmesg. make sure you are not missing some firmware files in /lib/firmware. it's usually pretty trivial.
Back to top
View user's profile Send private message
crayztechnique
n00b
n00b


Joined: 03 Apr 2016
Posts: 30

PostPosted: Tue Apr 19, 2016 9:44 pm    Post subject: Reply with quote

Alright so after much sweat and tears (Oh the tears) I got it up and running. First major problem that pretty much fixed everything was getting the SSID set correctly because it's not crazyteknician it's crayzteknician. :lol:

Then I had to go through the process of going in circles removing the correct config files that wpa_supplicant had put in place with the wrong SSID and finally I used

Code:
wpa_supplicant -B -Dnl80211 -wlan0 -c /etc/wpa_supplicant.conf


Having that log file helped a lot so thanks for that. Much appreciation to everyone for the help. My old Lenovo is wireless these days! I'm gonna take her outside. LOL
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum