USB wireless can't get an IP address via dhcp

My openSUSE boxes are OK and I can see the Edimax dongle attached to the
Beagleboard beaconing.
From /etc/network/interfaces

hello Sid,
   this is common place. lost of posts regarding wifi and BB.
You didn't mention your BB os you are using.
Short answer that usually works is:

Break link to /etc/resolv.conf
rm -f /etc/resolv.conf

resolv.conf should have your dns

Disable/etc /init.d/connman
chmod -x /etc /init.d/connman

reboot

I use static ip's and edit my hosts. hostname. resolve.conf.
interfaces files.

I hope you get it working
Don Lewis

hello Sid,
   this is common place. lost of posts regarding wifi and BB.
You didn't mention your BB os you are using.
Short answer that usually works is:

Break link to /etc/resolv.conf
rm -f /etc/resolv.conf

It was a hard file before and on reboot it makes the symlink to
/var/run/resolv.conf which is empty.

resolv.conf should have your dns

The dns was in the original /etc/resolv.conf file.

Disable/etc /init.d/connman

Do you mean "stop" here?

chmod -x /etc /init.d/connman

Was already rwx-r-x-r-x.

reboot

No change after reboot.

I use static ip's and edit my hosts. hostname. resolve.conf.
interfaces files.

I shall try using static values with the ESSID and WPA-PSK key added.

I hope you get it working
Don Lewis
----------------------------------

Regards
Sid.

Will people please stop posting such hacks? In the connman case you should do one of the following:

* use update-rc.d to disable the startup scripts
* edit /var/lib/connman/defaults.conf and add something like
[Configuration]
Policy=manual
Priority=200
* edit /var/lib/connman/dev_<your mac addres>.conf and change Policy to manual
* use the connman gui to have connman ignore the interface

regards,

Koen

Disable/etc /init.d/connman
chmod -x /etc /init.d/connman

Will people please stop posting such hacks? In the connman case you
should do one of the following:

* use update-rc.d to disable the startup scripts
* edit /var/lib/connman/defaults.conf and add something like
[Configuration]
Policy=manual
Priority=200

File doesn't exist, but I can create it.

* edit /var/lib/connman/dev_<your mac addres>.conf and change Policy to
manual

OK, it's set to auto.

* use the connman gui to have connman ignore the interface

Keyboard is the only USB device that is never enumerated, so I shall
have to edit the MMC on one of my boxes.
# less /var/lib/connman/dev_00_0E_2E_E3_80_9B.conf

[Configuration]
Policy=auto
Priority=100
ScanInterval=30

regards,

Koen

Regards
Sid.

Your card is not associated with any accespoint, so dhcp will never work.

regards,

Koen

In /etc/network/interfaces I have tried
iface wlan0 inet dhcp

        wpa-essid TalkTalk520
        wpa-psk XXXXXXXXXXXXXXXX
and
iface wlan0 inet dhcp
  wpa-conf /etc/wpa_supplicant.conf
  wpa-driver hostap

# less /etc/wpa_supplicant.conf
ctrl_interface=/var/run/wpa_supplicant

# home network; allow all valid ciphers
          network={
               ssid="TalkTalk520"
               scan_ssid=1
               key_mgmt=WPA-PSK
               psk="XXXXXXXXXXXXXXXX"
          }
Regards
Sid.

Maybe it's a little silly question but... Have you tried 'ifup wlan0'?

beagleboard login: root
root@beagleboard:~# ifup wlan0
WPA: Configuring Interface
[ 62.844360] ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 72.491973] ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
udhcpc (v1.13.2) started
run-parts: /etc/udhcpc.d/00avahi-autoipd exited with code 1
Sending discover...
Sending discover...
Sending discover...
No lease, failing
root@beagleboard:~# iwconfig wlan0
wlan0 IEEE 802.11bg ESSID:"TalkTalk520"
          Mode:Managed Frequency:2.462 GHz Access Point: Not-Associated
          Tx-Power=15 dBm
          Retry min limit:7 RTS thr:off Fragment thr=2352 B
          Encryption key:off
          Power Management:off
          Link Quality:0 Signal level:0 Noise level:0
          Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
          Tx excessive retries:0 Invalid misc:0 Missed beacon:0
ifconfig doesn't look right, must check the interfaces file again to see
if avahi is on. Besides address should be 192.168.1.x
root@beagleboard:~ ifconfig
wlan0 Link encap:Ethernet HWaddr 00:0E:2E:E3:80:9B
          inet6 addr: fe80::20e:2eff:fee3:809b/64 Scope:Link
          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)

wlan0:avahi Link encap:Ethernet HWaddr 00:0E:2E:E3:80:9B
          inet addr:169.254.9.27 Bcast:169.254.255.255 Mask:255.255.0.0
          UP BROADCAST MULTICAST MTU:1500 Metric:1

wmaster0 Link encap:UNSPEC HWaddr
00-0E-2E-E3-80-9B-50-C7-00-00-00-00-00-00-00-00
          UP BROADCAST RUNNING 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)

root@beagleboard:~#

Some stuff from dmesg - looks like it's disconnecting for some reason

Attached is a snapshot of the router, the beagleboard does not show up
there with the rest of the boxes.
Regards
Sid.

ROUTER_Leases.png

Seems to be better. Retry ifdown wlan0/ifup wlan0. Sometimes it helps
(at least for my laptop wireless atheros card).

You might want to check the region for the wifi and the router. I had a problem where the wireless router was set to UK country and auto-selected channel 13 - which isn’t valid for USA which is what the BeagleBoard / Angstrom was using…

You might want to check the region for the wifi and the router. I had a
problem where the wireless router was set to UK country and
auto-selected channel 13 - which isn't valid for USA which is what the
BeagleBoard / Angstrom was using...

UK channnel 1, 3 other Linux boxes the same and working. I attached a
snapshot of the router showing the 3 boxes with IP addresses assigned to
one of my recent postings
Regards
Sid.

Sid,
can you post your the distro and kernel you use?

Sid,
can you post your the distro and kernel you use?

Angstrom-Beagleboard-demo-image-glibc-ipk-2009.X-stable-20090612--beagleboard.rootfs.tar.bz2
modules-2.6.29-r37-beagleboard.tgz
On partition 1 - MLO_revc_v3 and uImage_revc_v3.bin
Regards
Sid.

Hi all,
    I would like to know if any one had a solution for this problem. I
am working with an RT3070-based wifi USB on Bealge board Rev.B6 and
have similar problem: cannot get an IP address via dhcp. The USB card
works well on my ubuntu 8.04 PC.
Some info:

root@beagleboard:~# uname -va
Linux beagleboard 2.6.29-omap1 #1 Mon Aug 10 19:25:55 ICT 2009 armv7l
GNU/Linux
root@beagleboard:~# lsmod
Module Size Used by
rt3070sta 533988 0 [permanent]
root@beagleboard:~# iwconfig
lo no wireless extensions.

usb0 no wireless extensions.

eth0 no wireless extensions.

ra0 RT2870 Wireless ESSID:"SamSon2" Nickname:"RT2870STA"
          Mode:Managed Frequency=2.437 GHz Access Point: 00:1A:
70:32:B6:61
          Bit Rate=54 Mb/s
          RTS thr:off Fragment thr:off
          Encryption key:off
          Link Quality=92/100 Signal level:-55 dBm Noise level:-83
dBm
          Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
          Tx excessive retries:0 Invalid misc:0 Missed beacon:0
root@beagleboard:~# udhcpc -i ra0
udhcpc (v1.13.2) started
run-parts: /etc/udhcpc.d/00avahi-autoipd exited with code 1
Sending discover...
Sending discover...
Sending discover...

Thanks,
Viet Hoang.

Hi all,
  just tried with another usb wifi card: F5D7050 Belkin 802.11g.
  Here is the log:

usb 2-1.3: new high speed USB device using musb_hdrc and address 4
usb 2-1.3: device v050d p705c is not supported
usb 2-1.3: configuration #1 chosen from 1 choice
usb 2-1.3: reset high speed USB device using musb_hdrc and address 4
wmaster0 (zd1211rw): not using net_device_ops yet
wlan0 (zd1211rw): not using net_device_ops yet
zd1211rw 2-1.3:1.0: phy0
usb 2-1.3: firmware: requesting zd1211/zd1211b_ub
usb 2-1.3: firmware: requesting zd1211/zd1211b_uphr
usb 2-1.3: Could not load firmware file zd1211/zd1211b_uphr. Error
number -2
zd1211rw 2-1.3:1.0: couldn't load firmware. Error number -2
usb 2-1.3: firmware: requesting zd1211/zd1211b_ub
usb 2-1.3: firmware: requesting zd1211/zd1211b_uphr

unplug and re-plug caused the firmware loaded:

root@beagleboard:~/workdir/dsplink/newViet# usb 2-1.3: USB disconnect,
address 4
usb 2-1.3: new high speed USB device using musb_hdrc and address 5
usb 2-1.3: device v050d p705c is not supported
usb 2-1.3: configuration #1 chosen from 1 choice
usb 2-1.3: reset high speed USB device using musb_hdrc and address 5
wmaster0 (zd1211rw): not using net_device_ops yet
wlan0 (zd1211rw): not using net_device_ops yet
zd1211rw 2-1.3:1.0: phy1
usb 2-1.3: firmware: requesting zd1211/zd1211b_ub
usb 2-1.3: firmware: requesting zd1211/zd1211b_uphr
zd1211rw 2-1.3:1.0: firmware version 4725
zd1211rw 2-1.3:1.0: zd1211b chip 050d:705c v4810 high 00-17-3f
AL2230_RF pa0 g--NS
cfg80211: Calling CRDA for country: US

but does not help much:

root@beagleboard:~/workdir/dsplink/newViet# iwconfig wlan0 essid
SamSon2 mode ma
naged
Error for wireless request "Set Mode" (8B06) :
    SET failed on device wlan0 ; Device or resource busy.
root@beagleboard:~/workdir/dsplink/newViet# iwconfig
lo no wireless extensions.

usb0 no wireless extensions.

eth0 no wireless extensions.

wmaster0 no wireless extensions.

wlan0 IEEE 802.11bg ESSID:"SamSon2"
          Mode:Managed Frequency:2.437 GHz Access Point: Not-
Associated
          Tx-Power=27 dBm
          Retry min limit:7 RTS thr:off Fragment thr=2352 B
          Encryption key:off
          Power Management:off
          Link Quality:0 Signal level:0 Noise level:0
          Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
          Tx excessive retries:0 Invalid misc:0 Missed beacon:0

and dmesg:

usb 2-1.3: firmware: requesting zd1211/zd1211b_ub
usb 2-1.3: firmware: requesting zd1211/zd1211b_uphr
zd1211rw 2-1.3:1.0: firmware version 4725
zd1211rw 2-1.3:1.0: zd1211b chip 050d:705c v4810 high 00-17-3f
AL2230_RF pa0 g--NS
cfg80211: Calling CRDA for country: US
wlan0: direct probe to AP 00:1a:70:32:b6:61 try 1
wlan0 direct probe responded
wlan0: authenticate with AP 00:1a:70:32:b6:61
wlan0: authenticated
wlan0: associate with AP 00:1a:70:32:b6:61
wlan0: RX AssocResp from 00:1a:70:32:b6:61 (capab=0x401 status=0
aid=1)
wlan0: associated
wlan0: disassociating by local choice (reason=3)
wlan0: direct probe to AP 00:1a:70:32:b6:61 try 1
wlan0 direct probe responded
wlan0: authenticate with AP 00:1a:70:32:b6:61
wlan0: authenticated
wlan0: associate with AP 00:1a:70:32:b6:61
wlan0: RX AssocResp from 00:1a:70:32:b6:61 (capab=0x401 status=0
aid=1)

Do you know what does "disassociating by local choice (reason=3)"
mean? Problem of kernel 2.26.29?

Viet Hoang.

I was only successful after disabling Connman. There seem to be two
pieces of software (udev and connman perhaps) that are both trying to
configure the wifi. So they screw each other up. Doing chmod -x /etc/
init.d/connman, and then putting the appropriate lines in /etc/network/
interfaces did the trick for me. Also remember that the dhcp script
is not terribly robust. So sometimes you may have to do ifdown / ifup
to retry.

Geof

Hi Geof,
Thanks so much, my usb wifi is working on Beagle Board.
Viet Hoang.

Hi Geof,
Thanks so much, my usb wifi is working on Beagle Board.
Viet Hoang.

No such luck here even afer "update-rc.d -f connman remove" and "chmod
-x /etc/init.d/connman".

    I was only successful after disabling Connman. There seem to be two
    pieces of software (udev and connman perhaps) that are both trying to
    configure the wifi. So they screw each other up. Doing chmod -x /etc/
    init.d/connman, and then putting the appropriate lines in /etc/network/
    interfaces did the trick for me. Also remember that the dhcp script
    is not terribly robust. So sometimes you may have to do ifdown / ifup
    to retry.

    Geof

root@beagleboard:~# ifup wlan0
WPA: Configuring Interface
[46481.988098] rt73usb 1-2.3:1.0: firmware: requesting rt73.bin

[46482.152130] ADDRCONF(NETDEV_UP): wlan0: link is not ready
[46484.664337] ADDRCONF(NETDEV_UP): wlan0: link is not ready
udhcpc (v1.13.2) started
run-parts: /etc/udhcpc.d/00avahi-autoipd exited with code 1
Sending discover...
Sending discover...
Sending discover...
No lease, failing
root@beagleboard:~#
Regards
Sid.