What's new

RT-N16 wifi drops

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

korenisko

Occasional Visitor
I have weird wifi drop-outs on rt-n16 with latest beta build: 3.0.0.4_374.33_beta1.
I copied some of my data to external usb hdd attached to router via wifi using samba server. After aprox 20gb (large DVD iso files) pc lost wifi connection to router and copy was corrupted. On router wifi led indicator was off and wireless signal wasnt broadcasted, so probably wifi was off. Then after a while wifi was enabled and worked.
I downloaded syslog so I hope, that there is something to track issue. I had this problem on asus original fw too (build: 3004.374.168). There I had issues with losting 3G connection too, but your firmware working with 3G no problems.
Thank You for Your great work :)
 

Attachments

  • syslog.zip
    5.2 KB · Views: 162
Sounds like your router crashed and rebooted, which is why wifi went down for a minute or two and came back on on its own.

The RT-N16 only has 128 MB of RAM, so it's possible the router ran out of memory while trying to copy such a large file.
 
Sounds like your router crashed and rebooted, which is why wifi went down for a minute or two and came back on on its own.

The RT-N16 only has 128 MB of RAM, so it's possible the router ran out of memory while trying to copy such a large file.
Hi,

That's the reason why I have created a swap file:
Code:
chief@ASUS_RT-N16:/tmp/home/root# free
             total         used         free       shared      buffers
Mem:        126528        45472        81056            0         5484
-/+ buffers:              39988        86540
[B]Swap:       125984            0       125984[/B]
It's the first partition of the attached drive:
Code:
chief@ASUS_RT-N16:/tmp/home/root# fdisk -l /dev/sda
Disk /dev/sda: 800 GB, 8004304896 bytes
247 heads, 62 sectors/track, 1020 cylinders
Units = cylinders of 15314 * 512 = 7840768 bytes

   Device Boot      Start         End      Blocks  Id System
[B]/dev/sda1               1          17      125992+ 83 Linux[/B] ==> swap
/dev/sda2              17        1021     7690680  83 Linux ==> data

Currently I do not really need/use swap, but you never know when you need it...

With kind regards
Joe :cool:
 
Thank You all for help me.
Yes, that is as reboot and I had it in original asus fw too. So, it is because of low ram? Hmm... and with swap file I can fix that?
I have hdd partitioned to 3 partitions:
1st: entware prepaired :O
2nd: mnt (data storage!
3rd: formated as linux swap
So I have swap partition, but I dont know, if firmware can use it.
Swap file is some file saved on mnt? And if I create it, then /probably/ router can work without overloading because of big data transfers to disc?
Thanks again, Im novice on wrt...
 
Last edited:
Thank You all for help me.
Yes, that is as reboot and I had it in original asus fw too. So, it is because of low ram? Hmm... and with swap file I can fix that?

That's at least one theory. It could also be a kernel panic occuring because the router is having trouble communicating with the USB device when under sustained load.
 
So I have swap partition, but I dont know, if firmware can use it.
Swap file is some file saved on mnt? And if I create it, then /probably/ router can work without overloading because of big data transfers to disc?
Hi,

First of all the swap partition should be the first on the HDD to have the best speed - imagine: If it's the last on the HDD, the HDD head need to move all over the HDD surface to get to swap - which is slow. :confused:

How to get to swap:
1. The fdisk -l /dev/sdX command (X = a, b, c, ...) will show the list of partition with the right name and type.

Here a sample output:
Code:
chief@ASUS_RT-N66U:/tmp/home/root# fdisk -l /dev/sda

Disk /dev/sda: 750.1 GB, 750156374016 bytes
255 heads, 63 sectors/track, 91201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks  Id System
[B]/dev/sda2              66          73       64260  82 Linux swap[/B]
/dev/sda4             139       91201   731463547+ 83 Linux

2. Add the swapon command to the pre-mount user script in /jffs/scripts.

Example script as I use it:
Code:
#!/bin/sh
/usr/bin/logger -t START_$(basename $0) "started [$@]"
SCRLOG=/tmp/$(basename $0).log
touch $SCRLOG
echo "START_$(basename $0) started [$@]" >> $SCRLOG
if [ $1 = "[B]/dev/sda2[/B]" ]
then
[B]  /sbin/swapon $1 >> $SCRLOG[/B]
  wait 1
fi
if [ $1 = "/dev/sda4" ]
then
# nothing to do!
fi
if [ "$?" -ne 0 ]
then
  echo "Error in pre-mount execution! Script: $0" >> $SCRLOG
else
  echo "Pre-mount execution OK. Script: $0" >> $SCRLOG
fi
/usr/bin/logger -t STOP_$(basename $0) "return code $?"
exit $?

By the way: The script editing need to be done either ON the router or if you do it OFF the router (on a Windows PC), you need a Linux capable text editor and transferred in binary mode to the router! :eek:

I hope this helps...

With kind regards
Joe :cool:
 
I had done repartitioning disc to as you mentioned, so 1st is swap, then data and last is ent part.
next I enabled and formated jifs via web gui and rebooted router.
As last step I logged via winscp to jifs dir and created file "swapon" and pasted your script to it - did changed part ids and saved to router.

fdisk info:
Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 1 131 1052226 82 Linux swap
/dev/sdb2 132 60680 486359842+ 83 Linux
/dev/sdb3 60681 60801 971932+ 83 Linux

edited script:

#!/bin/sh
/usr/bin/logger -t START_$(basename $0) "started [$@]"
SCRLOG=/tmp/$(basename $0).log
touch $SCRLOG
echo "START_$(basename $0) started [$@]" >> $SCRLOG
if [ $1 = "/dev/sdb1" ]
then
/sbin/swapon $1 >> $SCRLOG
wait 1
fi
if [ $1 = "/dev/sdb2" ]
then
# nothing to do!
fi
if [ "$?" -ne 0 ]
then
echo "Error in pre-mount execution! Script: $0" >> $SCRLOG
else
echo "Pre-mount execution OK. Script: $0" >> $SCRLOG
fi
/usr/bin/logger -t STOP_$(basename $0) "return code $?"
exit $?

is that all ok?

EDIT:
after router reboot I checked via web ui in Tools-Sysinfo if swap is used, but not. There isnt any info about free or used swap.
 
Last edited:
after router reboot I checked via web ui in Tools-Sysinfo if swap is used, but not. There isnt any info about free or used swap.
Hi,

Ups! :eek:
I forgot to tell you that you need to make the scripts in the /jffs/scripts folder executable:
Code:
chmod a+x /jffs/scripts/*

With kind regards
Joe :cool:
 
I have to run that command in command prompt?

edit:
I run that cmd in putty over ssh and nothing changed.?

edit2
I discovered, that transfering gigs or small files was done without any problem. Only big files are the problem for router.
 
Last edited:

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top