Some problems with WAG354G

31 views
Skip to first unread message

Rail Aliev

unread,
Mar 12, 2007, 2:22:41 PM3/12/07
to neptune...@googlegroups.com
Hi,

I have 2 things which don't work in neptune354 (and in orginal FW as well).

1. Time synchronization via ntp. Seems like ntpd doesn't run after
start up. If you run it manually it works.

2. DDNS service doesn't update IP address automatically. You must run
/usr/sbin/ez-ipupdate -c /tmp/ddns.conf [--daemon] to get it working.

Does somebidy have the same problems or I am alone? :)

--
WBR,
Rail Aliev

cyberstorm

unread,
Mar 14, 2007, 2:38:31 PM3/14/07
to neptune354-dev
On 12 Mar, 19:22, "Rail Aliev" <railal...@gmail.com> wrote:
> Hi,
>
> I have 2 things which don't work in neptune354 (and in orginal FW as well).
>
> 1. Time synchronization via ntp. Seems like ntpd doesn't run after
> start up. If you run it manually it works.

Oh, I have never used the ntp server in wag354g to sync hour, so I
cannot tell anything u about this.


> 2. DDNS service doesn't update IP address automatically. You must run
> /usr/sbin/ez-ipupdate -c /tmp/ddns.conf [--daemon] to get it working.

I had this problem, but now no more. One thing I noticed is that this
problem occure when I used a non-standard name, i.e. not ending in
dyndns.org

Hope this could help,

I dont have much time lately, sorry for the late answer

Marco

Rail Aliev

unread,
Mar 14, 2007, 3:35:47 PM3/14/07
to neptune...@googlegroups.com
2007/3/14, cyberstorm <marc...@gmail.com>:

> Oh, I have never used the ntp server in wag354g to sync hour, so I
> cannot tell anything u about this.

It's not important.

> > 2. DDNS service doesn't update IP address automatically. You must run
> > /usr/sbin/ez-ipupdate -c /tmp/ddns.conf [--daemon] to get it working.
>
> I had this problem, but now no more. One thing I noticed is that this
> problem occure when I used a non-standard name, i.e. not ending in
> dyndns.org

Good hint. I will try main dyndns.org instead of linuxhome.org. :)

> I dont have much time lately, sorry for the late answer

NP, it's a public list and you are not only person who can answer ;)

johna...@gmail.com

unread,
Mar 15, 2007, 6:13:48 AM3/15/07
to neptune354-dev
Time synchronization don't work for me when I enable qos.
>From 1.01.09 firmware version and above DDNS works fine for me and I
have linuxhome.org. :)

Rail Aliev

unread,
Mar 15, 2007, 6:29:38 AM3/15/07
to neptune...@googlegroups.com
2007/3/15, johna...@gmail.com <johna...@gmail.com>:

> Time synchronization don't work for me when I enable qos.

Hmm, seems like it's true. After disabling QoS it worked (at least
after reboot) and I got /tmp/ddns_msg! Thanks a lot for the tip.

> have linuxhome.org. :)

I can switch back now. :)

toneworks

unread,
Mar 18, 2007, 3:50:10 PM3/18/07
to neptune354-dev
Hi there. First I'd like to thank all people who contribute to
neptune354 project. I've learned a lot from you:) I'm writing this
message to post a problem I'm having with Wag354g (official and
unofficial firmwares).

I'm trying to enable DHCP Static Leases, that is when a specific mac
address joins network, the dhcpd gives a specific local ip. Some
technical info follows...

When I use 192.168.1.1/dhcp_reserved.asp, router saves settings using
nvram (nvram get dhcp_reserved_ip). It also adds macip lines to
udhcpd.conf (cat /tmp/udhcpd.conf). The thing is that it works only
after a soft reboot. Settings are lost when power cycle happens.

Any tips on this?

Thank you.


PS.
Possible Workarounds are:
a) to set the ip on the local pc manually but this is not what I
really want.
b) to increase default lease time (default: 86400 sec - dumpleases -f /
tmp/udhcpd.leases) but I wouldn't like this either.

Message has been deleted

toneworks

unread,
Mar 18, 2007, 6:29:55 PM3/18/07
to neptune354-dev
Geez, I was really careless on this one. Dhcp's mac address static
leases work just fine. Thank you Rail Aliev.

I'll check out if the dhcp's host name static leases work ok.

Maybe dhcp_reserved.asp should be edited and linked with the rest
of the web interface.

cyberstorm

unread,
Mar 19, 2007, 7:07:13 AM3/19/07
to neptune354-dev

On 18 Mar, 23:29, "toneworks" <irgpla...@gmail.com> wrote:

> I'll check out if the dhcp's host name static leases work ok.
>
> Maybe dhcp_reserved.asp should be edited and linked with the rest
> of the web interface.

NOP about adding a link.
So, to make static dhcp work even after a reboot, you need to save
(commit?) the content of the nvram.
In this case, we just need to add nvram_commit(); at the end of the
function that handles static dhcp. This function is probably in router/
shared/dhcp.c. If you are able to do this fix, tell me.

toneworks

unread,
Mar 19, 2007, 2:20:46 PM3/19/07
to neptune354-dev
I checked dhcp's host name leases. They work too (hostip line is added
in udhcpd.conf).

I don't think the problem is in "nvram commit". I applied some changes
in dhcp_reserved.asp, pressed save and rebooted (soft and hard).
Changes had been saved.

The only problem is when you press save in dhcp_reserved.asp: changes
at that time are applied only in nvram. You need to reboot so that
udhcpd.conf can be updated.

I tried manually to kill udhcpd and restart it, that didn't work.

So there are two options I guess. One is to add "soft reboot router"
process after pressing save in page. The other option is to find how
changes are moved from nvram to .conf and repeat the specific steps,
in order to skip the reboot.

Any ideas? :D

Marco Vedovati

unread,
Mar 19, 2007, 2:41:55 PM3/19/07
to neptune...@googlegroups.com

Il giorno 19/mar/07, alle ore 19:20, toneworks ha scritto:

>
> I don't think the problem is in "nvram commit". I applied some changes
> in dhcp_reserved.asp, pressed save and rebooted (soft and hard).
> Changes had been saved.
>

ok

> The only problem is when you press save in dhcp_reserved.asp: changes
> at that time are applied only in nvram. You need to reboot so that
> udhcpd.conf can be updated.

mmhh...maybe there is a way.
Go to router/shared/broadcom.c and change this line:

{"dhcp_reserved", "dhcp_reserved_ip", 0, NULL, NULL},

with this:

{"dhcp_reserved", "dhcp_reserved_ip", 0, RESTART, NULL},

Instead of RESTART you could also try SERVICE_RESTART. If these two
fail (I hope not),
try with the "brutal" REBOOT

good luck,

Marco

cyberstorm

unread,
Mar 19, 2007, 2:50:48 PM3/19/07
to neptune354-dev
just another thing that maybe could help. To test your changes, you
dont need all the time to build a complete fw and flash it. Just enter
the router folder and type:

make httpd

The compiled binary httpd/httpd can be sent to the router, e.g.
setting up a ftp server on your machine (like I do) with anonymous
access, so that on your router you can simply type:

wget ftp://yourmachineip/httpd && chmod +xr httpd
killall httpd && ./httpd

bye

toneworks

unread,
Mar 19, 2007, 5:27:13 PM3/19/07
to neptune354-dev
Man you own! As you said, I've changed:

{"dhcp_reserved", "dhcp_reserved_ip", 0, NULL, NULL},
with this:
{"dhcp_reserved", "dhcp_reserved_ip", 0, RESTART, NULL},

I compiled new httpd, sent it to router through tftp, killed the -ro
httpd. Then executed my new httpd with this: admin@neptune:/www# /
tmp/./httpd
(I had to do this in /www so new httpd showed correctly web pages).

Now when I press save in dhcp_reserved.asp it only disconnects/
reconnects and automatically applies changes in udhcpd.conf :D

Thank you again for your time.

Marco Vedovati

unread,
Mar 19, 2007, 5:32:23 PM3/19/07
to neptune...@googlegroups.com
great! thank to you for testing it!
I will now commit the changes in the SVN :D

toneworks

unread,
Mar 25, 2007, 6:55:48 PM3/25/07
to neptune354-dev
Hello again.

There's one bug (I think) in official (and neptune) web interface:
Button "DHCP Client Table" in Status_Lan.asp. It's always (or most of
the time) disabled. It links to DHCPTable.asp (which works). I removed
text:
<% nvram_invmatch(\"lan_proto\", \"dhcp\", \"disabled\"); %>
from Status_Lan.asp to make button always clickable (it worked).

I believe that normally, script would check if you had DHCP Server
running. If yes then button would have been enabled, if not then it
would have been disabled.
If you mind that much, you can make it work this way (instead of
always clickable :D).

Thank you and sorry for my bad english :o

Marco Vedovati

unread,
Mar 26, 2007, 3:59:48 AM3/26/07
to neptune...@googlegroups.com

Il giorno 26/mar/07, alle ore 00:55, toneworks ha scritto:

>
> Hello again.
>
> There's one bug (I think) in official (and neptune) web interface:
> Button "DHCP Client Table" in Status_Lan.asp. It's always (or most of
> the time) disabled. It links to DHCPTable.asp (which works). I removed
> text:
> <% nvram_invmatch(\"lan_proto\", \"dhcp\", \"disabled\"); %>
> from Status_Lan.asp to make button always clickable (it worked).
>

Thank you for your this. It works like it should simply deleting all
the \.
No worry about your english: surely it's not worse than mine!

cheers

marco

toneworks

unread,
Mar 26, 2007, 11:19:50 PM3/26/07
to neptune354-dev
As I said I was in 080 and while browsing web interface httpd crashed.
I updated in 087 and same thing kept happening. I'll explain.

When I go to pages that have a roll menu and show new forms (which
depend on what I selected on roll menu), like WL_WPATable.asp and
DDNS.asp, httpd crashes.

Tell me this happens only to me (bad compile or something).


Marco Vedovati

unread,
Mar 27, 2007, 12:39:15 PM3/27/07
to neptune...@googlegroups.com

Il giorno 27/mar/07, alle ore 05:19, toneworks ha scritto:


shit, this happens to me too. When have you first noticed this bug?
I will try to check what's wrong, I really dont know what could be
the cause.

cyberstorm

unread,
Mar 27, 2007, 1:24:43 PM3/27/07
to neptune354-dev
ok, fixed...
It was a stupid thing, but luckily I have remembered of it..

toneworks

unread,
Mar 27, 2007, 1:41:12 PM3/27/07
to neptune354-dev

Ο/Η Marco Vedovati έγραψε:

> shit, this happens to me too. When have you first noticed this bug?
> I will try to check what's wrong, I really dont know what could be
> the cause.

I first noticed it on 080.

SSH version on your site doesn't have that bug.
Latest firmware I had compiled was 069 (with a custom change) which
doesn't have that bug.
I had serious problems in compiling httpd on 070+ versions (broadcom.o
file. It could have been my fault though).
On 080, httpd compilation was successful but as I said it crashes.

toneworks

unread,
Mar 30, 2007, 7:51:53 AM3/30/07
to neptune354-dev
JohnAthana, (a member of this mailing list) has provided (apart from 2
tickets) a great solution to internet led freezing at his page:

http://l1nux.h4ck3r.googlepages.com

If he agrees, it could be a nice idea to implement his fix to
nepture354 (with a proper thank you).

ps. I don't want to be rude to anyone, I'm just trying to speed things
up (for the sake of all wag354 users).

Marco Vedovati

unread,
Mar 30, 2007, 10:20:34 AM3/30/07
to neptune...@googlegroups.com

Il giorno 30/mar/07, alle ore 13:51, toneworks ha scritto:

>
> JohnAthana, (a member of this mailing list) has provided (apart from 2
> tickets) a great solution to internet led freezing at his page:
>
> http://l1nux.h4ck3r.googlepages.com
>
> If he agrees, it could be a nice idea to implement his fix to
> nepture354 (with a proper thank you).
>

yes, I think the same, and if he published the patch, I think he will
agree.

> ps. I don't want to be rude to anyone, I'm just trying to speed things
> up (for the sake of all wag354 users).


There is problem for me to let people commit in the svn, as long as
they intend to implement useful things / fix bugs.
So if someone of you wants to do it, just ask me.


toneworks

unread,
Mar 31, 2007, 6:06:14 PM3/31/07
to neptune354-dev
Ο/Η Marco Vedovati έγραψε:

>
> There is problem for me to let people commit in the svn, as long as
> they intend to implement useful things / fix bugs.
> So if someone of you wants to do it, just ask me.

Well I would, If I had some experience in svn :D
Anyway, I implemented Johnathana's led fix and a httpd speed
optimisation.
If they are ok upload them.

http://users.forthnet.gr/her/gojira/changes.tar.bz2

toneworks

unread,
Mar 31, 2007, 8:27:58 PM3/31/07
to neptune354-dev
I looked into static_route.c (located at /router/shared/) and there is
a problem.
It uses path /usr/bin/route for route command but route is at /sbin.
(of course static routing in Routing.asp does not work.)

Maybe an edit at static_route.c or a symlink of route in /sbin can do
the trick.

toneworks

unread,
Mar 31, 2007, 9:03:20 PM3/31/07
to neptune354-dev
about that "editing .c file".. forget it. "/usr/bin/route" reference
is found in a lot of .c files.
so either we use symlink or we edit installed location of route
command at the first place. (busybox/include/applets.h).

maybe the problem was caused by busybox upgrade. we need to check if
other commands are in place (in comparison to 0.60 version).

Marco Vedovati

unread,
Apr 1, 2007, 5:14:17 AM4/1/07
to neptune...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Il giorno 01/apr/07, alle ore 00:06, toneworks ha scritto:


>
> Well I would, If I had some experience in svn :D
> Anyway, I implemented Johnathana's led fix and a httpd speed
> optimisation.
> If they are ok upload them.
>
> http://users.forthnet.gr/her/gojira/changes.tar.bz2

have you tested these changes? I'm actually running openwrt, and I
dont wanna flash neptune, loosing all my configs...
If these changes are ok, tell me and I'll commit it.

BTW, committing is just matter of:
- -checkout the last revision
- -modify a file like usual
- -type:
svn commit filename -m "changes done because of blah blah blah"

If you are able to fix bugs, I dont think committing is a hard task
for you...
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFGD3fq8PPSbh9Zs4YRAtJhAJ9P7MVqAuKBTA1sO+5VQkeOpPLcewCdFALx
Zs3aYwNcEWGIM1GpvE54EZE=
=ST2n
-----END PGP SIGNATURE-----

Marco Vedovati

unread,
Apr 1, 2007, 5:24:42 AM4/1/07
to neptune...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Il giorno 01/apr/07, alle ore 03:03, toneworks ha scritto:

>
> about that "editing .c file".. forget it. "/usr/bin/route" reference
> is found in a lot of .c files.
> so either we use symlink or we edit installed location of route
> command at the first place. (busybox/include/applets.h).

the best thing is to change the line 230 in applets.h

- -USE_ROUTE(APPLET(route, _BB_DIR_SBIN, _BB_SUID_NEVER))
+USE_ROUTE(APPLET(route, _BB_DIR_USR_BIN, _BB_SUID_NEVER))


> maybe the problem was caused by busybox upgrade. we need to check if
> other commands are in place (in comparison to 0.60 version).
>

yes, I think the same...
Thank you for the telling me this bug.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFGD3pa8PPSbh9Zs4YRAtoZAJ9LBGl2woBcxrdJsBJomci8VysCNQCeMJJc
ashOlBZS9BamCSq6OGs6QoU=
=oAgq
-----END PGP SIGNATURE-----

toneworks

unread,
Apr 1, 2007, 10:30:21 AM4/1/07
to neptune354-dev
Changes are checked (and compiled) before I send them to you.

I used wget -E --http-user=admin --http-passwd=pass -r 192.168.1.1/
index.asp to measure speed fix. It was about 30-35% faster than
official (and neptune) httpd.

The led fix needs heavy download usage, but as a problem it exists. (I
have read about it in greek and french forums).

Besides those, I'm thinking of rewritting uptime function (if you
don't mind). I wanna add wan uptime and maybe line sync uptime. Wish
me good luck :D

Cheers

cyberstorm

unread,
Apr 1, 2007, 1:54:45 PM4/1/07
to neptune354-dev

On 1 Apr, 16:30, "toneworks" <irgpla...@gmail.com> wrote:
> Changes are checked (and compiled) before I send them to you.
>
> I used wget -E --http-user=admin --http-passwd=pass -r 192.168.1.1/
> index.asp to measure speed fix. It was about 30-35% faster than
> official (and neptune) httpd.
>

that's incredible!! Good job.

I've committed your changes and fixed the busybox applets.h
Can you test if the dropbear port changes are stored in nvram? Because
I dont remeber if it was ok.
Also I deleted the ability to accept connections from wan side,
because that was not working (because of bad-formed iptables
rules...).
We'll have to fix those rules, now are really non-sense, e.g. the
policy for INPUT chain is "ACCEPT" !!
I'll try to dump the iptables rules from openwrt and see if they can
be ported to neptune.

> Besides those, I'm thinking of rewritting uptime function (if you
> don't mind). I wanna add wan uptime and maybe line sync uptime. Wish
> me good luck :D

Are u joking? You are free to do whatever changes you want!
Just some hints
Maybe you can "lend" some functions from dd-wrt (like I did... :) ).
1)Checkout the latest dd-wrt trunk, some interesting functions are in
router/httpd/modules/ddwrt.c
2)to build a new image without starting from the begging, you could
use:
cd router/
make httpd && make install package && make rom && make upgrade
3) You can store functions in:
router/shared/neptune.c
4)Write separate functions for each value you wanna print

Good Luck!! :)

toneworks

unread,
Apr 1, 2007, 6:39:51 PM4/1/07
to neptune354-dev
I'm on 097.

Ο/Η cyberstorm έγραψε:


>I've committed your changes and fixed the busybox applets.h

I'm testing those now. All are ok. route now is in /sbin and in /usr/
bin.
Since both are symlinked to /bin/busybox, it's better this way.

> Can you test if the dropbear port changes are stored in nvram? Because
> I dont remeber if it was ok.

admin@neptune:~# nvram show | grep "dropbear"
dropbear_enable=1
dropbear_port=22
admin@neptune:~# nvram show | grep "ssh"
wan_ssh=0

Seem ok. Values change from web interface too.

> We'll have to fix those rules, now are really non-sense, e.g. the
> policy for INPUT chain is "ACCEPT" !!
> I'll try to dump the iptables rules from openwrt and see if they can
> be ported to neptune.

I believe iptables need major update to 1.3.5 or 6. Maybe some kernel
options also have to be enabled.
Do you want to fix rules on 1.2.7a?

> 1)Checkout the latest dd-wrt trunk, some interesting functions are in
> router/httpd/modules/ddwrt.c

I will :) Thanks

toneworks

unread,
Apr 2, 2007, 11:23:06 AM4/2/07
to neptune354-dev
I tried my luck with uptime stuff. Changes look like this:
http://img505.imageshack.us/my.php?image=wanupct9.jpg
I added a check in Wan Uptime if ppp0 was down.

I had problems with line uptime. It worked on first boot but if lost
sync it read buffer from other file and it showed it was sync since
1970 :D Could have overcome this, but it needs lots of computations or
changes and I don't think it is worth it.

Another problem we might face is that stupid 15 sec refresh script. On
status pages that show only stats it doesn't matter but on pages like
Status_Router.asp which have buttons like connect and disconnect, it
just makes our lives harder.
I'd say remove all refresh script or make them at least 45 sec.

Anyway uptime changes are here:
http://users.forthnet.gr/her/gojira/wantime.tar.bz2

cyberstorm

unread,
Apr 2, 2007, 1:57:55 PM4/2/07
to neptune354-dev
On 2 Apr, 17:23, "toneworks" <irgpla...@gmail.com> wrote:
> I tried my luck with uptime stuff. Changes look like this:http://img505.imageshack.us/my.php?image=wanupct9.jpg
> I added a check in Wan Uptime if ppp0 was down.

what about moving the position of wan uptime in "internet connection"
under "interface" ?

> I had problems with line uptime. It worked on first boot but if lost
> sync it read buffer from other file and it showed it was sync since
> 1970 :D Could have overcome this, but it needs lots of computations or
> changes and I don't think it is worth it.

ok, that' not aproblem. There is plenty of other infos in /proc/
avalanche you could print :)
E.g. the number of failed training.

> Another problem we might face is that stupid 15 sec refresh script. On
> status pages that show only stats it doesn't matter but on pages like
> Status_Router.asp which have buttons like connect and disconnect, it
> just makes our lives harder.
> I'd say remove all refresh script or make them at least 45 sec.

I cannot understand what's the problem with refresh !!

toneworks

unread,
Apr 2, 2007, 5:04:26 PM4/2/07
to neptune354-dev
Ο/Η cyberstorm έγραψε:

> what about moving the position of wan uptime in "internet connection"
> under "interface" ?

I put ppp0 uptime under Interface: (internet connection). Here it is
with newer changes.
http://users.forthnet.gr/her/gojira/wantime2.tar.bz2

> I cannot understand what's the problem with refresh !!

Well sometimes (rarely), when I press eg. disconnect while connected
and at the same time a refresh of the page happens (because of script)
then router disconnects but page is not updated (i mean timers are,
but it still shows me connected while i'm not). I don't believe it is
because of my added neptune.c routines. It could be because of httpd
optimisation though. But instead of removing httpd fix I prefer to
remove auto refresh script on those 2 or 3 pages. Or set it to refresh
every 45 sec - 1 min to avoid refreshing happening at the same time
with a connect-disconnect change.

Anyway, that's all for now. Gotta test newer squashfs :D


Reply all
Reply to author
Forward
0 new messages