+ Reply
Page 1 of 2 12 LastLast
Results 1 to 20 of 23

Your favorite Apple, iPhone, iPad, iOS, Jailbreak, and Cydia site.


Thread: Waking the iPhone from Sleep Mode?

is a discussion within the

iPhone / iPod Touch SDK | Development Discussion

forums, a part of the

3rd Party Apps For iPhone | iPod Touch

section;
Hi, I'm trying to set off an alert from my app while the phone is in sleep/screensaver mode. However this doesn't work. Even vibration doesn't work. I tried starting up
...
  1. #1
    Developer
    Join Date
    Jan 2008
    Posts
    16
    Thanks
    1
    Thanked 2 Times in 1 Post
    Unhappy Waking the iPhone from Sleep Mode?
    Hi,

    I'm trying to set off an alert from my app while the phone is in sleep/screensaver mode. However this doesn't work. Even vibration doesn't work. I tried starting up a daemon under launchd to try doing the same with no luck.

    Does anyone know how to set off alerts like those set off by SMS while the screen is asleep, or a sound/vibration alert to wake the phone up?

    Many thanks
    -g

  2. #2
    Green Apple
    Join Date
    Sep 2007
    Posts
    67
    Thanks
    7
    Thanked 3 Times in 3 Posts

    I had a similar with problem my gf phone... When phone is in sleep it didnt receive sms msg's or phonecalls. Read This http://hackint0sh.org/forum/showthread.php?t=7699
    Support.A.New.JAILBREAK.Program.For.Windows.

  3. #3
    Owner / Founder - ModMyi
    aka poetic_folly
    Kyle Matthews's Avatar
    Join Date
    May 2007
    Location
    Tampa, Florida, United States
    Posts
    8,473
    Thanks
    568
    Thanked 4,798 Times in 1,222 Posts

    Yes, that 27 page thread is exactly the answer. Ha. More specific answers are nice...
    .


    ↑ ↑ ↓ ↓ ← → ← → B A [select] [start] Kyle Matthews

  4. #4
    Green Apple
    Join Date
    Sep 2007
    Posts
    67
    Thanks
    7
    Thanked 3 Times in 3 Posts

    Sorry...



    Here goes:

    1. Access the iPhone's file system by a method of your choice (iPhoneList or other manzana.dll app, iPHUC, SCP)
    2. Go to /System/Library/SystemConfiguration/PowerManagement.bundle/
    3. Back up com.apple.SystemPowerProfileDefaults.plist somewhere safe
    4. Delete or rename com.apple.SystemPowerProfileDefaults.plist
    5. Reboot

    You can check if it worked by going to Settings > Usage and checking the Usage and Standby values. If they stay the same no matter what you do, that's it

    Hope this helps..
    Last edited by BigPete; 01-07-2008 at 05:54 PM.
    Support.A.New.JAILBREAK.Program.For.Windows.

  5. #5
    JLA
    JLA is offline
    Developer
    Join Date
    Oct 2007
    Posts
    224
    Thanks
    1
    Thanked 31 Times in 24 Posts

    (I think he's asking a programming question, not a troubleshooting question...)

    I'm assuming you tried an alert sheet, right? If that doesn't work, you could perform a search of the header files for something with the word "wake" or "resume" in it...if you can't find anything, it may be some of the C/C++ stuff that didn't make the headers...you could search the binaries for programs that are able to wake the phone...e.g. MobileTimer...there is usually C/C++ method info at the bottom of the binary.
    Last edited by JLA; 01-07-2008 at 06:05 PM.

  6. #6
    Developer
    Join Date
    Jan 2008
    Posts
    16
    Thanks
    1
    Thanked 2 Times in 1 Post
    Default No luck...
    Thanks for that JLA, but I've tried all that already (by the way, it was an objective-c/c++ question). Alert sheets don't work. Found something in UIApplication.h for 'wake' but that's something unrelated. Tried dumping headers for MobileTimer and other apps but it seems they're depending upon an external daemon that's running in the background, alerting for events. Found nothing in any header. If someone can point out a particular daemon, perhaps we may find a clue.

    Have exhausted all options

  7. #7
    What's Jailbreak?
    Join Date
    Nov 2007
    Posts
    3
    Thanks
    0
    Thanked 1 Time in 1 Post
    To display the alertsheet above the springboard in sleep mode you must use this:

    UIAlertSheet * zSheet;
    ..............
    ................
    [zSheet setShowsOverSpringBoardAlerts:true];
    ..........
    ............

    but this not solve the problem of waking....

    excuse me for my bad english...

  8. #8
    Developer
    Join Date
    Jan 2008
    Posts
    16
    Thanks
    1
    Thanked 2 Times in 1 Post
    Thanks chiafa, yes that wouldn't solve the waking up issue but will give us an 'alarmish' alert sheet; helpful tip.

    All the alerting/notifying apps out there would greatly benefit if we knew how to wake the phone up.

  9. #9
    JLA
    JLA is offline
    Developer
    Join Date
    Oct 2007
    Posts
    224
    Thanks
    1
    Thanked 31 Times in 24 Posts

    Hmmm....good question. So perhaps it's a mach port/interprocess type thing?
    From what I remember, the following programs are able to wake the iPhone:
    MobileTimer
    MobilePhone
    <The text message one>
    <The calendar one>

    Do they do this via Springboard maybe?
    Last edited by JLA; 01-11-2008 at 04:02 AM. Reason: Corrected springboard

  10. #10
    Green Apple
    Join Date
    Jan 2008
    Posts
    36
    Thanks
    0
    Thanked 2 Times in 2 Posts

    i think we spoke on hackint0sh about this earlier today didnt we..?

    i have the same problem... trying to make smsnotify work in sleep mode... its strange as it works while the phone is plugged in to the usb other than that i can get it to work in sleep mode?

    Very strange? it makes me think that it isnt something in the coding as it will wake while plugged in?

  11. #11
    Developer NetMage's Avatar
    Join Date
    Aug 2007
    Location
    Virginia
    Posts
    1,296
    Thanks
    72
    Thanked 210 Times in 168 Posts

    Using SSH while the iPhone is plugged in tells me the phone doesn't sleep (just turns off the display) when plugged in to USB.
    Starlight Computer Wizardry
    Pocket-sized Development
    Follow me on twitter: @NetMage

  12. #12
    Developer
    Join Date
    Jan 2008
    Posts
    16
    Thanks
    1
    Thanked 2 Times in 1 Post
    Yes but you can't ssh while it's off the cradle. However it still apparently is listening for notifications from apps such as MobileTimer etc. Almost as if there are triggers on the SMS db that call a service that's always 'on' even in sleep mode.

    This is a show stopper really. Yes Nuttynutter123 we did talk on hackint0sh by the way.

  13. #13
    JLA
    JLA is offline
    Developer
    Join Date
    Oct 2007
    Posts
    224
    Thanks
    1
    Thanked 31 Times in 24 Posts

    Perhaps a good question would be a reverse engineering one: how does one monitor communication between two processes? That's what I'd like to know.

    Also, have you tried doing an arm-apple-darwin-nm on SpringBoard? Maybe the apps funnel through that...

  14. #14
    Green Apple
    Join Date
    Jan 2008
    Posts
    36
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Quote Originally Posted by guided View Post
    Yes but you can't ssh while it's off the cradle. However it still apparently is listening for notifications from apps such as MobileTimer etc. Almost as if there are triggers on the SMS db that call a service that's always 'on' even in sleep mode.

    This is a show stopper really. Yes Nuttynutter123 we did talk on hackint0sh by the way.

    I never SSH when its on the cradle.. its all wireless (like everyone else i thought lol)

  15. #15
    Developer
    Join Date
    Jan 2008
    Posts
    16
    Thanks
    1
    Thanked 2 Times in 1 Post
    I've got wireless too - Sorry, what I meant was that I have seen it work (i.e. ssh) while the phone's on its cradle and have seen my ssh session die out when it's off the cradle (i.e. asleep). Perhaps it kills the wireless connection when off the cradle? Nevertheless, no matter what you do, the phone does not switch on for alerts

    Not sure what "arm-apple-darwin-nm" is to be honest. Yes, I thought most out there already know how to reverse-engineer the apps but so far I haven't seen anyone come up with a solution for the wakey-up problem.
    Last edited by guided; 01-11-2008 at 07:41 AM. Reason: Automerged Doublepost

  16. #16
    JLA
    JLA is offline
    Developer
    Join Date
    Oct 2007
    Posts
    224
    Thanks
    1
    Thanked 31 Times in 24 Posts

    If I remember correctly, on your computer, go to your springboard dir and type:
    arm-apple-darwin-nm -gmu SpringBoard

    It should give you a list of the external calls made by that executable.

  17. #17
    iPhone? More like MyPhone
    Join Date
    Oct 2007
    Posts
    102
    Thanks
    1
    Thanked 12 Times in 10 Posts

    Default I think iMapIlde can do it...???
    Nuttynutter123 and guided:

    I don't have an answer, but I believe the developer of iMapIdle found a solution around this. Its supposed to be able to play the alert while the phone is off. I believe I tried it and it did work, so you might want to ask him (as a developer to developer).

    http://www.hackint0sh.org/forum/showthread.php?t=6116


    I use SMSNotify and would LOVE for it to work via waking.

  18. #18
    Developer
    Join Date
    Jan 2008
    Posts
    16
    Thanks
    1
    Thanked 2 Times in 1 Post
    Thanks IvanRaide. After reading more on IMapIdle, I think it uses Mail.app's notifications to wake the phone up, rather than waking it up itself. I *think* even in sleep mode the daemons are allowed to run but cannot wake the phone up (currently). So this daemon forces Mail.app to check for email which then in turn raises an alert. I think the following statement gives it away:

    "Sound notification should use the same method your mail client uses (ie: if you have vibrate on, it'll vibrate as well)"

    Quote Originally Posted by JLA View Post
    If I remember correctly, on your computer, go to your springboard dir and type:
    arm-apple-darwin-nm -gmu SpringBoard

    It should give you a list of the external calls made by that executable.
    Brilliant! very handy indeed. Now... how does one figure out how the calls have been declared in external libraries if one can't find a reference in the named .h files?
    Last edited by guided; 01-12-2008 at 01:27 AM. Reason: Automerged Doublepost

  19. #19
    What's Jailbreak?
    Join Date
    Nov 2007
    Posts
    8
    Thanks
    2
    Thanked 1 Time in 1 Post
    Hello guided
    I am so happy you figured out how to do it... can you please post here the code so we learn how to do it..

  20. #20
    What's Jailbreak?
    Join Date
    Nov 2007
    Posts
    8
    Thanks
    2
    Thanked 1 Time in 1 Post
    Sobhan Allah

    You was asking about a way on how waking the iPhone from Sleep Mode.. and you was expect us to share you what we know..and help..

    So it seem normal if you find how to come and post here, so you can help anyone who was search like you..

    But even after I ask.. you do not share.. it is strange you expect DevTeam to make a toolchain, and Sean to gives you 31 opensource app.. and lot of people opensource there project to share... and you take all that and do not want share tiny information.. isn't ironic??

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts