User:Historybuff/notes

From Openmoko

< User:Historybuff(Difference between revisions)
Jump to: navigation, search
(Add reference to developing with Eclipse)
 
(16 intermediate revisions by 2 users not shown)
Line 1: Line 1:
These are scribbles. Should be cleaned up and moved into real pages if useful.
+
These are my scribbles. Should be cleaned up and moved into real pages if useful.
  
Setting the timezone: [http://www.wikihow.com/Change-the-Timezone-in-Linux]
+
==Bluetooth keyboards==
(Doesn't work though, and is annoying)
+
I've tested two bluetooth keyboards. After having a bit of trouble, I've been able to get things worked out and use them both. They rock. Now, I just have to fiddle and get things working without command line stuff being needed.
  
[[Development with Eclipse]] - have to check it out.
+
==Possible bug==
 +
Clock display doesn't update with Timezone display change. (ie TZ change from Standard to Daylight -- ''date"returns right value, clock no) -- oddly, some weirdness, I had the system clock set wrong (?) and the date bar under the clock was ahead (it was 11 something pm, but should have shown today's date, but instead showed tomorrows)
  
Orientation of screen:
+
== Interesting sites ==
 +
http://www.opkg.org/specials/ <-- has neo cases
  
xrandr -o 1 turns screen to landscape mode
+
http://neo1973-germany.de/ - DE neo guys, and some of their software
(xrandr -o 0 to go back to ordinary portrait)
+
 
 +
== Build info ==
 +
Get your daily [[Snapshot_review]] -- find out if a snapshot works before you flash it.
 +
 
 +
== GPS stuff ==
 +
 
 +
[[GPS Sight]] - seems to be a basic track visualizer
 +
 
 +
Ugly hack to get Time info from a GPS stream: (UNTESTED)
 +
<pre>awk -F',' '/^\$GPRMC/{print "date "substr($10,3,2) substr($10,1,2)
 +
substr($2,1,2) substr($2,3,2) 2000+substr($10,5)"."substr($2,5)}'</pre>
 +
(all on one line, cut for readability)
 +
 
 +
[http://vancouver-webpages.com/peter/nmeafaq.txt] contains some good info for decoding, and [http://www.openmoko.org.pl/node/55] is a good link for getting started. Another good link is [http://wiki.openstreetmap.org/index.php/NMEA here at OSM]
 +
 
 +
There are some reasonable packages which can help with GPS now, such as [[Navit]] and [[Installing_Pyroute|Pyroute]] (thanks [[User:Wurp]]. I'll have to hack at them a bit when I get a chance.
 +
 
 +
I've done some hacking with awk scripts, so I know a bit about the layout and format of the various NMEA bits. For one bit that is undocumented, here is a ref to the [http://svnweb.openmoko.org/developers/olv/openmoko-agpsui2/src/nmea.h?rev=3371&view=markup OM repo] - the bit I was looking for was the $PGLOR sentence.
 +
 
 +
== Power/PM/tray icon ==
 +
Module for mb_panel -- should use /proc/apm to look at Power remaining. Reference is [http://alumnit.ca/~apenwarr/apmd/index.html here]
  
 
Getting Battery status:
 
Getting Battery status:
Line 20: Line 42:
 
nicer script (cwd must be above)-
 
nicer script (cwd must be above)-
 
CHARGE=`cat battvolt` && awk -v charge=${CHARGE} 'BEGIN {print charge/4224*100" "charge }'
 
CHARGE=`cat battvolt` && awk -v charge=${CHARGE} 'BEGIN {print charge/4224*100" "charge }'
 +
 +
A nice script that allows you to up the charger speed -- Make sure your charging device won't be smoked! [[Forcing fast charge mode#The_checkFastCharge.py_daemon]]
 +
 +
== uncatted now ==
 +
 +
This is a mess right now, but undergoing cleaning.
 +
 +
There is a project to get [[FreeBSD]] working on the Neo. Might be something to look at later in March.
 +
 +
Setting the timezone: [http://www.wikihow.com/Change-the-Timezone-in-Linux]
 +
(I had to use a hard link, but a symlink should work. Remember to log out (remote) or cycle the GUI/reboot to get this to take effect).
 +
 +
[[Development with Eclipse]] - have to check it out.
 +
 +
The essential [[GSM_850_test]]
 +
 +
Orientation of screen:
 +
 +
xrandr -o 1 turns screen to landscape mode
 +
(xrandr -o 0 to go back to ordinary portrait)
  
  
Line 46: Line 88:
  
 
Booting:
 
Booting:
Boot noise documented [[Boot_sound|here]]
+
Old boot noise documented [[Boot_sound|here]]
  
GPS:
+
more GPS:
 
+
I've gotten the binary up, but I'm still trying to decipher the NMEA output -- right now it doesn't look like I'm getting a fix, and when I replugged into the computer the neo froze. Grr.
+
 
+
[http://vancouver-webpages.com/peter/nmeafaq.txt] contains some good info for decoding, and [http://web.archive.org/web/20071119160631/http://www.openmoko.org.pl/node/55] is a good link for getting started. (I had issues with the original Polish site).
+
  
 
Note from [[User:Wurp]]: I got an awk script, I think from SpeedEvil, that deciphers /tmp/nmeaNP.  Here it is:
 
Note from [[User:Wurp]]: I got an awk script, I think from SpeedEvil, that deciphers /tmp/nmeaNP.  Here it is:
Line 71: Line 109:
  
 
I prefer to use gpsd output, though, via pygps.
 
I prefer to use gpsd output, though, via pygps.
 
Project Cupcake:
 
 
This is a project to get some mapping working on the moko. Right now I'm thinking of hacking together a basic picture viewer and stealing Tiles at Home PNG's and overlaying where the GPS says we are. Eventually it would be nice to have vector maps and true routing, but baby steps are important.
 
 
Note from [[User:Wurp]]: The navit package seems a good starting place.  I prefer pyroute, but I think we're going to have to get pypy or psyco going on the neo before pyroute is usable.
 

Latest revision as of 15:52, 28 October 2008

These are my scribbles. Should be cleaned up and moved into real pages if useful.

Contents

[edit] Bluetooth keyboards

I've tested two bluetooth keyboards. After having a bit of trouble, I've been able to get things worked out and use them both. They rock. Now, I just have to fiddle and get things working without command line stuff being needed.

[edit] Possible bug

Clock display doesn't update with Timezone display change. (ie TZ change from Standard to Daylight -- date"returns right value, clock no) -- oddly, some weirdness, I had the system clock set wrong (?) and the date bar under the clock was ahead (it was 11 something pm, but should have shown today's date, but instead showed tomorrows)

[edit] Interesting sites

http://www.opkg.org/specials/ <-- has neo cases

http://neo1973-germany.de/ - DE neo guys, and some of their software

[edit] Build info

Get your daily Snapshot_review -- find out if a snapshot works before you flash it.

[edit] GPS stuff

GPS Sight - seems to be a basic track visualizer

Ugly hack to get Time info from a GPS stream: (UNTESTED)

awk -F',' '/^\$GPRMC/{print "date "substr($10,3,2) substr($10,1,2) 
substr($2,1,2) substr($2,3,2) 2000+substr($10,5)"."substr($2,5)}'

(all on one line, cut for readability)

[1] contains some good info for decoding, and [2] is a good link for getting started. Another good link is here at OSM

There are some reasonable packages which can help with GPS now, such as Navit and Pyroute (thanks User:Wurp. I'll have to hack at them a bit when I get a chance.

I've done some hacking with awk scripts, so I know a bit about the layout and format of the various NMEA bits. For one bit that is undocumented, here is a ref to the OM repo - the bit I was looking for was the $PGLOR sentence.

[edit] Power/PM/tray icon

Module for mb_panel -- should use /proc/apm to look at Power remaining. Reference is here

Getting Battery status: cat `find /sys/ -name battvolt` the output is in millivolts. ~4224 millivolts is completely charged (observed 3568 lowest, 4207 highest)

exact location is /sys/devices/platform/s3c2410-i2c/i2c-adapter/i2c-0/0-0008/

nicer script (cwd must be above)- CHARGE=`cat battvolt` && awk -v charge=${CHARGE} 'BEGIN {print charge/4224*100" "charge }'

A nice script that allows you to up the charger speed -- Make sure your charging device won't be smoked! Forcing fast charge mode#The_checkFastCharge.py_daemon

[edit] uncatted now

This is a mess right now, but undergoing cleaning.

There is a project to get FreeBSD working on the Neo. Might be something to look at later in March.

Setting the timezone: [3] (I had to use a hard link, but a symlink should work. Remember to log out (remote) or cycle the GUI/reboot to get this to take effect).

Development with Eclipse - have to check it out.

The essential GSM_850_test

Orientation of screen:

xrandr -o 1 turns screen to landscape mode (xrandr -o 0 to go back to ordinary portrait)


GTA01_gsm_modem for AT commands; Gsmd for manual AT stuff

To get sound working: alsactl -f /etc/alsa/gsmhandset.state restore

Trying to record sound from the mic:

cat /dev/dsp does sample the ADC It's then 'simply' a case of setting the mixer controls so that the sound is routed from the mic to the adc See the nice simple explanatory block diagram in the middle of http://wiki.openmoko.org/wiki/Neo1973_Audio_Subsystem for guidance. In principle. You need to find which mic input the mic is connected to, setup the input gain and mic selector appropriately,setup the ALC mixer right, then set it up to route to the left or right ADC alsactl can do it (alsamixer)

alsactl -f /etc/alsa/capturehandset.state restore
arecord -f cd -t wav -d 10 foo.wav
Make noise for 10 seconds
alsactl -f /etc/alsa/stereoout.state restore
aplay foo.wav

Note from User:Wurp: You'll need to shut down pulseaudio before aplay will work (you also need to do this to get mplayer to play audio). Use '/etc/init.d/pulseaudio stop' before 'aplay foo.wav'. There is probably a better way to do this, but I don't know it.

Booting: Old boot noise documented here

more GPS:

Note from User:Wurp: I got an awk script, I think from SpeedEvil, that deciphers /tmp/nmeaNP. Here it is:

BEGIN{FS=","}
/GPRMC/{v=$8*1.1507}
/PGRME/{herr=sqrt($2^2+$4^2); err=$6}
/GPGGA/{
h=substr($2,1,2)
m=substr($2,3,2)
s=substr($2,5,2)
ndeg=substr($3,1,2)
nmin=substr($3,3)
wdeg=substr($5,1,3)
wmin=substr($5,4)}
/GPRMC/{print substr($10,1,2)"/"substr($10,3,2)"/"substr($10,5,2), h":"m":"s,(h*3600)+(m*60)+s,ndeg,nmin,wdeg,wmin, ndeg+(nmin/60),wdeg+(wmin/60), $10,$9,herr+0,err+0,v }

I prefer to use gpsd output, though, via pygps.

Personal tools

These are scribbles. Should be cleaned up and moved into real pages if useful.

Setting the timezone: [1] (Doesn't work though, and is annoying)

Development with Eclipse - have to check it out.

Orientation of screen:

xrandr -o 1 turns screen to landscape mode (xrandr -o 0 to go back to ordinary portrait)

Getting Battery status: cat `find /sys/ -name battvolt` the output is in millivolts. ~4224 millivolts is completely charged (observed 3568 lowest, 4207 highest)

exact location is /sys/devices/platform/s3c2410-i2c/i2c-adapter/i2c-0/0-0008/

nicer script (cwd must be above)- CHARGE=`cat battvolt` && awk -v charge=${CHARGE} 'BEGIN {print charge/4224*100" "charge }'


GTA01_gsm_modem for AT commands; Gsmd for manual AT stuff

To get sound working: alsactl -f /etc/alsa/gsmhandset.state restore

Trying to record sound from the mic:

cat /dev/dsp does sample the ADC It's then 'simply' a case of setting the mixer controls so that the sound is routed from the mic to the adc See the nice simple explanatory block diagram in the middle of http://wiki.openmoko.org/wiki/Neo1973_Audio_Subsystem for guidance. In principle. You need to find which mic input the mic is connected to, setup the input gain and mic selector appropriately,setup the ALC mixer right, then set it up to route to the left or right ADC alsactl can do it (alsamixer)

alsactl -f /etc/alsa/capturehandset.state restore
arecord -f cd -t wav -d 10 foo.wav
Make noise for 10 seconds
alsactl -f /etc/alsa/stereoout.state restore
aplay foo.wav

Note from User:Wurp: You'll need to shut down pulseaudio before aplay will work (you also need to do this to get mplayer to play audio). Use '/etc/init.d/pulseaudio stop' before 'aplay foo.wav'. There is probably a better way to do this, but I don't know it.

Booting: Boot noise documented here

GPS:

I've gotten the binary up, but I'm still trying to decipher the NMEA output -- right now it doesn't look like I'm getting a fix, and when I replugged into the computer the neo froze. Grr.

[2] contains some good info for decoding, and [3] is a good link for getting started. (I had issues with the original Polish site).

Note from User:Wurp: I got an awk script, I think from SpeedEvil, that deciphers /tmp/nmeaNP. Here it is:

BEGIN{FS=","}
/GPRMC/{v=$8*1.1507}
/PGRME/{herr=sqrt($2^2+$4^2); err=$6}
/GPGGA/{
h=substr($2,1,2)
m=substr($2,3,2)
s=substr($2,5,2)
ndeg=substr($3,1,2)
nmin=substr($3,3)
wdeg=substr($5,1,3)
wmin=substr($5,4)}
/GPRMC/{print substr($10,1,2)"/"substr($10,3,2)"/"substr($10,5,2), h":"m":"s,(h*3600)+(m*60)+s,ndeg,nmin,wdeg,wmin, ndeg+(nmin/60),wdeg+(wmin/60), $10,$9,herr+0,err+0,v }

I prefer to use gpsd output, though, via pygps.

Project Cupcake:

This is a project to get some mapping working on the moko. Right now I'm thinking of hacking together a basic picture viewer and stealing Tiles at Home PNG's and overlaying where the GPS says we are. Eventually it would be nice to have vector maps and true routing, but baby steps are important.

Note from User:Wurp: The navit package seems a good starting place. I prefer pyroute, but I think we're going to have to get pypy or psyco going on the neo before pyroute is usable.