How to auto-connect when connection is lost? (Solved?)

Problems and successes with specific brands/models of networking hardware.
Post Reply
Message
Author
nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

How to auto-connect when connection is lost? (Solved?)

#1 Post by nooby »

Most likely solved. Barry had thread and in it they linked to a description on a wika so I try to make a good link later. Have to test it more first.

//////////////////

Each twenty minutes or so I lose connection to wired internet.

My dhcp fail to restart itself. I know that other Linuxes can restart within a few seconds without any need to my active participation. .

Now the most surprising thing. When I boot up puppy after a reboot or shot down then it does make a reconnection automatically. so there are code there in puppy that knows how to do it.

One would only need a link to start up that code on the desktop or in the tray or a script that automatically just do it without waiting for any action from me.

In Debian/Antix Linux forum they suggest this thing.
Open a terminal,
su
dhclient eth0

and I'm connected in a few seconds.

This is much faster than 'default' setting.
http://antix.freeforums.org/post830.html#p830

Puppy terminal seems to not have that dhcp client or maybe there is a x in front of it or a p in front of the command. I have no idea.

Wconfig dhcp etho0
or something similar in terminal? Is there no such code???

Or does there exists some script one could add somewhere of change some text already written so it reconnect autmatically when it realize the connection is dropped?
Last edited by nooby on Fri 02 Apr 2010, 18:58, edited 3 times in total.

kjp
Posts: 25
Joined: Sat 06 Feb 2010, 19:26

Network wizard

#2 Post by kjp »

Network wizard seems to be doing this when you push the DHCP button

Code: Select all

dhcpcd -d -I '' "$INTERFACE" 2>&1 
That is in /usr/sbin/wag-profiles.sh. There is setupDHCP() function, which is used by /usr/sbin/net-setup.sh.

Are you sure this lease length is not determined by your modem's router parameters or something? That is, it would be easier (and more permanent) to change parameters there rather than do this kind of stay-alive-script on the client side. Mind you, I don't know nothing much about networking :).

I've never had this particular problem. For example, this Puppy session is now some 10 hours old and has been at least couple of hours idling. No timeouts or anything like that have occurred. I'm using wired ADSL connection. Neither has the problem occurred on GPRS wireless connection.

Hope this gives at least a pointers to some direction (right or wrong :wink: ) Would be interesting to see what solution you'll end up using.

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

Re: Network wizard

#3 Post by Flash »

kjp wrote:....Are you sure this lease length is not determined by your modem's router parameters or something? ....
In my case it is, but oddly I never had to mess with it until I started using this latest version of Puppy (4.3.1). Something seems to have changed in Puppy. In earlier versions of Puppy I could leave the computer on for days without having to re-run the Connect wizard. When I switched to Puppy 4.3.1 that switched to every hour, until I went into the router and changed the lease time to 12 hours.

nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

#4 Post by nooby »

Thanks, not easy to remember that one though.

You mean one can have a button to click on the desktop to accomplish the same? That would be cool.

The connect button has at least several hoops to go through each time.

Flash, do you remember if any of the developers have mention this difference? Could it be about changing to a more modern Kernel and then not something the puppy devs can do anything about?

Going into the router.

Well that would require a long story. We have a kind of combined TV/Telephone/Computer/switch/modem/router/SIP? IP-Telephone modem and Computer modem combined in one box and the ISP has taken total control over it and don't tell us the log in name and password to it and most likely one lose the account if one tamper with it.

we can pay to see hundreds of tv channels on demand.

We pay for the "base" on the rent. so one pay even of one never use internet and we have no extra money for the base features. So we are kind of boxed in unless we want to pay to two different ISP. But this one is the best provider so no need to change. Cheapest telephone bills too. Same price to talk all over the world as talking local here. Only more costly to Cell Mobile phone.

so I can not change lease time here.

My extreme wild guess is that before they drop the line to me they send out some kind of "request to acknowledge wanting to keep the line up" and the software of the Distro is supposed to answer "keep it up".


I guess I have to ask somebody at the ISP about it. But they always say they don't do linux. We are only paying for service about windows.
I use Google Search on Puppy Forum
not an ideal solution though

nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

#5 Post by nooby »

So I would need to copy the button from the Network Wizard over to the desktop and when I click on that button it would do dhcpcd -d -I '' "$INTERFACE" 2>&1 in the Terminal.

or the better thing.

when a program running in the background detect that the ISP send out the .

"Send an acknowledge to this request to drop or keep the line up" then it should answer "Yes keep it up".

I don't remember if it was DebianElive or Debian/AntiX or some other program that did that. Each time one saw the connection sumbol go into a "spin" and when it established connection again then it stopped spinning. that was done automatically. Not the most ideal thing but less intrusive than to have to do 6 clicks and not knowing when it was dropped and then one often has to log in again because forum thought one had left the building so to say.
I use Google Search on Puppy Forum
not an ideal solution though

User avatar
rjbrewer
Posts: 4405
Joined: Tue 22 Jan 2008, 21:41
Location: merriam, kansas

#6 Post by rjbrewer »

2 click method:

R-click connect icon.
L-click autoconnect eth/wireless.

Inspiron 700m, Pent.M 1.6Ghz, 1Gb ram.
Msi Wind U100, N270 1.6>2.0Ghz, 1.5Gb ram.
Eeepc 8g 701, 900Mhz, 1Gb ram.
Full installs

nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

#7 Post by nooby »

RJ, that was on the money. You made my day a happy day.


It is three click but a huge improvement.

do you know if one can move the icon to the tray instead? or place a copy or symlink in the tray. Maybe to the right of the menu. I guess one only have to ape after how the Menu get placed there.

Yes I am an old grumpy guy. Here goes:

Why did it take so many years for somebody to tell such important features. Talking about linux for geeks.

If you had not cared enough to tell me this today then most likely years had gone with me clicking 6 to 8 times to get back connection each 20 minutes or so.

So you may think of me as an old grumpy guy that are set on to be different not doing DVD each time I want to test a new puppy or other linuxes.

The best would be if the "lost connection" would set some flag and a program that worked in background could execute this function instantly.

I guess there is something odd with my set up. We are only 125 persons on this local net so I guess the ISP don't care about us as long as our money get paid automatically by the Directors of the community. I don't know the english formal word for it. But you got together and own many houses together and invest together in it and chose a Board of Directors and they decide on things.
I use Google Search on Puppy Forum
not an ideal solution though

User avatar
rjbrewer
Posts: 4405
Joined: Tue 22 Jan 2008, 21:41
Location: merriam, kansas

#8 Post by rjbrewer »

My neighbor and I share internet connection.
We are at the end of the cable line and sometimes the signal
will drop out.
Sometimes have to reset cable modem.
We live with it.

Inspiron 700m, Pent.M 1.6Ghz, 1Gb ram.
Msi Wind U100, N270 1.6>2.0Ghz, 1.5Gb ram.
Eeepc 8g 701, 900Mhz, 1Gb ram.
Full installs

nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

#9 Post by nooby »

RJ unfortunately it did not work out if one are logged in to puppy forum and writing and then lose the connection.

then it fail to reconnect the way you suggested but does connect if I go the 6 click route to do it.

Have no idea why. That's life the text in the song says: :)

so the best thing would be to have some kind of automatic detection of losing connection and a retry.

I have had such linux going but did not write down the name of it so can not give any reference about it.
I use Google Search on Puppy Forum
not an ideal solution though

nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

#10 Post by nooby »

wayward
adj.
1. Given to or marked by willful, often perverse deviation from what is desired, expected, or required in order to gratify one's own impulses or inclinations. See Synonyms at unruly.
2. Swayed or prompted by caprice; unpredictable.
That was not my intention at all.

Anyway I am in antiX linux now in frugal install to see how that one behave when I lose the connection.
I use Google Search on Puppy Forum
not an ideal solution though

nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

#11 Post by nooby »

gently trying to bump this thread because it is important to me.

Each twenty minutes or so I lose connection to wired internet.

My dhcp fail to restart itself. I know that other Linuxes can restart within a few seconds without any need to my active participation. .

Now the most surprising thing. When I boot up puppy after a reboot or shot down then it does make a reconnection automatically. so there are code there in puppy that knows how to do it.

One would only need a link to start up that code on the desktop or in the tray or a script that automatically just do it without waiting for any action from me.

In Debian/Antix Linux forum they suggest this thing.
Open a terminal,
su
dhclient eth0

and I'm connected in a few seconds.

This is much faster than 'default' setting.
http://antix.freeforums.org/post830.html#p830

Puppy terminal seems to not have that dhcp client or maybe there is a x in front of it or a p in front of the command. I have no idea.

Wconfig dhcp etho0
or something similar in terminal? Is there no such code???

Or does there exists some script one could add somewhere of change some text already written so it reconnect autmatically when it realize the connection is dropped?
I edited the first post to try to give it a more graspable way of presenting the problem and that the solution is there if one knows how to do it which is what I hope to get help with.
I use Google Search on Puppy Forum
not an ideal solution though

2byte
Posts: 353
Joined: Mon 09 Oct 2006, 18:10

#12 Post by 2byte »

Nooby,
Have you solved this issue?
What worked for you?


nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

#13 Post by nooby »

2byte.

Yes and No!

Depends on what you mean by solved.

Kind persons have in PM described how it can be solved.

I am not intelligent or bright enough to follow the instructions.

So yes it is officially solved because somebody who knows has done a description they trust should be on a decent level but me is not on that level so practically I don't know if it is solved.

But when Quirky 015 comes out when Barry get to it in due time which he most likely will within some month or so then it most likely are solved by the SNS feature that hopefully works also on my computers.
I use Google Search on Puppy Forum
not an ideal solution though

nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

#14 Post by nooby »

I am testing quirky 13 now. I hope I did chose SNS network manager. Because if I do remember correctly it can keep the line when it drops? or re-lease or what the word for it is.

in terminal/console I did this

# dhcpcd -L
dhcpcd: version 5.1.5 starting
dhcpcd: eth0: rebinding lease of IP-address
dhcpcd: eth0: acknowledged IP-address from IP-address
dhcpcd: eth0: leased IP-address for 3600 seconds
dhcpcd: forking to background
#

Maybe the word is rebinding or leasing.

3600 sec should be for 60 minutes.

See this part?

dhcpcd: version 5.1.5 in puppy 431 I had 3.1.8 something don't remember so this newer one hopefully solve my problem with losing connection?
I use Google Search on Puppy Forum
not an ideal solution though

kataja
Posts: 38
Joined: Sat 30 Apr 2011, 15:15

#15 Post by kataja »

Is there any full-automatic way to do this auto-connection?
My internet-connection drops off very often, but Puppy requires every time re-connection by me. Windows systems do it fully automatically.

nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

#16 Post by nooby »

I guess that if you have luck then somebody who do know see your question but the chances is rather slim due to this:

How to auto-connect when connection is lost? (Solved?)


So people looking for to help others see that it is already solved so them
give my old thread very little priority.

If Flash or Beem or any other Moderator read this confirm that I can advice that it is better to start a new question in Beginners with same question or title slightly more precise than I gave it here.

Sadly I know too little to help you.
I use Google Search on Puppy Forum
not an ideal solution though

MoebusNet
Posts: 89
Joined: Sat 04 Jun 2011, 20:50

#17 Post by MoebusNet »

This seems to be working for me:

Menu>Internet>Stay_Connected_To_The_Internet

I think this application is supposed to be for dial-up, but it seems to have solved for me my disconnect-every-few-minutes issue with connecting by wireless router. I'm using Lucid Puppy 5.28 frugal install to USB flash drive.

Hope this helps :)
Acer Aspire One D255-2301 (N450 Atom @ 1.6 Ghz, 1 Gb RAM, 160 Gb HDD w/WinXP, ENE SD card reader, Alps touchpad) 5.28/5.3.1 via manual-frugal ext4 USB flash drive (4Gb) using GRUB4DOS

Post Reply