User talk:Kapiteined

From Openmoko

(Difference between revisions)
Jump to: navigation, search
m
 
Line 9: Line 9:
 
This also was not satisfactory, so i wrote some scripts that pop-up xmessages and let you perform any action you can script with a simple button.
 
This also was not satisfactory, so i wrote some scripts that pop-up xmessages and let you perform any action you can script with a simple button.
  
I have put up all the scripts you see in the video online [http://www.kapitein.org/opnemoko/menu.tgz here].
+
I have put up all the scripts you see in the video online [http://www.kapitein.org/openmoko/menu.tgz here].
  
 
Please untar it in /tmp and make sure it won't conflict with any file in your system.
 
Please untar it in /tmp and make sure it won't conflict with any file in your system.

Latest revision as of 14:51, 4 August 2009

Here You can see a video of my freerunner using menu's.

One of the things i did not like about the freerunner was the need for a stylus for the simplest tasks

If you need to use mdbus commands you need to type long strings on a small screen with a stylus.

So i ended up making some scripts, which was already better, but now i had to type the scriptname with the stylus.

This also was not satisfactory, so i wrote some scripts that pop-up xmessages and let you perform any action you can script with a simple button.

I have put up all the scripts you see in the video online here.

Please untar it in /tmp and make sure it won't conflict with any file in your system.

You need to change the MY_WAY variable in the scripts, to reflect the base path where you put the scripts.

You start it by running menu_master.sh

In the scripts, you only have to change the MY_WAY variable and add your own scripts.

MENU_ITEM[${N}]="${MY_WAY}/scripts/gsm.sh";             NAME[${N}]="GSM";               N=$(( ${N} + 1 ))
MENU_ITEM[${N}]="${MY_WAY}/scripts/network.sh";         NAME[${N}]="Network";           N=$(( ${N} + 1 ))
MENU_ITEM[${N}]="${MY_WAY}/scripts/gps.sh";             NAME[${N}]="GPS";               N=$(( ${N} + 1 ))
MENU_ITEM[${N}]="${MY_WAY}/scripts/multimedia.sh";      NAME[${N}]="Multimedia";        N=$(( ${N} + 1 ))
MENU_ITEM[${N}]="${MY_WAY}/scripts/screen.sh";          NAME[${N}]="Screen";            N=$(( ${N} + 1 ))

As you can see, the layout is really simple, first you put the name of your script, and the name of the "button" shown on your screen.

Font size is automatically calculated based on the number of letters to show. You might need to add a space to the name sometimes, to prevent words beeing cut-off at the end.

One special script, not in the menu, is my alarmclock. (pim/scripts/alarm_clock.sh)

Many thanks for this script go to Ben Wong, who was kind enough to help me on my way.

It uses a perl script to parse the cron entries containing "alarm_trigger"

20 7 * * 1-5 if test -x /home/ed/scripts/pim/scripts/alarm_trigger.sh; then /home/ed/scripts/pim/scripts/alarm_trigger.sh >/dev/null 2>&1; fi
20 8 * * 6-7 if test -x /home/ed/scripts/pim/scripts/alarm_trigger.sh; then /home/ed/scripts/pim/scripts/alarm_trigger.sh >/dev/null 2>&1; fi

These are my wake-up calls, playing a random song from my collection, starting at low volume and in steps play louder and louder, until you hit the snooze or off button.

I did integrate it with my agenda notifications, a wake up call is just another appointment with a specific action ( play song instead of just beep).

I really like it a lot and use it everyday !

The phone resumes from suspend 10 secs before playing the song.

I hope these scripts will give someone inspiration to make the freerunner more finger friendly.

I think the overall response is slow, but i still like it, you can use it while walking, in a bus/train/car etc.

And you can't do that with a stylus and terminal i think.

Troubleshooting is easiest done when logged in in the FR with ssh and start the menu by just typing ./scripts/xmessage/scripts/screen.sh for example.

this way you see the error messages in your console.

Have Fun!




This is a collection of scripts to obtain a GSM cellid, get the aprox loction based on the info of opencellid.org and get agps data about the aproximate location.

You also can log the gsm cellid's and after the trip submit the found cells back to opencellid.org with the script parse_logs.sh

This is working on om2008.12.

You need the gps-utils package, font-bitstream-100dpi, encodings, font-alias, font-util, gsm0710muxd

I use xmessage to have a rough way to create "menu's".

The default fontsize is to small to my likings, so i installed some aditional fonts and set the xmessage font size in

~/.Xdefaults-`hostname`

xmessage*font: -*-*-*-*-*-*-30-*-*-*-*-*-iso8859-1

xterm*font: -*-*-*-*-*-*-25-*-*-*-*-*-iso8859-1

And add a font path to the X server in the file /etc/X11/Xserver

To use the scripts, untar the tarball in /tmp and check if none of the files from the tarball is conflicting with your current files.

After verifying and makeing backups if necesary, you can install it by untarring the tarball in /

After all this you need to reboot the FR once to activate all the new settings.

To use it, simply click the gps icon on your desktop and in the following order:

click agps -> this will try to get your location based on the current cellid and get agps data for that location

click dump nmea -> this will log the gps data to a local file during your trip

click log GSM -> this will log the cellid's during your trip


To obtain the cellid and still being able to make phone calls, you need the gsm0710muxd package.

With the default /etc/X11/Xsession.d/89qtopia file it wasn't working for me,

so i provided my file in the tarball as well.

The local clock must be synchronized to link the cellid to the location.

to do this i use the gpsd as a clock source for ntpd.

add the following lines to /etc/ntp.conf:

#LinuxPPS: GPS + PPS (comment out either this whole section or the next one)

server 127.127.20.0 minpoll 4 prefer

fudge 127.127.20.0 flag3 1 flag2 0

# SHM: PPS filtered mean (comment out either this whole section or the previous one)

server 127.127.28.0 minpoll 4 prefer

fudge 127.127.28.0 refid PPS flag3 1

set the clock to the current time and make sure you start the ntpd.


I realize that this "manual" needs a lot of improvement, so please help me improving it

Kind regards,

Ed

Personal tools

Here You can see a video of my freerunner using menu's.

One of the things i did not like about the freerunner was the need for a stylus for the simplest tasks

If you need to use mdbus commands you need to type long strings on a small screen with a stylus.

So i ended up making some scripts, which was already better, but now i had to type the scriptname with the stylus.

This also was not satisfactory, so i wrote some scripts that pop-up xmessages and let you perform any action you can script with a simple button.

I have put up all the scripts you see in the video online here.

Please untar it in /tmp and make sure it won't conflict with any file in your system.

You need to change the MY_WAY variable in the scripts, to reflect the base path where you put the scripts.

You start it by running menu_master.sh

In the scripts, you only have to change the MY_WAY variable and add your own scripts.

MENU_ITEM[${N}]="${MY_WAY}/scripts/gsm.sh";             NAME[${N}]="GSM";               N=$(( ${N} + 1 ))
MENU_ITEM[${N}]="${MY_WAY}/scripts/network.sh";         NAME[${N}]="Network";           N=$(( ${N} + 1 ))
MENU_ITEM[${N}]="${MY_WAY}/scripts/gps.sh";             NAME[${N}]="GPS";               N=$(( ${N} + 1 ))
MENU_ITEM[${N}]="${MY_WAY}/scripts/multimedia.sh";      NAME[${N}]="Multimedia";        N=$(( ${N} + 1 ))
MENU_ITEM[${N}]="${MY_WAY}/scripts/screen.sh";          NAME[${N}]="Screen";            N=$(( ${N} + 1 ))

As you can see, the layout is really simple, first you put the name of your script, and the name of the "button" shown on your screen.

Font size is automatically calculated based on the number of letters to show. You might need to add a space to the name sometimes, to prevent words beeing cut-off at the end.

One special script, not in the menu, is my alarmclock. (pim/scripts/alarm_clock.sh)

Many thanks for this script go to Ben Wong, who was kind enough to help me on my way.

It uses a perl script to parse the cron entries containing "alarm_trigger"

20 7 * * 1-5 if test -x /home/ed/scripts/pim/scripts/alarm_trigger.sh; then /home/ed/scripts/pim/scripts/alarm_trigger.sh >/dev/null 2>&1; fi
20 8 * * 6-7 if test -x /home/ed/scripts/pim/scripts/alarm_trigger.sh; then /home/ed/scripts/pim/scripts/alarm_trigger.sh >/dev/null 2>&1; fi

These are my wake-up calls, playing a random song from my collection, starting at low volume and in steps play louder and louder, until you hit the snooze or off button.

I did integrate it with my agenda notifications, a wake up call is just another appointment with a specific action ( play song instead of just beep).

I really like it a lot and use it everyday !

The phone resumes from suspend 10 secs before playing the song.

I hope these scripts will give someone inspiration to make the freerunner more finger friendly.

I think the overall response is slow, but i still like it, you can use it while walking, in a bus/train/car etc.

And you can't do that with a stylus and terminal i think.

Troubleshooting is easiest done when logged in in the FR with ssh and start the menu by just typing ./scripts/xmessage/scripts/screen.sh for example.

this way you see the error messages in your console.

Have Fun!




This is a collection of scripts to obtain a GSM cellid, get the aprox loction based on the info of opencellid.org and get agps data about the aproximate location.

You also can log the gsm cellid's and after the trip submit the found cells back to opencellid.org with the script parse_logs.sh

This is working on om2008.12.

You need the gps-utils package, font-bitstream-100dpi, encodings, font-alias, font-util, gsm0710muxd

I use xmessage to have a rough way to create "menu's".

The default fontsize is to small to my likings, so i installed some aditional fonts and set the xmessage font size in

~/.Xdefaults-`hostname`

xmessage*font: -*-*-*-*-*-*-30-*-*-*-*-*-iso8859-1

xterm*font: -*-*-*-*-*-*-25-*-*-*-*-*-iso8859-1

And add a font path to the X server in the file /etc/X11/Xserver

To use the scripts, untar the tarball in /tmp and check if none of the files from the tarball is conflicting with your current files.

After verifying and makeing backups if necesary, you can install it by untarring the tarball in /

After all this you need to reboot the FR once to activate all the new settings.

To use it, simply click the gps icon on your desktop and in the following order:

click agps -> this will try to get your location based on the current cellid and get agps data for that location

click dump nmea -> this will log the gps data to a local file during your trip

click log GSM -> this will log the cellid's during your trip


To obtain the cellid and still being able to make phone calls, you need the gsm0710muxd package.

With the default /etc/X11/Xsession.d/89qtopia file it wasn't working for me,

so i provided my file in the tarball as well.

The local clock must be synchronized to link the cellid to the location.

to do this i use the gpsd as a clock source for ntpd.

add the following lines to /etc/ntp.conf:

#LinuxPPS: GPS + PPS (comment out either this whole section or the next one)

server 127.127.20.0 minpoll 4 prefer

fudge 127.127.20.0 flag3 1 flag2 0

# SHM: PPS filtered mean (comment out either this whole section or the previous one)

server 127.127.28.0 minpoll 4 prefer

fudge 127.127.28.0 refid PPS flag3 1

set the clock to the current time and make sure you start the ntpd.


I realize that this "manual" needs a lot of improvement, so please help me improving it

Kind regards,

Ed