run "setprop ctrl.start wpa_supplicant" manually
来源:互联网 发布:ios同步请求数据 编辑:程序博客网 时间:2024/06/01 08:48
https://groups.google.com/forum/#!topic/android-porting/Cgv-rGMJwX0
{
char supp_status[PROPERTY_VALUE_
const char *ctrl_prop = (startIt ? "ctl.start" : "ctl.stop");
const char *desired_status = (startIt ? "running" : "stopped");
int count = 20; /* wait at most 20 seconds for completion */
if (property_get(SUPP_PROP_NAME, supp_status, NULL)
&& strcmp(supp_status, desired_status) == 0) {
return 0; /* supplicant already running */
}
property_set(ctrl_prop, SUPPLICANT_NAME);
while (count-- > 0) {
usleep(1000000);
if (property_get(SUPP_PROP_NAME, supp_status, NULL)) {
if (strcmp(supp_status, desired_status) == 0)
return 0;
}
}
return -1;
}
Do you know which line is to start wpa_supplicant?
Thanks
Richard
2008/12/9 Jithu Jance <jithu...@gmail.com>:
> Thanks a lot Richard. This is really a good pointer..
>
>>> Jithu Jance.
>
>
> On Tue, Dec 9, 2008 at 12:50 PM, Richard Zhao <linu...@gmail.com> wrote:
>>
>> I think it's :
>> GUI -> libhardware -> wpa_supplicant -> wext -> wifi driver
>> Your driver is using wireless externsion, right?
>>
>> libhardware is now using Ti wlan driver. Maybe we must modify
>> hardware/libhardware/wifi/
>>
>> Thanks
>> Richard
>>
>> 2008/12/9 Jithu Jance <jithu...@gmail.com>:
>> > Hi Richard,
>> >
>> > You r welcome.. btw I am also stuck up there.. How did u manage to hook
>> > wpa_supplicant to GUI??? I saw Wifi Manager framework folder. I am
>> > confused
>> > how we could hook our wifi driver to the GUI.
>> >
>> > From your mail, i understand GUI talks to the wpa_supplicant which
>> > inturn
>> > talks to the wlandriver. But I didnt see anything in the wpa_supplican
>> > that
>> > is using the wifi manager framework. or is it some service like
>> > wifimanager
>> > which actually talks to the supplicant???
>> >
>> > GUI - wpa_supplicant - wlandriver
>> >
>> > if you have any idea on the above query pls help me out.
>> >
>> > What I did try was to connect using hyperterminal to the eval board and
>> > invoke supplicant through commandline. It worked but doesn't make sense
>> > as
>> > its not connected to the GUI. I want to use GUI for controlling my wifi
>> > driver
>> >
>> >
>> > Thanks..
>> >
>> >>> Jithu
>> >
>> >
>> > On Tue, Dec 9, 2008 at 7:32 AM, Richard Zhao <linu...@gmail.com> wrote:
>> >>
>> >> Hi Jithu,
>> >>
>> >> Thanks very much!
>> >> Now I compiled out wpa_supplicant, but the GUI always says
>> >> wpa_supplicant load failed.
>> >>
>> >> Thanks
>> >> Richard
>> >>
>> >> 2008/12/7 Jithu Jance <jithu...@gmail.com>:
>> >> > I saw ur question on wpa_supplicant for android
>> >> >
>> >> > I also got stuck at the same problem.. then i modified Android.mk
>> >> > file
>> >> > in
>> >> > wpa_supplicant dir and changed BUILD_SUPPLICANT :=true. Make sure u
>> >> > edit
>> >> > .config file to include WEXT. and then build android again.. You can
>> >> > find
>> >> > wpa_supplicant in system/bin directory..
>> >> >
>> >> >>> Jithu Jance.
>> >> >
>> >
>> >
>
>
wpa_supplicant service.
I tried to run "setprop ctrl.start wpa_supplicant" manually, but
wpa_supplicant is not run.
I've added something in init.rc:
service wpa_supplicant /system/bin/wpa_supplicant -Dwext -i eth1
-C/data/misc/wifi/sockets -c/system/etc/wifi/wpa_
user bluetooth
group bluetooth net_bt_admin
disabled
What's wrong?
Thanks
Richard
2008/12/10 Richard Zhao <linu...@gmail.com>:
properties.c
this api will send property information for init process through
socket.
with the latest init source code, init shows error message when fails
to start service.
check existance of /dev/socket/property_service and update init with
the latest one.
--
nagamatu
On 12月10日, 午後3:40, "Richard Zhao" <linux...@gmail.com> wrote:
> I see "property_set(ctrl_prop, SUPPLICANT_NAME)" is starting the
> wpa_supplicant service.
> I tried to run "setprop ctrl.start wpa_supplicant" manually, but
> wpa_supplicant is not run.
> I've added something in init.rc:
> service wpa_supplicant /system/bin/wpa_supplicant -Dwext -i eth1
> -C/data/misc/wifi/sockets -c/system/etc/wifi/wpa_
> user bluetooth
> group bluetooth net_bt_admin
> disabled
>
> What's wrong?
>
> Thanks
> Richard
>
> > static int control_supplicant(int startIt)
> > {
> > char supp_status[PROPERTY_VALUE_
> > const char *ctrl_prop = (startIt ? "ctl.start" : "ctl.stop");
> > const char *desired_status = (startIt ? "running" : "stopped");
> > int count = 20; /* wait at most 20 seconds for completion */
>
> > if (property_get(SUPP_PROP_NAME, supp_status, NULL)
> > && strcmp(supp_status, desired_status) == 0) {
> > return 0; /* supplicant already running */
> > }
> > property_set(ctrl_prop, SUPPLICANT_NAME);
>
> > while (count-- > 0) {
> > usleep(1000000);
> > if (property_get(SUPP_PROP_NAME, supp_status, NULL)) {
> > if (strcmp(supp_status, desired_status) == 0)
> > return 0;
> > }
> > }
> > return -1;
> > }
>
> > Do you know which line is to start wpa_supplicant?
>
> > Thanks
> > Richard
>
>
> >>>> Jithu Jance.
>
>
> >>> I think it's :
> >>> GUI -> libhardware -> wpa_supplicant -> wext -> wifi driver
> >>> Your driver is using wireless externsion, right?
>
> >>> libhardware is now using Ti wlan driver. Maybe we must modify
> >>> hardware/libhardware/wifi/
>
> >>> Thanks
> >>> Richard
>
>
> >>> > You r welcome.. btw I am also stuck up there.. How did u manage to hook
> >>> > wpa_supplicant to GUI??? I saw Wifi Manager framework folder. I am
> >>> > confused
> >>> > how we could hook our wifi driver to the GUI.
>
> >>> > From your mail, i understand GUI talks to the wpa_supplicant which
> >>> > inturn
> >>> > talks to the wlandriver. But I didnt see anything in the wpa_supplican
> >>> > that
> >>> > is using the wifi manager framework. or is it some service like
> >>> > wifimanager
> >>> > which actually talks to the supplicant???
>
> >>> > GUI - wpa_supplicant - wlandriver
>
> >>> > if you have any idea on the above query pls help me out.
>
> >>> > What I did try was to connect using hyperterminal to the eval board and
> >>> > invoke supplicant through commandline. It worked but doesn't make sense
> >>> > as
> >>> > its not connected to the GUI. I want to use GUI for controlling my wifi
> >>> > driver
>
> >>> > Thanks..
>
> >>> >>> Jithu
>
>
> >>> >> Hi Jithu,
>
> >>> >> Thanks very much!
> >>> >> Now I compiled out wpa_supplicant, but the GUI always says
> >>> >> wpa_supplicant load failed.
>
> >>> >> Thanks
> >>> >> Richard
>
/dev/socket/property_service
I can't see any error message.
init I'm using is compiled out from android 1.0 source.
Thanks
Richard
2008/12/10 nagamatu <naga...@gmail.com>:
# start wpa_supplicant
This start command just do property_set("ctl.start", service_name)
And get the system property of "init.svc.wpa_supplicant".
--
nagamatu
On 12月10日, 午後4:57, "Richard Zhao" <linux...@gmail.com> wrote:
> # ls /dev/socket/property_service
> /dev/socket/property_service
>
> I can't see any error message.
> init I'm using is compiled out from android 1.0 source.
>
> Thanks
> Richard
>
2008/12/10 nagamatu <naga...@gmail.com>:
>
> Can you start wpa_supplicant by start command like:
> # start wpa_supplicant
> This start command just do property_set("ctl.start", service_name)
>
> And get the system property of "init.svc.wpa_supplicant".
>
> --
> nagamatu
>
> On 12月10日, 午後4:57, "Richard Zhao" <linux...@gmail.com> wrote:
command from the shell?
After "start wpa_supplicant", "getprop init.svc.wpa_supplicant" show
"restarting".
Thanks
Rihard
2008/12/11 Sean McNeil <seanm...@gmail.com>:
init.svc.wpa_supplicant" shows "running".
In case of termination of service execution, status becomes "stopped".
And when service is not oneshot
mode, init will try to restart this service again.
First debug your wpa_supplicant by executing it from debugger or
strace.
--
nagamatu
On 12月12日, 午前9:20, "Richard Zhao" <linux...@gmail.com> wrote:
> Sure I can run it from console.
> After "start wpa_supplicant", "getprop init.svc.wpa_supplicant" show
> "restarting".
>
> Thanks
> Rihard
>
>
>
> > Are you even certain you have the wpa_supplicant binary? Can you run the
> > command from the shell?
>
> > Richard Zhao wrote:
> >> It still don't work.
>
have the right permission for wpa_supplicant to read and write.
Xiaopeng
- run "setprop ctrl.start wpa_supplicant" manually
- adb.exe,start-server' failed -- run manually if necessary
- adb.exe,start-server' failed -- run manually if necessary
- adb.exe,start-server' failed -- run manually if necessary
- 【ADB server didn't ACK||'adb.exe start-server' failed -- run manually if necessary】问题解决办法
- adb报:adb.exe,-P,8879,start-server' failed -- run manually if necessary 端口占用
- RUN fsck MANUALLY
- Android start simulator manually
- Start the ASM manually
- platform-tools\adb.exe,start-server' failed -- run manually if necessary,adb启动失败,端口被占用
- start->run
- /: UNEXPECTED INCONSISTENCY; RUN FSCK MANUALLY
- UNExcepted inconsistency; run fsck manually
- unexpected inconsistency;RUN fsck MANUALLY
- UNEXPECTED INCONSISTENCY; RUN FSCK MANUALLY
- UNEXPECTED INCONSISTENCY; RUN FSCK MANUALLY
- centos unexpected inconsistency run fsck manually解决
- unexpected inconsistency;RUN fsck MANUALLY 解决方案
- 炼数成金《机器学习》系列00
- 手把手教你使用Git
- L2-007. 家庭房产
- 【转载】透视“专利恶霸”系列之二 蜕变后的苹果有了新玩法
- CUDA总结:线程网络和线程分配
- run "setprop ctrl.start wpa_supplicant" manually
- Servlet动态资源手动配置
- 如何用HTML5+CSS3实现无插件拖拽上传图片(支持预览与批量)
- hibernate 注解
- 标准C++中的string类的用法总结
- BMP文件格式详解(BMP file format)
- 费马定理
- 针对Minkolov发布的“根据词向量计算目标单词的N近邻词汇”源码的分析
- 蓝牙相关