On Mon, Aug 31, 2009 at 6:14 AM, Vinzenz Hersche <span dir="ltr">&lt;<a href="mailto:hersche@puzzle.ch">hersche@puzzle.ch</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

hello all,<br>
<br>
i&#39;ve got a keyboard from pulster for the openmoko. this works well with shr-<br>
unstable, but there&#39;s a problem:<br>
i wrote something, then the screen would be black for a half second. so i<br>
could wrote again and in one moment, it goes to suspend (in the moment i<br>
write).<br>
<br>
now i don&#39;t know if this is a kernel- fso- or shr-problem.. but would be nice<br>
if it&#39;s fixable..<br>
<br>
greets<br>
<br>
_______________________________________________<br>
Openmoko community mailing list<br>
<a href="mailto:community@lists.openmoko.org">community@lists.openmoko.org</a><br>
<a href="http://lists.openmoko.org/mailman/listinfo/community" target="_blank">http://lists.openmoko.org/mailman/listinfo/community</a><br>
</blockquote></div><br><br>I&#39;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.<br>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 time).<br>
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.<br><br>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.<br>

<br>Hope this helps!<br><br>-Dan<br>
<br>
<br>
run with: fsoraw -r Display,Bluetooth /usr/share/btkb<br>
<br>
#!/bin/sh<br>
echo &quot;`ps -A | grep btkb | wc -l`&quot; <br>
<br>
if [ &quot;`ps -A | grep btkb | wc -l`&quot; = &quot;2&quot; ]; <br>
then <br>
    echo &quot;connecting...&quot;<br>
    hciconfig hci0 up<br>
    sleep 1s<br>
    if [ &quot;`hidd --search | wc -l`&quot; = &quot;1&quot; ];<br>
    then<br>
        echo &quot;No Keyboard found...exiting&quot;<br>
        hciconfig hci0 down<br>
        exit 0<br>
    else<br>
        echo &quot;Keyboard found and connected!  sleeping...&quot;<br>
        while true;<br>
        do<br>
            sleep 10m<br>
        done<br>
    fi<br>
else<br>
    echo &quot;killing current process...&quot;<br>
    killall btkb <br>
fi<br>