Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader > Kobo Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 06-08-2013, 06:31 AM   #46
z000ao8q
Enthusiast
z000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toys
 
Posts: 49
Karma: 5942
Join Date: May 2013
Device: kobo mini
yes, I found it. thanks.
I will test with the following lines being commented out...
Quote:
if (strcmp(suspend, "on") && !may_wakeup(rtcname))
bb_error_msg_and_die("%s not enabled for wakeup events", rtcname);
z000ao8q is offline   Reply With Quote
Old 06-09-2013, 01:57 PM   #47
z000ao8q
Enthusiast
z000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toys
 
Posts: 49
Karma: 5942
Join Date: May 2013
Device: kobo mini
what happens after the standby?
when I have WiFi and Telnet working and I am triggering the RTCWAKE command (which seems to work), do I need to reinitialize everything again after the wakeup - or should it work without doing anything?

If the answer is "everything should still work" then it might not work in my test yet because I cant reconnect telnet
z000ao8q is offline   Reply With Quote
Old 06-09-2013, 03:04 PM   #48
sven
Enthusiast
sven has a complete set of Star Wars action figures.sven has a complete set of Star Wars action figures.sven has a complete set of Star Wars action figures.sven has a complete set of Star Wars action figures.sven has a complete set of Star Wars action figures.
 
Posts: 39
Karma: 454
Join Date: Jul 2012
Location: Brussels
Device: Kobo Touch
Quote:
Originally Posted by z000ao8q View Post
what happens after the standby?
when I have WiFi and Telnet working and I am triggering the RTCWAKE command (which seems to work), do I need to reinitialize everything again after the wakeup - or should it work without doing anything?

If the answer is "everything should still work" then it might not work in my test yet because I cant reconnect telnet
Normally everything should work without any re-initialization. Currently I do not use the rtc alarm to resume my Kobo from suspend, but I use the power button (quick slide, no boot) to get the Kobo running again. The WiFi and Telnet are instantly working after resume.
sven is offline   Reply With Quote
Old 06-10-2013, 09:04 AM   #49
Grunge
Member
Grunge can eat soup with a fork.Grunge can eat soup with a fork.Grunge can eat soup with a fork.Grunge can eat soup with a fork.Grunge can eat soup with a fork.Grunge can eat soup with a fork.Grunge can eat soup with a fork.Grunge can eat soup with a fork.Grunge can eat soup with a fork.Grunge can eat soup with a fork.Grunge can eat soup with a fork.
 
Posts: 12
Karma: 9172
Join Date: Apr 2013
Device: Kobo Touch
nice to know

ha, just figured out:

the kobo will not sleep when you have it plugged to usb (usb network, ssh session).
So rtcwake IS working, it was my mistake.
Grunge is offline   Reply With Quote
Old 06-10-2013, 09:35 AM   #50
z000ao8q
Enthusiast
z000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toys
 
Posts: 49
Karma: 5942
Join Date: May 2013
Device: kobo mini
on my Mini the RTCWAKE did work to set it to sleep - only the wakeup did not.
As Sven posted, everything should be there again.
on my side, I could not connect to telnet unless I rebooted the Mini.

I will try a little more today...
z000ao8q is offline   Reply With Quote
Old 06-10-2013, 11:28 PM   #51
z000ao8q
Enthusiast
z000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toys
 
Posts: 49
Karma: 5942
Join Date: May 2013
Device: kobo mini
it seems to work :-)
but only with re-init of Wifi.

I am running my test.sh in background with "nohup ./test.sh"
Quote:
echo 1 > /sys/power/state-extended
sh /mnt/onboard/wifidn.sh
/mnt/onboard/busybox_kobo rtcwake -a -s 30
sleep 2
sh /mnt/onboard/wifiup.sh
zcat /mnt/onboard/kobo.raw.gz | /usr/local/Kobo/pickel showpic
and TA-DAAA - a Pic-Refresh and ability to reconnect to Telnet after 30 seconds.
need to do some more tweaking but looks promising :-)
z000ao8q is offline   Reply With Quote
Old 06-15-2013, 02:20 PM   #52
z000ao8q
Enthusiast
z000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toys
 
Posts: 49
Karma: 5942
Join Date: May 2013
Device: kobo mini
Hello,
just a happy update. It seems to work for me - even so I still need to run it for several days to test stability and runtime.

Basic idea:
  • wakeup every hour
  • execute Cron (at 1 min after the hour) to update display
  • send to sleep until next full hour
As the cron is only executed between 7am and 8pm on my side, I had to go a little extra way. basically I am dividing the timestamp by 3600 seconds to geht the last full hour and then up to the next execution...
this is how my update.sh looks like (which is executed by cron)

Quote:
sh /mnt/onboard/wifiup.sh

....update display...

sh /mnt/onboard/wifidn.sh

h=`date +%H`
timestp=$((`date +%s`/3600))
if [ "$h" -ge 20 ]; then
multi=24-$h
let timestp+=7
let timestp+=$multi
elif [ "$h" -lt 7 ]; then
multi=7-$h
let timestp+=$multi
else
let timestp+=1
fi
timestp=$((timestp * 3600))
/mnt/onboard/busybox_kobo rtcwake -t $timestp

Last edited by z000ao8q; 06-16-2013 at 01:42 PM.
z000ao8q is offline   Reply With Quote
Old 06-27-2013, 03:34 PM   #53
z000ao8q
Enthusiast
z000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toys
 
Posts: 49
Karma: 5942
Join Date: May 2013
Device: kobo mini
wakeup with seconds works perfectly - but using a time it is behaving strange.
hwclock is UCT: Thu Jun 27 19:20:31 2013 0.000000 seconds
date (system time) is local: Thu Jun 27 21:20:52 CEST 2013
I try:
Quote:
timestp=`date +%s`
let timestp+=30
echo `date`
/mnt/onboard/busybox_kobo rtcwake -u -t $timestp -m mem
output:
Thu Jun 27 21:13:45 CEST 2013
wakeup from "mem" at Thu Jun 27 21:14:15 2013
no wakeup

Quote:
rtcwake -l would give me
wakeup from "mem" at Thu Jun 27 21:14:15 2013
but also no wakeup

my assumption: rtcwake is using the hwclock
but when I adjust the system time backwards with hwclock -s -l (instead of -s -u like in rcS):
hwclock is UTC: Thu Jun 27 19:29:48 2013 0.000000 seconds
date is: Thu Jun 27 19:30:16 CEST 2013
Then I execute
Quote:
timestp=`date +%s`
let timestp+=30
echo `date`
/mnt/onboard/busybox_kobo rtcwake -a -t $timestp -m mem
output:
Thu Jun 27 19:29:03 CEST 2013
wakeup from "mem" at Thu Jun 27 19:29:33 2013
and yes - a wakeup

seems to work - but now the issue is, that cron does not work anymore because it is using the system time -which is now 2hrs off


any idea?
z000ao8q is offline   Reply With Quote
Old 06-28-2013, 04:55 AM   #54
Lucas Malor
Pain in the arse
Lucas Malor can shake the floor when laughingLucas Malor can shake the floor when laughingLucas Malor can shake the floor when laughingLucas Malor can shake the floor when laughingLucas Malor can shake the floor when laughingLucas Malor can shake the floor when laughingLucas Malor can shake the floor when laughingLucas Malor can shake the floor when laughingLucas Malor can shake the floor when laughingLucas Malor can shake the floor when laughingLucas Malor can shake the floor when laughing
 
Lucas Malor's Avatar
 
Posts: 606
Karma: 63112
Join Date: Apr 2013
Device: Kobo Glo, Kindle 4
let timestp -= 120 ?
Lucas Malor is offline   Reply With Quote
Old 06-28-2013, 05:02 AM   #55
Lucas Malor
Pain in the arse
Lucas Malor can shake the floor when laughingLucas Malor can shake the floor when laughingLucas Malor can shake the floor when laughingLucas Malor can shake the floor when laughingLucas Malor can shake the floor when laughingLucas Malor can shake the floor when laughingLucas Malor can shake the floor when laughingLucas Malor can shake the floor when laughingLucas Malor can shake the floor when laughingLucas Malor can shake the floor when laughingLucas Malor can shake the floor when laughing
 
Lucas Malor's Avatar
 
Posts: 606
Karma: 63112
Join Date: Apr 2013
Device: Kobo Glo, Kindle 4
Or
date -u +%s

Or
man date
man hwclock

Lucas Malor is offline   Reply With Quote
Old 06-28-2013, 04:19 PM   #56
z000ao8q
Enthusiast
z000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toys
 
Posts: 49
Karma: 5942
Join Date: May 2013
Device: kobo mini
I guess you did not try your answer before :-)
+%s obviously always outputs the utc format, no matter what additional parameter

Quote:
[root@(none) /]# date -u +%s
1372441495
[root@(none) /]# date +%s
1372441500
[root@(none) /]# date -u
Fri Jun 28 17:45:04 UTC 2013
[root@(none) /]# date
Fri Jun 28 19:45:06 CEST 2013
and regarding "man": not installed on kobo

If i am right, the implementation of rtcwake has an issue. it compares against the local system time
Quote:
sys_time = time(NULL);
if (alarm_time < sys_time)
bb_error_msg_and_die("time doesn't go backward to %s", ctime(&alarm_time));
and here is the issue when you want to set it to UTC and this one is 2hrs backwards. I think I read something about this somewhere already but cant find the article

I changed the timezone now to UTC so I only have one time for all clocks now.
now it works - finally
z000ao8q is offline   Reply With Quote
Old 06-29-2013, 10:18 AM   #57
auspex
Zealot
auspex ought to be getting tired of karma fortunes by now.auspex ought to be getting tired of karma fortunes by now.auspex ought to be getting tired of karma fortunes by now.auspex ought to be getting tired of karma fortunes by now.auspex ought to be getting tired of karma fortunes by now.auspex ought to be getting tired of karma fortunes by now.auspex ought to be getting tired of karma fortunes by now.auspex ought to be getting tired of karma fortunes by now.auspex ought to be getting tired of karma fortunes by now.auspex ought to be getting tired of karma fortunes by now.auspex ought to be getting tired of karma fortunes by now.
 
auspex's Avatar
 
Posts: 135
Karma: 1066430
Join Date: Sep 2012
Location: Nova Scotia
Device: Sony PRS-T2, Samsung Galaxy Ace IIx
er, ALL the unix/linux man pages are in numerous places on the Internet
auspex is offline   Reply With Quote
Old 07-04-2013, 05:42 AM   #58
z000ao8q
Enthusiast
z000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toys
 
Posts: 49
Karma: 5942
Join Date: May 2013
Device: kobo mini
a little update:
its running now stable sincs several days with 13 2min wakeups per day.
I am relying on the battery-percentage values of the kobo and the consumption of the mode "mem" (suspend-to-ram) seems to be ~3,5% per day.
this would give a runtime of around 1 month on a single charge.

I want to test the disk-mode next to see if it brings more value...
z000ao8q is offline   Reply With Quote
Old 07-29-2013, 12:25 PM   #59
sunda
Member
sunda began at the beginning.
 
Posts: 15
Karma: 10
Join Date: Jul 2013
Device: Kobo
Hi all,

maybe I missed somthing, but I get the same error:
rtcwake: /dev/rtc0 not enabled for wakeup events

can I "enable" it!?
sunda is offline   Reply With Quote
Old 07-30-2013, 05:06 AM   #60
z000ao8q
Enthusiast
z000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toys
 
Posts: 49
Karma: 5942
Join Date: May 2013
Device: kobo mini
Hello,

you need a tweaked version of the rtcwake command.
I still need to post it here. hope that I can do it today or tomorrow...
z000ao8q is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Glo How to import reading Life Statistics from Kobo Touch to Kobo Glo? the_m Kobo Reader 5 12-13-2012 03:40 PM
$25 gift card w. purchase of Kobo Touch or Kobo Vox at Frys sufue Deals, Freebies, and Resources (No Self-Promotion) 0 07-15-2012 10:39 AM
Touch Kobo Touch defective after 3 months and Kobo Customer Support useless shaf Kobo Reader 5 12-04-2011 05:10 PM
Touch Kobo Touch not ejecting cleanly with Calibre OR Kobo Desktop - Windows 7 JBlyth Kobo Reader 11 08-03-2011 05:38 PM
Kobo Touch not disconnecting properly from Calibre OR Kobo Desktop - Windows 7 JBlyth Devices 1 08-03-2011 06:50 AM


All times are GMT -4. The time now is 06:05 PM.


MobileRead.com is a privately owned, operated and funded community.