LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Wireless Networking (https://www.linuxquestions.org/questions/linux-wireless-networking-41/)
-   -   Wireless autoconfig (https://www.linuxquestions.org/questions/linux-wireless-networking-41/wireless-autoconfig-404985/)

RMSe17 01-18-2006 12:12 PM

Wireless autoconfig
 
Hi, we are trying to shift a section of laptops from windows to linux at our university, which presents a load of issues since we are just familiar with Linux, and don't have advanced knowledge of it. Another issue is that the users of these laptops have no clue about Linux, so everything must work upon bootup. We figured something like Kubuntu would do a good job, since KDE can be configured to look just like windows, and it's behavior is sorta similar. The problem we are at now is the wireless connectivity. We use PCMCIA wireless adapter, and linux identifies it correctly. The problem is that it doesn't automatically connect to any wireless networks, and for some reason KWifiManager says there are no networks found... Sometimes after some tinkering, we connect to the network, other times we restart, and then after more tinkering with I dont even know what we get to the network... So my question is, is there a program or a script that would run at startup (I guess somehow it needs to be shoved into the init.d?) that would autoconfiger the network card to connect to the wireless network and get the IP address through DHCP?

Thanks,
RMSe17

samel_tvom 01-18-2006 05:28 PM

Well hello!

I have to get some info, so try the following as root:
Code:

ifconfig
What does that show?
If it shows that your wifi-card has recieved an ip, super!... but it
probably won't since kwifimanager couldn't find any networks...

What does this show?
Code:

ifconfig -a
If all is well you should see a device like wlan0

Try:
Code:

iwconfig
Try:
Code:

iwlist wlan0 scan
If your device is named wlan0 that is.

What was the output of the commands?

RMSe17 02-10-2006 09:24 AM

Here is what I get back

Code:

rmse17@RECON:~$ ifconfig -a
eth0      Link encap:Ethernet  HWaddr 00:40:96:30:CB:D4
          inet6 addr: fe80::240:96ff:fe30:cbd4/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:990 dropped:0 overruns:0 frame:990
          TX packets:24 errors:24 dropped:0 overruns:0 carrier:24
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:6588 (6.4 KiB)
          Interrupt:3 Base address:0x100

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:4273 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4273 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:388010 (378.9 KiB)  TX bytes:388010 (378.9 KiB)

sit0      Link encap:IPv6-in-IPv4
          NOARP  MTU:1480  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)

wifi0    Link encap:UNSPEC  HWaddr 00-40-96-30-CB-D4-65-74-00-00-00-00-00-00-00-00
          BROADCAST MULTICAST  MTU:2312  Metric:1
          RX packets:0 errors:990 dropped:0 overruns:0 frame:990
          TX packets:24 errors:24 dropped:0 overruns:0 carrier:24
          collisions:0 txqueuelen:100
          RX bytes:0 (0.0 b)  TX bytes:6588 (6.4 KiB)
          Interrupt:3 Base address:0x100

rmse17@RECON:~$ iwconfig
lo        no wireless extensions.

sit0      no wireless extensions.

eth0      IEEE 802.11-DS  ESSID:"tsunami"
          Mode:Managed  Frequency:2.442 GHz  Access Point: FF:FF:FF:FF:FF:FF
          Bit Rate:11 Mb/s  Tx-Power=15 dBm  Sensitivity=0/65535
          Retry limit:16  RTS thr:off  Fragment thr:off
          Power Management:off
          Link Quality=0/32  Signal level=-96 dBm
          Rx invalid nwid:314  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:213  Missed beacon:0

wifi0    IEEE 802.11-DS  ESSID:"tsunami"
          Mode:Managed  Frequency:2.442 GHz  Access Point: FF:FF:FF:FF:FF:FF
          Bit Rate:11 Mb/s  Tx-Power=15 dBm  Sensitivity=0/65535
          Retry limit:16  RTS thr:off  Fragment thr:off
          Power Management:off
          Link Quality=0/32  Signal level=-96 dBm
          Rx invalid nwid:314  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:213  Missed beacon:0

rmse17@RECON:~$ iwlist wifi0 scan
wifi0    Failed to read scan data : No data available

btw, there is no such thing as "tsunami" network around here... I found that if I manually set ESSID of ufw, (name of the net here) and then run dhcp client, it gets the address and everythign works. Is there a way to get that to work automatically though? Is there something I need to add in /etc/network/interfaces or /etc/pcmcia/wireless.opts ?

samel_tvom 02-10-2006 11:14 AM

Well, stuff worked out, good for you! Please post what you did in order to make it work so that other persons with the same problem will know how to fix it.

If you want things to be done automatically, I suggest that you write a script which should be executed at boot time or something. You can make a service script (but that differs between distros) or you can call that script from /etc/rc.local which is executed at boot up.

If you mean by automatically that you don't want to tell what essid you will connect to, you can choose essid to any.

Code:

iwconfig wlan0 essid any
With wlan0 as you wifi-interface. Then it connects to any connectionpoint.

Peace!

RMSe17 02-10-2006 12:19 PM

Well, it's not really working. It connects to nonexistant network called "tsunami" instead of anything real, and the scan returns no valid results, so it doesnt see any real networks. I have to run the script that will turn on the interface once again, then assign essid, and then run dhcp client. What I need is for this script to run automatically when the PCMCIA card is inserted (whether at boot, or in the middle of working) or perhapse some other way of assigning ESSID upon PCMCIA card insertion. The ESSID is the same, never changes, so I have no problem with hardcoding it, if I knew where to stick it.

Thanks,
RMSe17

RMSe17 02-10-2006 01:22 PM

So I found a way that will do it, I added these lines at the bottom of network.opts

Code:

ifconfig eth0 up;
ifconfig eth1 up;
ifconfig eth2 up;
iwconfig eth0 essid ufw;
iwconfig eth1 essid ufw;
iwconfig eth2 essid ufw;
dhclient

This works just fine when I insert a card while being in Ubuntu gnome environemnet, but creates a problem if the card is inserted at boot. The problem is that gnome takes 6 minutes (as opposed to 40 seconds) to start after the username/password is entered.


All times are GMT -5. The time now is 03:39 PM.