external keyboard & suspend

Dan Staley daniel.l.staley at gmail.com
Mon Aug 31 19:25:40 CEST 2009

On Mon, Aug 31, 2009 at 6:14 AM, Vinzenz Hersche <hersche at puzzle.ch> wrote:

> hello all,
> i've got a keyboard from pulster for the openmoko. this works well with
> shr-
> unstable, but there's a problem:
> i wrote something, then the screen would be black for a half second. so i
> could wrote again and in one moment, it goes to suspend (in the moment i
> write).
> now i don't know if this is a kernel- fso- or shr-problem.. but would be
> nice
> if it's fixable..
> greets
> _______________________________________________
> Openmoko community mailing list
> community at lists.openmoko.org
> http://lists.openmoko.org/mailman/listinfo/community

I'm not sure what kind of keyboard you are using...but I connect my
freerunner to a bluetooth keyboard (iGo Stowaway bluetooth keyboard) on a
pretty regular basis in SHR-U.
To solve the problem you are mentioning, I wrote a little shell script that
connects to my bluetooth keyboard (or disconnects if I run it a second
I run the script using fsoraw to request the Display and Bluetooth
resources.  This keeps the display from dimming (and consequently the
auto-suspend from running) as long as I am connected to my keyboard.

You will notice the script sleeps indefinately after it connects.  This
keeps the Display and Bluetooth resources requested until I run the program
again, which will kill both instances of it and release the resources.

Hope this helps!


run with: fsoraw -r Display,Bluetooth /usr/share/btkb

echo "`ps -A | grep btkb | wc -l`"

if [ "`ps -A | grep btkb | wc -l`" = "2" ];
    echo "connecting..."
    hciconfig hci0 up
    sleep 1s
    if [ "`hidd --search | wc -l`" = "1" ];
        echo "No Keyboard found...exiting"
        hciconfig hci0 down
        exit 0
        echo "Keyboard found and connected!  sleeping..."
        while true;
            sleep 10m
    echo "killing current process..."
    killall btkb
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.openmoko.org/pipermail/community/attachments/20090831/17a48976/attachment-0001.htm 

More information about the community mailing list