DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Installation and Upgrading

OpenBSD Installation and Upgrading Installing and upgrading OpenBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 28th May 2010
rma rma is offline
New User
 
Join Date: May 2010
Posts: 3
Thanked 0 Times in 0 Posts
Unhappy dhclient -> urtw0: no link ....... sleeping

Hey everyone. I'm tyring to get my Alfa usb wifi dongle to work. I'll try to post as much information as possible.

So I plug in the usb device and it gets recognized, in fact a nice little message pops up on the screen :

Code:
urtw0 at ubut2 post 2 "Realtek RTL8187" rev 1.10/1.00 addr2
urtw0: RTL8187 rev 0x04, RFv2, address 00:c0:ca:1c:44:2a"
Okay, thats reassuring. Ifconfig shows it as well :

Code:
#ifconfig urtw0
urtw0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
     lladdr 00:c0:ca:1c:44:2a
     priority: 4
     groups: wlan
     media: IEEE802.11 autoselect
     status: no network
     ieee80211: nwid "" 100dBm
Again, reassuring. So I try to connect to my wifi network, in the exact same manner I connect my ancient pcmcia card.

Code:
#ifconfig urtw0 up
#ifconfig urtw0 nwid MyESSID
#ifconfig urtw0 nwkey 0xmynetkey
A quick ifconfig urtw0 verifies that everything is set. Then I do dhclient... this is where things start to fail :
Code:
#dhclient urtw0
urtw0: no link ............. sleeping
And I have no idea what the problem is. I've looked around online and haven't found anything life changing. And I searched here before posting. If anyone has any ideas I'd really appreciate it.

Thanks everyone
Reply With Quote
  #2   (View Single Post)  
Old 28th May 2010
rma rma is offline
New User
 
Join Date: May 2010
Posts: 3
Thanked 0 Times in 0 Posts
Default

So I forgot to post the model of the alfa usb dongle, in case it's helpful :

Mode: AWUS036H
Reply With Quote
  #3   (View Single Post)  
Old 28th May 2010
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 2,883
Thanked 190 Times in 160 Posts
Default

Quote:
Originally Posted by rma View Post
...I try to connect to my wifi network, in the exact same manner I connect my ancient pcmcia card.
Code:
#ifconfig urtw0 up
#ifconfig urtw0 nwid MyESSID
#ifconfig urtw0 nwkey 0xmynetkey
Welcome.

As for potential work-arounds:
  • You may want to try setting the configuration in /etc/hostname.urtw0 as described in the urtw(4) manpage. Look at the "EXAMPLES" section. I don't see where you are specifying a channel.
  • You may also want to explore setting the IP address statically -- especially if more complicated DHCP behavior (even if preferred...) isn't working.
Quote:
Code:
urtw0 at ubut2 post 2 "Realtek RTL8187" rev 1.10/1.00 addr2
urtw0: RTL8187 rev 0x04, RFv2, address 00:c0:ca:1c:44:2a"
According to the urtw(4) manpage the 8187L & B chips are supported. The fact that the identification string displayed by the kernel (coming from the chip itself...) says something different in your case is noteworthy.

Likewise, the main source file associated with this driver, src/sys/dev/usb/if_urtw.c, has not changed since OpenBSD 4.7 was tagged. Perhaps you are using 4.7, maybe 4.6. Your message didn't state such fundamental information. If you are using 4.6 or an earlier version, upgrading is in order. If you are using 4.7, installing -current is still justified -- especially if you want the project developers to take interest. Even if you are already running -current, installing a recent snapshot may help your case.

If you are unclear as to what is -current, familiarize yourself with the information found in Section 5.1 of the FAQ.

Submitting a formal problem report may be your best next move. Since the developers are far more interested in the behavior seen on -current, this is the motivating reason for installing it. The fact that the driver's source has not changed since 4.7's tagging should not raise your hopes for a miraculous change in observed behavior. I cannot say definitively that filing a report will resolve your issue or resolve your issue quickly, but by going through the appropriate channels, your information will get to those familiar with the driver's internals. Information on submitting problem reports can be found at the following:

http://www.openbsd.org/report.html
  • Take the time to provide detailed information. Skimping will only cause the developer(s) to throw their hands up due to incomplete information which cannot be substantiated. Providing usbdevs(8) & dmesg(8) output in your report is appropriate. In fact, dmesg(8) output is required if I recall correctly.
  • Familiarizing yourself with previous discussion on the urtw(4) driver and RTL8187 support in the official misc@ mailing list would also be helpful for context. The following search is a beginning:

    http://marc.info/?l=openbsd-misc&w=2&r=1&s=urtw&q=b
Understanding this information before submitting a problem report will help in explaining the behavior you are experiencing. Reciting the results of trying the work-arounds mentioned at the beginning will also support your cause.

Good luck.
Reply With Quote
  #4   (View Single Post)  
Old 28th May 2010
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 3,688
Thanked 214 Times in 189 Posts
Default

Code:
status: no network
DHCP isn't working because there is no communication between the NIC and the AP.

You'll need to get that fixed, first. There could be any number of reasons, but that there is no trained SSID shown when the nwid is set to "" tells me to look for a functioning AP. Does it broadcast its SSID? If so, it should appear in a scan: "#ifconfig urtw0 scan" -- if nothing shows, yet your PCMCIA card works still, then perhaps you might have a bad USB NIC. Might.

Me, I'd set up a broadcasting AP with no security, first, just to test connectivity.
Reply With Quote
  #5   (View Single Post)  
Old 28th May 2010
polera's Avatar
polera polera is offline
New User
 
Join Date: Dec 2009
Posts: 2
Thanked 0 Times in 0 Posts
Default

You might try specifying which channel urtw0 should use (should match your AP):
Code:
# ifconfig urtw0 chan YOUR_CHANNEL
also, scanning for additional access points doesn't hurt either:
Code:
# ifconfig urtw0 scan
Reply With Quote
  #6   (View Single Post)  
Old 28th May 2010
BSDfan666 BSDfan666 is offline
Real Name: N/A, this is the interweb.
Helpful companion
 
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 2,223
Thanked 193 Times in 184 Posts
Default

As mentioned by polera, specifying just nwid/nwkey may be insufficient.. run a scan and then directly indicate which channel to use, post the output of ifconfig(8) here after doing so.
Reply With Quote
  #7   (View Single Post)  
Old 28th May 2010
rma rma is offline
New User
 
Join Date: May 2010
Posts: 3
Thanked 0 Times in 0 Posts
Default

first off... you guys rock. thanks so much for the fast and quality responses. And I am using 4.7 stable, sorry I forgot to mention that.

@ocicat : I setup an /etc/hostname.urtw0 :
Code:
dhcp NONE NONE NONE nwkey 0xmysecretkey chan 1
When it boots though, with the usb device plugged in. I noticed it did not try to acquire a dhcp address (as it normally shows in the bootup process). Once logged in I performed :
Code:
#ifconfig urtw0
urtw0: no such interface
#inconfig urtw0 up
ifconfig: SIOCGIFFLAGS: Device not configured
So that's odd... unplugging it and plugging it back in though gets it recognized as I posted above.

Scanning doesn't work, it just says the information like ifconfig rather than showing all the networks (the pcmcia picks them up)
Code:
#ifconfig urtw0 scan
urtw0: flags=8803<UP,BROADCAST,SIMPLEX,MULTICAST> mtu 1500
lladder 00:c0:ca:1c:44:2a
priority: 4
groups: wlan
media: IEEE802.11 autoselect
status: no network
ieee80211: nwid "" 100dBm
Setting the channel makes no difference. I was actually doing that but simply forgot to add that line in the post. Adding the channel, nwid, nwkey, and performing dhclient urtw0 I get the same response :

Code:
#ifconfig urtw0
urtw0: flags=8803<UP,BROADCAST,SIMPLEX,MULTICAST> mtu 1500
lladder 00:c0:ca:1c:44:2a
priority: 4
groups: wlan
media: IEEE802.11 autoselect
status: no network
ieee80211: nwid mynetwork chan 1 nwkey 0xmykey 100dBm
inet6 fe80::.....snip....442a%urtw0 prefixlen 64 scopeid 0x6
#dhclient urtw0
urtw0: no link ............. sleeping
This is a pretty amazing usb device. It works under debian flavors, and of course windows. So I guarantee it is fully operational. The ESSID is broadcasting, and the exact same sequence of steps works for the pcmcia. I haven't tried connecting to an open network, but seeing as how the card won't even perform a scan, I think there is a bigger problem.

Trying to set it up statically doesn't seem to get me anywhere, but maybe this will help you guys :
Code:
#ifconfig urtw0 inet 192.168.1.57 netmask 255.255.255.0 broadcast 192.168.1.255
#ifconfig urtw0
urtw0: flags=8803<UP,BROADCAST,SIMPLEX,MULTICAST> mtu 1500
lladder 00:c0:ca:1c:44:2a
priority: 4
groups: wlan
media: IEEE802.11 autoselect
status: no network
ieee80211: nwid mynetwork chan 1 nwkey 0xmykey 100dBm
inet6 fe80::.....snip....442a%urtw0 prefixlen 64 scopeid 0x6
inet 192.168.1.57 netmask 0xffffff00 broadcast 192.168.1.255
#ping 192.168.1.1
PING 192.168.1.1 (192.168.1.1): 56 data bytes
ping: sendto: Network is down
ping: wrote 192.168.1.1 64 chars, ret=-1
Anyways guys, thanks again for the help, it's really appreciated. Hopefully something above will help identify the problem. Thanks so much!
Reply With Quote
  #8   (View Single Post)  
Old 6th June 2010
tetrodozombie tetrodozombie is offline
Real Name: bill slusser
Banned
 
Join Date: Dec 2009
Location: atlanta, ga
Posts: 82
Thanked 1 Time in 1 Post
Default

I do this all the time with urtw0. do it like this without the quotes "sudo ifconfig urtw0 scan" --> should get you a list of nwid's ( net work id's ) that the radio in the usb wifi nic is picking up. usually they're public at places like Borders, McDonalds, Taco Bell, etc. If you ain't got a nwid you ain't gonna get nowhere -- that's been my luck. you have to have a nwid or if it's hidden who knows I don't go there anyway.

then with the nwid do this "sudo ifconfig urtw0 nwid "theNameOfTheAccessPoint" -chan up" --> that's about it. give it 30 seconds to connect fully. the dash chan tells the urtw0 driver to automatically pick a channel that's gonna work. don't make things harder than they have to be. the light should light up on your usb stick wifi thingy. then, do the "sudo dhclient urtw0" and get a lease and then rock out. hope this helps.
Reply With Quote
  #9   (View Single Post)  
Old 6th June 2010
tetrodozombie tetrodozombie is offline
Real Name: bill slusser
Banned
 
Join Date: Dec 2009
Location: atlanta, ga
Posts: 82
Thanked 1 Time in 1 Post
Default

about that hostname.urtw0 you're making ... just put this in there without the quotes "dhcp" that's it. nothing else cause that causes problems and confusion. keep it simple. openbsd takes care of the hard stuff so you don't have to.
Reply With Quote
Old 6th June 2010
BSDfan666 BSDfan666 is offline
Real Name: N/A, this is the interweb.
Helpful companion
 
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 2,223
Thanked 193 Times in 184 Posts
Default

Most wireless cards will automatically try to associate with an access point, this may or may not be a good thing.. you should always manually scan for and join one yourself, specifying the appropriate nwid and operating channel.

Wireless works in a different way, you should probably keep hostname.if(5) files empty for them.. that's my opinion of it.
Reply With Quote
Old 20th August 2010
elimite elimite is offline
New User
 
Join Date: Aug 2010
Posts: 1
Thanked 0 Times in 0 Posts
Default

I was having a similar problem with getting a "no link .... sleeping" message. Turned out the authentication mode defaulted to 'open'. Once i used ifconfig to set it to 'shared', everything worked fine.

note: the access point was using shared key WEP.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
CARP interface with DHClient xinform3n OpenBSD General 5 22nd July 2009 12:41 PM
dhclient at startup bsdnewbie999 OpenBSD General 3 31st March 2009 03:55 AM
kde .desktop file link doesn't act like a link when opening files caesius FreeBSD Ports and Packages 3 14th October 2008 07:35 AM
dhclient.conf: multiple fixed-address statements xiphias FreeBSD General 14 19th June 2008 06:42 AM
dhclient iwi0 "Could not read iwi-bss' error FreeMan OpenBSD General 2 15th May 2008 08:01 PM


All times are GMT. The time now is 10:25 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick