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 05-03-2013, 09:56 AM   #16
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
Hello,
how did you get the device out of suspend?

I am looking for a way to sleep/suspend the device for a certain time and only have it woken up for executing a cron job.
similar to rtcwake - which is unfortunately not working
Hi,

On my Kobo Touch I use the rtcwake command to set the wake up time. After that I do the suspend:
Code:
rtcwake -m no -s 10
echo 1 > /sys/power/state-extended
echo mem > /sys/power/state
This example sends the Kobo for 10 seconds to sleep. With the -t parameter instead of -s you can set the epoch wake up time, i.e. seconds since 1 Jan 1970.

What I couldn't get working is to send the Kobo directly to mem sleep with rtcwake command.

Edit: Also your second approach echoing directly to /sys/class/rtc/rtc0/wakealarm should work. It is only important to write 0 to wakealarm before writing the wakeup time:
Code:
echo 0 > /sys/class/rtc/rtc0/wakealarm
echo "+20" > /sys/class/rtc/rtc0/wakealarm
I hope that helps,

Sven

Last edited by sven; 05-03-2013 at 11:16 AM. Reason: Addition to post
sven is offline   Reply With Quote
Old 05-03-2013, 12:17 PM   #17
z000ao8q
Connoisseur
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: 51
Karma: 5942
Join Date: May 2013
Device: kobo mini
does the touch (i assume from your user profile) have a different OS setup than the mini?
Quote:
cho 0 > /sys/class/rtc/rtc0/wakealarm
-sh: can't create /sys/class/rtc/rtc0/wakealarm: nonexistent directory
Quote:
rtcwake -m no -s 10
rtcwake: /dev/rtc0 not enabled for wakeup events
Quote:
rtc0]# ls
date hctosys power time
dev max_user_freq since_epoch uevent
device name subsystem
z000ao8q is offline   Reply With Quote
Advert
Old 05-03-2013, 02:35 PM   #18
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
does the touch (i assume from your user profile) have a different OS setup than the mini?
I have no clue why you have no wakealarm directory on your mini. Maybe other users of a mini can confirm that there is also no such directory on their device.
What I could find searching the net is that your kernel might be built with a different configuration. Therefor I attached the config file of my Touch. You should find your config file in the /proc directory. Maybe you can find some differences in the rtc or suspend sections.
Attached Files
File Type: gz config.gz (10.3 KB, 264 views)
sven is offline   Reply With Quote
Old 05-03-2013, 05:11 PM   #19
z000ao8q
Connoisseur
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: 51
Karma: 5942
Join Date: May 2013
Device: kobo mini
thank you for your efforts.
unfortunately it looks pretty much the same - especially in the RTC section :-(
z000ao8q is offline   Reply With Quote
Old 05-06-2013, 03:40 PM   #20
z000ao8q
Connoisseur
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: 51
Karma: 5942
Join Date: May 2013
Device: kobo mini
Hello,

which Kobo do you have?
according to the firmware-thread there are 2 touches

Mark 4 Hardware: Glo/Mini/Touch Low Cost (N905C Model)
Mark 3 Hardware: Original Touch (N905, N905B Models)

could you also tell me your firmware version/kernel version?
mine is
Quote:
[root@(none) /]# cat /proc/version
Linux version 2.6.35.3-850-gbc67621+ (gallen@gallen-P5KPL-AM-BM) (gcc version 4.4.4 (4.4.4_09.06.2010) ) #617 PREEMPT Mon Apr 22 11:07:47 CST 2013
this should be firmware 2.5.1
z000ao8q is offline   Reply With Quote
Advert
Old 05-07-2013, 04:04 PM   #21
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
Hi,

I have a Kobo Touch N905 (bought early 2012 in Germany, built-in memory, no SD card). uname -r tells me
Code:
2.6.35.3-568-g4cf53cf-00050-g1422e3c-dirty
I am still running original firmware 1.9.17.

Is there anyone around in the community who can confirm that rtcwake doesn't work and /sys/class/rtc/rtc0/wakealarm directory is not existent in newer firmware/kernel builds?
sven is offline   Reply With Quote
Old 05-08-2013, 11:07 AM   #22
KevinShort
Addict
KevinShort ought to be getting tired of karma fortunes by now.KevinShort ought to be getting tired of karma fortunes by now.KevinShort ought to be getting tired of karma fortunes by now.KevinShort ought to be getting tired of karma fortunes by now.KevinShort ought to be getting tired of karma fortunes by now.KevinShort ought to be getting tired of karma fortunes by now.KevinShort ought to be getting tired of karma fortunes by now.KevinShort ought to be getting tired of karma fortunes by now.KevinShort ought to be getting tired of karma fortunes by now.KevinShort ought to be getting tired of karma fortunes by now.KevinShort ought to be getting tired of karma fortunes by now.
 
KevinShort's Avatar
 
Posts: 348
Karma: 209937
Join Date: Jan 2012
Location: Virginia, US
Device: Kobo Wifi, Kobo Glo
I can confirm that rtcwake doesn't work on my Glo, and /sys/class/rtc/rtc0/wakealarm does not exist.
KevinShort is offline   Reply With Quote
Old 05-16-2013, 11:34 AM   #23
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
failed to run run.sh from external sd

Quote:
Now when I insert a MicroSD card with a run.sh script on it, it will automatically run the script! This way I can start up nickel normally when the device boots, but kill it in run.sh if I need to. Also, the device reboots when the SD card is removed... this is for convenience.
Hia i tried to do the same... but failed --> Update: solved.

so i modified the rootfs/usr/local/Kobo/udev/sd to run run.sh of the external card like this: (exec because there is no run flags on fat32)
Code:
if [ "$DEV" == "$DEVNAME" ]; then
	if [ "$ACTION" == "add" ]; then
		dosfsck -a -w $DEVNAME
#mount write, exec
		mount -w -t vfat -o user,exec,shortname=mixed $DEVNAME /mnt/sd
		if [ $? != 0 ]; then
#			mount -r $DEVNAME /mnt/sd
			if [ $? != 0 ]; then
				echo sd mount fail $DEVNAME >> /tmp/nickel-hardware-status &
			else
				echo sd $ACTION $DEVNAME >> /tmp/nickel-hardware-status &
			fi
		else
			echo sd $ACTION $DEVNAME >> /tmp/nickel-hardware-status &
		fi
		/mnt/sd/run.sh
	fi
fi

but it never executes my run.sh on the external card.

So my next step is to get usb terminal so i can start to do anything... i'm a bit stuck and loose way to much of my free time with guessing what could go on in this blackbox.

run.sh
#!/bin/bash

LOGFILE=/mnt/sd/log.txt

log(){
echo "$(date +%c) $*" >>$LOGFILE
}

log "run.sh started."
log "kill nickel..."

#end the party
killall nickel

log "insmod.."

#insmod usb ethernet

/bin/busybox insmod /drivers/ntx508/usb/gadget/arcotg_udc.ko
/bin/busybox insmod /drivers/ntx508/usb/gadget/g_ether.ko

log "set ip to usb..."

#set ip to usb ethernet
ifconfig usb0 192.168.2.2

log "run.sh end."

i also tried to change inittab/rcS direct to not execute nickel and hindenburg and do direct
/bin/busybox insmod /drivers/ntx508/usb/gadget/arcotg_udc.ko
/bin/busybox insmod /drivers/ntx508/usb/gadget/g_ether.ko
but i couldn't find the usb device on the pc. (linux, lsusb).

SOLVED
took it home where i have unsecure wifi (non enterprise+cert) and here is was easy to log in to wifi and figure out what was wrong.
All fine now, just replaced all files in usb/gadget/ by does from the update package, fixed a typo i had and thats it. connecting fine.

so whats next for me, ssh?
any advice for the novice?

i have also to cross compile cutycapt, but failed already with the kernel ;-/
whats the best build environment?

Last edited by Grunge; 05-16-2013 at 03:37 PM. Reason: problem solved
Grunge is offline   Reply With Quote
Old 12-26-2013, 05:15 AM   #24
cyprien
Junior Member
cyprien began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Dec 2013
Device: Kobo Touch N905J
Quote:
Originally Posted by z000ao8q View Post
Hello,
which Kobo do you have?
according to the firmware-thread there are 2 touches
Mark 4 Hardware: Glo/Mini/Touch Low Cost (N905C Model)
Mark 3 Hardware: Original Touch (N905, N905B Models)
could you also tell me your firmware version/kernel version?
mine is
this should be firmware 2.5.1
I have the same issue on my Kobo Touch N905J (French one). I saw in linux kernel code that RTC wakeup code has been commented out

EDIT: in fact original code has been replaced by MSP430 dedicated code. It works fine, but rtcwake must not do its sanity check. See https://www.mobileread.com/forums/sho...=212145&page=5

Last edited by cyprien; 12-27-2013 at 06:00 AM.
cyprien is offline   Reply With Quote
Old 01-22-2014, 01:40 AM   #25
dewoller
Junior Member
dewoller began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Jan 2014
Device: kobo mini
TonyV mentions that, to enable automatic usb networking, you have to put this at end of /usr/local/Kobo/udev/ac and /usr/local/Kobo/udev/plug:

ifconfig usb0 192.168.2.2

I found that I needed to add the line:

/sbin/route add default gw 192.168.2.1 usb0

to enable networking from the Kobo mini out to the open internet.

On the pc side, in /etc/networking, the usb0 stanza reads as follows:

allow-hotplug usb0
iface usb0 inet static
address 192.168.2.1
netmask 255.255.255.0
network 192.168.2.0
broadcast 192.168.2.255
up iptables -A POSTROUTING -t nat -j MASQUERADE -s 192.168.2.0/24
up sysctl -w net.ipv4.ip_forward=1
up route add -host 192.168.2.2 usb0
down iptables -D POSTROUTING -t nat -j MASQUERADE -s 192.168.2.0/24
dewoller is offline   Reply With Quote
Old 01-22-2014, 09:04 AM   #26
Ken Maltby
Wizard
Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.
 
Ken Maltby's Avatar
 
Posts: 4,465
Karma: 6900052
Join Date: Dec 2009
Location: The Heart of Texas
Device: Boox Note2, AuraHD, PDA,
Quote:
Originally Posted by dewoller View Post
TonyV mentions that, to enable automatic usb networking, you have to put this at end of /usr/local/Kobo/udev/ac and /usr/local/Kobo/udev/plug:

ifconfig usb0 192.168.2.2

I found that I needed to add the line:

/sbin/route add default gw 192.168.2.1 usb0

to enable networking from the Kobo mini out to the open internet.

On the pc side, in /etc/networking, the usb0 stanza reads as follows:

allow-hotplug usb0
iface usb0 inet static
address 192.168.2.1
netmask 255.255.255.0
network 192.168.2.0
broadcast 192.168.2.255
up iptables -A POSTROUTING -t nat -j MASQUERADE -s 192.168.2.0/24
up sysctl -w net.ipv4.ip_forward=1
up route add -host 192.168.2.2 usb0
down iptables -D POSTROUTING -t nat -j MASQUERADE -s 192.168.2.0/24
I take it you have a Linux PC?

Luck;
Ken
Ken Maltby 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
Touch Hacking into the Kobo Touch stef70 Kobo Developer's Corner 60 03-04-2017 11:32 AM
Hacking Kobo Touch suspend usb network eink driver tonyv Kobo Reader 0 06-26-2012 02:27 PM
Touch hacking: wifi & suspend? notzed Kobo Developer's Corner 0 01-21-2012 02:05 AM
Touch Which usb phone chargers work with Kobo Touch Tangent Kobo Reader 30 12-01-2011 05:16 AM
Touch Updates to Calibre Kobo driver for Touch timlegge Kobo Reader 20 07-22-2011 07:05 AM


All times are GMT -4. The time now is 02:47 AM.


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