Linux - Wireless Networking This forum is for the discussion of wireless networking in Linux. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
02-03-2003, 01:14 AM
|
#1
|
LQ Newbie
Registered: Oct 2002
Location: Sydney
Distribution: Redhat 7.3
Posts: 15
Rep:
|
Connecting to windows via wireless network
I was wondering if anyone can help me connect my laptop running redhat 7.3 to my other computer running windows 2000. Both have working wireless 802.11b D-Link cards.
On my windows computer I have it set to ad-hoc mode. I'm not sure what commands I need to use on the linux side of things to make the connection. Is there a command that will scan for wireless networks in the area to connect to?
I have brought up the wireless device by "ifconfig eth1 up" and also set the same SSID by "iwconfig eth1 essid home". What should I do next?
Once I am able to connect in ad-hoc mode, is it possible for me to share files between redhat and windows? For example, will I be able to grab files from the shared directory from windows and copying them to redhat? How do I do it?
Thank you.
|
|
|
02-03-2003, 01:29 AM
|
#2
|
LQ Guru
Registered: Aug 2001
Location: Dublin, Ireland
Distribution: Slackware
Posts: 5,700
Rep:
|
ifconfig eth0 192.168.1.42 up (or whatever is the same network the 2k machines are on)
Then ping by address, see if you're all talking. In ad-hoc, you're going to have to expressly define the channel also:
iwconfig eth0 mode ad-hoc
iwconfig eth0 channel 6
See if you have a signal strength at all (which will just be the signal strength to the nearest pier on the network):
iwconfig eth0
As far as file sharing, you're looking at smbclient, I really never use it as all of my windows file sharing goes downhill, the other way round with another machine snagging files off of the samba server linux box. Poke around for threads here on smbclient, they should cover it.
Sometimes cards get confused about the channel arguments... it depends on the card really, and the drivers, but rh 7.3 is kernel 2.4.18, and I assume this is rather new kit.
Cheers,
Finegan
|
|
|
02-03-2003, 07:22 PM
|
#3
|
LQ Newbie
Registered: Oct 2002
Location: Sydney
Distribution: Redhat 7.3
Posts: 15
Original Poster
Rep:
|
Thanks Finegan. I typed ipconfig /all on the win2k computer and found the ip to be 169.254.5.19. So I set my redhat wireless card to 169.254.5.18, also set the essid, changed to ad-hoc mode and changed the channel. Although when I set the channel and type iwconfig the frequency stays the same.
Unfortunately I still have no signal strength and can't ping. Both computers are right next to each other. In redhat I can ping its own ip, but I found on the win2k computer I can't ping its own ip. The redhat card is a dwl-650 using orinoco drivers.
|
|
|
02-04-2003, 04:41 PM
|
#4
|
LQ Guru
Registered: Aug 2001
Location: Dublin, Ireland
Distribution: Slackware
Posts: 5,700
Rep:
|
Code:
finegan@tenacious:~$ /usr/sbin/iwconfig
wlan0 IEEE 802.11-b ESSID:"homenet"
Mode:Master Frequency:2.422GHz Access Point: 00:03:2F:01:D6:97
Bit Rate:11Mb/s Tx-Power:3 dBm Sensitivity=1/3
Retry min limit:8 RTS thr:off Fragment thr: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:412 Invalid misc:160803 Missed beacon:0
Yours is of course going to look different than mine. As for the channel not changing, some settings can't be set until the device is brought up, and you can't set the channel until the device is put in ad-hoc mode, so lets try the following:
ifconfig eth0 169.254.5.18 up
iwconfig eth0 mode ad-hoc
iwconfig eth0 essid nameofyournetworkhere
iwconfig eth0 enc off
iwconfig eth0 channel X
iwconfig
and see if the changes are sticking, there are other more evil ways to give it the right channel. We'll try them if this works.
Cheers,
Finegan
|
|
|
02-05-2003, 10:26 AM
|
#5
|
Member
Registered: Jan 2003
Location: Atlanta USA
Distribution: Mandrake 9.0, Red Hat 8
Posts: 49
Rep:
|
finegan-- I hope you don't mind me posting here in your thread, but I have a question that will further your explenation/understanding to JasonW as well as myself:
Each time I boot I have to re-enter my wireless settings manually and I am really getting tired of this. How can I make these settings be default upon each boot? Is there a config file somewhere that I have to change?
btw- my chosen distro is mandy 9...
-Thank you-
|
|
|
02-05-2003, 12:39 PM
|
#6
|
LQ Guru
Registered: Aug 2001
Location: Dublin, Ireland
Distribution: Slackware
Posts: 5,700
Rep:
|
If Mandy still has the same config structure as RedHat, more or less, you should be able to set everything you need to in /etc/sysconfig/network-scripts/ifcfg-eth0 (wow, I finally memorized the name of that bugger)
If there's nothing in there for wireless, or not enough, hackjob it!
You can put in each of the settings, one by one just like you would type them into the command line after you login into this file: /etc/rc.d/rc.local
rc.local is the last init script to run on boot, so its the same as if you hand typed everything in....
Cheers,
Finegan
|
|
|
02-05-2003, 01:53 PM
|
#7
|
Member
Registered: Dec 2002
Posts: 327
Rep:
|
I would add this : 169.254.xxx.xxx is the 'default' ip address given to an interface that can't find it's address from a DHCP server.
ie. It tries to find one, can't and defaults to the above.
It sounds to me as if you've not set up your interface to know it's wireless. Under Redhat there's an ifcfg.wireless or something, if I recall and I should look around for something similar to that on Mandy.
I've never used wireless under Linux, so someone with more experience than I should maybe step in here..
Slick.
|
|
|
02-05-2003, 09:50 PM
|
#8
|
Member
Registered: Jan 2003
Location: Atlanta USA
Distribution: Mandrake 9.0, Red Hat 8
Posts: 49
Rep:
|
finegan-- that should set me at least in the direction...I haven't tried it yet and won't be able to until the morning.
I'll let you know what I find out.
Thank you.
|
|
|
02-06-2003, 09:48 AM
|
#9
|
Member
Registered: Jan 2003
Location: Atlanta USA
Distribution: Mandrake 9.0, Red Hat 8
Posts: 49
Rep:
|
For any Mandrake wireless users that may be reading this thread, here is a little something I stumbled across that will allow you to apply your wireless settings to your ethX upon boot--
Quote:
MANDRAKE 8.2 and later
------------
(Grabbed from various source - Google is your friend)
Configuration is done in the file :
/etc/sysconfig/network-scripts/ifcfg-ethN
Where 'ethN' is the name of the wireless interface (such as
eth0, eth1, ...).
The following lines may be added in this file :
WIRELESS_MODE=<mode>
WIRELESS_ESSID=<essid>
WIRELESS_NWID=<nwid>
WIRELESS_FREQ=<freq/channel>
WIRELESS_SENS=<sensitivity>
WIRELESS_RATE=<rate>
WIRELESS_ENC_KEY=<keys>
WIRELESS_RTS=<rts>
WIRELESS_FRAG=<frag>
WIRELESS_IWCONFIG=<iwconfig command>
WIRELESS_IWSPY=<iwspy command>
WIRELESS_IWPRIV=<iwpriv command>
Most likely, you only need to add a few of those lines and not
all of them. The script doing the configuration and where you can
check the details is :
/etc/network/network-scripts/ifup-wireless
You will of course need the Wireless Extension package :
rpm -Uvh wireless-tools-XX-Xmdk.XXX.rpm
|
That should help--
|
|
|
02-06-2003, 11:53 AM
|
#10
|
Member
Registered: Dec 2002
Posts: 327
Rep:
|
Alternatively in your ifcfg-eth<x> configuration file :
TYPE=wireless
That way it conforms to the way ifup works - Look at it and see where is says 'if wireless', and will run ifup-wireless properly, and won't be subject to a hack which will only cause you headaches later on.
As you pointed out the above is contained within the ifup-wireless script.
Slick.
|
|
|
All times are GMT -5. The time now is 01:39 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|