Help with a script to renew DHCP when connection disconnects

Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware
Goto page Previous  1, 2
Author Message
t0t0fe0
DD-WRT Novice


Joined: 26 Nov 2017
Posts: 17

PostPosted: Thu Dec 21, 2017 2:03    Post subject: Reply with quote
MDA400 wrote:

How did you go about connecting your router to an xfinitywifi hotspot? by wifi repeater/ client bridge mode?

More generally, where are you that requires you to use the xfinitywifi hotspot and not a modem hooked up to the router for internet access?


Don't know what the difference is but it i have it set as "client" not "client bridge"

I'm on a small apartment with 2 floors, shouldn't be much congestion, the the amount of ssid's around me also suggest they have their own internet.

MDA400 wrote:

The xfinitywifi hotspots usually are timed access and you need to re-login every so often since anyone in public with a cable account can use them... This is probably the reason for your disconnection issue and is not an ideal way to get internet access.


The hotspot offers 1 hour trial like every month to people without an account, I've had an account and the connection has been constant for the past 8+ months aside from these DHCP issues.

I assume somehow dd-wrt doesn't handle these hotspots perfectly, cause having to go to the dd-wrt page to renew the dhcp once or twice a day and connection being back up in an instant doesn't seem like something i'd have to do manually.

Also a few days ago i started noticing the disconnects happening at roughly the same time so i started recording when and it would go up by exactly +3 mins every 24 hours (would dc at 8:05,8:08,8:11..etc i only had a chance to record the evening one), maybe it has something to do with lease? i tried setting it to a year but the 2 dhcp disconnects still happen daily, maybe the hotspot is forced to 24 hours but still don't know why it would disconnect me instead of renewing itself when it happens.
(it does renew itself but after the "remaining lease time" on WAN expires. which is set to every 5 mins, so i have to wait 1-5 mins with no internet if i don't renew it myself)

_________________
Asus RT-N66U

Firmware: DD-WRT v3.0-r33492 big (10/10/17)
Sponsor
t0t0fe0
DD-WRT Novice


Joined: 26 Nov 2017
Posts: 17

PostPosted: Sun Dec 24, 2017 17:39    Post subject: Reply with quote
So yeah i recorded the morning disconnect this time and it happened at 9:54am and then again as expected 12 hours later, same thing the next day. Definitely not random, any way to circumvent this?
_________________
Asus RT-N66U

Firmware: DD-WRT v3.0-r33492 big (10/10/17)
cousinabe
DD-WRT Novice


Joined: 31 Jan 2014
Posts: 5

PostPosted: Sat Apr 21, 2018 21:33    Post subject: Reply with quote
I am having the same issue. Did you find a solution?
t0t0fe0
DD-WRT Novice


Joined: 26 Nov 2017
Posts: 17

PostPosted: Sat Apr 21, 2018 22:07    Post subject: Reply with quote
cousinabe wrote:
I am having the same issue. Did you find a solution?


Sorry to say i did not, I gave up and just looked for the fastest way to renew the dhcp automatically so i don't have to manually go to the interface anymore.

I couldn't figure out how to make the script that detects when your connection drops and do a dhcp renew work so i just made it hit renew every second lol...[put in admin->command>save startup script below.](has a small chance to not work on startup, reset till it does)
Code:
#!/bin/sh
sleep 30
while [ true ]
do
    killall -SIGUSR1 udhcpc
    sleep 1
done


Might not be the most efficient thing but it's something.

_________________
Asus RT-N66U

Firmware: DD-WRT v3.0-r33492 big (10/10/17)
Goto page Previous  1, 2 Display posts from previous:    Page 2 of 2
Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum