Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Wed 26 Nov 2014, 13:28
All times are UTC - 4
 Forum index » Advanced Topics » Hardware » Networking
How to auto-connect when connection is lost? (Solved?)
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 2 Posts_count   Goto page: 1, 2 Next
Author Message
nooby

Joined: 29 Jun 2008
Posts: 10557
Location: SwedenEurope

PostPosted: Sat 27 Mar 2010, 17:57    Post_subject:  How to auto-connect when connection is lost? (Solved?)
Sub_title: A script to detect the lost connection and run DHCP?
 

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.

Quote:
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?

Edited_times_total
Back to top
View user's profile Send_private_message 
kjp

Joined: 06 Feb 2010
Posts: 25

PostPosted: Sat 27 Mar 2010, 21:11    Post_subject: Network wizard  

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

Code:
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 Smile.

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.
Back to top
View user's profile Send_private_message 
Flash
Official Dog Handler


Joined: 04 May 2005
Posts: 11164
Location: Arizona USA

PostPosted: Sat 27 Mar 2010, 21:44    Post_subject: Re: Network wizard  

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.
Back to top
View user's profile Send_private_message 
nooby

Joined: 29 Jun 2008
Posts: 10557
Location: SwedenEurope

PostPosted: Sun 28 Mar 2010, 07:10    Post_subject:  

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
Back to top
View user's profile Send_private_message 
nooby

Joined: 29 Jun 2008
Posts: 10557
Location: SwedenEurope

PostPosted: Sun 28 Mar 2010, 07:59    Post_subject:  

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
Back to top
View user's profile Send_private_message 
rjbrewer


Joined: 22 Jan 2008
Posts: 4422
Location: merriam, kansas

PostPosted: Sun 28 Mar 2010, 13:24    Post_subject:  

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

Back to top
View user's profile Send_private_message 
nooby

Joined: 29 Jun 2008
Posts: 10557
Location: SwedenEurope

PostPosted: Sun 28 Mar 2010, 13:45    Post_subject:  

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
Back to top
View user's profile Send_private_message 
rjbrewer


Joined: 22 Jan 2008
Posts: 4422
Location: merriam, kansas

PostPosted: Sun 28 Mar 2010, 14:03    Post_subject:  

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

Back to top
View user's profile Send_private_message 
nooby

Joined: 29 Jun 2008
Posts: 10557
Location: SwedenEurope

PostPosted: Sun 28 Mar 2010, 15:19    Post_subject:  

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: Smile

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
Back to top
View user's profile Send_private_message 
nooby

Joined: 29 Jun 2008
Posts: 10557
Location: SwedenEurope

PostPosted: Sun 28 Mar 2010, 17:01    Post_subject:  

Quote:
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
Back to top
View user's profile Send_private_message 
nooby

Joined: 29 Jun 2008
Posts: 10557
Location: SwedenEurope

PostPosted: Fri 02 Apr 2010, 12:34    Post_subject:  

Quote:

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.

Quote:
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
Back to top
View user's profile Send_private_message 
2byte

Joined: 09 Oct 2006
Posts: 357

PostPosted: Sat 03 Apr 2010, 10:02    Post_subject:  

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

_________________

Back to top
View user's profile Send_private_message 
nooby

Joined: 29 Jun 2008
Posts: 10557
Location: SwedenEurope

PostPosted: Sat 03 Apr 2010, 10:13    Post_subject:  

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
Back to top
View user's profile Send_private_message 
nooby

Joined: 29 Jun 2008
Posts: 10557
Location: SwedenEurope

PostPosted: Sat 03 Apr 2010, 16:30    Post_subject:  

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
Back to top
View user's profile Send_private_message 
kataja

Joined: 30 Apr 2011
Posts: 38

PostPosted: Tue 13 Sep 2011, 09:25    Post_subject:  

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.
Back to top
View user's profile Send_private_message 
Display_posts:   Sort by:   
Page 1 of 2 Posts_count   Goto page: 1, 2 Next
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Advanced Topics » Hardware » Networking
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0929s ][ Queries: 11 (0.0035s) ][ GZIP on ]