Hi, I'm using the intel XDK, programming in javascript, but at this
I am basically just trying to figure out how to make the intel Edison and anything connected to it use as little power as possible for an hour, then becoming fully functional again. I'm using the intel XDK, programming in javascript, but at this point, I'm open to pretty much any option. I can make the Edison go to sleep, I run this:
var exec = require('child_process').exec;
exec('ifconfig wlan0 down', function (error, stdOut, stdErr) { });
exec('systemctl stop wpa_supplicant', function (error, stdOut, stdErr) {});
exec('echo -n "mem" > /sys/power/state', function (error, stdOut, stdErr) {});
but after that, it never wakes up unless i physically reset it. is there a command I can run in chron that wakes it up every hour? a javascript solution would of course be prefered, but after about 24 hours of searching, I have yet to find anything.
Thanks
Link Copied
Hello ShakerBreaker,
Thanks for reaching out!
Have you tried the suggestion mentioned in https://communities.intel.com/message/374035# 374035 https://communities.intel.com/message/374035# 374035?
I believe this is the only option to wake up Edison from a software approach. I believe the other option would be to make hardware modifications to your design in order to simulate the physical action of pressing the power button.
Let me know if this helps you,
Pedro M.
Hey Pedro,
Is it possible to access the MCU through the javascript/node XDK platform? Thank you for the link, I had not found it and it is very helpful
Hi ShakerBreaker,
Unfortunately no, the only way to interact with Edison's MCU is through its SDK. You can find all the details about the MCU's SDK in https://software.intel.com/en-us/node/545142.
However, since the MCU and the CPU are two different devices (even though they are both clustered within Edison), they can run separately and in parallel. I mean, you can develop your JavaScript application and it will run completely independent from what the MCU is doing. For this scenario in specific, you can use your code without any modifications and simply have the MCU wake the CPU from sleep whenever it is needed. Since you have already developed your application and there is an example of how to use the MCU for this purpose in https://software.intel.com/en-us/node/557354# Waking_up_the_host_CPU_using_the_MCU, this shouldn't take too long to tune up.
Let me know how it goes.
Pedro M.
Thank you! This will work as a solution
Hi ShakerBreaker,
You are very welcome!
If you ever have any other doubts or questions, please don't hesitate to come back to the community. We'll try to help you in any way we can.
Pedro M.
For more complete information about compiler optimizations, see our Optimization Notice.