DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 13th May 2011
chicago chicago is offline
New User
 
Join Date: May 2011
Posts: 9
Wink Help on getting WEP-Encrypted Network on OpenBSD

Hey all Daemons

I'm new to this forum but it looks like it's gonna be very helpful.
This semester at university I've studied UNIX and learnt a lot.
Even that way we never saw about wireless settings (cuz my teacher says we'll rarely use it to configure servers, thing I understand, but by now I can't be sitting by the router all day long ).

I have not found a full guide on the internet so I'm asking for help here.

I've used the following commands:

My wifi card is BWI0, whose firmware package I had to install. It does work (or I consider so) because the LED does lit when I ifconfig up.

#ifconfig bwi0 nwid obeid nwkey key

I also have a hostname.bwi0, but it contains the same thing as my wired connection (that does work). I have not found elsewhere what must I put in that file.

Any help will be gladly appreciated

Thanks to all!
Reply With Quote
  #2   (View Single Post)  
Old 13th May 2011
BSDfan666 BSDfan666 is offline
Real Name: N/A, this is the interweb.
Banned
 
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 2,223
Default

Reading ifconfig(8) and hostname.if(5) would be advisable, after you authenticate with your WEP network you would typically use dhclient to negotiate additional network settings like the IP address, routing information, and DNS servers.
Reply With Quote
  #3   (View Single Post)  
Old 13th May 2011
IdOp's Avatar
IdOp IdOp is offline
Too dumb for a smartphone
 
Join Date: May 2008
Location: twisting on the daemon's fork(2)
Posts: 1,027
Default

In addition to the above, I'd suggest looking at the man page for your wireless driver, bwi(4), particularly the EXAMPLES section.
Reply With Quote
  #4   (View Single Post)  
Old 14th May 2011
chicago chicago is offline
New User
 
Join Date: May 2011
Posts: 9
Default Thanks for your responses

Well, First of all thanks for your kind responses.

Now... I've tried both. First read the examples at the bwi man page (I didn't know it existed never tried xD).

I edited the hostname.bwi0 file accordingly and ran sh netstart.
It didn't work well. After the sh netstart I got a bwi0: no link ..... sleeping.

After that I typed dhclient bwi0 and got the same output.

What am I doing wrong, or missing?

Thank you!
Reply With Quote
  #5   (View Single Post)  
Old 14th May 2011
BSDfan666 BSDfan666 is offline
Real Name: N/A, this is the interweb.
Banned
 
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 2,223
Default

You haven't provided enough information for us to even pretend to know what is wrong.
Reply With Quote
  #6   (View Single Post)  
Old 14th May 2011
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,318
Default

Quote:
Originally Posted by chicago View Post
I edited the hostname.bwi0 file accordingly and ran sh netstart.
It didn't work well. After the sh netstart I got a bwi0: no link ..... sleeping.

After that I typed dhclient bwi0 and got the same output.
Three thoughts.
  • The kernel will deposit what devices are identified into dmesg(8) output. Confirm that the chip found there exactly matches the information found in the bwi(4) manpage.
  • Assuming the chip is supported, simplify the environment by taking DHCP out of the picture. Assign a static IP address to the interface. More information can be found in hostname.if(5) & Section 6.2.1 of the FAQ.
  • The primary file used by bwi(8) is src/sys/dev/ic/bwi.c. This file has not changed since August 2010. You haven't mentioned which version of OpenBSD is being used, but OpenBSD 4.9 was tagged mid-February 2011. This suggests that installing -current will not show different functionality, but src/sys/dev/ic/bwi.c isn't the only file found in this driver either. Installing -current might show different behavior, but nothing can be said conclusively at this point.
Reply With Quote
  #7   (View Single Post)  
Old 14th May 2011
Oko's Avatar
Oko Oko is offline
Rc.conf Instructor
 
Join Date: May 2008
Location: Kosovo, Serbia
Posts: 1,102
Default

Your wireless card needs firmware to work. Download firmware as
Code:
$ lynx http://www.nazgul.ch/bwi/bwi-firmware-1.4.tgz
Change the path to packages as
Code:
# export PKG_PATH=path to your firmware
Add the firmware
Code:
# pkg_add bwi-firmware-1.4.tgz
Then set WEP as follows. See mine
Code:
$ cat /etc/hostname.ral0
dhcp nwid monkey nwkey 9bc948a011989
Instead of /etc/hostname.ral0 name the file as follows /etc/hostname.bwi0.
Edit the file accordingly with the name of your network and nwkey. Reboot the damn thing
and you should have the wireless connection "protected by WEP".

By the way I have experience with bwi0 driver on my wife's DeLL laptop and works rock solid.

Last edited by Oko; 14th May 2011 at 04:39 AM.
Reply With Quote
  #8   (View Single Post)  
Old 14th May 2011
chicago chicago is offline
New User
 
Join Date: May 2011
Posts: 9
Default Thanks again :)

Sorry for omitting details. I'm running OpenBSD version 4.9.

I had already upgraded the firmware package. Before that ifconfig bwi0 up would report an error. Upon upgrading firmware if I type that command the Wireless LED lits.

About dmesg, the device does match the info on the manpage.

Is there anything else needed to learn what goes wrong?

Thanks!!
Reply With Quote
  #9   (View Single Post)  
Old 14th May 2011
backrow backrow is offline
Real Name: Anthony J. Bentley
Shell Scout
 
Join Date: Jul 2009
Location: Albuquerque, NM
Posts: 136
Default

What do you see when you run ifconfig bwi0 scan?
__________________
Many thanks to the forum regulars who put time and effort into helping others solve their problems.
Reply With Quote
Old 14th May 2011
chicago chicago is offline
New User
 
Join Date: May 2011
Posts: 9
Default wep

It shows the networks I may connect to, its intensity, and such.

The usual networks I see with Windows.


Last edited by chicago; 14th May 2011 at 10:20 PM.
Reply With Quote
Old 15th May 2011
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

Is your WEP key in hexidecimal? Containing only the number 0-9 and the letters A through F or a through f?

If so, you should set your nwkey with a leading "0x", to indicate the values are hexidecimal and not ASCII:

ifconfig bwi0 obeid nwkey 0x37324a7f

or

ifconfig bwi0 obeid nwkey 0xdeadbeefcafe
Reply With Quote
Old 15th May 2011
chicago chicago is offline
New User
 
Join Date: May 2011
Posts: 9
Default

It is not hexadecimal, yet, I did try with the 0x preceding the numbers. Doesn't work anyway.

Do you think that if I switch to WPA encryption my problem could be solved?

Thanks!
Reply With Quote
Old 15th May 2011
IdOp's Avatar
IdOp IdOp is offline
Too dumb for a smartphone
 
Join Date: May 2008
Location: twisting on the daemon's fork(2)
Posts: 1,027
Default

Quote:
Originally Posted by chicago View Post
Do you think that if I switch to WPA encryption my problem could be solved?!
When having a problem like this, it's often useful to find the simplest possible setup which reproduces the problem.

With that in mind, I'd not go to more complex encryption, but get rid of encryption entirely. Try to see if you can get it to connect as an open network. If/when that succeeds you'll be sure the hardware is working and the driver and interface is properly configured, and you can try to layer on some encryption.
Reply With Quote
Old 17th May 2011
girarde girarde is offline
Fdisk Soldier
 
Join Date: Nov 2010
Location: NW FL
Posts: 75
Default

Switching to WPA would significantly improve the security of the connection as well.
Reply With Quote
Old 17th May 2011
chicago chicago is offline
New User
 
Join Date: May 2011
Posts: 9
Default My mistake maybe?

Hey

I switched to WPA because I also needed to do that before. That is done and all our computers are now on it. (of course except the BSD one XD).

I'm pretty sure it is something I'm omitting. I plugged a second wireless adapter (Atheros) and doesn't work either. I get the exact same behavior.

I deduct therefore I'm not doing this correctly.

What could I be doing wrong?

PS. Thank you all for your responses
Reply With Quote
Old 18th May 2011
Oko's Avatar
Oko Oko is offline
Rc.conf Instructor
 
Join Date: May 2008
Location: Kosovo, Serbia
Posts: 1,102
Default

Quote:
Originally Posted by IdOp View Post
When having a problem like this, it's often useful to find the simplest possible setup which reproduces the problem.

With that in mind, I'd not go to more complex encryption, but get rid of encryption entirely. Try to see if you can get it to connect as an open network. If/when that succeeds you'll be sure the hardware is working and the driver and interface is properly configured, and you can try to layer on some encryption.
+1

Setting WPA (WPA2), WEP and unprotected wireless on any *BSD is trivial. Wireless can be protected on at least 5 additional ways on *BSDs some of which are not available on any other OS. You are getting some seriously good advices which you are ignoring. Short of you paying a BSD consultant who will actually configure your wireless network for you I do not think that anybody can help you here.
Reply With Quote
Old 18th May 2011
chicago chicago is offline
New User
 
Join Date: May 2011
Posts: 9
Default

Quote:
You are getting some seriously good advices which you are ignoring. Short of you paying a BSD consultant who will actually configure your wireless network for you I do not think that anybody can help you here.
I don't know if i get your comment, but if you suggest me dropping my network's encryption I can't.

If i drop encryption then I'd provide free internet for some of my neighbors and this would not be pleasant. Even if it would work that way I can't do it.

I don't know if I am doing something wrong, but if I am my point is to learn about it.

Secondly.... I'm not in the need of paying a consultant to do it for me. It's a school project of which I want to learn.

Thanks
Reply With Quote
Old 18th May 2011
BSDfan666 BSDfan666 is offline
Real Name: N/A, this is the interweb.
Banned
 
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 2,223
Default

As I said before, you're omitting information.. show us your configuration, what you're typing, the complete output of relevant commands.

Beyond just saying "it doesn't work", because that's useless.
Reply With Quote
Old 18th May 2011
chicago chicago is offline
New User
 
Join Date: May 2011
Posts: 9
Default

Quote:
Originally Posted by BSDfan666 View Post
As I said before, you're omitting information.. show us your configuration, what you're typing, the complete output of relevant commands.

Beyond just saying "it doesn't work", because that's useless.
So, I must show the commands with which I attempt to connect to my network I guess, plus the hostname.if file.

The hostname.if file is as of now empty. I haven't managed to make it work.

I attempt to connect using the ifconfig command.

As far as I know my interface does work, as doing an ifconfig bwi0 scan does show all the networks in range.

My attempts were with WEP:

ifconfig bwi0 nwid obeid nwkey 030303029
dhclient bwi0

and then with WPA the same, just with the WPA params on ifconfig.

I don't know anything further than this, so if there's an extra thing I'm missing to post and that will help please tell me. I may of course show it here.

Thanks for your patience!
Reply With Quote
Old 18th May 2011
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,318
Default

Quote:
Originally Posted by chicago View Post
So, I must show the commands with which I attempt to connect to my network I guess, plus the hostname.if file.
Posting the complete output of dmesg(8) is fundamentally important.

Most of this thread has followed the pattern of you asking for help, various people making suggestions, followed by you stating that you have either already tried this & it still doesn't work. If we were standing behind you, we could verify your actions. As it is with some in this thread nearly half a world away, we can only take your word. Little hard evidence has been presented.

At least twice you have been asked to test a simplified configuration. Even if this isn't what you ultimately want as a working solution, it may help illuminate the fundamental problem(s). Troubleshooting situations where n variables are at play may become obvious when the number can be reduced to n - 1, or n - 2. etc. Rarely does attempting to configure a sophisticated configuration work on first try. Especially if one isn't familiar with the software/hardware. This is one of the reasons I asked you to take DHCP out of the picture. Since you never mentioned this in subsequent responses, I have absolutely no idea whether you did or didn't.

You are invited to read an older thread on what information can & should be considered useful when seeking support over the Internet:

http://www.daemonforums.org/showthread.php?t=596
Quote:
As far as I know my interface does work, as doing an ifconfig bwi0 scan does show all the networks in range.
Again, it would be helpful to provide us the complete output of dmesg(8).
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
script add user with encrypted password wesley OpenBSD General 3 14th December 2010 03:22 PM
Encrypted == secure? passthejoe OpenBSD Security 13 9th November 2010 05:45 PM
Tool for cracking encrypted session data J65nko News 0 9th June 2010 06:31 PM
Openbsd 4.5 network connection timeout andrewm OpenBSD General 4 11th September 2009 02:32 AM
Encrypted disk compatibility issue TheLogicInverter FreeBSD Security 3 30th January 2009 02:59 PM


All times are GMT. The time now is 10:27 AM.


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