WiFi

by borhe » Tue, 16 Dec 2008 16:52:17 GMT


Sponsored Links
 Hi!
I am porting android to the ARM platform, i am trying now to make WiFi
work but got stuck a little bit,
My question is how should i start wpa_supplicant service: manually or
is it done by the framework, can't figure it out .
I compiled supplicant manually and tested it outside android and can
connect to AP.

Please Help!

Bellow is a failure log:

I/SystemServer(  241): Starting Status Bar Service.
I/WindowManager(  241): Input configuration changed: { scale=1.0
imsi=0/0 locale=en_US touch=3 key=2/2 nav=3 orien=2 }
I/SystemServer(  241): Starting Hardware Service.
I/SystemServer(  241): Starting NetStat Service.
I/SystemServer(  241): Starting Connectivity Service.
W/dalvikvm(  241): VFY: unable to resolve virtual method 437: Landroid/
net/NetworkStateTracker;.releaseWakeLock ()V
W/dalvikvm(  241): VFY:  rejecting opcode 0x6e at 0x00cb
W/dalvikvm(  241): VFY:  rejected Lcom/android/server/
ConnectivityService;.handleConnect (Landroid/net/NetworkInfo;)V
W/dalvikvm(  241): Verifier rejected class Lcom/android/server/
ConnectivityService;
E/SystemServer(  241): Failure starting Connectivity Service
E/SystemServer(  241): java.lang.VerifyError:
com.android.server.ConnectivityService
E/SystemServer(  241):  at com.android.server.ServerThread.run
(SystemServer.java:202)
E/AndroidRuntime(  241): Crash logging skipped, no checkin service
I/SystemServer(  241): Starting Notification Manager.
I/SystemServer(  241): Starting Location Manager.
D/LocationManagerService(  241): Constructed LocationManager Service
D/libhardware(  241): no GPS hardware on this device
D/LocationManagerService(  241): Found dir /data/location/gps
D/LocationManagerService(  241): name = gps
D/TrackProvider(  241): Loading properties file /data/location/gps/
properties
D/dalvikvm(  241): GC freed 6152 objects / 336576 bytes in 289ms
E/SystemServer(  241): Failure starting Location Manager
E/SystemServer(  241): java.lang.NullPointerException
E/SystemServer(  241):  at android.net.wifi.WifiManager.getScanResults
(WifiManager.java:483)
E/SystemServer(  241):  at
com.android.server.LocationManagerService.<init>
(LocationManagerService.java:487)
E/SystemServer(  241):  at com.android.server.ServerThread.run
(SystemServer.java:234)
E/AndroidRuntime(  241): Crash logging skipped, no checkin service

--~--~---------~--~----~------------~-------~--~----~

-~----------~----~----~----~------~----~------~--~---



WiFi

by solca » Tue, 16 Dec 2008 17:53:17 GMT


 


You can check the NITdroid patch to solve your problem:

 http://guug.org/nit/nitdroid/ 
--~--~---------~--~----~------------~-------~--~----~

-~----------~----~----~----~------~----~------~--~---


Sponsored Links


WiFi

by dimitr...@android.com » Tue, 16 Dec 2008 18:16:54 GMT


 Hi,
Framework supposes to start wpa_supplicant.
Or you can start it manually - framework will talk to it through
socket interface.
However framework will expect some data (for example from scan
results) in certain format.
For example, it expects Rssi value to be negative.





--~--~---------~--~----~------------~-------~--~----~

-~----------~----~----~----~------~----~------~--~---



WiFi

by pavan savoy » Fri, 19 Dec 2008 16:38:36 GMT


 i,

The wlan which I have in my setup, starts off with wlan_loader.
But before I start off the service wpa_supplicant, there needs to be an IP
address assigned & the interface has to be made up.

So is there a service which does that automatically, if from cmd line, I do
ifconfig wlan0 <ip_address> up.
Can I somehow do this inside the init.rc ? after wlan_loader ?

Also are there any pointers as to how to start off dhcpcd ? & who is
starting that ? like WifiService is starting wlan_loader & wpa_supplicant
via wifi.c in libhardware.

Thanks,
Pavan

On Tue, Dec 16, 2008 at 12:16 PM, dimitr...@android.com <
dimitr...@android.com> wrote:


--~--~---------~--~----~------------~-------~--~----~

-~----------~----~----~----~------~----~------~--~---



WiFi

by dimitr...@android.com » Fri, 19 Dec 2008 17:30:31 GMT


 i,

On Dec 19, 8:38am, "pavan savoy" <pavan.sa...@gmail.com> wrote:
Dm: Why do you think so ? IP has nothing to do with wpa_supplicant.

You can not do this - it doesn't make any sense. wlan_loader just
loads wifi firmware.
But for WiFi you need to be associated with AP at least.

Network framework starts dhcpcd. There is a network layer that is
responsible for this.
Look for wifi.c and hardware library.

--~--~---------~--~----~------------~-------~--~----~

-~----------~----~----~----~------~----~------~--~---



WiFi

by pavan savoy » Fri, 19 Dec 2008 17:51:07 GMT


 k, I am looking @ wifi.c. -  Have commented bunch of stuff, becos I don't
have driver as .ko [its built-in] & few other error checkings..
my situation is something like this.

I do "start wlan_loader", its successfully loads the firmware - done
If I do an ifconfig -a at this time, it shows interface is down.

Now I try to do a "start wpa_supplicant" from cmd line & it shows
"connection to wlan cannot be opened".

but the same error, connection to wlan can't be established.

questions
1. Connection here I assume is the ctrl_interface ? not the network iface ?

2: Should the interface be up before I start wpa_supplicant ? Should it have
an IP ?

3: How can I make use of dhcpcd, to assign an IP and make the wlan0 up ?

Thanks,
Pavan
On Fri, Dec 19, 2008 at 11:30 AM, dimitr...@android.com <
dimitr...@android.com> wrote:


--~--~---------~--~----~------------~-------~--~----~

-~----------~----~----~----~------~----~------~--~---



WiFi

by dimitr...@android.com » Fri, 19 Dec 2008 18:07:07 GMT


 ee my comments below.

On Dec 19, 9:50am, "pavan savoy" <pavan.sa...@gmail.com> wrote:
In case of built-in driver you may need to rewrite parts of network
manager because it expects to
be able to load / unload driver.

I don't understand, are you using same WiFi chip ?

Network framework talks to wpa_supplicant through socket interface.
Again, IP has nothing to do with wpa_supplicant. If you can not talk
to it try to get wpa_supplicant
debug output - run it from command-line with -dd option.

You can run dhcpcd client by yourself, however network framework takes
care of it.
Look for dhcpcd call in library layer.

--~--~---------~--~----~------------~-------~--~----~

-~----------~----~----~----~------~----~------~--~---



WiFi

by pavan savoy » Tue, 23 Dec 2008 23:08:18 GMT


 i,

Started the supplicant & wlan_loader from the command line.
I want to do wpa_cli and connect to supplicant.

How can I do that ?
A temperory file is created in /wlan0/ folder as wlan0 and my interface is
also named wlan0, so when I do a
wpa_cli -p/wlan0/ -iwlan0

It says "Could not connect to wpa_supplicant - re-trying"

What could be the problem?

regards,
Pavan

On Fri, Dec 19, 2008 at 12:06 PM, dimitr...@android.com <
dimitr...@android.com> wrote:


--~--~---------~--~----~------------~-------~--~----~

-~----------~----~----~----~------~----~------~--~---



WiFi

by dimitr...@android.com » Tue, 23 Dec 2008 23:15:15 GMT


 nfortunately you didn't tell how did you start wpa_supplicant.
Anyway, you need to run wpa_cli next way:
wpa_supplicant [-C xxxxxxx]
wpa_cli -p xxxxxxx

where xxxxxxx - path to sockets.

On Dec 23, 3:08pm, "pavan savoy" <pavan.sa...@gmail.com> wrote:
--~--~---------~--~----~------------~-------~--~----~

-~----------~----~----~----~------~----~------~--~---



WiFi

by pavan savoy » Tue, 23 Dec 2008 23:20:36 GMT


 h yeah sorry, I should have, I use the -c option wpa_supplicant.conf file.

Command is
wpa_supplicant /system/bin/wpa_supplicant -Dwext -iwlan0
-c/system/etc/wifi/wpa_supplicant.conf -dd

So, in this case I suppose -C is not required ??

regards,
pavan
On Tue, Dec 23, 2008 at 5:15 PM, dimitr...@android.com <
dimitr...@android.com> wrote:


--~--~---------~--~----~------------~-------~--~----~

-~----------~----~----~----~------~----~------~--~---



WiFi

by pavan savoy » Thu, 25 Dec 2008 04:26:10 GMT


 k,

Got the supplicant to start up, had to create the directories
/data/system/wpa_supplicant & /data/misc/wifi/sockets, because the
supplicant seems to be using them.
Now the problem is the commands,

DRIVER RSSI, DRIVER LINKSPEED, DRIVER MACADDR which are kind of documented
in wifi.h, but how are they supported in driver_wext.c ?

Because I see the same commands in a custom driver, driver_ti.c but nowwhere
in supplicant,
So why is android using commands, which are not in WEXT ? Should I be
implementing them ?

regards,
Pavan

On Tue, Dec 23, 2008 at 5:20 PM, pavan savoy <pavan.sa...@gmail.com> wrote:


--~--~---------~--~----~------------~-------~--~----~

-~----------~----~----~----~------~----~------~--~---



WiFi

by pavan savoy » Sat, 27 Dec 2008 16:33:22 GMT


 i,

The Scan command seems to be sent to the supplicant via Wext, however I see
a message "Unable to scan" on the UI, what does that mean ?

Also when I did get it to scan, It shows me the same set of APs, does it
store the scan results in some temporary location ?
I want to remove that & check. how do I do this ?
regards,
Pavan

On Wed, Dec 24, 2008 at 10:25 PM, pavan savoy <pavan.sa...@gmail.com> wrote:


--~--~---------~--~----~------------~-------~--~----~

-~----------~----~----~----~------~----~------~--~---



WiFi

by pavan savoy » Sun, 28 Dec 2008 19:48:08 GMT


 hanks Dimitry.
Finally got it working. Can now browse through using the interface after
connecting to AP.

But still want to know the right way to do it.

Thanks,
Pavan

On Sat, Dec 27, 2008 at 10:33 AM, pavan savoy <pavan.sa...@gmail.com> wrote:


--~--~---------~--~----~------------~-------~--~----~

-~----------~----~----~----~------~----~------~--~---



WiFi

by dimitr...@android.com » Mon, 29 Dec 2008 19:19:56 GMT


 i Pavan,

This is the open source project, and it supposes sharing experience.
If you explain to others what did you do to make it work for your
specific case, and
somebody else will share his case, then together we may create /
improve the common solution.
Meanwhile I can not even guess what did you do.

Thanks,

Dmitry

On Dec 28, 11:47am, "pavan savoy" <pavan.sa...@gmail.com> wrote:
--~--~---------~--~----~------------~-------~--~----~

-~----------~----~----~----~------~----~------~--~---



WiFi

by pavan savoy » Mon, 29 Dec 2008 22:47:38 GMT


 ure, why not,
This is my init.rc

service wlan_loader /system/bin/wlan_loader
disabled
oneshot
service ifcfg_new /system/bin/ifconfig wlan0 up
disabled
oneshot
service wpa_supplicant /system/bin/logwrapper /system/bin/wpa_supplicant
-Dwext -iwlan0 -c/system/etc/wifi/wpa_supplicant.conf -dd
group system
disabled
oneshot
service dhcpcd /system/bin/logwrapper /system/bin/dhcpcd -d wlan0
disabled
oneshot
wifi.c was changed to start these services along with wlan_loader &
supplicant. [i.e dhcpd & ifconfig]
Since driver uses WEXT it does not have
DRIVER START, STOP, RSSi, LINKSPEED, MACADDR etc...

However the new problem which has came up is, the supplicant when it tries
to do a SAVE_CONFIG, of the connected APs, truncates the config file [i.e
either the data/misc/wifi/wpa_supplicant.conf or the
system/etc/wifi/wpa_supplicant.conf ]
So I have to copy .conf file everytime I start android.

The log says,
"Failed to open system/etc/wifi/wpa_supplicant.conf for writing" -
config_file.c line 704 & around.

Please suggest,

regards,
Pavan



On Mon, Dec 29, 2008 at 1:19 PM, dimitr...@android.com <
dimitr...@android.com> wrote:


--~--~---------~--~----~------------~-------~--~----~

-~----------~----~----~----~------~----~------~--~---



Other Threads

1. Detecting a Tidal Wave of Android Apps

Hi all,

Flurry, as you may know from previous emails, has been supporting Android
since we launched our mobile application analytics service this January.
This month, we measured the most significant spike to date of android
developer activity within our system.  We're very e{*filter*}d about the upcoming
launch of several more Android handsets and see the correlation between
major android handset launches and developer support.

We shared some stats with Om Malik at GigaOm who has been closely following
the Android story unfold since the beginning.  You can read his take on take
on Android and what's to come at:
 http://www.***.com/ 

Best regards,

Peter Farago
VP Marketing
www.flurry.com
Follow us:
 http://www.***.com/ 
 http://www.***.com/ 

--~--~---------~--~----~------------~-------~--~----~

2. Cupcake : "Removed SD Card" notification after 1.5 upgrade

Are you getting your SD card insert gpio interrupt?





--~--~---------~--~----~------------~-------~--~----~
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: 

3. How to build Android emulator for special platform?

4. Cupcake : "Removed SD Card" notification after 1.5 upgrade

5. Does Android Support Video Rotation?

6. Native Shared Lib

7. Google: please change your release process