How to remotely reboot Jetson TK1 board

Hi all,

Is it possible that we could remotely reboot Jetson TK1 board?
I have a remote-controlled power-switch which can power up and power down a machine remotely.
However, the Jetson TK1 board will stay power off when it loses power. (On Intel machine, I know we can make the machine boot up when power is recovered.) The Jetson board won’t power up unless I physically press the power button.

My question is:
Does anyone have ever succeeded in rebooting the Jetson board remotely?

I found online someone suggests to use another board and a relay to support the remote reboot. I’m wondering if anyone succeeded?

Thank you very much for your time and help in this question!

On the command line, such as ssh or serial console:

sudo shutdown -r now

The “-r” means reboot, a “-h” would mean halt. Using the power switch to shutdown or reboot would not be considered an acceptable shutdown (a journalling file system won’t be corrupted, but files could be lost).

First grant yourself a ssh access to the target computer via sshd start and configure.

Than you may like to edit hosts.allow and hosts.deny in /etc/ folder :

hosts.deny
ALL:ALL

hosts.allow
sshd: [your-permanent-ip-address-without-brackets, presuming you have a permanent one ]

You may as well consider a key-authentication-based ssh access:

https://httpd.apache.org/docs/2.4/ssl/ssl_faq.html
https://ist.berkeley.edu/as-ag/tools/howto/ssh-key-exchange-win.html

After you successfully logged in, use the one of the following methods:

sudo reboot
sudo shutdown -r now

Hi linuxdev and Andrey1984,

Thank you very much for your help! I really appreciate your answer!

I should have explain my question in a better way.

I understand that I can use reboot or shutdown command to reboot a working Linux on Jetson.
However, if the Linux kernel has a bug and makes the system hangs. Sometimes, the linux may hangs before it fully boots up. We may have to “hard reboot” the system by pressing the “reset” button. Another way to do the hard reboot is first powering off the board, and then powering up the board and press the “power” button.

My question is:
How can we do the “hard reboot” remotely?
Is there a way to remotely press the “reset” button?

If on Intel machine, I can configure the BIOS to make the machine reset to boot status when it has its power recovered. However, on Jetson board, I’m not sure if we do have the similar mechanism in Uboot?

Thank you very much!

There is a standard “front panel” header (it’s nicely color coded, next to the D-sub connector) which allows adding an external reset or power function…you’d have to rig some sort of hardware to use this.

There may be some sort of remote telephone-based serial keyboard hardware available which lets you call in on a phone and work as a standard serial console over the phone line. This in turn could allow sysrq functionality (but only if it isn’t a hard lockup…sysrq tends to function if serial console functions, and serial console tends to be resilient…the question is if the lockup leaves serial console working). Or any remotely accessible machine next to the Jetson capable of running serial console would possibly make sysrq available (sysrq allows certain keystrokes or echo to the “/proc/sysrq-trigger” to do emergency maintenance, including forcing remount of disks read-only or reboot) through a simple serial cable.

There is a possibility of setting up the watchdog timer, but this is similar to serial console issues where there has to be at least some functionality still working. If the kernel has this feature enabled, then file “/dev/watchdog” is produced, and opening the file for read starts a timer (one example of opening for read as a test is to manually run “less /dev/watchdog”). An independent user space program will periodically write to the same file, which resets the timer (one example of manually writing to the file for testing is “echo ‘x’ > /dev/watchdog”). Should the timer run too long without a write, the system reboots…a system lockup would stop the user space app from writing, so this would trigger reboot after a delay (provided the lockup leaves the watchdog running in kernel space).

Hi linuxdev,

Thank you so much for your nice answer! Somehow, I didn’t receive the notification of your answer and didn’t see it until now… :-(

Is there any documentation/tutorial about how to rig the hardware to use this functionality? I would like to try it… This is probably the only way that works for my situation.

Yes, I knew these two functionalities when I do the development on Freescale IMX6 SABRE board, which is easier. The thing is that sometimes, the hard lockup make disable the sysrq functionality as well, because I have to modify the kernel and introduce bugs to the kernel.

However, what if the uboot fails before uboot loads the kernel? It will print out the message, similar to “You have to reset the board by pressing the reset button.” In this case, I may have to press the reset the button manually, which I want to do remotely… Or is there some remote button presser I can buy? That will be great! :-)

The Jetson TK1 schematic shows the front panel header on page 25 (search for “FRONT PANEL”). The wiring is actually standard for a typical motherboard, many chassis front panels can plug directly into this. See:
http://developer.download.nvidia.com/embedded/jetson/TK1/docs/602-7R375-0000-D00.Schematics.Rev.4.02.pdf

A short discussion:
https://devtalk.nvidia.com/default/topic/762822/front-panel-pins-description/?offset=5

I see. Thank you so much! :-)