Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. [solved] Detect Resume from Standby / Mem

[solved] Detect Resume from Standby / Mem

Scheduled Pinned Locked Moved Mobile and Embedded
4 Posts 2 Posters 1.0k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    evanol
    wrote on last edited by evanol
    #1

    Hi,

    We are currently developing an embedded device based on the am335x sdk from ti (based on arago-project.org)

    The main application on the device is being developed using Qt4.8

    We want to detect when the device is entering Standby / Mem states so that we can save data and suspend our main application

    We also want to detect when the device is resuming from these states so that the main application can be resumed correctly

    Does anyone have experience / information / links to how this may be achieved?

    Thanks

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      This might be of interest.

      Hope it helps

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • E Offline
        E Offline
        evanol
        wrote on last edited by
        #3

        I've found a solution to my issue above.

        On our system the Standby / Mem state can be invoked via a script /usr/bin/pm_suspend.sh which in turn calls echo mem > /sys/power/state to suspend the device to memory.

        I've added kill -USR2 {App.pid} before the call to suspend and kill -USR1 {App.pid} after.

        My application understands that USR2 is a signal to save our data and delete our main form and that USR1 is a signal to spawn a new instance of our main form.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Great !

          Since you have it working now, please update the thread title prepending [solved] so other forum users may know as solution has been found :)

          Also consider up-voting the answer(s) that help you, it will allow other members to find them more easily :)

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved