LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking
User Name
Password
Linux - Wireless Networking This forum is for the discussion of wireless networking in Linux.

Notices


Reply
  Search this Thread
Old 02-18-2015, 06:50 PM   #1
bugz33
LQ Newbie
 
Registered: Feb 2015
Posts: 2

Rep: Reputation: Disabled
Exclamation Help with wpa_supplicant/wpa_cli


I'm using G'Five GPad 701 ( not a very popular device I know)
Android version: 4.2.2 (official ROM/rooted)
Kernel version: 3.4.5
root@tom-VirtualBox #2
(Any other information needed?)


I'm trying to connect to WPS network, but since it's not possible without pressing the WPS button on the router anymore after android 4.1+

I googled a lot and found that it's possible to connect to WPS networks using wpa_cli

I got the file and put it in /system/bin and modified the permissions (checked all boxes) but I'm not sure about "owner" and "group" , I've set them to : owner root, group root

Opening terminal and using:

Code:
su
wpa_cli
I get the following:

Code:
wpa_cli
wpa_cli v2.0-devel-4.1.2
Copyright (c) 2004-2012, Jouni Malinen <j@w1.fi> and contributors

This software may be distributed under the terms of the BSD license.
See README for more details.


Using interface 'wlan0'
Warning: Failed to attach to wpa_supplicant.
Could not connect to wpa_supplicant - re-trying
Warning: Failed to attach to wpa_supplicant.
Warning: Failed to attach to wpa_supplicant.
Warning: Failed to attach to wpa_supplicant.
Warning: Failed to attach to wpa_supplicant.
and it just loops on and on.

I've been trying to work around it for hours now and understand what's wrong, but I can't figure it out.
I tried changing permissions of wpa_cli , wpa_supplicant , wpa_supplicant.conf , and even all folders from root to /sockets

All other forums I found talk about wpa_cli in linux not android, and even trying their solutions did not work for me.

Also, there are multiple wpa_supplicant/wpa_supplicant.conf files around my device, I don't know which ones are used for wpa_cli .. ?

Anyone can help with that?

Thanks in advance!
 
Old 02-19-2015, 12:10 PM   #2
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,882
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
Not sure if this will help, but for a WPA network I have a script which I use on a particular system, 2.6.31 kernel.
Code:
            /sbin/start-stop-daemon -K -x /sbin/wpa_supplicant;
            /usr/bin/wpa_passphrase $ESSID $PSK > /config/wpa.conf;
            /sbin/wpa_supplicant -B -Dwext -i$IFACE -c/config/wpa.conf
And then after that it depends whether I'm going to use DHCP or a static IP.

The crux of this is that I needed to stop the daemon, generate a passphrase $ESSID is just the SSID of the network and $PSK is just the key phrase for the WIFI network. This goes into a config file and then that file is used to re-run the WPA supplicant.
 
Old 02-19-2015, 07:14 PM   #3
bugz33
LQ Newbie
 
Registered: Feb 2015
Posts: 2

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by rtmistler View Post
Not sure if this will help, but for a WPA network I have a script which I use on a particular system, 2.6.31 kernel.
Code:
            /sbin/start-stop-daemon -K -x /sbin/wpa_supplicant;
            /usr/bin/wpa_passphrase $ESSID $PSK > /config/wpa.conf;
            /sbin/wpa_supplicant -B -Dwext -i$IFACE -c/config/wpa.conf
And then after that it depends whether I'm going to use DHCP or a static IP.

The crux of this is that I needed to stop the daemon, generate a passphrase $ESSID is just the SSID of the network and $PSK is just the key phrase for the WIFI network. This goes into a config file and then that file is used to re-run the WPA supplicant.

Thanks for the reply, I was giving up on LQ, over 100 views on my post and still no reply :P

I will be trying this right away and posting the result, but like I said in my post, I'm trying to connect via WPS, so do I just put the WPS PIN in the PSK space, or is there another argument (noob alert) for it ?


------

Edit: trying this, it failed on the first line
Code:
sh: /sbin/start-stop-daemon: not found

Last edited by bugz33; 02-19-2015 at 07:19 PM.
 
Old 02-23-2015, 06:52 AM   #4
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,882
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
Being that it's Android (? correct?), I'm not sure if you have the full set of commands which are typical to most distributions. So you either can or can't install that binary command for that system and processor.

I really don't have experience attaching to WPS via the command line. I saw you attempting to use WPA commands and made an assumption. If WPS is an entirely different set of rules or protocol, then my advice is probably useless. If WPA is the security and WPS is merely a description to designate that the network is protected in some form, then maybe. But I do suspect not.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
wpa_cli in place of wicd Josh000 Slackware 5 12-23-2009 12:10 PM
Enabled WPA2 but connot use wpa_cli commands.... sa_riyaskhan Linux - Wireless Networking 2 08-09-2008 01:39 AM
wpa_supplicant help Aerolinux Linux - Hardware 4 02-20-2007 01:00 PM
wpa_supplicant hosler Slackware 7 01-25-2006 04:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking

All times are GMT -5. The time now is 10:46 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration