LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 05-09-2007, 05:50 AM   #1
ppr:kut
Member
 
Registered: Aug 2006
Location: Netherlands
Distribution: Slackware
Posts: 361

Rep: Reputation: 93
Howto reconnect to W-LAN without restart


Hi folks,

I have some problem regarding connection to wireless networks. I use commandline to enable a connection, and I get connected, but at times, when the signal is lost, I can't reconnect with the same command. I have to restart the whole system to reestablish a connection. The power button for my Wireless card does not work in Linux and the txpower-stuff doesn't work neither.
I would be really thankful for any suggestions in that way, as it is really annoying.
At last my script I use to connect:

Quote:
/sbin/iwconfig eth1 essid AP-FHE-ICS key ***************************
/etc/rc.d/rc.inet1 restart
BTW: Another problem I have regarding my wireless is it searches very long for an IP on boot (via DHCP), my lan-card on the other hand not (also configured with DHCP). Is there some way to fix that?
Thanks in advance!
 
Old 05-09-2007, 09:36 AM   #2
BCarey
Senior Member
 
Registered: Oct 2005
Location: New Mexico
Distribution: Slackware
Posts: 1,457

Rep: Reputation: Disabled
I have had this problem occasionally as well. Instead of rebooting, rmmod your driver and then modprobe it again. Also, not sure what kernel your using, but since I upped to 2.6.21 it connects a lot faster (I'm using bcm43xx).

Brian
 
Old 05-09-2007, 09:48 AM   #3
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 11,215
Blog Entries: 3

Rep: Reputation: 1437Reputation: 1437Reputation: 1437Reputation: 1437Reputation: 1437Reputation: 1437Reputation: 1437Reputation: 1437Reputation: 1437Reputation: 1437
Quote:
Originally Posted by ppr:kut
Hi folks,

I have some problem regarding connection to wireless networks. I use commandline to enable a connection, and I get connected, but at times, when the signal is lost, I can't reconnect with the same command. I have to restart the whole system to reestablish a connection. The power button for my Wireless card does not work in Linux and the txpower-stuff doesn't work neither.
I would be really thankful for any suggestions in that way, as it is really annoying.
At last my script I use to connect:

Quote:
/sbin/iwconfig eth1 essid AP-FHE-ICS key ***************************
/etc/rc.d/rc.inet1 restart
BTW: Another problem I have regarding my wireless is it searches very long for an IP on boot (via DHCP), my lan-card on the other hand not (also configured with DHCP). Is there some way to fix that?
Thanks in advance!
Hi,

I would do a 'iwlist eth1 scan' for available AP. You will have to identify your AP in case there are other APs' in your area. The confirmation of the AP will assist you. Is this a personal AP? What about lease time?
The problem could be relative to the auto situation so
from 'man iwconfig' concerning the ap option;

Quote:
ap

Force the card to register to the Access Point given by the address, if it is possible. When the quality of the connection goes too low, the driver may revert back to automatic mode (the card selects the best Access Point in range). You may also use off to re-enable automatic mode without changing the current Access Point, or you may use any or auto to force the card to reassociate with the currently best Access Point.
Example :
iwconfig eth0 ap 00:60:1D:01:23:45
iwconfig eth0 ap any
iwconfig eth0 ap off
You could stop the eth0 and restart it.

Code:
#ifconfig eth0 down         #interface to be shut down
#ifconfig eth0 up           #interface activated
#/etc/rc.d/rc.inet1 restart #restart using /etc/rc.d/rc.inet1.conf
You do have your /etc/rc.d/rc.inet1.conf configured properly.

Quote:
BTW: Another problem I have regarding my wireless is it searches very long for an IP on boot (via DHCP), my lan-card on the other hand not (also configured with DHCP). Is there some way to fix that?
What about signal strength on the AP? As for the wired or eth0 then post the 'ifconfig -a' and 'route -n'.
 
Old 05-10-2007, 01:39 AM   #4
ppr:kut
Member
 
Registered: Aug 2006
Location: Netherlands
Distribution: Slackware
Posts: 361

Original Poster
Rep: Reputation: 93
Thanks folks,
I have it working. Basically I do removing the module, additionally to 'ifconfig down / up' and 'iwconfig txpower off / on'. Don't know if I need that, though.
My other problem is still not solved, but I think I can give some more information on that. My W-LAN-driver is ipw3945, not included in the kernel and it needs the binary daemon ipw3945d. My LAN-driver is r8169, included in the kernel. Now my poblem is not AP-latency, but searching for an DHCP, where there is none. So booting up with DHCP-Search enabled on just the LAN does fine, but booting up with WLAN additionally or even only results in a long search for an ip, if I'm not connected to anything.
If I'm connected everything is fine. It's just the case where I'm working 'stand-alone'.

Hope there's someone out who can help me on that.
 
Old 05-10-2007, 09:23 AM   #5
BCarey
Senior Member
 
Registered: Oct 2005
Location: New Mexico
Distribution: Slackware
Posts: 1,457

Rep: Reputation: Disabled
So you need to start the daemon before bringing up the internet. Try modifying /etc/rc.d/rc.M.

Brian
 
Old 05-10-2007, 06:54 PM   #6
bioe007
Member
 
Registered: Apr 2006
Location: lynnwood, wa - usa
Distribution: archlinux
Posts: 654

Rep: Reputation: 30
for DHCP times this is a simple way I found on a thread here:

Code:
 echo "/etc/rc.d/rc.inet1:  /sbin/dhcpcd -d -t ${DHCP_TIMEOUT[$i]:-20} ${DHCP_OPTIONS} ${1} &" | $LOGGER
        /sbin/dhcpcd -d -t ${DHCP_TIMEOUT[$i]:-20} ${DHCP_OPTIONS} ${1} &
note the '&' to send your dhcpcd request to the background. this really speeds up boot times with or without being plugged in or near a network. some have said this is not good practice (sorry I can't remember where the thread is) but its working fine for me.
 
Old 05-11-2007, 01:43 AM   #7
ppr:kut
Member
 
Registered: Aug 2006
Location: Netherlands
Distribution: Slackware
Posts: 361

Original Poster
Rep: Reputation: 93
Quote:
So you need to start the daemon before bringing up the internet. Try modifying /etc/rc.d/rc.M.
Yes, but I do already have a working modprobe-rule, which does this automatically, so loading the daemon is not the problem.
Yesterday I testes my LAN-Setup again, and recognized that I have the same problem there too. Now I remember exactly that I had a working setup, where my LAN-Card was not searching for an IP on startup, if there is no DHCP available on network, but it did, when there was one.
On the solution with '&'. It's not perfect, but I'll probably use it, though I would like to have a better solution.
 
Old 03-25-2009, 09:24 PM   #8
SwissHeritage
Member
 
Registered: Apr 2007
Distribution: Slackware 12.2, Debian 5.0, Ubuntu Intrepid Ibu
Posts: 39

Rep: Reputation: 16
Reconnecting after a dropped connection

The best solution I've found so far is is the one given by BCarey: remove and reload the driver, then restart the connection. In my case, with my wireless connection, that's:

rmmod ath5k
modprobe ath5k
/etc/rc.d/rc.inet1 wlan0_restart

I suppose I can put that in a script, but it's still annoying to have to run a script every time I lose the connection. Is there anything in the slackware distribution that I can use to monitor the connection, and automatically reconnect when it drops? Also, can anyone point me to an article or thread about possible reasons for dropped connections and what to do about them?

Last edited by SwissHeritage; 03-25-2009 at 11:01 PM.
 
Old 03-27-2009, 07:46 AM   #9
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 11,215
Blog Entries: 3

Rep: Reputation: 1437Reputation: 1437Reputation: 1437Reputation: 1437Reputation: 1437Reputation: 1437Reputation: 1437Reputation: 1437Reputation: 1437Reputation: 1437
Hi,

Old Post!

You could do a search here on LQ as your problem has been covered.

Try wicd.
 
  


Reply

Tags
dhcp, reconnect, wireless


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mount / unmount / ejecting CD/DVD makes LAN disconnect & reconnect...! GrapefruiTgirl Slackware 9 03-06-2007 10:48 PM
security log FC5 stops running -howto restart? cirman Linux - Security 2 02-10-2007 02:51 PM
howto start ntpdate after restart ? cccc Debian 4 08-13-2006 06:57 PM
HOWTo restart downloading with wget ashwin_cse Red Hat 5 08-26-2004 10:07 AM
Lan Howto xmac Linux - Networking 1 04-22-2004 12:14 PM


All times are GMT -5. The time now is 01:13 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration