<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=text/html;charset=iso-8859-1 http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18882"></HEAD>
<BODY style="PADDING-LEFT: 10px; PADDING-RIGHT: 10px; PADDING-TOP: 15px"
id=MailContainerBody leftMargin=0 topMargin=0 CanvasTabStop="true"
name="Compose message area">
<DIV><FONT face=Calibri>Hi,</FONT></DIV>
<DIV><FONT face=Calibri></FONT> </DIV>
<DIV><FONT face=Calibri>(I'm new to posting questions on mailing lists.
Suggestions on good posting behaviour are appreciated. :) )</FONT></DIV>
<DIV><FONT face=Calibri></FONT> </DIV>
<DIV><FONT face=Calibri>FYI: I've also posted this issue on the Android
Development Google Group. </FONT></DIV>
<DIV><FONT face=Calibri></FONT> </DIV>
<DIV><FONT face=Calibri>This is what I'm trying to achieve: I would like to
write an Android app that is capable of talking to wpa_supplicant. More
specifically, I would like to connect to a WPA2-EAP secured network (with
authentication methods TTLS / PEAP / TLS), but since the device will be used by
several users, the user credentials will be supplied by the user in my app,
instead of by wpa_suplicant.conf. I don't want to write my own supplicant
software, I would like to be able to communicate with it. (I am able to connect
to the network when I provide the user credentials as well in the
/data/misc/wifi/wpa_supplicant.conf file)</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Calibri>I've looked at several solutions and their problems, and
I would like some advice on them. Maybe I've overlooked something: </FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Calibri>- Solution 1: Using the Android Wifi API. Problem: The
Android WiFi API doesn't seem to support TTLS / PEAP / TLS. Strange other thing
is: It appears to support LEAP, but I can't find a way to supply the user
credentials to the WifiConfiguration. </FONT></DIV>
<DIV><FONT face=Calibri></FONT> </DIV>
<DIV><FONT face=Calibri>- Solution 2: Letting the app write to
/data/misc/wifi/wpa_supplicant.conf and then reassociating. Problem: I
understand from the API that apps can only write to their own private space or
the external SD store. I've also tried writing to a file with the Terminal
Emulator app. This doesn't work. I can only write wpa_supplicant.conf in the adb
shell with root acces. </FONT></DIV>
<DIV><FONT face=Calibri></FONT> </DIV>
<DIV><FONT face=Calibri>- Solution 3: Talking directly to the control interface
of wpa_suplicant using Unix domain sockets. I found that the Android API
supplies us with the LocalSocket class for this. However, I have no idea how to
cummunicate with the wpa_supplicant control interface domain socket. (I will
also post this on a wpa_supplicant forum). </FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Calibri>- Solution 4: Using java.lang.Runtime and .Process for
running wpa_cli and communicating with it. Problem: I expect there will be
Manifest.permission conflicts. </FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Calibri>- Solution 5: Another option might be to use Android NDK
/ JNI to be able to use the helper functions in c that wpa_supplicant provides.
Problem: This might be a solution, but it seems to me that it complicates
matters a lot. And I also wonder if there might be some Manifest.permission
conflicts. </FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Calibri>- Solution 6: Finding some open source Java supplicant
code and adapting this. Problem: I haven't found it yet. (My C skills aren't so
good, and it needs to work on Android). </FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Calibri>I really need some help on this. Is there somebody with
some more experience on this topic? I hope somebody would be able to enlighten
me by providing some answers or pointers on where to look. </FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Calibri>Any help would be greatly appreciated. Thanks in
advance, </FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Calibri>a2ronus</FONT></DIV></BODY></HTML>