1 2 Previous Next 18 Replies Latest reply on Oct 21, 2016 3:32 PM by Intel Corporation

    Waking the Edison from sleep with a sensor?

    Pkcollins

      Hey all,

       

      I have spent some time researching, but documentation seems to be sparse on sleep mode and how to wake the Edison from sleep mode.

       

      For this project, I need to be able to put the Edison into sleep after a certain time idle, and it needs to be woken again by an accelerator when moved.

       

      I am developing this project using Eclipse and C++ and am currently am using the default breakout board. I am able to programmatically turn off the wifi and put the edison to sleep. For now, for testing, i have a program that is designed to wake the edison using a button attached to a gpio pin. Because the program is suspended when the Edison goes to sleep, using a simple C++ program isn't working. The only way I've been able to wake the edison from sleep is via serial, which is not an option for this project.

       

      Has anyone been able to wake the Edison from sleep with a sensor such as a button, or accelerator? And if so, how?

      Also, is there any fix to the bug that doesn't allow the Edison to sleep more than once without being rebooted?

       

      Thanks,

       

      Patrick

        • 1. Re: Waking the Edison from sleep with a sensor?
          Intel Corporation
          This message was posted on behalf of Intel Corporation

          Hi Pk,

          We understand your concern about the Edison’s documentation regarding sleep modes, we will share your feedback with the right department to see if there’s possible to provide more information about this.
          Regarding the Edison sleep state, you mention that the only way you’ve been able to wake the Edison from sleep is via serial, by this you mean using the echo -n "mem" > /sys/power/state command? 
          About the bug you’re talking about, if I’m not mistaken the patch was already added to the latest image according to another user, however, if this is not the case you can add the patch to your image, you can check these thread for further instructions:
          https://communities.intel.com/thread/61067
          https://communities.intel.com/thread/99776

          Regards,
          -Pablo

          • 2. Re: Waking the Edison from sleep with a sensor?
            Pkcollins

            Thanks for the reply Pablo,

             

            I can put the edison in sleep state using either wifi or serial with the command "echo -n "mem" > /sys/power/state" but it can only be put into sleep after the wifi has been turned off, so while in sleep, the only way to wake it is through serial. I'm not sure if I am running the latest software on my edison, we have been developing with it for a while so it may be out of date. What is the best way to check, and how would I go about updating?

             

            In order to solve my problem of waking the edison with a sensor, I am looking into the MCU SDK. I am wondering if anyone has had any luck with this?

             

            Thanks,

             

            Patrick

             

            EDIT: I used "configure_edison --version" and got a return of "159.devkit". Would you recommend updating from this version?

            • 3. Re: Waking the Edison from sleep with a sensor?
              Intel Corporation
              This message was posted on behalf of Intel Corporation

              Hi Pk,

              Thank you for your information and for the update regarding your current image version.
              It would be a good idea to update the Edison, there’s been two images prior to the one you’re using, here’s the link to the latest one https://software.intel.com/edison-image/latest.
              I would suggest you to check this example https://software.intel.com/en-us/node/557354#Waking_up_the_host_CPU_using_the_MCU. It is possible to wake up the Edison using the MCU, you should try implementing the sensor you mentioned.

              Regards,
              -Pablo

              • 4. Re: Waking the Edison from sleep with a sensor?
                Intel Corporation
                This message was posted on behalf of Intel Corporation

                Hi Pk, 

                We are wondering if you had time to check our suggestions regarding the MCU and its possible implementation with your sensor. 

                Regards, 
                -Pablo

                • 5. Re: Waking the Edison from sleep with a sensor?
                  Pkcollins

                  Pablo,

                   

                  Another small project came up as priority and I have to deal with that before I can continue working on this. As soon as I am able, I will update my progress.

                   

                  Thanks,

                   

                  Patrick

                  • 6. Re: Waking the Edison from sleep with a sensor?
                    Intel Corporation
                    This message was posted on behalf of Intel Corporation

                    Hi Pk,

                    That’s ok. Feel free to post your updates once you start working on it again.

                    Regards,
                    -Pablo

                    • 7. Re: Waking the Edison from sleep with a sensor?
                      Pkcollins

                      I was able to successfully wake the Edison with a sensor (button for now) using the simple code in the guide you linked. This only works once though and I have to re-download the code to the MCU after every time the Edison is woken. Do I need to add this to some sort of "service" file similar to enabling a startup program on the main host?

                       

                      Thanks,

                       

                      Patrick

                      • 8. Re: Waking the Edison from sleep with a sensor?
                        Pkcollins

                        I am now getting a "recipe for target 'post-build' failed whenever I try to build something with the MCUSDK. I have tried reinstalling, and have tried installing the MCUSDK on multiple Virtual Machines with different operating systems and they all give me different errors. Is making MCU projects with Eclipse really this unreliable?

                        1 of 1 people found this helpful
                        • 9. Re: Waking the Edison from sleep with a sensor?
                          Intel Corporation
                          This message was posted on behalf of Intel Corporation

                          Hi Pk,

                          Unfortunately, there are a series of known limitations that could in fact hinder the development process for the MCU, there’s actually a list of these limitations, and you can take a look at it here https://software.intel.com/en-us/node/545142. So your different issues could be related to the list I just shared. Are you unable to build something with the MCU SDK since you started getting this “recipe for a target ‘post-build’ failed” error?

                          Regards,
                          -Pablo

                          • 10. Re: Waking the Edison from sleep with a sensor?
                            Pkcollins

                            Yes, building any MCU code gives me the 'post-build failed' error, indicating an error in the automatically generated makefile that says at the top "do not modify".

                            • 11. Re: Waking the Edison from sleep with a sensor?
                              Intel Corporation
                              This message was posted on behalf of Intel Corporation

                              Hi Pk,

                              Could you please let me know the steps you’re following to see if I can reproduce the issue? I’ve never encountered this problem using the MCU SDK, so any minor detail will be of great help.

                              Regards,
                              -Pablo
                               

                              • 12. Re: Waking the Edison from sleep with a sensor?
                                Pkcollins

                                I doubt you'll be able to accurately reproduce the issue. Every Virtual Machine/Operating System that I install the SDK/Eclipse on gives me a different error.
                                On 2 different VMs and my host machine I have ran into issues now allowing me to deploy anything to my MCU.

                                 

                                1. VM - Windows 7 - Eclipse runs, but code does not build. Even the default C++ code that simply prints out "hello world" does not run. I get two errors on build: g++ not found in PATH, and gcc not found it path. I am assuming it can't find the compiler? When I try to run the program, I get "Launch failed. Binary not found."

                                2. VM - Linux Mint 17 - Eclips runs and I was actually able to deploy code to the MCU a couple times. After these couple times, it stopped working and gave me the makefile error I documented above. I change no code and no settings in eclipse to cause this that I can think of. It seems like it just stopped working after a couple tries. I haven't been able to get anything to build since.3. Host Machine - Windows 10 - MCUSDK will not open. A terminal window flashes and disappears instantly; nothing else happens.

                                 

                                Three completely different issues after following the instructions closely each time... I am about to have to give up on the MCU because of these issues. BTW, my VM with windows 7 has normal eclipse which deploys code to the Edison without issue.

                                • 13. Re: Waking the Edison from sleep with a sensor?
                                  Intel Corporation
                                  This message was posted on behalf of Intel Corporation

                                  Hi Pk,

                                  I’m really sorry to hear you’re getting these many errors and in different conditions, we understand this can become really frustrating. Let us investigate this a little bit more and we’ll get back to you once we have more updates. We appreciate your patience in the meantime.

                                  Regards,
                                  -Pablo

                                  • 14. Re: Waking the Edison from sleep with a sensor?
                                    Intel Corporation
                                    This message was posted on behalf of Intel Corporation

                                    Hi Pk,

                                    Unfortunately, for the Virtual machines is not clear what could be causing the issue, but for the Windows 10 machine the issue could be related to Java JRE (missing install or environment variable not set), also if the path if the MCU SDK’s location has spaces then it could cause unexpected behaviors.
                                    Following the guide, the MCU SDK works as expected on a Windows 10 host machine (64 bits) with Edison Arduino kit. Would it be possible that you give another try to the setup guide using your Windows 10 machine? https://software.intel.com/en-us/node/545143, make sure to follow the steps closely and please let us your results.

                                    Regards,
                                    -Pablo

                                    1 2 Previous Next