What's new

RT-AC68R - Running AIMesh Reboot Nodes

  • 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!

Airey001

New Around Here
Is there a way to reboot the nodes when in AiMesh. I have found that the the software is very unstable and i constantly have to get a ladder and power cycle my nodes to get them to reconnect to the master. I know they are running you can ping them and if i try to access their IP via http it routes to the master but the nodes don't reconnect to the master until they are power cycled causing dead zones.


It would be nice if there was a way to reboot and control they via the master.
 
If you can enable SSH on your router then you can reboot from command line. You can also use a smart plug such as a WeMo Mini to remotely power cycle the mesh node.

If your mesh node has a USB port that allows you to mount a USB thumb drive, you can also make it reboot automatically if it completely loses the connection to the master :

1. Plug in the USB drive.

2. Create a directory /jffs/scripts.

3. Create a shell script named service-start in the directory with the following lines in it.
#!/bin/sh
# Reboot at 3am on Sunday
cru a ScheduledReboot "00 3 * * 0 /sbin/reboot"
# Run check.sh every 5 minutes
cru a NoConnectionReboot "*/5 * * * * /jffs/scripts/check.sh"


4. In the same directory create the file check.sh with the following lines, assuming your main router's IP address is 192.168.1.1.
#!/bin/sh
if ! ping -w 10 -c 10 192.168.1.1 > /dev/null; then
echo `date` "- Mesh router ping failed" >> /jffs/reboot.log
sleep 120
if ! ping -w 10 -c 10 192.168.1.1 > /dev/null; then
echo `date` "- reboot" >> /jffs/reboot.log
reboot
fi
fi


5. Run the following commands.
chmod a+x /jffs/scripts/service-start
chmod a+x /jffs/scripts/check.sh
nvram set script_usbmount=/jffs/scripts/services-start
nvram commit
reboot


6. After reboot check if the cron jobs have been set up:
cru l
You should see these lines:
00 3 * * 0 /sbin/reboot #ScheduledReboot#
*/5 * * * * /jffs/scripts/check.sh #NoConnectionReboot#
 
Is there a way to reboot the nodes when in AiMesh. I have found that the the software is very unstable and i constantly have to get a ladder and power cycle my nodes to get them to reconnect to the master. I know they are running you can ping them and if i try to access their IP via http it routes to the master but the nodes don't reconnect to the master until they are power cycled causing dead zones.


It would be nice if there was a way to reboot and control they via the master.

Can you send feedback with system log, wifi log by feedback function ? Please add your POST URL link in Comments field.
 
I have the exact same issue and have submitted logs via the feedback email (with log attached)...but no response from ASUS.

Need take more time to find out your feedback. if any, someone will response to you from ASUS.
 
Need take more time to find out your feedback. if any, someone will response to you from ASUS.
Thanks, I had to email the log as the Feedback function doesn't work from the web UI...says the ISP is blocking it. I am hoping someone will respond soon, because the basement node will not stay connected for more than a couple of hours after reboot.
 
This is what I found works on a AC-68U because if you put a command in /jffs/.asusrouter, it will always run at reboot of the router. the 4 is for a 4 am reboot

1. SSH into the node
2. vi /jffs/.asusrouter
3. add the following line:
cru a ScheduledReboot "0 4 * * * /sbin/reboot"
4. reboot
done!

to check that the cron job is running after reboot
1. SSH into the mode
2. cru l
It should display:
0 4 * * * /sbin/reboot #ScheduledReboot#
 
Can you send feedback with system log, wifi log by feedback function ? Please add your POST URL link in Comments field.
I think the problem here is that people are submitting logs, etc, and with little or no response from ASUS. It's obvious this a just one of a few problems with AiMesh.
What people are wanting are fixes, new firmwares from ASUS for the problems with AiMesh. Just how long does it take to put out a new firmware with fixes? Especially, right now as Aimesh is only compatible with just so a few, of ASUS router models.
With AiMesh being so new, yes you can expect problems/bugs, but more of a newer firmware update cycle would be appreciated because of the fact that it is so new.
Having to reboot nodes via a script, really???
 
Last edited:
Well i don't think any of these options will work. As of right now i have no way to access the nodes directly to create a script. When i added them to the mesh network http access was removed. So i can't enable SSH to add ssh. I could try breaking the mesh turning on SSH and then adding it back to the mesh. But i have a feeling ssh will get shut off. So it seems to me everyone is confirming there is no way to reboot the nodes when in a mesh except by switch or pulling power.

But again if that worked its only a temp solution . I just don't understand why access to the nodes would be removed completely. Seems kind of weird that all options from the mesh nodes are removed.

I will try to collect more data next time it happens so far i have been able to attribute this to the devices going offline. I have done upgrades of the firmware twice each time same situation. Also it appears when i have a power outage the same. .
 
All you need to do is to enable SSH on the master and it will sync to the node. The user and password will be the same on the node.
 
This is what I found works on a AC-68U because if you put a command in /jffs/.asusrouter, it will always run at reboot of the router. the 4 is for a 4 am reboot

1. SSH into the node
2. vi /jffs/.asusrouter
3. add the following line:
cru a ScheduledReboot "0 4 * * * /sbin/reboot"
4. reboot
done!

to check that the cron job is running after reboot
1. SSH into the mode
2. cru l
It should display:
0 4 * * * /sbin/reboot #ScheduledReboot#
This worked great. Unfortunately, my network seems to get all spastic after any component reboots. Seems to take hours for things to settle down. I have the same issue when I make major config changes. I've learned to just not mess with things when they are working OK. So I'll just file your script and example under general knowledge. I didn't know this flavor of linux's cron was called cru. Or about the ability to run jffs scripts on boots. Thanks for that.
 
This is what I found works on a AC-68U because if you put a command in /jffs/.asusrouter, it will always run at reboot of the router. the 4 is for a 4 am reboot

1. SSH into the node
2. vi /jffs/.asusrouter
3. add the following line:
cru a ScheduledReboot "0 4 * * * /sbin/reboot"
4. reboot
done!

to check that the cron job is running after reboot
1. SSH into the mode
2. cru l
It should display:
0 4 * * * /sbin/reboot #ScheduledReboot#

This /jffs/.asusrouter file is not documented anywhere. I tried it on my AC68P and it doesn't work.
 
Last edited:
Yes it doesn't seem to be running my cron command.
After reading the source code of the Merlin firmware, I realized that I need to make /jffs/.asusrouter a shell script and executable. For example,

#!/bin/sh
touch /jffs/temp.log


And then do a "chmod a+x /jffs/.asusrouter"
 
After reading the source code of the Merlin firmware, I realized that I need to make /jffs/.asusrouter a shell script and executable. For example,

#!/bin/sh
touch /jffs/temp.log


And then do a "chmod a+x /jffs/.asusrouter"
Yeah, I figured that out. Do all the old Merlin things apply? IIRC there was a jffs folder to start services on reboot.
 
Regardless if it is an AiMesh node or not, you should still be able to use nvram to configure the router settings. While camedia's script adds a connection check every 5 minutes, the other scripts do not do anything more than the basic reboot scheduler. To enable the built-in scheduler, SSH to the nodes and run these commands (adjust the days/time to your preference):

Code:
nvram set reboot_schedule_enable=1
nvram set reboot_schedule=11111110415
nvram commit
reboot

NOTE: The above sets this for every day at 4:15am. The day of the week is set to 0 or 1 to enable them, beginning with Sunday. If you wanted Mondays at 2:15pm, the value would be 01000001415.

There is a chance that you will lose the configuration in a future release and you will certainly lose it if you perform an nvram reset (no different than enabling external user scripts), but this is the native method for configuring a reboot schedule versus the bash shell script method.
 
If you can enable SSH on your router then you can reboot from command line. You can also use a smart plug such as a WeMo Mini to remotely power cycle the mesh node.

If your mesh node has a USB port that allows you to mount a USB thumb drive, you can also make it reboot automatically if it completely loses the connection to the master :

1. Plug in the USB drive.

2. Create a directory /jffs/scripts.

3. Create a shell script named service-start in the directory with the following lines in it.
#!/bin/sh
# Reboot at 3am on Sunday
cru a ScheduledReboot "00 3 * * 0 /sbin/reboot"
# Run check.sh every 5 minutes
cru a NoConnectionReboot "*/5 * * * * /jffs/scripts/check.sh"


4. In the same directory create the file check.sh with the following lines, assuming your main router's IP address is 192.168.1.1.
#!/bin/sh
if ! ping -w 10 -c 10 192.168.1.1 > /dev/null; then
echo `date` "- Mesh router ping failed" >> /jffs/reboot.log
sleep 120
if ! ping -w 10 -c 10 192.168.1.1 > /dev/null; then
echo `date` "- reboot" >> /jffs/reboot.log
reboot
fi
fi


5. Run the following commands.
chmod a+x /jffs/scripts/service-start
chmod a+x /jffs/scripts/check.sh
nvram set script_usbmount=/jffs/scripts/services-start
nvram commit
reboot


6. After reboot check if the cron jobs have been set up:
cru l
You should see these lines:
00 3 * * 0 /sbin/reboot #ScheduledReboot#
*/5 * * * * /jffs/scripts/check.sh #NoConnectionReboot#

I think I am missing something basic here.
Does the usb drive have to be pre-formatted (ext2?)?
Are we creating the scripts on the usb drive or on the router file system itself?
The usb drive keeps mounting at /tmp/mnt/LACIE/ and I can't seem to umount it.
Does this work with ASUS firmware or is the Merlin firmware required?

Thanks.
 
I think I am missing something basic here.
Does the usb drive have to be pre-formatted (ext2?)?
Are we creating the scripts on the usb drive or on the router file system itself?
The usb drive keeps mounting at /tmp/mnt/LACIE/ and I can't seem to umount it.
Does this work with ASUS firmware or is the Merlin firmware required?

Thanks.
The USB drive should be formatted to whatever format the router can read. If enabled, you should use .asusrouter instead of this USB drive trick.
We are creating the scripts in /jffs.
The drive is mounted during reboot or when you plug it in. It will be unmounted when you unplug it.
In 3.0.0.4.384.45717 ASUS disabled .asusrouter and removes execute permission from any files under /jffs. The feature might come back in the future. See this thread:
https://www.snbforums.com/threads/3-0-0-4-384-45717-removes-x-attribute-in-jffs-files.57334/
 
The latest release versions of the ASUS Router app for Android/iOS finally support manual reboot of AiMesh nodes.

BR
 

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

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