Hi Weber

to what permission i need to change?. current my system is showing

# cd dhcpcd
# ls -l
drwxr-xr-x root     root              2010-08-19 07:56 dhcpcd-hooks
-rwxrwxrwx root     shell        1009 2010-08-19 07:00 dhcpcd-run-
hooks
-rw-r--r-- root     root          189 2010-08-19 07:20 dhcpcd.conf


>From logs i am getting  same issue permission denied. this is in
froyo.

D/dhcpcd  ( 1412): sending DHCP_DISCOVER with xid 0xeb49aec1, next in
32.75 seconds
E/dhcpcd  ( 1412): timed out
D/dhcpcd  ( 1412): executing `/system/etc/dhcpcd/dhcpcd-run-hooks',
reason FAIL
I//system/bin/dhcpcd( 1411): [: permission denied
D/dhcpcd  ( 1412): broadcasting for a lease
D/dhcpcd  ( 1412): sending DHCP_DISCOVER with xid 0x93facc20, next in
4.76 seconds
I/WifiStateTracker( 1010): DhcpHandler: DHCP request failed: DHCP
result was failed




On Jul 23, 6:07 pm, Weber <[email protected]> wrote:
> Thanks,Ashwin
> At last I found that  it was caused  by the permission of /system/etc/
> dhcpcd/dhcpcd-run-hooks
>  I changed it ,and now it can get the ip addr and connect,I can use
> iwconfig to see the info or eth1
> # iwconfig
> lo        no wireless extensions.
>
> eth0      no wireless extensions.
>
> usb0      no wireless extensions.
>
> eth1      IEEE 802.11b/g  ESSID:"Antrose-11g"
>           Mode:Managed  Frequency:2.437 GHz  Access Point: 00:15:E9:0C:
> 87:7C
>           Bit Rate:1 Mb/s   Tx-Power=13 dBm
>           Retry limit:8   RTS thr=2347 B   Fragment thr=2346 B
>           Encryption key:off
>           Power Management:off
>           Link Quality=84/100  Signal level=-57 dBm  Noise level=-92
> dBm
>           Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:108
>           Tx excessive retries:58  Invalid misc:12279   Missed beacon:
> 0
>
> # ifconfig
> eth0      Link encap:Ethernet  HWaddr 00:22:12:34:56:90
>           inet addr:192.168.10.123  Bcast:192.168.10.255  Mask:
> 255.255.255.0
>           UP BROADCAST MULTICAST  MTU:1500  Metric:1
>           RX packets:0 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:1000
>           RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
>           Interrupt:74 Base address:0x300
>
> eth1      Link encap:Ethernet  HWaddr 00:1A:6B:A2:38:65
>           inet addr:192.168.10.69  Bcast:192.168.10.255  Mask:
> 255.255.255.0
>           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>           RX packets:255 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:1000
>           RX bytes:22342 (21.8 KiB)  TX bytes:1236 (1.2 KiB)
>
> lo        Link encap:Local Loopback
>           inet addr:127.0.0.1  Mask:255.0.0.0
>           UP LOOPBACK RUNNING  MTU:16436  Metric:1
>           RX packets:0 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:0
>           RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
>
> But the signal bar on the top  seem to be none(actually in settin->
> wireless & networks->wifi settings,the signal bar is 2/3 full )
> So I found that I can not access the internet.
> So could you tell me why? Is becuase of the signal or something else
> such as eth0(defualt to use eth0? I don't know)?
>
> Thankyou
> --Weber
> On Jul 22, 9:52 pm, Ashwin Bihari <[email protected]> wrote:
>
> > Weber,
>
> > I have the following in my init.rc file associated with brining up the
> > WiFi interface:
>
> > #-----
> > service wpa_supplicant /system/bin/logwrapper
> > /system/bin/wpa_supplicant -Dwext -iwlan0
> > -c/system/etc/wifi/wpa_supplicant.conf -dd
> >     disabled
> >     group system
>
> > service dhcpcd /system/bin/logwrapper /system/bin/dhcpcd -d wlan0
> >     disabled
> >     oneshot
> >     #group systemdhcp
> > #------
>
> > My interface is called wlan0..
>
> > -- Ashwin
>
> > On Thu, Jul 22, 2010 at 9:37 AM, Weber <[email protected]> wrote:
> > > Hi Ashwin
> > > I  tried the wpa_supplicant code of donut  ,and then problem went
> > > away.
>
> > > Now my board can scan the ap and return the results, but it still can
> > > not connect to ap.
> > > Maybe it is because of thedhcp
>
> > > and in init.rc,My  dhcpservice is started by the follow line:
>
> > >  service dhcpcd /system/bin/dhcpcd -f /system/etc/dhcpcd/dhcpcd.conf -
> > > d eth1
> > >  group systemdhcpwifi
> > >  disabled
> > >  oneshot
>
> > > but it seems that it can not work, the logs are:
> > > D/WifiStateTracker(  713): Deconfiguring interface and stoppingDHCP
> > > D/WifiStateTracker(  713): DhcpHandler:DHCPrequeststarted
> > > I/WifiStateTracker(  713): DhcpHandler:DHCPrequestfailed: Timed out
> > > waiting forDHCPto finish
> > > V/WifiStateTracker(  713): Changing supplicant state: COMPLETED ==>
> > > DORMANT
> > >  D/WifiStateTracker(  713): Deconfiguring interface and stoppingDHCP
>
> > > and I started thedhcpmanually, it says:flock
> > > # dhcpcd -f /system/etc/dhcpcd/dhcpcd.conf -d eth1
> > > eth1: flock `/data/misc/dhcp/dhcpcd-eth1.pid': Try again
>
> > > Could you give me some clue?
> > > Thanks!
> > > --Weber
> > > On Jul 21, 10:40 am, Ashwin Bihari <[email protected]> wrote:
> > >> Weber,
>
> > >> This is exactly what I faced when I recently tried to get theWiFiup
> > >> and running on my Eclair based device..I had everything up and running
> > >> on Donut and I copied the configuration and all and kept getting these
> > >> 'permission denied' and 'operation not permitted' with the chown/mkdir
> > >> related to ctrl_interface and so on..
>
> > >> After monkeying with the wpa_supplicant.conf file and the init.rc file
> > >> with the various user/group permissions..just on a whim I decided to
> > >> do a diff between the older wpa_supplicant code and the new one and
> > >> there were a few differences..I just brought back all of the older
> > >> wpa_supplicant code and BOOMWiFiwas up and running in Eclair..
>
> > >> I think wpa_supplicant is somehow broken in Eclair and needs to be
> > >> patched to work..I'll have to go through my diff step by step and
> > >> figure out what exactly breaks things..and I might do that over the
> > >> next few weeks..
>
> > >> Regards
> > >> -- Ashwin
>
> > >> On Tue, Jul 20, 2010 at 10:05 PM, Weber <[email protected]> wrote:
> > >> > Hi
> > >> > Just now I started the wpa_supplicant mannually, but is seem that it
> > >> > can not be started,like this:
> > >> > # wpa_supplicant -dd -Dwext -ieth1 -c /system/etc/wifi/
> > >> > wpa_supplicant.conf&
> > >> > # ioctl[SIOCSIWPMKSA]: Invalid argument
> > >> > mkdir[ctrl_interface]: Permission denied
>
> > >> > [1] + Done(255)                  wpa_supplicant -dd -Dwext -ieth1 -c /
> > >> > system/etc/wifi/wpa_supplicant.conf
> > >> > Then I grep and found that "mkdir[ctrl_interface]" is in
> > >> > ctrl_iface_unix.c ,and what confused me is that it is not inside the"
> > >> > ifdefANDROIDendif" but now I am using theandroidprivate socket.
>
> > >> > by the way,Someone had mentioned in the groups that
> > >> > wpa_supplicant/Android.mk
>
> > >> > (3.1)
>
> > >> > LOCAL_PATH := $(call my-dir)
>
> > >> > WPA_BUILD_SUPPLICANT := true
>
> > >> > ifneq ($(TARGET_SIMULATOR),true)
>
> > >> >  ifneq ($(BOARD_WPA_SUPPLICANT_DRIVER),)
>
> > >> >    WPA_BUILD_SUPPLICANT := true
>
> > >> >    CONFIG_DRIVER_$(BOARD_WPA_SUPPLICANT_DRIVER) = y
>
> > >> >  endif
>
> > >> > (3.2) remove mark symbol, and look like this
>
> > >> > ########################
>
> > >> > local_target_dir := $(TARGET_OUT)/etc/wifi
>
> > >> > include $(CLEAR_VARS)
>
> > >> > LOCAL_MODULE := wpa_supplicant.conf
>
> > >> > LOCAL_MODULE_TAGS := user
>
> > >> > LOCAL_MODULE_CLASS := ETC
>
> > >> > LOCAL_MODULE_PATH := $(local_target_dir)
>
> > >> > LOCAL_SRC_FILES := $(LOCAL_MODULE)
>
> > >> > include $(BUILD_PREBUILT)
>
> > >> > But in My wpa_supplicant/Android.mk WPA_BUILD_SUPPLICANT :=
> > >> > false ,Does this matter?
>
> > >> > Thank you!
> > >> > --Weber
> > >> > On Jul 21, 9:22 am, Weber <[email protected]> wrote:
> > >> >> Hi,I read yourwifiportingguide ,and followed it
> > >> >> but the error still appears--By the way the version I use is eclair
> > >> >> 2.1-update1
>
> > >> >> E/WifiHW  (  708): Unable to open connection to supplicant on "/data/
> > >> >> system/wpa_supplicant/sta": No such file or directory
>
> > >> >> Here is myportingflow:
> > >> >> 1.
> > >> >> build/target/board/generic/BoardConfig.mk
> > >> >> BOARD_WPA_SUPPLICANT_DRIVER := WEXT
> > >> >> I also try to add ------HAVE_CUSTOM_WIFI_DRIVER_2 := true,but it still
> > >> >> cannot work
> > >> >> 2.
> > >> >> 2.1 modify external/wpa_supplicant/common.c and set wpa_debug_level =
> > >> >> MSG_DEBUG
> > >> >> 2.2 modify common.h and change #define wpa_printf from if ((level) >=
> > >> >> MSG_INFO) to if ((level) >= MSG_DEBUG)
> > >> >> 3.
> > >> >> system/etc/wifi/wpa_supplicant.conf and data/misc/wifi/
> > >> >> wpa_supplicant.conf
> > >> >> ctrl_interface=DIR=/data/system/wpa_supplicant GROUP=wifi
> > >> >> update_config=1
> > >> >> ap_scan=1
> > >> >> 4.
> > >> >> init.rc
> > >> >>     mkdir /system/etc/wifi0777wifiwifi
> > >> >>     chmod 0777 /system/etc/wifi
> > >> >>     chmod 0777 /system/etc/wifi/wpa_supplicant.conf
> > >> >>     chownwifiwifi/system/etc/wifi/wpa_supplicant.conf
>
> > >> >>  ##wpa_supplicant control socket forandroidwifi.c (androidprivate
> > >> >> socket)
> > >> >> mkdir /data/misc/wifi0777wifiwifi
> > >> >> mkdir /data/misc/wifi/sockets 0777wifiwifi
> > >> >> chmod 0777 /data/misc/wifi
> > >> >> chmod 0777 /data/misc/wifi/wpa_supplicant.conf
> > >> >> chownwifiwifi/data/misc/wifi
> > >> >> chownwifiwifi/data/misc/wifi/wpa_supplicant.conf
>
> > >> >>     ## wpa_supplicant socket (unix socket mode)
> > >> >>     mkdir /data/system/wpa_supplicant 0777wifiwifi
> > >> >>     chmod 0777 /data/system/wpa_supplicant
> > >> >>     chownwifiwifi/data/system/wpa_supplicant
> > >> >>     chownwifiwifi/data/system
> > >> >>     chownwifiwifi/data
>
> > >> >>     ## wpa_supplicant socket (unix socket mode--another goup version)
> > >> >> ----when itfailed,I try this one ,stillfailed
> > >> >> #    mkdir /data/system/wpa_supplicant 0777 system system
> > >> >> #    chmod 0777 /data/system/wpa_supplicant
> > >> >> #    chown system system /data/system/wpa_supplicant
> > >> >> #    chown system system /data/system
> > >> >> #    chown system  system /data
> > >> >> 5.init.rc
> > >> >> service wpa_supplicant /system/bin/wpa_supplicant -dd -Dwext -ieth1 -
> > >> >> c /system/etc/wifi/wpa_supplicant.conf
> > >> >> group systemwifiinet
> > >> >> disabled
> > >> >> oneshot
>
> > >> >> service dhcpcd /system/bin/dhcpcd -f /system/etc/dhcpcd/dhcpcd.conf -d
> > >> >> eth1
> > >> >> group system dhcpwifi
> > >> >> disabled
> > >> >> oneshot
>
> > >> >> /system/etc/dhcpcd/dhcpcd.conf
> > >> >> interface eth1
> > >> >> option subnet_mask, routers, domain_name_servers
> > >> >> 6.
>
> ...
>
> read more »

-- 
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting

Reply via email to