<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://wiki.openmoko.org/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://wiki.openmoko.org/api.php?action=feedcontributions&amp;user=Brian+H+Wilson&amp;feedformat=atom</id>
		<title>Openmoko - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://wiki.openmoko.org/api.php?action=feedcontributions&amp;user=Brian+H+Wilson&amp;feedformat=atom"/>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Special:Contributions/Brian_H_Wilson"/>
		<updated>2013-05-22T05:30:08Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.19.6</generator>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Neo_1973_and_Windows</id>
		<title>Neo 1973 and Windows</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Neo_1973_and_Windows"/>
				<updated>2009-01-22T00:41:55Z</updated>
		
		<summary type="html">&lt;p&gt;Brian H Wilson: /* Further references */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;''Note -- The guidelines on this page work for the Neo FreeRunner too -- at least they do if you have a recent kernel installed. (See notes below on bluescreen of death before proceeding.)''&lt;br /&gt;
&lt;br /&gt;
This page tries to collect some information on how to use your Neo1973 together with a computer running a Microsoft(R) Windows(TM) series operating system.&lt;br /&gt;
&lt;br /&gt;
Please note that this is not really supported, and that the Openmoko developers themselves only use Linux for testing.&lt;br /&gt;
&lt;br /&gt;
Also note that Windows appears to not recognize and communicate with the neo as a USB device unless you install the .inf file below, and hence you will always have to [[forcing fast charge mode|force fast charge]] to recharge using a usb connection to a Windows machine unless you install that .inf.&lt;br /&gt;
&lt;br /&gt;
== Connecting to the phone ==&lt;br /&gt;
&lt;br /&gt;
=== Bluetooth connection ===&lt;br /&gt;
&lt;br /&gt;
How to connect to Windows XP via Bluetooth is described here: [[Manually_using_Bluetooth#Bluetooth_networking_with_a_Windows_XP_system]]&lt;br /&gt;
&lt;br /&gt;
=== USB Ethernet emulation ===&lt;br /&gt;
&lt;br /&gt;
{{note|With some recent versions of FSO or SHR with kernel 2.6.28 and Windows XP, you might get a Blue Screen Of Death (BSOD) as soon as you connect your Freerunner. ( https://docs.openmoko.org/trac/ticket/2211 )}}&lt;br /&gt;
&lt;br /&gt;
{{note|For Windows XP USB RNDIS networking ''finally works'' as of Kernel 2.6.22.5-moko11 using the procedure described below.}}&lt;br /&gt;
&lt;br /&gt;
{{note|For Vista this procedure works with the 2.6.24 kernel that ships with the Neo FreeRunner. The initial SSH connection seems a little slow however.}}&lt;br /&gt;
&lt;br /&gt;
# Download http://privat.wmo.de/~c_schweers/NeoRndis.inf ([[NeoRndis.inf|Listing of NeoRndis.inf]]) to somewhere convenient on your Windows machine. If the file is not reachable, you can download another working inf file here: http://users.informatik.uni-halle.de/~rabe/neo/Neo1973.inf ([[Neo1973.inf|Listing of Neo1973.inf]]). If you have Windows Vista x64 try this one: [http://openmoko.kamillo.pl/neo_vista_x64.inf http://openmoko.kamillo.pl/neo_vista_x64.inf]. If you have Windows 2000 download this: [http://minucci.net/file/FreeRndis.zip http://minucci.net/file/FreeRndis.zip]&lt;br /&gt;
# Power up your Neo1973, let it boot into Openmoko, and then connect its USB port to the Windows machine, using a standard USB-A to USB-mini-B cable. Note that if you connect the cable ''before'' powering the phone on, Windows will detect a device presented by the [[Boot lader|boot loader]]. This probably isn't what you want. Let the phone power up first.&lt;br /&gt;
# Assuming the new drivers are downloaded and accessible as above, Windows should detect the Neo1973 and prompt you for a driver for a &amp;quot;RNDIS/Ethernet Gadget&amp;quot;. Select to specify your own driver, and then choose the NeoRndis.inf file you downloaded earlier. This file tells Windows XP to use its own built-in RNDIS driver for the device.&lt;br /&gt;
# Windows may complain of &amp;quot;reduced network connectivity&amp;quot;. This is because it expects to be able to get an address automatically from the Neo1973 and it doesn't provide one in the default setup. To fix this, see the next step.&lt;br /&gt;
# Go into the Windows network configuration for the new USB networking adapter and set the IP address of the interface to 192.168.0.200.&lt;br /&gt;
&lt;br /&gt;
If you have trouble using the Windows tools to set the IP address (on XP it would not allow me to type in the full ip address!), use a command line.&lt;br /&gt;
List all available interfaces to get the adapter name to use:&lt;br /&gt;
&lt;br /&gt;
 $ '''netsh interface ip show config'''&lt;br /&gt;
 ''...lots of stuff here not shown, at the bottom I see my USB interface...''&lt;br /&gt;
 Configuration for interface &amp;quot;Local Area Connection 11&amp;quot;&lt;br /&gt;
    DHCP enabled:                         Yes&lt;br /&gt;
    InterfaceMetric:                      0&lt;br /&gt;
    DNS servers configured through DHCP:  None&lt;br /&gt;
    WINS servers configured through DHCP: None&lt;br /&gt;
    Register with which suffix:           Primary only&lt;br /&gt;
 &lt;br /&gt;
Now that you know the name of the ethernet adapter, use the command to configure it.&lt;br /&gt;
&lt;br /&gt;
 $ '''netsh interface ip set address name=&amp;quot;Local Area Connection 11&amp;quot; static 192.168.0.200 255.255.255.0'''&lt;br /&gt;
 Ok.&lt;br /&gt;
&lt;br /&gt;
You should now be able to connect to your smart phone on 192.168.0.202 via ssh (e.g. putty). The distribution you have might not have an ssh server running on it but if you still have a command line window open, you can ping the phone to make sure it's connected.&lt;br /&gt;
&lt;br /&gt;
 $ '''ping 192.168.0.202'''&lt;br /&gt;
 &lt;br /&gt;
 Pinging 192.168.0.202 with 32 bytes of data:&lt;br /&gt;
 &lt;br /&gt;
 Reply from 192.168.0.202: bytes=32 time=3ms TTL=64&lt;br /&gt;
 etc... good news!&lt;br /&gt;
&lt;br /&gt;
'''Getting a Blue Screen of Death (BSOD) in windows XP?''' Some extra drivers are automatically installed with new devices (e.g. &amp;quot;SecureRemoteMiniPort&amp;quot;).  Try disabling them in the device manager while the Neo is not connected.  You need to select &amp;quot;Show hidden devices&amp;quot; in the view menu to see them. Then reconnect the Neo.&lt;br /&gt;
&lt;br /&gt;
== Connection to the Internet ==&lt;br /&gt;
&lt;br /&gt;
If you want to connect to the internet from your Neo via Windows XP, e.g. for doing ipkg update/upgrade, you need to set up IP forwarding and routing properly.&lt;br /&gt;
&lt;br /&gt;
==== Option 1, using Windows ICS ====&lt;br /&gt;
&lt;br /&gt;
An easy way to do this is to use Windows Internet Connection Sharing.&lt;br /&gt;
&lt;br /&gt;
To do this, you need to create a network bridge which contains the usb connection to the Neo.&lt;br /&gt;
&lt;br /&gt;
Then you tell Windows to share the WAN connection (i.e. the network interface which connects your Windows system to the internet) with the new bridge.&lt;br /&gt;
&lt;br /&gt;
Then you manually set the IP address of the bridge to 192.168.0.200&lt;br /&gt;
&lt;br /&gt;
After you have done all this, the Neo will be able to route through the Windows machine out to the internet. DNS queries will also be proxied by the Windows machine. Of course, /etc/resolv.conf on the Neo needs to be set to your local DNS or a free DNS.&lt;br /&gt;
&lt;br /&gt;
'''New''' When you have LAN with network address 192.168.0.0 you have to do some hacking.&lt;br /&gt;
1. Edit /etc/network/interfaces and set for usb0&lt;br /&gt;
'' address 192.168.2.202&lt;br /&gt;
   netmask 255.255.255.0&lt;br /&gt;
   network 192.168.2.0&lt;br /&gt;
   gateway 192.168.2.1&lt;br /&gt;
''&lt;br /&gt;
On Windows go to Network settings, ''pull out LAN cable'' (so there's no connection with local DHCP server which conflicts with IP 192.168.0.1), enable connection sharing for Neo-USB cable. Then edit Neo-usb interface settings and change it's IP address to 192.168.2.1 and set gateway for yours 192.168.0.x (other which you have). Apply changes with OK. Put in net cable. Enjoy net on NEO.&lt;br /&gt;
&lt;br /&gt;
'''Example: Setup for wifi only internet connection (windows xp and Neo FreeRunner)'''&lt;br /&gt;
# Once the Network Connections window shows both &amp;quot;Wireless Network Connection Status:Connected&amp;quot; and &amp;quot;openmoko Status:Connected&amp;quot; Right click on Wireless Network Connection and goto Properties. Select Advanced tab, and turn on Internet Connection sharing. Choose the openmoko network.&lt;br /&gt;
# If you get the error: the ip address is already in use. Change your wireless router address away from 192.168.0.2, to something like 192.168.1.2&lt;br /&gt;
# Windows will change the ip address of openmoko network to 192.168.0.1 and the Network Connections window will show &amp;quot;Wireless Internet Connection Status: connected,shared&amp;quot; &lt;br /&gt;
# Right click on openmoko network and goto Properties. Change the ip address of openmoko network to 192.168.0.200&lt;br /&gt;
# Login to openmoko using Putty (ssh client for windows) 192.168.0.202&lt;br /&gt;
&lt;br /&gt;
=== Option 1.5, using a Network Bridge ===&lt;br /&gt;
&lt;br /&gt;
Just bridge the USB and Ethernet networks together (Win XP).&lt;br /&gt;
&lt;br /&gt;
To do this, you need to create a network bridge which contains the usb connection to the Neo and your normal Ethernet (or WiFi) connection (the one you use to go on the internets).&lt;br /&gt;
&lt;br /&gt;
Then you set up the bridge like your Ethernet was (DHCP or static IP, e.g. 10.10.0.foo) and the Neo to be in the same subnet as the bridge (10.10.0.bar)&lt;br /&gt;
&lt;br /&gt;
After you have done all this, the Neo will be able to route through the Windows machine out to the internet. DNS queries will also be proxied by the Windows machine. Of course, /etc/resolv.conf on the Neo needs to be set to your local DNS or a free DNS. &lt;br /&gt;
&lt;br /&gt;
=== Option 2, using AnalogX ===&lt;br /&gt;
&lt;br /&gt;
AnalogX is a lightweight, free network proxy for Windows. It can proxy HTTP, FTP, SMTP and other protocols. It's very easy to set up and works with any software on the phone that supports proxies (eg. opkg).&lt;br /&gt;
&lt;br /&gt;
* Download and install AnalogX onto your Windows PC (http://www.analogx.com)  (http://www.analogx.com/files/proxyi.exe) This is the actual program used.&lt;br /&gt;
* Run AnalogX. The default configuration should be ok: open mode, all protocols on. &lt;br /&gt;
* Connect your phone using the USB cable as normal.&lt;br /&gt;
* Configure opkg to use the proxy by editing /etc/opkg.conf. There's 2 lines to uncomment and change.&lt;br /&gt;
** option http_proxy http://192.168.0.200:6588&lt;br /&gt;
** option ftp_proxy http://192.168.0.200:21&lt;br /&gt;
* opkg should now work via the proxy.&lt;br /&gt;
&lt;br /&gt;
Other apps like [[Minimo]] can also be configured to use a proxy. Use the HTTP proxy URL as above.&lt;br /&gt;
&lt;br /&gt;
=== Option 3, using IP Forwarding and extra routing ===&lt;br /&gt;
&lt;br /&gt;
An alternative way is to do it manually:&lt;br /&gt;
&lt;br /&gt;
In the Windows registry, go to:&lt;br /&gt;
 Hkey_Local_Machine\System\CurrentControlSet\Services\Tcpip\Parameters&lt;br /&gt;
and set &lt;br /&gt;
 REG_DWORD: &amp;quot;IPEnableRouter&amp;quot; to &amp;quot;1&amp;quot;&lt;br /&gt;
Be aware that IP Forwarding can be a security risk.&lt;br /&gt;
&lt;br /&gt;
Then, if there is a router between your Windows XP system and the internet, you also need to tell the router how to get back to your Neo, so you need to set a route on it for 192.168.0.0/255.255.255.0 to your Windows XP LAN interface IP address. Windows will then forward the packets to the Neo.&lt;br /&gt;
&lt;br /&gt;
=== Option 4, using HTTP proxy at work with Putty SSH tunneling ===&lt;br /&gt;
&lt;br /&gt;
If your PC is running Windows and Internet connection goes through proxy, you can simply use [http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html PuTTY: A Free Telnet/SSH Client]. In Connection-&amp;gt;SSH-&amp;gt;Tunnels you can add tunnel to your proxy server. For example, if proxy address is &amp;quot;10.0.0.1:8080&amp;quot;:&lt;br /&gt;
Source port: 8080&lt;br /&gt;
Destination: 10.0.0.1 &lt;br /&gt;
Radio button: &amp;quot;Remote&amp;quot;&lt;br /&gt;
Then you will only need to set http_proxy address at your 1973/Freerunner:&lt;br /&gt;
&lt;br /&gt;
 # export http_proxy=http://localhost:8080&lt;br /&gt;
&lt;br /&gt;
And have Internet.&lt;br /&gt;
&lt;br /&gt;
== Further references ==&lt;br /&gt;
&lt;br /&gt;
* http://www.microsoft.com/whdc/device/network/NDIS/rndis.mspx&lt;br /&gt;
* http://maemo.org/maemowiki/USBnetworkingWinXP&lt;br /&gt;
* http://docwiki.gumstix.org/Setting_up_USBnet&lt;br /&gt;
* http://handhelds.org/moin/moin.cgi/WindowsXpUsbNetworkHowTo&lt;br /&gt;
* [http://www.petri.co.il/configure_tcp_ip_from_cmd.htm Configuring TCP/IP settings from command line]&lt;br /&gt;
&lt;br /&gt;
[[Category:Networking]]&lt;br /&gt;
[[Category:Host OSes]]&lt;/div&gt;</summary>
		<author><name>Brian H Wilson</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Neo_1973_and_Windows</id>
		<title>Neo 1973 and Windows</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Neo_1973_and_Windows"/>
				<updated>2009-01-22T00:40:09Z</updated>
		
		<summary type="html">&lt;p&gt;Brian H Wilson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;''Note -- The guidelines on this page work for the Neo FreeRunner too -- at least they do if you have a recent kernel installed. (See notes below on bluescreen of death before proceeding.)''&lt;br /&gt;
&lt;br /&gt;
This page tries to collect some information on how to use your Neo1973 together with a computer running a Microsoft(R) Windows(TM) series operating system.&lt;br /&gt;
&lt;br /&gt;
Please note that this is not really supported, and that the Openmoko developers themselves only use Linux for testing.&lt;br /&gt;
&lt;br /&gt;
Also note that Windows appears to not recognize and communicate with the neo as a USB device unless you install the .inf file below, and hence you will always have to [[forcing fast charge mode|force fast charge]] to recharge using a usb connection to a Windows machine unless you install that .inf.&lt;br /&gt;
&lt;br /&gt;
== Connecting to the phone ==&lt;br /&gt;
&lt;br /&gt;
=== Bluetooth connection ===&lt;br /&gt;
&lt;br /&gt;
How to connect to Windows XP via Bluetooth is described here: [[Manually_using_Bluetooth#Bluetooth_networking_with_a_Windows_XP_system]]&lt;br /&gt;
&lt;br /&gt;
=== USB Ethernet emulation ===&lt;br /&gt;
&lt;br /&gt;
{{note|With some recent versions of FSO or SHR with kernel 2.6.28 and Windows XP, you might get a Blue Screen Of Death (BSOD) as soon as you connect your Freerunner. ( https://docs.openmoko.org/trac/ticket/2211 )}}&lt;br /&gt;
&lt;br /&gt;
{{note|For Windows XP USB RNDIS networking ''finally works'' as of Kernel 2.6.22.5-moko11 using the procedure described below.}}&lt;br /&gt;
&lt;br /&gt;
{{note|For Vista this procedure works with the 2.6.24 kernel that ships with the Neo FreeRunner. The initial SSH connection seems a little slow however.}}&lt;br /&gt;
&lt;br /&gt;
# Download http://privat.wmo.de/~c_schweers/NeoRndis.inf ([[NeoRndis.inf|Listing of NeoRndis.inf]]) to somewhere convenient on your Windows machine. If the file is not reachable, you can download another working inf file here: http://users.informatik.uni-halle.de/~rabe/neo/Neo1973.inf ([[Neo1973.inf|Listing of Neo1973.inf]]). If you have Windows Vista x64 try this one: [http://openmoko.kamillo.pl/neo_vista_x64.inf http://openmoko.kamillo.pl/neo_vista_x64.inf]. If you have Windows 2000 download this: [http://minucci.net/file/FreeRndis.zip http://minucci.net/file/FreeRndis.zip]&lt;br /&gt;
# Power up your Neo1973, let it boot into Openmoko, and then connect its USB port to the Windows machine, using a standard USB-A to USB-mini-B cable. Note that if you connect the cable ''before'' powering the phone on, Windows will detect a device presented by the [[Boot lader|boot loader]]. This probably isn't what you want. Let the phone power up first.&lt;br /&gt;
# Assuming the new drivers are downloaded and accessible as above, Windows should detect the Neo1973 and prompt you for a driver for a &amp;quot;RNDIS/Ethernet Gadget&amp;quot;. Select to specify your own driver, and then choose the NeoRndis.inf file you downloaded earlier. This file tells Windows XP to use its own built-in RNDIS driver for the device.&lt;br /&gt;
# Windows may complain of &amp;quot;reduced network connectivity&amp;quot;. This is because it expects to be able to get an address automatically from the Neo1973 and it doesn't provide one in the default setup. To fix this, see the next step.&lt;br /&gt;
# Go into the Windows network configuration for the new USB networking adapter and set the IP address of the interface to 192.168.0.200.&lt;br /&gt;
&lt;br /&gt;
If you have trouble using the Windows tools to set the IP address (on XP it would not allow me to type in the full ip address!), use a command line.&lt;br /&gt;
List all available interfaces to get the adapter name to use:&lt;br /&gt;
&lt;br /&gt;
 $ '''netsh interface ip show config'''&lt;br /&gt;
 ''...lots of stuff here not shown, at the bottom I see my USB interface...''&lt;br /&gt;
 Configuration for interface &amp;quot;Local Area Connection 11&amp;quot;&lt;br /&gt;
    DHCP enabled:                         Yes&lt;br /&gt;
    InterfaceMetric:                      0&lt;br /&gt;
    DNS servers configured through DHCP:  None&lt;br /&gt;
    WINS servers configured through DHCP: None&lt;br /&gt;
    Register with which suffix:           Primary only&lt;br /&gt;
 &lt;br /&gt;
Now that you know the name of the ethernet adapter, use the command to configure it.&lt;br /&gt;
&lt;br /&gt;
 $ '''netsh interface ip set address name=&amp;quot;Local Area Connection 11&amp;quot; static 192.168.0.200 255.255.255.0'''&lt;br /&gt;
 Ok.&lt;br /&gt;
&lt;br /&gt;
You should now be able to connect to your smart phone on 192.168.0.202 via ssh (e.g. putty). The distribution you have might not have an ssh server running on it but if you still have a command line window open, you can ping the phone to make sure it's connected.&lt;br /&gt;
&lt;br /&gt;
 $ '''ping 192.168.0.202'''&lt;br /&gt;
 &lt;br /&gt;
 Pinging 192.168.0.202 with 32 bytes of data:&lt;br /&gt;
 &lt;br /&gt;
 Reply from 192.168.0.202: bytes=32 time=3ms TTL=64&lt;br /&gt;
 etc... good news!&lt;br /&gt;
&lt;br /&gt;
'''Getting a Blue Screen of Death (BSOD) in windows XP?''' Some extra drivers are automatically installed with new devices (e.g. &amp;quot;SecureRemoteMiniPort&amp;quot;).  Try disabling them in the device manager while the Neo is not connected.  You need to select &amp;quot;Show hidden devices&amp;quot; in the view menu to see them. Then reconnect the Neo.&lt;br /&gt;
&lt;br /&gt;
== Connection to the Internet ==&lt;br /&gt;
&lt;br /&gt;
If you want to connect to the internet from your Neo via Windows XP, e.g. for doing ipkg update/upgrade, you need to set up IP forwarding and routing properly.&lt;br /&gt;
&lt;br /&gt;
==== Option 1, using Windows ICS ====&lt;br /&gt;
&lt;br /&gt;
An easy way to do this is to use Windows Internet Connection Sharing.&lt;br /&gt;
&lt;br /&gt;
To do this, you need to create a network bridge which contains the usb connection to the Neo.&lt;br /&gt;
&lt;br /&gt;
Then you tell Windows to share the WAN connection (i.e. the network interface which connects your Windows system to the internet) with the new bridge.&lt;br /&gt;
&lt;br /&gt;
Then you manually set the IP address of the bridge to 192.168.0.200&lt;br /&gt;
&lt;br /&gt;
After you have done all this, the Neo will be able to route through the Windows machine out to the internet. DNS queries will also be proxied by the Windows machine. Of course, /etc/resolv.conf on the Neo needs to be set to your local DNS or a free DNS.&lt;br /&gt;
&lt;br /&gt;
'''New''' When you have LAN with network address 192.168.0.0 you have to do some hacking.&lt;br /&gt;
1. Edit /etc/network/interfaces and set for usb0&lt;br /&gt;
'' address 192.168.2.202&lt;br /&gt;
   netmask 255.255.255.0&lt;br /&gt;
   network 192.168.2.0&lt;br /&gt;
   gateway 192.168.2.1&lt;br /&gt;
''&lt;br /&gt;
On Windows go to Network settings, ''pull out LAN cable'' (so there's no connection with local DHCP server which conflicts with IP 192.168.0.1), enable connection sharing for Neo-USB cable. Then edit Neo-usb interface settings and change it's IP address to 192.168.2.1 and set gateway for yours 192.168.0.x (other which you have). Apply changes with OK. Put in net cable. Enjoy net on NEO.&lt;br /&gt;
&lt;br /&gt;
'''Example: Setup for wifi only internet connection (windows xp and Neo FreeRunner)'''&lt;br /&gt;
# Once the Network Connections window shows both &amp;quot;Wireless Network Connection Status:Connected&amp;quot; and &amp;quot;openmoko Status:Connected&amp;quot; Right click on Wireless Network Connection and goto Properties. Select Advanced tab, and turn on Internet Connection sharing. Choose the openmoko network.&lt;br /&gt;
# If you get the error: the ip address is already in use. Change your wireless router address away from 192.168.0.2, to something like 192.168.1.2&lt;br /&gt;
# Windows will change the ip address of openmoko network to 192.168.0.1 and the Network Connections window will show &amp;quot;Wireless Internet Connection Status: connected,shared&amp;quot; &lt;br /&gt;
# Right click on openmoko network and goto Properties. Change the ip address of openmoko network to 192.168.0.200&lt;br /&gt;
# Login to openmoko using Putty (ssh client for windows) 192.168.0.202&lt;br /&gt;
&lt;br /&gt;
=== Option 1.5, using a Network Bridge ===&lt;br /&gt;
&lt;br /&gt;
Just bridge the USB and Ethernet networks together (Win XP).&lt;br /&gt;
&lt;br /&gt;
To do this, you need to create a network bridge which contains the usb connection to the Neo and your normal Ethernet (or WiFi) connection (the one you use to go on the internets).&lt;br /&gt;
&lt;br /&gt;
Then you set up the bridge like your Ethernet was (DHCP or static IP, e.g. 10.10.0.foo) and the Neo to be in the same subnet as the bridge (10.10.0.bar)&lt;br /&gt;
&lt;br /&gt;
After you have done all this, the Neo will be able to route through the Windows machine out to the internet. DNS queries will also be proxied by the Windows machine. Of course, /etc/resolv.conf on the Neo needs to be set to your local DNS or a free DNS. &lt;br /&gt;
&lt;br /&gt;
=== Option 2, using AnalogX ===&lt;br /&gt;
&lt;br /&gt;
AnalogX is a lightweight, free network proxy for Windows. It can proxy HTTP, FTP, SMTP and other protocols. It's very easy to set up and works with any software on the phone that supports proxies (eg. opkg).&lt;br /&gt;
&lt;br /&gt;
* Download and install AnalogX onto your Windows PC (http://www.analogx.com)  (http://www.analogx.com/files/proxyi.exe) This is the actual program used.&lt;br /&gt;
* Run AnalogX. The default configuration should be ok: open mode, all protocols on. &lt;br /&gt;
* Connect your phone using the USB cable as normal.&lt;br /&gt;
* Configure opkg to use the proxy by editing /etc/opkg.conf. There's 2 lines to uncomment and change.&lt;br /&gt;
** option http_proxy http://192.168.0.200:6588&lt;br /&gt;
** option ftp_proxy http://192.168.0.200:21&lt;br /&gt;
* opkg should now work via the proxy.&lt;br /&gt;
&lt;br /&gt;
Other apps like [[Minimo]] can also be configured to use a proxy. Use the HTTP proxy URL as above.&lt;br /&gt;
&lt;br /&gt;
=== Option 3, using IP Forwarding and extra routing ===&lt;br /&gt;
&lt;br /&gt;
An alternative way is to do it manually:&lt;br /&gt;
&lt;br /&gt;
In the Windows registry, go to:&lt;br /&gt;
 Hkey_Local_Machine\System\CurrentControlSet\Services\Tcpip\Parameters&lt;br /&gt;
and set &lt;br /&gt;
 REG_DWORD: &amp;quot;IPEnableRouter&amp;quot; to &amp;quot;1&amp;quot;&lt;br /&gt;
Be aware that IP Forwarding can be a security risk.&lt;br /&gt;
&lt;br /&gt;
Then, if there is a router between your Windows XP system and the internet, you also need to tell the router how to get back to your Neo, so you need to set a route on it for 192.168.0.0/255.255.255.0 to your Windows XP LAN interface IP address. Windows will then forward the packets to the Neo.&lt;br /&gt;
&lt;br /&gt;
=== Option 4, using HTTP proxy at work with Putty SSH tunneling ===&lt;br /&gt;
&lt;br /&gt;
If your PC is running Windows and Internet connection goes through proxy, you can simply use [http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html PuTTY: A Free Telnet/SSH Client]. In Connection-&amp;gt;SSH-&amp;gt;Tunnels you can add tunnel to your proxy server. For example, if proxy address is &amp;quot;10.0.0.1:8080&amp;quot;:&lt;br /&gt;
Source port: 8080&lt;br /&gt;
Destination: 10.0.0.1 &lt;br /&gt;
Radio button: &amp;quot;Remote&amp;quot;&lt;br /&gt;
Then you will only need to set http_proxy address at your 1973/Freerunner:&lt;br /&gt;
&lt;br /&gt;
 # export http_proxy=http://localhost:8080&lt;br /&gt;
&lt;br /&gt;
And have Internet.&lt;br /&gt;
&lt;br /&gt;
== Further references ==&lt;br /&gt;
&lt;br /&gt;
* http://www.microsoft.com/whdc/device/network/NDIS/rndis.mspx&lt;br /&gt;
* http://maemo.org/maemowiki/USBnetworkingWinXP&lt;br /&gt;
* http://docwiki.gumstix.org/Setting_up_USBnet&lt;br /&gt;
* http://handhelds.org/moin/moin.cgi/WindowsXpUsbNetworkHowTo&lt;br /&gt;
&lt;br /&gt;
[[Category:Networking]]&lt;br /&gt;
[[Category:Host OSes]]&lt;/div&gt;</summary>
		<author><name>Brian H Wilson</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Bricked</id>
		<title>Bricked</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Bricked"/>
				<updated>2008-09-21T04:36:25Z</updated>
		
		<summary type="html">&lt;p&gt;Brian H Wilson: /* What is/is not a 'bricked' Neo? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== What is/is not a 'bricked' Neo? ==&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Bricked&amp;quot;, by analogy with &amp;quot;as useful as a brick&amp;quot;, means that the phone's state (as stored in flash memory) has gotten sufficiently messed up that you cannot get it operational via normal means, no matter how clever. The usual (but not the only) cause, as in the story below, is errors in re-flashing the device. The normal way to &amp;quot;un-brick&amp;quot; a phone requires use of a [[Debug_Board]].&lt;br /&gt;
&lt;br /&gt;
Note that being &amp;quot;bricked&amp;quot; must be distinguished from having a deeply-discharged battery. If you phone was working fine last Friday and won't boot up at all this Monday morning, it is more likely suffering the &amp;quot;really-dead-battery&amp;quot;; recovery from this is described on the [[Neo FreeRunner Hardware Issues#Can't boot with discharged or missing battery|Neo FreeRunner Hardware Issues]].&lt;br /&gt;
&lt;br /&gt;
== Notes on a 'bricked' Neo ==&lt;br /&gt;
&lt;br /&gt;
I've just spent a very long time, with the help of a few people on irc (who I now owe drinks to), trying to recover my Neo. This page is the result and is supposed to act as a collection of information to help owners with bricked or semi-bricked devices.&lt;br /&gt;
&lt;br /&gt;
== The Problem defined ==&lt;br /&gt;
&lt;br /&gt;
A typing error in the splashimage environment variable resulted in the splash image being read into the memory starting at 0x200000 rather than 0x32000000. The change was written, with the error being unnoticed, using saveenv. As a result it was not possible to connect the device to usb until it had booted fully. Any attempt to either start with usb plugged in or plugging it in at the u-boot prompt resulted in a locked up device. Looking at dmesg on the host the following errors were reported&lt;br /&gt;
&lt;br /&gt;
 usb 3-1: new full speed USB device using uhci_hcd and address 21&lt;br /&gt;
 usb 3-1: device not accepting address 21, error -110&lt;br /&gt;
&lt;br /&gt;
(the address number will change).&lt;br /&gt;
&lt;br /&gt;
So the problem was that although the device could now boot there was no way to flash it with dfu.&lt;br /&gt;
&lt;br /&gt;
=== The Solution ===&lt;br /&gt;
&lt;br /&gt;
The solution was to try and prevent the splashimage environment variable from being looked at, thus preventing the write to the wrong area of memory.&lt;br /&gt;
&lt;br /&gt;
==== Attempt 1 ====&lt;br /&gt;
&lt;br /&gt;
The idea was to dump mtdblock1 to a file, scp the file to a PC, hex edit it scp the file back to the phone and then dd the result into the mtdblock.&lt;br /&gt;
&lt;br /&gt;
On the Neo&lt;br /&gt;
&lt;br /&gt;
 dd if=/dev/mtdblock1 of=mtdblock1.bin&lt;br /&gt;
&lt;br /&gt;
Rebooting was required because of the i/o errors. The i/o error problem has been reported as bug  [http://bugzilla.openmoko.org/cgi-bin/bugzilla/show_bug.cgi?id=567 567]&lt;br /&gt;
&lt;br /&gt;
Once the Neo had rebooted the file was copied to a PC using scp. The first attempt to hex edit was made, the idea was to change 1 byte of the word '''splashimage''' so that it would, hopefully, be ignored by the bootloader. The resulting file was scp'd back to the Neo and written to flash&lt;br /&gt;
&lt;br /&gt;
 dd if=new_mtdblock1 of=/dev/mtdblock1&lt;br /&gt;
&lt;br /&gt;
again once this was done a 'reboot' was performed.&lt;br /&gt;
&lt;br /&gt;
==== Result 1 ====&lt;br /&gt;
&lt;br /&gt;
When the device booted there was a small tux image in the top left hand corner of the screen and a u-boot version string displayed over some of it. The device would not continue to boot.&lt;br /&gt;
&lt;br /&gt;
Powered off the Neo, powered on with AUX+POWER go give a reduced boot menu. &lt;br /&gt;
&lt;br /&gt;
 Boot&lt;br /&gt;
 Factory reset&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Selecting Boot resulted in a familiar 'bad magic number' error. However, selecting Factory reset resulted in the device booting. This time DFU was operational, but /dev/ttyACM0 was not available so there was no way to change the environment variable for splashimage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''[[User:CesarB|Cesar Barros]] points out that'''&lt;br /&gt;
&lt;br /&gt;
''The reason editing the environment by hand does not work well is not the missing variable, but that the CRC doesn't match anymore, which makes it ignore the whole environment''&lt;br /&gt;
&lt;br /&gt;
which makes perfect sense.&lt;br /&gt;
&lt;br /&gt;
==== Attempt 2 ====&lt;br /&gt;
&lt;br /&gt;
This idea involved taking the mtdblock1 from a working Neo and dd'ing it to the failed Neo's flash. '''WARNING!!! Never flash an u-boot-env (mtdblock1) that does not come from your own Neo. It contains a partition table and bad block table that's unique for each Neo.'''&lt;br /&gt;
&lt;br /&gt;
==== Result 2 ====&lt;br /&gt;
&lt;br /&gt;
The process was similar to attempt one, although no hex edit took place. The result was that the Neo booted perfectly, although without a splash screen. As the next stage for this the mtdblock3 was dumped from the working Neo and dd'd into mtdblock3 of the Neo with no splash screen. &lt;br /&gt;
&lt;br /&gt;
The final result was a perfectly fine Neo with a splash screen, working boot menu and dfu capabilities.&lt;br /&gt;
&lt;br /&gt;
== Discoveries ==&lt;br /&gt;
&lt;br /&gt;
1. You can use dd to extract and overwrite your mtd partitions. This works particularly well for u-boot-env and splash providing the source device has a similar partition layout. Doing this on the u-boot partition was '''not''' tested. However, after you have used dd on the mtdblock devices as either the if= or of= you get i/o errors with even basic commands. The only way to get round this is to 'reboot' by removing the battery.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. Hex editing the extracted mtd partition (u-boot-env) and trying to dd that works but the results are not what is expected. It appears that if one of the boot env parameters is missing, in this case splashimage, the u-boot-env parameters are all treated as if they were blank and the device uses default settings. This is because the CRC no longer matches.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. QEMU is very useful for testing out your theories before actually doing them on a real device. Most of the things we tried were tried on qemu first. Sadly QEMU's sd card emulation appears to be broken.&lt;br /&gt;
&lt;br /&gt;
== Useful information ==&lt;br /&gt;
&lt;br /&gt;
On your Neo:&lt;br /&gt;
&lt;br /&gt;
 cat /proc/mtd&lt;br /&gt;
 dev:    size   erasesize  name&lt;br /&gt;
 mtd0: 00040000 00004000 &amp;quot;u-boot&amp;quot;&lt;br /&gt;
 mtd1: 00004000 00004000 &amp;quot;u-boot_env&amp;quot;&lt;br /&gt;
 mtd2: 00200000 00004000 &amp;quot;kernel&amp;quot;&lt;br /&gt;
 mtd3: 000a0000 00004000 &amp;quot;splash&amp;quot;&lt;br /&gt;
 mtd4: 03d1c000 00004000 &amp;quot;rootfs&lt;br /&gt;
&lt;br /&gt;
[[Category:Hardware]]&lt;/div&gt;</summary>
		<author><name>Brian H Wilson</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Neo_FreeRunner_Battery</id>
		<title>Neo FreeRunner Battery</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Neo_FreeRunner_Battery"/>
				<updated>2008-09-02T17:57:18Z</updated>
		
		<summary type="html">&lt;p&gt;Brian H Wilson: /* What to do if your battery has become completely discharged */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Neo FreeRunner Menu}}&lt;br /&gt;
=== GTA02 1200 mAh Smart Battery ===&lt;br /&gt;
&lt;br /&gt;
*Using SANYO 1200mAh cell&lt;br /&gt;
*Battery Technical information: [http://people.openmoko.org/tony_tu/GTA02/hardware/GTA02/CT-GTA02.pdf Detailed Battery Information]&lt;br /&gt;
&lt;br /&gt;
* 1200mAh Smart Battery with Coulomb-counter and protection circuit&lt;br /&gt;
* The Smart Battery keeps track of maximum and current capacity for precise prediction of remaining battery power and time until shutdown, based on actual power dissipation.&lt;br /&gt;
&lt;br /&gt;
For more information, see the GTA01 battery info at [[Neo1973 Battery]]&lt;br /&gt;
&lt;br /&gt;
=== Notes about expected battery life ===&lt;br /&gt;
Battery life is a work in progress. The power saving software is in a very rudimentary state. At the moment 12h is about the most (note though a [http://lists.openmoko.org/pipermail/community/2008-July/020339.html recent result of at least 21h], mostly in suspend, with multiple short wakeups, on the predecessor device GTA01). A week standby and 6 hours talk, 20 hours mp3 might be attainable when power saving software is complete.&lt;br /&gt;
&lt;br /&gt;
== Make sure your battery never discharges completely. ==&lt;br /&gt;
&lt;br /&gt;
This is an issue because the internal charging circuitry can not be turned on until the FreeRunner has booted, and booting through USB power alone does not work.&lt;br /&gt;
&lt;br /&gt;
=== What to do if your battery has become completely discharged ===&lt;br /&gt;
&lt;br /&gt;
Should the battery become  completely discharged, your options are: &lt;br /&gt;
* Try booting with Wallwart USB-power supply (hold AUX button while inserting USB-plug)&lt;br /&gt;
* Recharge the dead battery with an external stand-alone charger (compatible with the Nokia BL-5C battery) &lt;br /&gt;
* Boot the FreeRunner with either a spare GTA01/GTA02 battery or a compatible battery, then plug in USB power and swap the dead battery into the FreeRunner while it's booted up and running. &lt;br /&gt;
* Boot the FreeRunner with a 4.5VDC external power source (steady hand and great care involved), plug USB power, then insert the empty battery.&lt;br /&gt;
* Charge the battery directly, [http://wiki.openmoko.org/wiki/Charging_battery_directly see here], how I did that. (Not recommended)&lt;br /&gt;
&lt;br /&gt;
The first option is probably the easiest and most sensible.&lt;br /&gt;
&lt;br /&gt;
== Compatible Replacement Batteries ==&lt;br /&gt;
&lt;br /&gt;
Other known FreeRunner-compatible batteries include the BL-series (BL-4X, BL-5X) from Nokia, and their third-party equivalents.&lt;br /&gt;
These may not work to revive a device and may not report charge information.&lt;br /&gt;
It is probably a good idea to check that your battery is not greater than the stock battery's voltage of 3.7V (the above suggests that 4.5VDC should be fine) unless you know what you are doing.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;4&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
!Battery Model&lt;br /&gt;
!Capacity (mAh)&lt;br /&gt;
!Charge info reported&lt;br /&gt;
!Notes&lt;br /&gt;
|-&lt;br /&gt;
|NOKIA BL-4&lt;br /&gt;
|&lt;br /&gt;
|no&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|NOKIA BL-4C&lt;br /&gt;
|750&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|NOKIA BL-5B&lt;br /&gt;
|760/890&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|NOKIA BL-5C&lt;br /&gt;
|950&lt;br /&gt;
|no&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|NOKIA BL-6C&lt;br /&gt;
|1070&lt;br /&gt;
|no&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== USB charger ==&lt;br /&gt;
&lt;br /&gt;
For information about USB battery chargers that can be used with the Neo FreeRunner see&lt;br /&gt;
{{main|USB charger}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Battery]]&lt;br /&gt;
[[Category:Neo FreeRunner Hardware]]&lt;/div&gt;</summary>
		<author><name>Brian H Wilson</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Neo_FreeRunner_Battery</id>
		<title>Neo FreeRunner Battery</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Neo_FreeRunner_Battery"/>
				<updated>2008-09-02T17:55:40Z</updated>
		
		<summary type="html">&lt;p&gt;Brian H Wilson: /* What to do if your battery has become completely discharged */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Neo FreeRunner Menu}}&lt;br /&gt;
=== GTA02 1200 mAh Smart Battery ===&lt;br /&gt;
&lt;br /&gt;
*Using SANYO 1200mAh cell&lt;br /&gt;
*Battery Technical information: [http://people.openmoko.org/tony_tu/GTA02/hardware/GTA02/CT-GTA02.pdf Detailed Battery Information]&lt;br /&gt;
&lt;br /&gt;
* 1200mAh Smart Battery with Coulomb-counter and protection circuit&lt;br /&gt;
* The Smart Battery keeps track of maximum and current capacity for precise prediction of remaining battery power and time until shutdown, based on actual power dissipation.&lt;br /&gt;
&lt;br /&gt;
For more information, see the GTA01 battery info at [[Neo1973 Battery]]&lt;br /&gt;
&lt;br /&gt;
=== Notes about expected battery life ===&lt;br /&gt;
Battery life is a work in progress. The power saving software is in a very rudimentary state. At the moment 12h is about the most (note though a [http://lists.openmoko.org/pipermail/community/2008-July/020339.html recent result of at least 21h], mostly in suspend, with multiple short wakeups, on the predecessor device GTA01). A week standby and 6 hours talk, 20 hours mp3 might be attainable when power saving software is complete.&lt;br /&gt;
&lt;br /&gt;
== Make sure your battery never discharges completely. ==&lt;br /&gt;
&lt;br /&gt;
This is an issue because the internal charging circuitry can not be turned on until the FreeRunner has booted, and booting through USB power alone does not work.&lt;br /&gt;
&lt;br /&gt;
=== What to do if your battery has become completely discharged ===&lt;br /&gt;
&lt;br /&gt;
Should the battery become  completely discharged, your options are: &lt;br /&gt;
* Try booting with Wallwart USB-power supply (hold AUX button while inserting USB-plug)&lt;br /&gt;
* Recharge the dead battery with an external stand-alone charger (compatible with the Nokia BL-5C battery) &lt;br /&gt;
* Boot the FreeRunner with either a spare GTA01 or GTA02 battery or a compatible battery, then plug in USB power and swap the dead battery into the FreeRunner while it's booted up and running. &lt;br /&gt;
* Boot the FreeRunner with a 4.5VDC external power source (steady hand and great care involved), plug USB power, then insert the empty battery.&lt;br /&gt;
* Charge the battery directly, [http://wiki.openmoko.org/wiki/Charging_battery_directly see here], how I did that.&lt;br /&gt;
&lt;br /&gt;
The first option is probably the easiest and most sensible.&lt;br /&gt;
&lt;br /&gt;
== Compatible Replacement Batteries ==&lt;br /&gt;
&lt;br /&gt;
Other known FreeRunner-compatible batteries include the BL-series (BL-4X, BL-5X) from Nokia, and their third-party equivalents.&lt;br /&gt;
These may not work to revive a device and may not report charge information.&lt;br /&gt;
It is probably a good idea to check that your battery is not greater than the stock battery's voltage of 3.7V (the above suggests that 4.5VDC should be fine) unless you know what you are doing.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;4&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
!Battery Model&lt;br /&gt;
!Capacity (mAh)&lt;br /&gt;
!Charge info reported&lt;br /&gt;
!Notes&lt;br /&gt;
|-&lt;br /&gt;
|NOKIA BL-4&lt;br /&gt;
|&lt;br /&gt;
|no&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|NOKIA BL-4C&lt;br /&gt;
|750&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|NOKIA BL-5B&lt;br /&gt;
|760/890&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|NOKIA BL-5C&lt;br /&gt;
|950&lt;br /&gt;
|no&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|NOKIA BL-6C&lt;br /&gt;
|1070&lt;br /&gt;
|no&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== USB charger ==&lt;br /&gt;
&lt;br /&gt;
For information about USB battery chargers that can be used with the Neo FreeRunner see&lt;br /&gt;
{{main|USB charger}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Battery]]&lt;br /&gt;
[[Category:Neo FreeRunner Hardware]]&lt;/div&gt;</summary>
		<author><name>Brian H Wilson</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Neo_FreeRunner_Battery</id>
		<title>Neo FreeRunner Battery</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Neo_FreeRunner_Battery"/>
				<updated>2008-09-02T17:52:04Z</updated>
		
		<summary type="html">&lt;p&gt;Brian H Wilson: /* Compatible Replacement Batteries */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Neo FreeRunner Menu}}&lt;br /&gt;
=== GTA02 1200 mAh Smart Battery ===&lt;br /&gt;
&lt;br /&gt;
*Using SANYO 1200mAh cell&lt;br /&gt;
*Battery Technical information: [http://people.openmoko.org/tony_tu/GTA02/hardware/GTA02/CT-GTA02.pdf Detailed Battery Information]&lt;br /&gt;
&lt;br /&gt;
* 1200mAh Smart Battery with Coulomb-counter and protection circuit&lt;br /&gt;
* The Smart Battery keeps track of maximum and current capacity for precise prediction of remaining battery power and time until shutdown, based on actual power dissipation.&lt;br /&gt;
&lt;br /&gt;
For more information, see the GTA01 battery info at [[Neo1973 Battery]]&lt;br /&gt;
&lt;br /&gt;
=== Notes about expected battery life ===&lt;br /&gt;
Battery life is a work in progress. The power saving software is in a very rudimentary state. At the moment 12h is about the most (note though a [http://lists.openmoko.org/pipermail/community/2008-July/020339.html recent result of at least 21h], mostly in suspend, with multiple short wakeups, on the predecessor device GTA01). A week standby and 6 hours talk, 20 hours mp3 might be attainable when power saving software is complete.&lt;br /&gt;
&lt;br /&gt;
== Make sure your battery never discharges completely. ==&lt;br /&gt;
&lt;br /&gt;
This is an issue because the internal charging circuitry can not be turned on until the FreeRunner has booted, and booting through USB power alone does not work.&lt;br /&gt;
&lt;br /&gt;
=== What to do if your battery has become completely discharged ===&lt;br /&gt;
&lt;br /&gt;
Should the battery become  completely discharged, your options are: &lt;br /&gt;
* Try booting with Wallwart USB-power supply (hold AUX button while inserting USB-plug)&lt;br /&gt;
* Use external stand-alone charger (compatible with the Nokia BL-5C battery) &lt;br /&gt;
* Boot the FreeRunner with an alternative battery, or with a spare GTA01 or GTA02 battery, plug USB power, then switch to the empty battery. &lt;br /&gt;
* Boot the FreeRunner with a 4.5VDC external power source (steady hand and great care involved), plug USB power, then insert the empty battery.&lt;br /&gt;
* Charge the battery directly, [http://wiki.openmoko.org/wiki/Charging_battery_directly see here], how I did that.&lt;br /&gt;
&lt;br /&gt;
== Compatible Replacement Batteries ==&lt;br /&gt;
&lt;br /&gt;
Other known FreeRunner-compatible batteries include the BL-series (BL-4X, BL-5X) from Nokia, and their third-party equivalents.&lt;br /&gt;
These may not work to revive a device and may not report charge information.&lt;br /&gt;
It is probably a good idea to check that your battery is not greater than the stock battery's voltage of 3.7V (the above suggests that 4.5VDC should be fine) unless you know what you are doing.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;4&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
!Battery Model&lt;br /&gt;
!Capacity (mAh)&lt;br /&gt;
!Charge info reported&lt;br /&gt;
!Notes&lt;br /&gt;
|-&lt;br /&gt;
|NOKIA BL-4&lt;br /&gt;
|&lt;br /&gt;
|no&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|NOKIA BL-4C&lt;br /&gt;
|750&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|NOKIA BL-5B&lt;br /&gt;
|760/890&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|NOKIA BL-5C&lt;br /&gt;
|950&lt;br /&gt;
|no&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|NOKIA BL-6C&lt;br /&gt;
|1070&lt;br /&gt;
|no&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== USB charger ==&lt;br /&gt;
&lt;br /&gt;
For information about USB battery chargers that can be used with the Neo FreeRunner see&lt;br /&gt;
{{main|USB charger}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Battery]]&lt;br /&gt;
[[Category:Neo FreeRunner Hardware]]&lt;/div&gt;</summary>
		<author><name>Brian H Wilson</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Neo_FreeRunner_Battery</id>
		<title>Neo FreeRunner Battery</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Neo_FreeRunner_Battery"/>
				<updated>2008-09-02T17:43:05Z</updated>
		
		<summary type="html">&lt;p&gt;Brian H Wilson: /* Notes about expected battery life */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Neo FreeRunner Menu}}&lt;br /&gt;
=== GTA02 1200 mAh Smart Battery ===&lt;br /&gt;
&lt;br /&gt;
*Using SANYO 1200mAh cell&lt;br /&gt;
*Battery Technical information: [http://people.openmoko.org/tony_tu/GTA02/hardware/GTA02/CT-GTA02.pdf Detailed Battery Information]&lt;br /&gt;
&lt;br /&gt;
* 1200mAh Smart Battery with Coulomb-counter and protection circuit&lt;br /&gt;
* The Smart Battery keeps track of maximum and current capacity for precise prediction of remaining battery power and time until shutdown, based on actual power dissipation.&lt;br /&gt;
&lt;br /&gt;
For more information, see the GTA01 battery info at [[Neo1973 Battery]]&lt;br /&gt;
&lt;br /&gt;
=== Notes about expected battery life ===&lt;br /&gt;
Battery life is a work in progress. The power saving software is in a very rudimentary state. At the moment 12h is about the most (note though a [http://lists.openmoko.org/pipermail/community/2008-July/020339.html recent result of at least 21h], mostly in suspend, with multiple short wakeups, on the predecessor device GTA01). A week standby and 6 hours talk, 20 hours mp3 might be attainable when power saving software is complete.&lt;br /&gt;
&lt;br /&gt;
== Make sure your battery never discharges completely. ==&lt;br /&gt;
&lt;br /&gt;
This is an issue because the internal charging circuitry can not be turned on until the FreeRunner has booted, and booting through USB power alone does not work.&lt;br /&gt;
&lt;br /&gt;
=== What to do if your battery has become completely discharged ===&lt;br /&gt;
&lt;br /&gt;
Should the battery become  completely discharged, your options are: &lt;br /&gt;
* Try booting with Wallwart USB-power supply (hold AUX button while inserting USB-plug)&lt;br /&gt;
* Use external stand-alone charger (compatible with the Nokia BL-5C battery) &lt;br /&gt;
* Boot the FreeRunner with an alternative battery, or with a spare GTA01 or GTA02 battery, plug USB power, then switch to the empty battery. &lt;br /&gt;
* Boot the FreeRunner with a 4.5VDC external power source (steady hand and great care involved), plug USB power, then insert the empty battery.&lt;br /&gt;
* Charge the battery directly, [http://wiki.openmoko.org/wiki/Charging_battery_directly see here], how I did that.&lt;br /&gt;
&lt;br /&gt;
=== Compatible Replacement Batteries ===&lt;br /&gt;
&lt;br /&gt;
Other known FreeRunner-compatible batteries include the BL-series (BL-4X, BL-5X) from Nokia, and their third-party equivalents.&lt;br /&gt;
These may not work to revive a device and may not report charge information.&lt;br /&gt;
It is probably a good idea to check that your battery is not greater than the stock battery's voltage of 3.7V (the above suggests that 4.5VDC should be fine) unless you know what you are doing.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;4&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
!Battery Model&lt;br /&gt;
!Capacity (mAh)&lt;br /&gt;
!Charge info reported&lt;br /&gt;
!Notes&lt;br /&gt;
|-&lt;br /&gt;
|NOKIA BL-4&lt;br /&gt;
|&lt;br /&gt;
|no&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|NOKIA BL-4C&lt;br /&gt;
|750&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|NOKIA BL-5B&lt;br /&gt;
|760/890&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|NOKIA BL-5C&lt;br /&gt;
|950&lt;br /&gt;
|no&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|NOKIA BL-6C&lt;br /&gt;
|1070&lt;br /&gt;
|no&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== USB charger ==&lt;br /&gt;
&lt;br /&gt;
For information about USB battery chargers that can be used with the Neo FreeRunner see&lt;br /&gt;
{{main|USB charger}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Battery]]&lt;br /&gt;
[[Category:Neo FreeRunner Hardware]]&lt;/div&gt;</summary>
		<author><name>Brian H Wilson</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Host-based_development_with_Xoo_and_Xephyr</id>
		<title>Host-based development with Xoo and Xephyr</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Host-based_development_with_Xoo_and_Xephyr"/>
				<updated>2008-09-02T15:29:17Z</updated>
		
		<summary type="html">&lt;p&gt;Brian H Wilson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page introduces you to the most efficient way to create new software for the Openmoko platform. Note that there is a VMware image where this environment has been prebuilt for you.&lt;br /&gt;
''Does anyone know where to find this VMWare image??''&lt;br /&gt;
&lt;br /&gt;
==Host-based development==&lt;br /&gt;
&lt;br /&gt;
This term means you develop most of your application in your standard desktop environment until it's almost finished. Then you can use a [[Toolchain]] to cross-compile your application for the Neo1973. Host-based development is incredibly more efficient since you can use your (typically) fast computer, large monitor, ... Compiling for your host also means that your edit-run-debug turnaround cycles are much faster, because you can skip the uploading-to-neo step.&lt;br /&gt;
&lt;br /&gt;
==Xoo and Xephyr==&lt;br /&gt;
[http://projects.o-hand.com/xoo/ Xoo] is a GTK2 based graphical wrapper around a ‘Windowed’ X Server.  The X server is typically '''Xnest''', the nested X server, or [http://projects.o-hand.com/xephyr Xephyr].  It is intended for embedded developers that want to simulate a target device (with an '''accurate''' display size, working hardware buttons, etc) on a desktop machine. &lt;br /&gt;
&lt;br /&gt;
Note that Xoo is not required to simulate Openmoko hardware - it just improves the presentation.&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
&lt;br /&gt;
===Part I (precompiled software)===&lt;br /&gt;
&lt;br /&gt;
You need to install some software that is usually not present on a desktop system, but used on the Neo1973. Some of this software has already been precompiled by your friendly distribution packager, so you don't need to compile it yourself. Most likely you can install the following packages from your distribution repository:&lt;br /&gt;
&lt;br /&gt;
* gtk-doc-tools&lt;br /&gt;
* libstartup-notification0-dev&lt;br /&gt;
* libapm-dev&lt;br /&gt;
* libgpgme11-dev&lt;br /&gt;
* libgtk2.0-dev&lt;br /&gt;
* libebook1.2-dev&lt;br /&gt;
* libecal1.2-dev&lt;br /&gt;
* libnotify-dev&lt;br /&gt;
* libpulse-dev&lt;br /&gt;
* libcurl4-openssl-dev (or libcurl4-gnutls-dev)&lt;br /&gt;
* matchbox-window-manager&lt;br /&gt;
* matchbox-keyboard&lt;br /&gt;
* pulseaudio&lt;br /&gt;
* xephyr ( package is called xserver-xephyr on ubuntu and debian )&lt;br /&gt;
* xoo&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Ubuntu-Specific Packages&lt;br /&gt;
* gnome-common (does this belong above?)&lt;br /&gt;
* ubuntu-mobile-dev (this depends on many other development packages; some are necessary, others optional)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Other Useful Packages&lt;br /&gt;
* libasound2-dev (needed to compile openmoko-dialer2 ([[User:Tomjoad]]))&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Gentoo users run just&lt;br /&gt;
 # emerge &amp;lt;package&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''note'': To get the Xephyr package installed Gentoo users have to rebuild the x11-base/xorg-server package with the &amp;quot;kdrive&amp;quot; use flag enabled ([http://gentoo-wiki.com/Scratchbox#Xephyr_support link])&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Debian/Ubuntu&lt;br /&gt;
 $ sudo apt-get install &amp;lt;package&amp;gt;&lt;br /&gt;
For Fedora, you can use&lt;br /&gt;
 # yum install &amp;lt;package&amp;gt;&lt;br /&gt;
For Mandriva, you may try&lt;br /&gt;
 # urpmi &amp;lt;package&amp;gt;&lt;br /&gt;
&lt;br /&gt;
for any other find a way how to do it in your distro.&lt;br /&gt;
&lt;br /&gt;
===Part II (building from source)===&lt;br /&gt;
&lt;br /&gt;
You also need some software that is typically not found in your distribution repository, either because it's too new, too specific, or unheard of.&lt;br /&gt;
&lt;br /&gt;
Most likely you will need to compile the following packages for your distribution:&lt;br /&gt;
&lt;br /&gt;
* matchbox-panel-2&lt;br /&gt;
* libjana&lt;br /&gt;
* libipkg&lt;br /&gt;
&lt;br /&gt;
To compile and install matchbox-panel-2:&lt;br /&gt;
&lt;br /&gt;
 mkdir -f /local/pkg/ohand&lt;br /&gt;
 cd /local/pkg/ohand&lt;br /&gt;
 svn co http://svn.o-hand.com/repos/matchbox/trunk matchbox&lt;br /&gt;
 cd matchbox/matchbox-panel-2&lt;br /&gt;
 ./autogen.sh&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
To compile and install libjana:&lt;br /&gt;
&lt;br /&gt;
 mkdir -f /local/pkg/ohand&lt;br /&gt;
 cd /local/pkg/ohand&lt;br /&gt;
 svn co http://svn.o-hand.com/repos/jana/trunk jana&lt;br /&gt;
 cd jana&lt;br /&gt;
 ./autogen.sh&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
To compile and install libipkg:&lt;br /&gt;
&lt;br /&gt;
 mkdir -f /local/pkg/handhelds.org&lt;br /&gt;
 cd /local/pkg/handhelds.org&lt;br /&gt;
 wget http://downloads.openmoko.org/sources/ipkg-0.99.163.tar.gz&lt;br /&gt;
 tar xzf ipkg-0.99.163.tar.gz&lt;br /&gt;
 cd ipkg-0.99.163&lt;br /&gt;
 ./configure&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
==Building the Openmoko core==&lt;br /&gt;
&lt;br /&gt;
First we download the Openmoko subversion repository:&lt;br /&gt;
&lt;br /&gt;
  mkdir -f /local/pkg/openmoko&lt;br /&gt;
  cd /local/pkg/openmoko&lt;br /&gt;
  svn co http://svn.openmoko.org/trunk/src src&lt;br /&gt;
&lt;br /&gt;
Then you compile the software contained there, e.g. you will definitely want to compile at least:&lt;br /&gt;
&lt;br /&gt;
In directory src/target/:&lt;br /&gt;
* [http://svnweb.openmoko.org/trunk/src/target/gsm/ gsmd]&lt;br /&gt;
* [http://svnweb.openmoko.org/trunk/src/target/opkg/ opkg]&lt;br /&gt;
&lt;br /&gt;
In directory src/target/OM-2007.2/artwork:&lt;br /&gt;
* [http://svnweb.openmoko.org/trunk/src/target/OM-2007.2/artwork/icons/ icons]&lt;br /&gt;
&lt;br /&gt;
In directory src/target/OM-2007.2/libraries/:&lt;br /&gt;
* [http://svnweb.openmoko.org/trunk/src/target/OM-2007.2/libraries/libmokoui2/ libmokoui2]&lt;br /&gt;
* [http://svnweb.openmoko.org/trunk/src/target/OM-2007.2/libraries/libmokopanelui2/ libmokopanelui2]&lt;br /&gt;
* [http://svnweb.openmoko.org/trunk/src/target/OM-2007.2/libraries/libmokojournal2/ libmokojournal2]&lt;br /&gt;
* [http://svnweb.openmoko.org/trunk/src/target/OM-2007.2/libraries/libmokogsmd2/ libmokogsmd2]&lt;br /&gt;
&lt;br /&gt;
In directory src/target/OM-2007.2/daemons/:&lt;br /&gt;
* [http://svnweb.openmoko.org/trunk/src/target/OM-2007.2/daemons/neod/ neod]&lt;br /&gt;
&lt;br /&gt;
In directory src/target/OM-2007.2/panel-plugins/:&lt;br /&gt;
* [http://svnweb.openmoko.org/trunk/src/target/OM-2007.2/panel-plugins/openmoko-panel-gsm/ openmoko-panel-gsm]&lt;br /&gt;
* [http://svnweb.openmoko.org/trunk/src/target/OM-2007.2/panel-plugins/openmoko-panel-usb/ openmoko-panel-usb]&lt;br /&gt;
* [http://svnweb.openmoko.org/trunk/src/target/OM-2007.2/panel-plugins/openmoko-panel-battery/ openmoko-panel-battery]&lt;br /&gt;
* [http://svnweb.openmoko.org/trunk/src/target/OM-2007.2/panel-plugins/openmoko-panel-gps/ openmoko-panel-gps]&lt;br /&gt;
* [http://svnweb.openmoko.org/trunk/src/target/OM-2007.2/panel-plugins/openmoko-panel-bt/ openmoko-panel-bt]&lt;br /&gt;
&lt;br /&gt;
In directory src/target/OM-2007.2/applications:&lt;br /&gt;
* [http://svnweb.openmoko.org/trunk/src/target/OM-2007.2/applications/openmoko-today2/ openmoko-today2]&lt;br /&gt;
* [http://svnweb.openmoko.org/trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ openmoko-dialer2]&lt;br /&gt;
* [http://svnweb.openmoko.org/trunk/src/target/OM-2007.2/applications/openmoko-calculator2/ openmoko-calculator2]&lt;br /&gt;
* [http://svnweb.openmoko.org/trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/ openmoko-appmanager2]&lt;br /&gt;
&lt;br /&gt;
Each of these packages can be compiled with the well-known-triple of:&lt;br /&gt;
&lt;br /&gt;
 ./configure (or ./autogen.sh, if it's the first time)&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
==Data files==&lt;br /&gt;
&lt;br /&gt;
Some of the data files are not yet installed. We will create links so that Openmoko finds the data files and uses them directly from the svn directories that you have checked out. To create the links:&lt;br /&gt;
&lt;br /&gt;
  cd /usr/local/share/matchbox&lt;br /&gt;
  ln -s /local/pkg/openmoko/src/target/OM-2007.2/misc/openmoko-today2-folders vfolders&lt;br /&gt;
&lt;br /&gt;
  cd /usr/share/themes&lt;br /&gt;
  ln -s /local/pkg/openmoko/src/target/OM-2007.2/artwork/themes/openmoko-standard-2&lt;br /&gt;
&lt;br /&gt;
==Starting the nested Openmoko==&lt;br /&gt;
&lt;br /&gt;
We have prepared a script for you that starts Xoo and all the necessary X clients in one run. The script is online at &lt;br /&gt;
* [http://svnweb.openmoko.org/trunk/src/host/xoo/om-launch om-launch]&lt;br /&gt;
&lt;br /&gt;
==Creating a new application==&lt;br /&gt;
&lt;br /&gt;
{{todo|...}}&lt;br /&gt;
&lt;br /&gt;
==Using a Neo1973 as external GSM modem==&lt;br /&gt;
&lt;br /&gt;
{{todo|...}}&lt;br /&gt;
&lt;br /&gt;
==Using an external GPS device==&lt;br /&gt;
&lt;br /&gt;
{{todo|...}}&lt;br /&gt;
&lt;br /&gt;
{{Languages|Host-based development with Xoo and Xephyr}}&lt;br /&gt;
[[Category:Technical]]&lt;br /&gt;
[[Category:Documentation]]&lt;br /&gt;
[[Category:Emulation]]&lt;/div&gt;</summary>
		<author><name>Brian H Wilson</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Neo_FreeRunner_Battery</id>
		<title>Neo FreeRunner Battery</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Neo_FreeRunner_Battery"/>
				<updated>2008-08-28T15:09:57Z</updated>
		
		<summary type="html">&lt;p&gt;Brian H Wilson: /* Compatible Replacement Batteries */  Corrected BL-6C mah&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Neo FreeRunner Menu}}&lt;br /&gt;
=== GTA02 1200 mAh Smart Battery ===&lt;br /&gt;
&lt;br /&gt;
*Using SANYO 1200mAh cell&lt;br /&gt;
*Battery Technical information: [http://people.openmoko.org/tony_tu/GTA02/hardware/GTA02/CT-GTA02.pdf Detailed Battery Information]&lt;br /&gt;
&lt;br /&gt;
* 1200mAh Smart Battery with Coulomb-counter and protection circuit&lt;br /&gt;
* The Smart Battery keeps track of maximum and current capacity for precise prediction of remaining battery power and time until shutdown, based on actual power dissipation.&lt;br /&gt;
&lt;br /&gt;
For more information, see the GTA01 battery info at [[Neo1973 Battery]]&lt;br /&gt;
&lt;br /&gt;
=== Notes about expected battery life ===&lt;br /&gt;
Battery life is a work in progress. The power saving software is in a very rudimentary state. At the moment 12h is about the most (note though a [http://lists.openmoko.org/pipermail/community/2008-July/020339.html recent result of at least 21h], mostly in suspend, with multiple short wakeups, on the predecessor device GTA01). A week standby and 6 hours talk, 20 hours mp3 might be attainable when power saving software is complete.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 Make sure that the battery never discharges completely. This is an issue because &lt;br /&gt;
 the internal charging circuitry can not be turned on until the FreeRunner has &lt;br /&gt;
 booted, and booting through USB power alone does not work.&lt;br /&gt;
 (If you have the newest kernel images, you should be safe due to a software fix.)&lt;br /&gt;
&lt;br /&gt;
Actually this isn't true for all FreeRunner devices, I got flawless boot on GTA02 DateCode 20080626, when holding AUX while insering USB-plug of Wallwart powersupply.&amp;lt;br&amp;gt;Also I don't see how new kernel image could help on this issue, other than if it stopped DIScharging of battery in time&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Should the battery become  completely discharged, your options are: &lt;br /&gt;
* Try booting with Wallwart USB-powersupply (maybe hold AUX during inserting USB-plug)&lt;br /&gt;
* Use external stand-alone charger (compatible with the Nokia BL-5C battery) &lt;br /&gt;
* Boot the FreeRunner with an alternative battery, or with a spare GTA01 or GTA02 battery, plug USB power, then switch to the empty battery. &lt;br /&gt;
* Boot the FreeRunner with a 4.5VDC external power source (steady hand and great care involved), plug USB power, then insert the empty battery.&lt;br /&gt;
* Charge the battery directly, [http://wiki.openmoko.org/wiki/Charging_battery_directly see here], how I did that.&lt;br /&gt;
&lt;br /&gt;
=== Compatible Replacement Batteries ===&lt;br /&gt;
&lt;br /&gt;
Other known FreeRunner-compatible batteries include the BL-series (BL-4X, BL-5X) from Nokia, and their third-party equivalents.&lt;br /&gt;
These may not work to revive a device and may not report charge information.&lt;br /&gt;
It is probably a good idea to check that your battery is not greater than the stock battery's voltage of 3.7V (the above suggests that 4.5VDC should be fine) unless you know what you are doing.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;4&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
!Battery Model&lt;br /&gt;
!Capacity (mAh)&lt;br /&gt;
!Charge info reported&lt;br /&gt;
!Notes&lt;br /&gt;
|-&lt;br /&gt;
|NOKIA BL-4&lt;br /&gt;
|&lt;br /&gt;
|no&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|NOKIA BL-4C&lt;br /&gt;
|750&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|NOKIA BL-5B&lt;br /&gt;
|760/890&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|NOKIA BL-5C&lt;br /&gt;
|950&lt;br /&gt;
|no&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|NOKIA BL-6C&lt;br /&gt;
|1070&lt;br /&gt;
|no&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== USB charger ==&lt;br /&gt;
&lt;br /&gt;
For information about USB battery chargers that can be used with the Neo FreeRunner see&lt;br /&gt;
{{main|USB charger}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Battery]]&lt;br /&gt;
[[Category:Neo FreeRunner Hardware]]&lt;/div&gt;</summary>
		<author><name>Brian H Wilson</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Neo_FreeRunner_Battery</id>
		<title>Neo FreeRunner Battery</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Neo_FreeRunner_Battery"/>
				<updated>2008-08-28T15:06:15Z</updated>
		
		<summary type="html">&lt;p&gt;Brian H Wilson: /* USB charger */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Neo FreeRunner Menu}}&lt;br /&gt;
=== GTA02 1200 mAh Smart Battery ===&lt;br /&gt;
&lt;br /&gt;
*Using SANYO 1200mAh cell&lt;br /&gt;
*Battery Technical information: [http://people.openmoko.org/tony_tu/GTA02/hardware/GTA02/CT-GTA02.pdf Detailed Battery Information]&lt;br /&gt;
&lt;br /&gt;
* 1200mAh Smart Battery with Coulomb-counter and protection circuit&lt;br /&gt;
* The Smart Battery keeps track of maximum and current capacity for precise prediction of remaining battery power and time until shutdown, based on actual power dissipation.&lt;br /&gt;
&lt;br /&gt;
For more information, see the GTA01 battery info at [[Neo1973 Battery]]&lt;br /&gt;
&lt;br /&gt;
=== Notes about expected battery life ===&lt;br /&gt;
Battery life is a work in progress. The power saving software is in a very rudimentary state. At the moment 12h is about the most (note though a [http://lists.openmoko.org/pipermail/community/2008-July/020339.html recent result of at least 21h], mostly in suspend, with multiple short wakeups, on the predecessor device GTA01). A week standby and 6 hours talk, 20 hours mp3 might be attainable when power saving software is complete.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 Make sure that the battery never discharges completely. This is an issue because &lt;br /&gt;
 the internal charging circuitry can not be turned on until the FreeRunner has &lt;br /&gt;
 booted, and booting through USB power alone does not work.&lt;br /&gt;
 (If you have the newest kernel images, you should be safe due to a software fix.)&lt;br /&gt;
Should the battery become  completely discharged, your options are: &lt;br /&gt;
* Use external stand-alone charger (compatible with the Nokia BL-5C battery) &lt;br /&gt;
* Boot the FreeRunner with an alternative battery, or with a spare GTA01 or GTA02 battery, plug USB power, then switch to the empty battery. &lt;br /&gt;
* Boot the FreeRunner with a 4.5VDC external power source (steady hand and great care involved), plug USB power, then insert the empty battery.&lt;br /&gt;
* Charge the battery directly, [http://wiki.openmoko.org/wiki/Charging_battery_directly see here], how I did that.&lt;br /&gt;
&lt;br /&gt;
=== Compatible Replacement Batteries ===&lt;br /&gt;
&lt;br /&gt;
Other known FreeRunner-compatible batteries include the BL-series (BL-4X, BL-5X) from Nokia, and their third-party equivalents.&lt;br /&gt;
These may not work to revive a device and may not report charge information.&lt;br /&gt;
It is probably a good idea to check that your battery is not greater than the stock battery's voltage of 3.7V (the above suggests that 4.5VDC should be fine) unless you know what you are doing.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;4&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
!Battery Model&lt;br /&gt;
!Capacity (mAh)&lt;br /&gt;
!Charge info reported&lt;br /&gt;
!Notes&lt;br /&gt;
|-&lt;br /&gt;
|NOKIA BL-4&lt;br /&gt;
|&lt;br /&gt;
|no&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|NOKIA BL-4C&lt;br /&gt;
|750&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|NOKIA BL-5B&lt;br /&gt;
|760/890&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|NOKIA BL-5C&lt;br /&gt;
|950&lt;br /&gt;
|no&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|NOKIA BL-6C&lt;br /&gt;
|1200&lt;br /&gt;
|no&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== USB charger ==&lt;br /&gt;
&lt;br /&gt;
For information about USB battery chargers that can be used with the Neo FreeRunner see&lt;br /&gt;
{{main|USB charger}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Battery]]&lt;br /&gt;
[[Category:Neo FreeRunner Hardware]]&lt;/div&gt;</summary>
		<author><name>Brian H Wilson</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Neo_FreeRunner_Battery</id>
		<title>Neo FreeRunner Battery</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Neo_FreeRunner_Battery"/>
				<updated>2008-08-28T14:52:00Z</updated>
		
		<summary type="html">&lt;p&gt;Brian H Wilson: /* USB charger */  Added category battery&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Neo FreeRunner Menu}}&lt;br /&gt;
=== GTA02 1200 mAh Smart Battery ===&lt;br /&gt;
&lt;br /&gt;
*Using SANYO 1200mAh cell&lt;br /&gt;
*Battery Technical information: [http://people.openmoko.org/tony_tu/GTA02/hardware/GTA02/CT-GTA02.pdf Detailed Battery Information]&lt;br /&gt;
&lt;br /&gt;
* 1200mAh Smart Battery with Coulomb-counter and protection circuit&lt;br /&gt;
* The Smart Battery keeps track of maximum and current capacity for precise prediction of remaining battery power and time until shutdown, based on actual power dissipation.&lt;br /&gt;
&lt;br /&gt;
For more information, see the GTA01 battery info at [[Neo1973 Battery]]&lt;br /&gt;
&lt;br /&gt;
=== Notes about expected battery life ===&lt;br /&gt;
Battery life is a work in progress. The power saving software is in a very rudimentary state. At the moment 12h is about the most (note though a [http://lists.openmoko.org/pipermail/community/2008-July/020339.html recent result of at least 21h], mostly in suspend, with multiple short wakeups, on the predecessor device GTA01). A week standby and 6 hours talk, 20 hours mp3 might be attainable when power saving software is complete.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 Make sure that the battery never discharges completely. This is an issue because &lt;br /&gt;
 the internal charging circuitry can not be turned on until the FreeRunner has &lt;br /&gt;
 booted, and booting through USB power alone does not work.&lt;br /&gt;
 (If you have the newest kernel images, you should be safe due to a software fix.)&lt;br /&gt;
Should the battery become  completely discharged, your options are: &lt;br /&gt;
* Use external stand-alone charger (compatible with the Nokia BL-5C battery) &lt;br /&gt;
* Boot the FreeRunner with an alternative battery, or with a spare GTA01 or GTA02 battery, plug USB power, then switch to the empty battery. &lt;br /&gt;
* Boot the FreeRunner with a 4.5VDC external power source (steady hand and great care involved), plug USB power, then insert the empty battery.&lt;br /&gt;
* Charge the battery directly, [http://wiki.openmoko.org/wiki/Charging_battery_directly see here], how I did that.&lt;br /&gt;
&lt;br /&gt;
=== Compatible Replacement Batteries ===&lt;br /&gt;
&lt;br /&gt;
Other known FreeRunner-compatible batteries include the BL-series (BL-4X, BL-5X) from Nokia, and their third-party equivalents.&lt;br /&gt;
These may not work to revive a device and may not report charge information.&lt;br /&gt;
It is probably a good idea to check that your battery is not greater than the stock battery's voltage of 3.7V (the above suggests that 4.5VDC should be fine) unless you know what you are doing.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;4&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
!Battery Model&lt;br /&gt;
!Capacity (mAh)&lt;br /&gt;
!Charge info reported&lt;br /&gt;
!Notes&lt;br /&gt;
|-&lt;br /&gt;
|NOKIA BL-4&lt;br /&gt;
|&lt;br /&gt;
|no&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|NOKIA BL-4C&lt;br /&gt;
|750&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|NOKIA BL-5B&lt;br /&gt;
|760/890&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|NOKIA BL-5C&lt;br /&gt;
|950&lt;br /&gt;
|no&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|NOKIA BL-6C&lt;br /&gt;
|1200&lt;br /&gt;
|no&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== USB charger ==&lt;br /&gt;
{{main|USB charger}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Battery]]&lt;br /&gt;
[[Category:Neo FreeRunner Hardware]]&lt;/div&gt;</summary>
		<author><name>Brian H Wilson</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/GPS_Data_Logger</id>
		<title>GPS Data Logger</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/GPS_Data_Logger"/>
				<updated>2008-08-25T05:26:08Z</updated>
		
		<summary type="html">&lt;p&gt;Brian H Wilson: /* More features */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page was created to address the use cases mentioned in [[GTA02 GPS]], including&lt;br /&gt;
&lt;br /&gt;
* I want to log GPS data for later analysis.&lt;br /&gt;
* I want to collect GPS data for scientific field work (forestry, biology, etc)&lt;br /&gt;
&lt;br /&gt;
The page was started on 17 August 2008 mostly as a thought exercise.&lt;br /&gt;
Please jump in and add to it.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
The typical commercial approach to managing GPS data is to create one big application that does everything well. Unfortunately everyone has a different idea of what &amp;quot;doing everything well&amp;quot; means. One person might want to use GPS to log and analyze bicycle rides while another does weed mapping and another might be doing asset management. One application cannot do all this well.&lt;br /&gt;
&lt;br /&gt;
A better approach is to break it up into a set of components. Each component can be a standalone application. This relies on some kind of multiplexer such as gpsd (does gypsy support multiplexing?) so that each app has access to the GPS data stream.&lt;br /&gt;
&lt;br /&gt;
Initially the main functions could be broken out these components.&lt;br /&gt;
&lt;br /&gt;
# A '''GPS multiplexer''' that talks to the GPS receiver and feeds data to many applications.&lt;br /&gt;
# A '''GPS Controller''' to that can talk to the mulitplexer (and hence the GPS receiver) to display status and adjust settings.&lt;br /&gt;
# A '''Data Logger''' that can run all the time and record GPS data.&lt;br /&gt;
# A '''Field Collection Tool''' that allows doing specific operations such as averaging GPS data while waiting at a point for increased accuracy and entering attributes for a point.&lt;br /&gt;
&lt;br /&gt;
'''Mapping''' We should consider how to support mapping as a part of the field collection tool; it is not strictly necessary but it can be very nice to have it incorporated. Likewise if you are logging a breadcrumb trail it can be very nice to be able to see it on the map. A mapping component will need to be able to update its display with data collected from the logger and the field collection tool.&lt;br /&gt;
&lt;br /&gt;
== Main components ==&lt;br /&gt;
&lt;br /&gt;
=== GPS multiplexer ===&lt;br /&gt;
&lt;br /&gt;
Look at gpsd and gypsy and either use one of them or use them for inspiration. &lt;br /&gt;
See the Gypsy author's take on GPSd here: http://folks.o-hand.com/iain/gypsy/why-not-gpsd.html&lt;br /&gt;
&lt;br /&gt;
So far Gypsy looks pretty good to me.&lt;br /&gt;
&lt;br /&gt;
Maybe the control program should be separated out from the multiplexer.&lt;br /&gt;
&lt;br /&gt;
Partial list of requirements for the multiplexer&lt;br /&gt;
* Control internal GPS receiver&lt;br /&gt;
* Control external GPS connected via serial port (USB or bluetooth)&lt;br /&gt;
* Feed data from the selected GPS receiver to multiple applications.&lt;br /&gt;
* Handle a RTCM stream to allow realtime DGPS postprocessing.&lt;br /&gt;
* Supply all attributes to applications, including such things as bearing, PDOP and satellites in use. (Not just time and position).&lt;br /&gt;
&lt;br /&gt;
Angle / inclination -- it might be possible to use the accelerometers in the smartphone to determine current inclination and calculate percent grade. You'd have to be able to calibrate this: mount the smartphone in a bracket and then read the acceleratometers to set it to 0 when on level ground.&lt;br /&gt;
&lt;br /&gt;
==== External GPS ====&lt;br /&gt;
&lt;br /&gt;
There is no reason we are limited to using the built-in GPS receiver. For applications requiring more accuracy (for example sub-meter), the GPS multiplexer should be able to accept data via USB or bluetooth and feed it to our applications. The controller program should be able to handle this situation.&lt;br /&gt;
&lt;br /&gt;
Bearing - some GPS receivers include an electronic compass that provides azimuth even when not moving. The multiplexer should know if bearing values are valid or not and indicate this. The value should indicate whether it is set for magnetic or true north.&lt;br /&gt;
&lt;br /&gt;
=== Support for postprocessing? ===&lt;br /&gt;
&lt;br /&gt;
Real-time DGPS correction possibilities include receiving an RTCM stream from an external device, receiving RTCM over an IP connection, and WAAS. Does the u-blox receiver support RTCM? Most receivers that support it just accept a stream of data from a serial line. You don't have to reverse engineer it, you just accept data from some source such as a DGPS Beacon Receiver and feed the output to the GPS receiver and you get something approaching 1 meter accuracy.&lt;br /&gt;
&lt;br /&gt;
Postprocessed DGPS correction requires recording pseudorange data and running an application later. In the open source world this means [http://en.wikipedia.org/wiki/RINEX RINEX]. Anyone with more knowledge of RINEX should jump in and edit this section.&lt;br /&gt;
&lt;br /&gt;
=== GPS controller ===&lt;br /&gt;
&lt;br /&gt;
''I think OM gps test program (what's it called) does much of this.''&lt;br /&gt;
&lt;br /&gt;
Some GPS receivers include a feature to stop logging or to issue warnings if data quality goes too low for any reason. Where should this be handled? In the multiplexer or in the applications? Maybe the settings should be applied to the multiplexer and it should issue warnings to the applications which would then decide what to do.&lt;br /&gt;
&lt;br /&gt;
=== Data Logger ===&lt;br /&gt;
&lt;br /&gt;
The basic concept of the logger is to create a bread crumb trail as you move about. &lt;br /&gt;
It has its own preference settings to determine if points are plotted based on change in position or on a time basis or both. &lt;br /&gt;
&lt;br /&gt;
It should also be possible to set what is logged. Possibilities include time, position, bearing, velocity, elevation, pseudo-range data, HDOP, PDOP, satellites used, type of GPS, type of antenna, DGPS on/off, type of DGPS.&lt;br /&gt;
&lt;br /&gt;
==== Speedometer, Pedomater -- Usage of logger by itself ====&lt;br /&gt;
&lt;br /&gt;
The data logger would be one crucial component in an application of GPS for bicyclists (and outdoor enthusiasts such as hikers and runners.) Other requirements would be a good display (to substitute for a speedometer) and a good mapping program. &lt;br /&gt;
&lt;br /&gt;
Should we expand on that on this page? It would be neat to have something that interoperates with the GPS multiplexer and the data logger so maybe we should?&lt;br /&gt;
&lt;br /&gt;
Speedometer functions would include tracking minimums, maximums, averages for speed, distance, and elevation (stopped, moving, combined). Bicyclists (and runners? I am not a runner...) want to know total climb.&lt;br /&gt;
&lt;br /&gt;
''I ride a bicycle and I use GPS as a speedometer and to do field work and I want to be able to do both with my Freerunner.'' [[User:Brian H Wilson|Brian H Wilson]] 19:38, 18 August 2008 (UTC)&lt;br /&gt;
&lt;br /&gt;
=== Field Collection Tool ===&lt;br /&gt;
&lt;br /&gt;
'''Attributes''' Mission planning should include setting up a file to be used for data collection, and that file should define attributes to be included. The data collector should be configurable to facilitate easy entry of the attribute data. For example, if you define a field to have a finite list of values, the values could be available as a drop down list.&lt;br /&gt;
&lt;br /&gt;
'''Point averaging''' Stand in one place and collect points until you are happy. The display should show current PDOP/HDOP and expected accuracy and number of readings used to create tehe point. Preferences should include storing all data used to create the averaged point.&lt;br /&gt;
&lt;br /&gt;
'''Points, lines and polygons.''' You should be able to collect all three. A typical use for polygons is to walk around a space while collecting GPS points to create a polygon showing the location of some physical object such as a wetland.&lt;br /&gt;
&lt;br /&gt;
==== Other related tools ====&lt;br /&gt;
&lt;br /&gt;
Other specialized field collection tools could be used for &lt;br /&gt;
&lt;br /&gt;
* Asset management, example: urban forestry, agriculture, public works&lt;br /&gt;
* Map making, for example to collect data for the Open Street Map project&lt;br /&gt;
* Geocaching&lt;br /&gt;
* ??? Add yours here ???&lt;br /&gt;
&lt;br /&gt;
== Data format and exchange ==&lt;br /&gt;
&lt;br /&gt;
The data should be stored internally in a compact form that is open or at least well documented (for example ESRI Shapefiles). Storing in XML based formats is bulky and should probably be avoided. &lt;br /&gt;
&lt;br /&gt;
There should be a desktop tool to manage transferring the data that has been collected from the smartphone to more portable exchange formats such as GPX and GML and KML. &amp;quot;GPS Office&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Native u-blox format ===&lt;br /&gt;
&lt;br /&gt;
One suggestion is to simply store and process the data in the u-blox binary format.&lt;br /&gt;
This might be a starting point but leaves out the possibility of the software interoperating&lt;br /&gt;
with other receivers or even running on the Neo 1973.&lt;br /&gt;
&lt;br /&gt;
=== RINEX ===&lt;br /&gt;
&lt;br /&gt;
Would RINEX be an appropriate general format for internal storage? No.&lt;br /&gt;
It's an exchange format but it's intended to include data required to perform post-processing.&lt;br /&gt;
It stores direct satellite observations, not things needed for navigation like calculated position.&lt;br /&gt;
&lt;br /&gt;
This guy wrote a program that takes u-blox Antaris 4 data and writes it as RINEX data.&lt;br /&gt;
http://home.comcast.net/~dmilbert/softs/ant2rin.htm&lt;br /&gt;
&lt;br /&gt;
GPX would accommodate everything we need but it's ASCII XML and that means 1/2 the file is just XML formatting. It might be possible to used tokenized GPX to make it more compact.&lt;br /&gt;
&lt;br /&gt;
== More features ==&lt;br /&gt;
&lt;br /&gt;
=== Audio clips ===&lt;br /&gt;
&lt;br /&gt;
It would be useful to be able to capture short audio comments, especially when collecting data for Openstreetmap. This can be easily done by starting recording when AUX is pressed and stopping it when it is released.&lt;br /&gt;
&lt;br /&gt;
=== Laser rangefinder ===&lt;br /&gt;
&lt;br /&gt;
There is another common situtaion where people use a laser rangefinder in conjunction with GPS, to get the location of an object that is not reachable (for example a boat) or a tree trunk (under heavy canopy).&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
&lt;br /&gt;
GPSd http://gpsd.berlios.de/&lt;br /&gt;
&lt;br /&gt;
GPX http://www.topografix.com/gpx.asp http://en.wikipedia.org/wiki/GPX_(data_transfer)&lt;br /&gt;
&lt;br /&gt;
gypsy http://folks.o-hand.com/iain/gypsy/ GPS data multiplexer&lt;br /&gt;
&lt;br /&gt;
RINEX specs ftp://ftp.unibe.ch/aiub/rinex/&lt;br /&gt;
&lt;br /&gt;
u-blox Antaris product page http://www.u-blox.com/products/a4products.html&lt;br /&gt;
&lt;br /&gt;
=== Commercial software ===&lt;br /&gt;
&lt;br /&gt;
ESRI ArcPad http://www.tdsway.com/products/solo_field&lt;br /&gt;
&lt;br /&gt;
TDS Solo Field http://www.tdsway.com/products/solo_field&lt;br /&gt;
&lt;br /&gt;
Trimble Terrasync http://www.trimble.com/terrasync.shtml&lt;br /&gt;
&lt;br /&gt;
== People working on this project ==&lt;br /&gt;
&lt;br /&gt;
[[User:Brian H Wilson]] is blabbing a lot here and wishing he had more time to work on this.&lt;br /&gt;
&lt;br /&gt;
[[Category: GPS]]&lt;/div&gt;</summary>
		<author><name>Brian H Wilson</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/GPS_Data_Logger</id>
		<title>GPS Data Logger</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/GPS_Data_Logger"/>
				<updated>2008-08-24T15:49:55Z</updated>
		
		<summary type="html">&lt;p&gt;Brian H Wilson: /* External links */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page was created to address the use cases mentioned in [[GTA02 GPS]], including&lt;br /&gt;
&lt;br /&gt;
* I want to log GPS data for later analysis.&lt;br /&gt;
* I want to collect GPS data for scientific field work (forestry, biology, etc)&lt;br /&gt;
&lt;br /&gt;
The page was started on 17 August 2008 mostly as a thought exercise.&lt;br /&gt;
Please jump in and add to it.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
The typical commercial approach to managing GPS data is to create one big application that does everything well. Unfortunately everyone has a different idea of what &amp;quot;doing everything well&amp;quot; means. One person might want to use GPS to log and analyze bicycle rides while another does weed mapping and another might be doing asset management. One application cannot do all this well.&lt;br /&gt;
&lt;br /&gt;
A better approach is to break it up into a set of components. Each component can be a standalone application. This relies on some kind of multiplexer such as gpsd (does gypsy support multiplexing?) so that each app has access to the GPS data stream.&lt;br /&gt;
&lt;br /&gt;
Initially the main functions could be broken out these components.&lt;br /&gt;
&lt;br /&gt;
# A '''GPS multiplexer''' that talks to the GPS receiver and feeds data to many applications.&lt;br /&gt;
# A '''GPS Controller''' to that can talk to the mulitplexer (and hence the GPS receiver) to display status and adjust settings.&lt;br /&gt;
# A '''Data Logger''' that can run all the time and record GPS data.&lt;br /&gt;
# A '''Field Collection Tool''' that allows doing specific operations such as averaging GPS data while waiting at a point for increased accuracy and entering attributes for a point.&lt;br /&gt;
&lt;br /&gt;
'''Mapping''' We should consider how to support mapping as a part of the field collection tool; it is not strictly necessary but it can be very nice to have it incorporated. Likewise if you are logging a breadcrumb trail it can be very nice to be able to see it on the map. A mapping component will need to be able to update its display with data collected from the logger and the field collection tool.&lt;br /&gt;
&lt;br /&gt;
== Main components ==&lt;br /&gt;
&lt;br /&gt;
=== GPS multiplexer ===&lt;br /&gt;
&lt;br /&gt;
Look at gpsd and gypsy and either use one of them or use them for inspiration. &lt;br /&gt;
See the Gypsy author's take on GPSd here: http://folks.o-hand.com/iain/gypsy/why-not-gpsd.html&lt;br /&gt;
&lt;br /&gt;
So far Gypsy looks pretty good to me.&lt;br /&gt;
&lt;br /&gt;
Maybe the control program should be separated out from the multiplexer.&lt;br /&gt;
&lt;br /&gt;
Partial list of requirements for the multiplexer&lt;br /&gt;
* Control internal GPS receiver&lt;br /&gt;
* Control external GPS connected via serial port (USB or bluetooth)&lt;br /&gt;
* Feed data from the selected GPS receiver to multiple applications.&lt;br /&gt;
* Handle a RTCM stream to allow realtime DGPS postprocessing.&lt;br /&gt;
* Supply all attributes to applications, including such things as bearing, PDOP and satellites in use. (Not just time and position).&lt;br /&gt;
&lt;br /&gt;
Angle / inclination -- it might be possible to use the accelerometers in the smartphone to determine current inclination and calculate percent grade. You'd have to be able to calibrate this: mount the smartphone in a bracket and then read the acceleratometers to set it to 0 when on level ground.&lt;br /&gt;
&lt;br /&gt;
==== External GPS ====&lt;br /&gt;
&lt;br /&gt;
There is no reason we are limited to using the built-in GPS receiver. For applications requiring more accuracy (for example sub-meter), the GPS multiplexer should be able to accept data via USB or bluetooth and feed it to our applications. The controller program should be able to handle this situation.&lt;br /&gt;
&lt;br /&gt;
Bearing - some GPS receivers include an electronic compass that provides azimuth even when not moving. The multiplexer should know if bearing values are valid or not and indicate this. The value should indicate whether it is set for magnetic or true north.&lt;br /&gt;
&lt;br /&gt;
=== Support for postprocessing? ===&lt;br /&gt;
&lt;br /&gt;
Real-time DGPS correction possibilities include receiving an RTCM stream from an external device, receiving RTCM over an IP connection, and WAAS. Does the u-blox receiver support RTCM? Most receivers that support it just accept a stream of data from a serial line. You don't have to reverse engineer it, you just accept data from some source such as a DGPS Beacon Receiver and feed the output to the GPS receiver and you get something approaching 1 meter accuracy.&lt;br /&gt;
&lt;br /&gt;
Postprocessed DGPS correction requires recording pseudorange data and running an application later. In the open source world this means [http://en.wikipedia.org/wiki/RINEX RINEX]. Anyone with more knowledge of RINEX should jump in and edit this section.&lt;br /&gt;
&lt;br /&gt;
=== GPS controller ===&lt;br /&gt;
&lt;br /&gt;
''I think OM gps test program (what's it called) does much of this.''&lt;br /&gt;
&lt;br /&gt;
Some GPS receivers include a feature to stop logging or to issue warnings if data quality goes too low for any reason. Where should this be handled? In the multiplexer or in the applications? Maybe the settings should be applied to the multiplexer and it should issue warnings to the applications which would then decide what to do.&lt;br /&gt;
&lt;br /&gt;
=== Data Logger ===&lt;br /&gt;
&lt;br /&gt;
The basic concept of the logger is to create a bread crumb trail as you move about. &lt;br /&gt;
It has its own preference settings to determine if points are plotted based on change in position or on a time basis or both. &lt;br /&gt;
&lt;br /&gt;
It should also be possible to set what is logged. Possibilities include time, position, bearing, velocity, elevation, pseudo-range data, HDOP, PDOP, satellites used, type of GPS, type of antenna, DGPS on/off, type of DGPS.&lt;br /&gt;
&lt;br /&gt;
==== Speedometer, Pedomater -- Usage of logger by itself ====&lt;br /&gt;
&lt;br /&gt;
The data logger would be one crucial component in an application of GPS for bicyclists (and outdoor enthusiasts such as hikers and runners.) Other requirements would be a good display (to substitute for a speedometer) and a good mapping program. &lt;br /&gt;
&lt;br /&gt;
Should we expand on that on this page? It would be neat to have something that interoperates with the GPS multiplexer and the data logger so maybe we should?&lt;br /&gt;
&lt;br /&gt;
Speedometer functions would include tracking minimums, maximums, averages for speed, distance, and elevation (stopped, moving, combined). Bicyclists (and runners? I am not a runner...) want to know total climb.&lt;br /&gt;
&lt;br /&gt;
''I ride a bicycle and I use GPS as a speedometer and to do field work and I want to be able to do both with my Freerunner.'' [[User:Brian H Wilson|Brian H Wilson]] 19:38, 18 August 2008 (UTC)&lt;br /&gt;
&lt;br /&gt;
=== Field Collection Tool ===&lt;br /&gt;
&lt;br /&gt;
'''Attributes''' Mission planning should include setting up a file to be used for data collection, and that file should define attributes to be included. The data collector should be configurable to facilitate easy entry of the attribute data. For example, if you define a field to have a finite list of values, the values could be available as a drop down list.&lt;br /&gt;
&lt;br /&gt;
'''Point averaging''' Stand in one place and collect points until you are happy. The display should show current PDOP/HDOP and expected accuracy and number of readings used to create tehe point. Preferences should include storing all data used to create the averaged point.&lt;br /&gt;
&lt;br /&gt;
'''Points, lines and polygons.''' You should be able to collect all three. A typical use for polygons is to walk around a space while collecting GPS points to create a polygon showing the location of some physical object such as a wetland.&lt;br /&gt;
&lt;br /&gt;
==== Other related tools ====&lt;br /&gt;
&lt;br /&gt;
Other specialized field collection tools could be used for &lt;br /&gt;
&lt;br /&gt;
* Asset management, example: urban forestry, agriculture, public works&lt;br /&gt;
* Map making, for example to collect data for the Open Street Map project&lt;br /&gt;
* Geocaching&lt;br /&gt;
* ??? Add yours here ???&lt;br /&gt;
&lt;br /&gt;
== Data format and exchange ==&lt;br /&gt;
&lt;br /&gt;
The data should be stored internally in a compact form that is open or at least well documented (for example ESRI Shapefiles). Storing in XML based formats is bulky and should probably be avoided. &lt;br /&gt;
&lt;br /&gt;
There should be a desktop tool to manage transferring the data that has been collected from the smartphone to more portable exchange formats such as GPX and GML and KML. &amp;quot;GPS Office&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Native u-blox format ===&lt;br /&gt;
&lt;br /&gt;
One suggestion is to simply store and process the data in the u-blox binary format.&lt;br /&gt;
This might be a starting point but leaves out the possibility of the software interoperating&lt;br /&gt;
with other receivers or even running on the Neo 1973.&lt;br /&gt;
&lt;br /&gt;
=== RINEX ===&lt;br /&gt;
&lt;br /&gt;
Would RINEX be an appropriate general format for internal storage? No.&lt;br /&gt;
It's an exchange format but it's intended to include data required to perform post-processing.&lt;br /&gt;
It stores direct satellite observations, not things needed for navigation like calculated position.&lt;br /&gt;
&lt;br /&gt;
This guy wrote a program that takes u-blox Antaris 4 data and writes it as RINEX data.&lt;br /&gt;
http://home.comcast.net/~dmilbert/softs/ant2rin.htm&lt;br /&gt;
&lt;br /&gt;
GPX would accommodate everything we need but it's ASCII XML and that means 1/2 the file is just XML formatting. It might be possible to used tokenized GPX to make it more compact.&lt;br /&gt;
&lt;br /&gt;
== More features ==&lt;br /&gt;
&lt;br /&gt;
All I can think of at the moment is rangefinders. I am sure there are others.&lt;br /&gt;
&lt;br /&gt;
=== Laser rangefinder ===&lt;br /&gt;
&lt;br /&gt;
There is another common situtaion where people use a laser rangefinder in conjunction with GPS, to get the location of an object that is not reachable (for example a boat) or a tree trunk (under heavy canopy).&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
&lt;br /&gt;
GPSd http://gpsd.berlios.de/&lt;br /&gt;
&lt;br /&gt;
GPX http://www.topografix.com/gpx.asp http://en.wikipedia.org/wiki/GPX_(data_transfer)&lt;br /&gt;
&lt;br /&gt;
gypsy http://folks.o-hand.com/iain/gypsy/ GPS data multiplexer&lt;br /&gt;
&lt;br /&gt;
RINEX specs ftp://ftp.unibe.ch/aiub/rinex/&lt;br /&gt;
&lt;br /&gt;
u-blox Antaris product page http://www.u-blox.com/products/a4products.html&lt;br /&gt;
&lt;br /&gt;
=== Commercial software ===&lt;br /&gt;
&lt;br /&gt;
ESRI ArcPad http://www.tdsway.com/products/solo_field&lt;br /&gt;
&lt;br /&gt;
TDS Solo Field http://www.tdsway.com/products/solo_field&lt;br /&gt;
&lt;br /&gt;
Trimble Terrasync http://www.trimble.com/terrasync.shtml&lt;br /&gt;
&lt;br /&gt;
== People working on this project ==&lt;br /&gt;
&lt;br /&gt;
[[User:Brian H Wilson]] is blabbing a lot here and wishing he had more time to work on this.&lt;br /&gt;
&lt;br /&gt;
[[Category: GPS]]&lt;/div&gt;</summary>
		<author><name>Brian H Wilson</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/GPS_Data_Logger</id>
		<title>GPS Data Logger</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/GPS_Data_Logger"/>
				<updated>2008-08-24T15:48:58Z</updated>
		
		<summary type="html">&lt;p&gt;Brian H Wilson: /* Data format and exchange */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page was created to address the use cases mentioned in [[GTA02 GPS]], including&lt;br /&gt;
&lt;br /&gt;
* I want to log GPS data for later analysis.&lt;br /&gt;
* I want to collect GPS data for scientific field work (forestry, biology, etc)&lt;br /&gt;
&lt;br /&gt;
The page was started on 17 August 2008 mostly as a thought exercise.&lt;br /&gt;
Please jump in and add to it.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
The typical commercial approach to managing GPS data is to create one big application that does everything well. Unfortunately everyone has a different idea of what &amp;quot;doing everything well&amp;quot; means. One person might want to use GPS to log and analyze bicycle rides while another does weed mapping and another might be doing asset management. One application cannot do all this well.&lt;br /&gt;
&lt;br /&gt;
A better approach is to break it up into a set of components. Each component can be a standalone application. This relies on some kind of multiplexer such as gpsd (does gypsy support multiplexing?) so that each app has access to the GPS data stream.&lt;br /&gt;
&lt;br /&gt;
Initially the main functions could be broken out these components.&lt;br /&gt;
&lt;br /&gt;
# A '''GPS multiplexer''' that talks to the GPS receiver and feeds data to many applications.&lt;br /&gt;
# A '''GPS Controller''' to that can talk to the mulitplexer (and hence the GPS receiver) to display status and adjust settings.&lt;br /&gt;
# A '''Data Logger''' that can run all the time and record GPS data.&lt;br /&gt;
# A '''Field Collection Tool''' that allows doing specific operations such as averaging GPS data while waiting at a point for increased accuracy and entering attributes for a point.&lt;br /&gt;
&lt;br /&gt;
'''Mapping''' We should consider how to support mapping as a part of the field collection tool; it is not strictly necessary but it can be very nice to have it incorporated. Likewise if you are logging a breadcrumb trail it can be very nice to be able to see it on the map. A mapping component will need to be able to update its display with data collected from the logger and the field collection tool.&lt;br /&gt;
&lt;br /&gt;
== Main components ==&lt;br /&gt;
&lt;br /&gt;
=== GPS multiplexer ===&lt;br /&gt;
&lt;br /&gt;
Look at gpsd and gypsy and either use one of them or use them for inspiration. &lt;br /&gt;
See the Gypsy author's take on GPSd here: http://folks.o-hand.com/iain/gypsy/why-not-gpsd.html&lt;br /&gt;
&lt;br /&gt;
So far Gypsy looks pretty good to me.&lt;br /&gt;
&lt;br /&gt;
Maybe the control program should be separated out from the multiplexer.&lt;br /&gt;
&lt;br /&gt;
Partial list of requirements for the multiplexer&lt;br /&gt;
* Control internal GPS receiver&lt;br /&gt;
* Control external GPS connected via serial port (USB or bluetooth)&lt;br /&gt;
* Feed data from the selected GPS receiver to multiple applications.&lt;br /&gt;
* Handle a RTCM stream to allow realtime DGPS postprocessing.&lt;br /&gt;
* Supply all attributes to applications, including such things as bearing, PDOP and satellites in use. (Not just time and position).&lt;br /&gt;
&lt;br /&gt;
Angle / inclination -- it might be possible to use the accelerometers in the smartphone to determine current inclination and calculate percent grade. You'd have to be able to calibrate this: mount the smartphone in a bracket and then read the acceleratometers to set it to 0 when on level ground.&lt;br /&gt;
&lt;br /&gt;
==== External GPS ====&lt;br /&gt;
&lt;br /&gt;
There is no reason we are limited to using the built-in GPS receiver. For applications requiring more accuracy (for example sub-meter), the GPS multiplexer should be able to accept data via USB or bluetooth and feed it to our applications. The controller program should be able to handle this situation.&lt;br /&gt;
&lt;br /&gt;
Bearing - some GPS receivers include an electronic compass that provides azimuth even when not moving. The multiplexer should know if bearing values are valid or not and indicate this. The value should indicate whether it is set for magnetic or true north.&lt;br /&gt;
&lt;br /&gt;
=== Support for postprocessing? ===&lt;br /&gt;
&lt;br /&gt;
Real-time DGPS correction possibilities include receiving an RTCM stream from an external device, receiving RTCM over an IP connection, and WAAS. Does the u-blox receiver support RTCM? Most receivers that support it just accept a stream of data from a serial line. You don't have to reverse engineer it, you just accept data from some source such as a DGPS Beacon Receiver and feed the output to the GPS receiver and you get something approaching 1 meter accuracy.&lt;br /&gt;
&lt;br /&gt;
Postprocessed DGPS correction requires recording pseudorange data and running an application later. In the open source world this means [http://en.wikipedia.org/wiki/RINEX RINEX]. Anyone with more knowledge of RINEX should jump in and edit this section.&lt;br /&gt;
&lt;br /&gt;
=== GPS controller ===&lt;br /&gt;
&lt;br /&gt;
''I think OM gps test program (what's it called) does much of this.''&lt;br /&gt;
&lt;br /&gt;
Some GPS receivers include a feature to stop logging or to issue warnings if data quality goes too low for any reason. Where should this be handled? In the multiplexer or in the applications? Maybe the settings should be applied to the multiplexer and it should issue warnings to the applications which would then decide what to do.&lt;br /&gt;
&lt;br /&gt;
=== Data Logger ===&lt;br /&gt;
&lt;br /&gt;
The basic concept of the logger is to create a bread crumb trail as you move about. &lt;br /&gt;
It has its own preference settings to determine if points are plotted based on change in position or on a time basis or both. &lt;br /&gt;
&lt;br /&gt;
It should also be possible to set what is logged. Possibilities include time, position, bearing, velocity, elevation, pseudo-range data, HDOP, PDOP, satellites used, type of GPS, type of antenna, DGPS on/off, type of DGPS.&lt;br /&gt;
&lt;br /&gt;
==== Speedometer, Pedomater -- Usage of logger by itself ====&lt;br /&gt;
&lt;br /&gt;
The data logger would be one crucial component in an application of GPS for bicyclists (and outdoor enthusiasts such as hikers and runners.) Other requirements would be a good display (to substitute for a speedometer) and a good mapping program. &lt;br /&gt;
&lt;br /&gt;
Should we expand on that on this page? It would be neat to have something that interoperates with the GPS multiplexer and the data logger so maybe we should?&lt;br /&gt;
&lt;br /&gt;
Speedometer functions would include tracking minimums, maximums, averages for speed, distance, and elevation (stopped, moving, combined). Bicyclists (and runners? I am not a runner...) want to know total climb.&lt;br /&gt;
&lt;br /&gt;
''I ride a bicycle and I use GPS as a speedometer and to do field work and I want to be able to do both with my Freerunner.'' [[User:Brian H Wilson|Brian H Wilson]] 19:38, 18 August 2008 (UTC)&lt;br /&gt;
&lt;br /&gt;
=== Field Collection Tool ===&lt;br /&gt;
&lt;br /&gt;
'''Attributes''' Mission planning should include setting up a file to be used for data collection, and that file should define attributes to be included. The data collector should be configurable to facilitate easy entry of the attribute data. For example, if you define a field to have a finite list of values, the values could be available as a drop down list.&lt;br /&gt;
&lt;br /&gt;
'''Point averaging''' Stand in one place and collect points until you are happy. The display should show current PDOP/HDOP and expected accuracy and number of readings used to create tehe point. Preferences should include storing all data used to create the averaged point.&lt;br /&gt;
&lt;br /&gt;
'''Points, lines and polygons.''' You should be able to collect all three. A typical use for polygons is to walk around a space while collecting GPS points to create a polygon showing the location of some physical object such as a wetland.&lt;br /&gt;
&lt;br /&gt;
==== Other related tools ====&lt;br /&gt;
&lt;br /&gt;
Other specialized field collection tools could be used for &lt;br /&gt;
&lt;br /&gt;
* Asset management, example: urban forestry, agriculture, public works&lt;br /&gt;
* Map making, for example to collect data for the Open Street Map project&lt;br /&gt;
* Geocaching&lt;br /&gt;
* ??? Add yours here ???&lt;br /&gt;
&lt;br /&gt;
== Data format and exchange ==&lt;br /&gt;
&lt;br /&gt;
The data should be stored internally in a compact form that is open or at least well documented (for example ESRI Shapefiles). Storing in XML based formats is bulky and should probably be avoided. &lt;br /&gt;
&lt;br /&gt;
There should be a desktop tool to manage transferring the data that has been collected from the smartphone to more portable exchange formats such as GPX and GML and KML. &amp;quot;GPS Office&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Native u-blox format ===&lt;br /&gt;
&lt;br /&gt;
One suggestion is to simply store and process the data in the u-blox binary format.&lt;br /&gt;
This might be a starting point but leaves out the possibility of the software interoperating&lt;br /&gt;
with other receivers or even running on the Neo 1973.&lt;br /&gt;
&lt;br /&gt;
=== RINEX ===&lt;br /&gt;
&lt;br /&gt;
Would RINEX be an appropriate general format for internal storage? No.&lt;br /&gt;
It's an exchange format but it's intended to include data required to perform post-processing.&lt;br /&gt;
It stores direct satellite observations, not things needed for navigation like calculated position.&lt;br /&gt;
&lt;br /&gt;
This guy wrote a program that takes u-blox Antaris 4 data and writes it as RINEX data.&lt;br /&gt;
http://home.comcast.net/~dmilbert/softs/ant2rin.htm&lt;br /&gt;
&lt;br /&gt;
GPX would accommodate everything we need but it's ASCII XML and that means 1/2 the file is just XML formatting. It might be possible to used tokenized GPX to make it more compact.&lt;br /&gt;
&lt;br /&gt;
== More features ==&lt;br /&gt;
&lt;br /&gt;
All I can think of at the moment is rangefinders. I am sure there are others.&lt;br /&gt;
&lt;br /&gt;
=== Laser rangefinder ===&lt;br /&gt;
&lt;br /&gt;
There is another common situtaion where people use a laser rangefinder in conjunction with GPS, to get the location of an object that is not reachable (for example a boat) or a tree trunk (under heavy canopy).&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
&lt;br /&gt;
GPSd http://gpsd.berlios.de/&lt;br /&gt;
&lt;br /&gt;
GPX http://www.topografix.com/gpx.asp http://en.wikipedia.org/wiki/GPX_(data_transfer)&lt;br /&gt;
&lt;br /&gt;
gypsy http://folks.o-hand.com/iain/gypsy/ GPS data multiplexer&lt;br /&gt;
&lt;br /&gt;
RINEX specs ftp://ftp.unibe.ch/aiub/rinex/&lt;br /&gt;
&lt;br /&gt;
=== Commercial software ===&lt;br /&gt;
&lt;br /&gt;
ESRI ArcPad http://www.tdsway.com/products/solo_field&lt;br /&gt;
&lt;br /&gt;
TDS Solo Field http://www.tdsway.com/products/solo_field&lt;br /&gt;
&lt;br /&gt;
Trimble Terrasync http://www.trimble.com/terrasync.shtml&lt;br /&gt;
&lt;br /&gt;
== People working on this project ==&lt;br /&gt;
&lt;br /&gt;
[[User:Brian H Wilson]] is blabbing a lot here and wishing he had more time to work on this.&lt;br /&gt;
&lt;br /&gt;
[[Category: GPS]]&lt;/div&gt;</summary>
		<author><name>Brian H Wilson</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/GPS_Data_Logger</id>
		<title>GPS Data Logger</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/GPS_Data_Logger"/>
				<updated>2008-08-24T15:46:25Z</updated>
		
		<summary type="html">&lt;p&gt;Brian H Wilson: /* RINEX */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page was created to address the use cases mentioned in [[GTA02 GPS]], including&lt;br /&gt;
&lt;br /&gt;
* I want to log GPS data for later analysis.&lt;br /&gt;
* I want to collect GPS data for scientific field work (forestry, biology, etc)&lt;br /&gt;
&lt;br /&gt;
The page was started on 17 August 2008 mostly as a thought exercise.&lt;br /&gt;
Please jump in and add to it.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
The typical commercial approach to managing GPS data is to create one big application that does everything well. Unfortunately everyone has a different idea of what &amp;quot;doing everything well&amp;quot; means. One person might want to use GPS to log and analyze bicycle rides while another does weed mapping and another might be doing asset management. One application cannot do all this well.&lt;br /&gt;
&lt;br /&gt;
A better approach is to break it up into a set of components. Each component can be a standalone application. This relies on some kind of multiplexer such as gpsd (does gypsy support multiplexing?) so that each app has access to the GPS data stream.&lt;br /&gt;
&lt;br /&gt;
Initially the main functions could be broken out these components.&lt;br /&gt;
&lt;br /&gt;
# A '''GPS multiplexer''' that talks to the GPS receiver and feeds data to many applications.&lt;br /&gt;
# A '''GPS Controller''' to that can talk to the mulitplexer (and hence the GPS receiver) to display status and adjust settings.&lt;br /&gt;
# A '''Data Logger''' that can run all the time and record GPS data.&lt;br /&gt;
# A '''Field Collection Tool''' that allows doing specific operations such as averaging GPS data while waiting at a point for increased accuracy and entering attributes for a point.&lt;br /&gt;
&lt;br /&gt;
'''Mapping''' We should consider how to support mapping as a part of the field collection tool; it is not strictly necessary but it can be very nice to have it incorporated. Likewise if you are logging a breadcrumb trail it can be very nice to be able to see it on the map. A mapping component will need to be able to update its display with data collected from the logger and the field collection tool.&lt;br /&gt;
&lt;br /&gt;
== Main components ==&lt;br /&gt;
&lt;br /&gt;
=== GPS multiplexer ===&lt;br /&gt;
&lt;br /&gt;
Look at gpsd and gypsy and either use one of them or use them for inspiration. &lt;br /&gt;
See the Gypsy author's take on GPSd here: http://folks.o-hand.com/iain/gypsy/why-not-gpsd.html&lt;br /&gt;
&lt;br /&gt;
So far Gypsy looks pretty good to me.&lt;br /&gt;
&lt;br /&gt;
Maybe the control program should be separated out from the multiplexer.&lt;br /&gt;
&lt;br /&gt;
Partial list of requirements for the multiplexer&lt;br /&gt;
* Control internal GPS receiver&lt;br /&gt;
* Control external GPS connected via serial port (USB or bluetooth)&lt;br /&gt;
* Feed data from the selected GPS receiver to multiple applications.&lt;br /&gt;
* Handle a RTCM stream to allow realtime DGPS postprocessing.&lt;br /&gt;
* Supply all attributes to applications, including such things as bearing, PDOP and satellites in use. (Not just time and position).&lt;br /&gt;
&lt;br /&gt;
Angle / inclination -- it might be possible to use the accelerometers in the smartphone to determine current inclination and calculate percent grade. You'd have to be able to calibrate this: mount the smartphone in a bracket and then read the acceleratometers to set it to 0 when on level ground.&lt;br /&gt;
&lt;br /&gt;
==== External GPS ====&lt;br /&gt;
&lt;br /&gt;
There is no reason we are limited to using the built-in GPS receiver. For applications requiring more accuracy (for example sub-meter), the GPS multiplexer should be able to accept data via USB or bluetooth and feed it to our applications. The controller program should be able to handle this situation.&lt;br /&gt;
&lt;br /&gt;
Bearing - some GPS receivers include an electronic compass that provides azimuth even when not moving. The multiplexer should know if bearing values are valid or not and indicate this. The value should indicate whether it is set for magnetic or true north.&lt;br /&gt;
&lt;br /&gt;
=== Support for postprocessing? ===&lt;br /&gt;
&lt;br /&gt;
Real-time DGPS correction possibilities include receiving an RTCM stream from an external device, receiving RTCM over an IP connection, and WAAS. Does the u-blox receiver support RTCM? Most receivers that support it just accept a stream of data from a serial line. You don't have to reverse engineer it, you just accept data from some source such as a DGPS Beacon Receiver and feed the output to the GPS receiver and you get something approaching 1 meter accuracy.&lt;br /&gt;
&lt;br /&gt;
Postprocessed DGPS correction requires recording pseudorange data and running an application later. In the open source world this means [http://en.wikipedia.org/wiki/RINEX RINEX]. Anyone with more knowledge of RINEX should jump in and edit this section.&lt;br /&gt;
&lt;br /&gt;
=== GPS controller ===&lt;br /&gt;
&lt;br /&gt;
''I think OM gps test program (what's it called) does much of this.''&lt;br /&gt;
&lt;br /&gt;
Some GPS receivers include a feature to stop logging or to issue warnings if data quality goes too low for any reason. Where should this be handled? In the multiplexer or in the applications? Maybe the settings should be applied to the multiplexer and it should issue warnings to the applications which would then decide what to do.&lt;br /&gt;
&lt;br /&gt;
=== Data Logger ===&lt;br /&gt;
&lt;br /&gt;
The basic concept of the logger is to create a bread crumb trail as you move about. &lt;br /&gt;
It has its own preference settings to determine if points are plotted based on change in position or on a time basis or both. &lt;br /&gt;
&lt;br /&gt;
It should also be possible to set what is logged. Possibilities include time, position, bearing, velocity, elevation, pseudo-range data, HDOP, PDOP, satellites used, type of GPS, type of antenna, DGPS on/off, type of DGPS.&lt;br /&gt;
&lt;br /&gt;
==== Speedometer, Pedomater -- Usage of logger by itself ====&lt;br /&gt;
&lt;br /&gt;
The data logger would be one crucial component in an application of GPS for bicyclists (and outdoor enthusiasts such as hikers and runners.) Other requirements would be a good display (to substitute for a speedometer) and a good mapping program. &lt;br /&gt;
&lt;br /&gt;
Should we expand on that on this page? It would be neat to have something that interoperates with the GPS multiplexer and the data logger so maybe we should?&lt;br /&gt;
&lt;br /&gt;
Speedometer functions would include tracking minimums, maximums, averages for speed, distance, and elevation (stopped, moving, combined). Bicyclists (and runners? I am not a runner...) want to know total climb.&lt;br /&gt;
&lt;br /&gt;
''I ride a bicycle and I use GPS as a speedometer and to do field work and I want to be able to do both with my Freerunner.'' [[User:Brian H Wilson|Brian H Wilson]] 19:38, 18 August 2008 (UTC)&lt;br /&gt;
&lt;br /&gt;
=== Field Collection Tool ===&lt;br /&gt;
&lt;br /&gt;
'''Attributes''' Mission planning should include setting up a file to be used for data collection, and that file should define attributes to be included. The data collector should be configurable to facilitate easy entry of the attribute data. For example, if you define a field to have a finite list of values, the values could be available as a drop down list.&lt;br /&gt;
&lt;br /&gt;
'''Point averaging''' Stand in one place and collect points until you are happy. The display should show current PDOP/HDOP and expected accuracy and number of readings used to create tehe point. Preferences should include storing all data used to create the averaged point.&lt;br /&gt;
&lt;br /&gt;
'''Points, lines and polygons.''' You should be able to collect all three. A typical use for polygons is to walk around a space while collecting GPS points to create a polygon showing the location of some physical object such as a wetland.&lt;br /&gt;
&lt;br /&gt;
==== Other related tools ====&lt;br /&gt;
&lt;br /&gt;
Other specialized field collection tools could be used for &lt;br /&gt;
&lt;br /&gt;
* Asset management, example: urban forestry, agriculture, public works&lt;br /&gt;
* Map making, for example to collect data for the Open Street Map project&lt;br /&gt;
* Geocaching&lt;br /&gt;
* ??? Add yours here ???&lt;br /&gt;
&lt;br /&gt;
== Data format and exchange ==&lt;br /&gt;
&lt;br /&gt;
The data should be stored internally in a compact form that is open or at least well documented (for example ESRI Shapefiles). Storing in XML based formats is bulky and should probably be avoided. &lt;br /&gt;
&lt;br /&gt;
There should be a desktop tool to manage transferring the data that has been collected from the smartphone to more portable exchange formats such as GPX and GML and KML. &amp;quot;GPS Office&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== RINEX ===&lt;br /&gt;
&lt;br /&gt;
Would RINEX be an appropriate general format for internal storage? No.&lt;br /&gt;
It's an exchange format but it's intended to include data required to perform post-processing.&lt;br /&gt;
It stores direct satellite observations, not things needed for navigation like calculated position.&lt;br /&gt;
&lt;br /&gt;
This guy wrote a program that takes u-blox Antaris 4 data and writes it as RINEX data.&lt;br /&gt;
http://home.comcast.net/~dmilbert/softs/ant2rin.htm&lt;br /&gt;
&lt;br /&gt;
GPX would accommodate everything we need but it's ASCII XML and that means 1/2 the file is just XML formatting. It might be possible to used tokenized GPX to make it more compact.&lt;br /&gt;
&lt;br /&gt;
== More features ==&lt;br /&gt;
&lt;br /&gt;
All I can think of at the moment is rangefinders. I am sure there are others.&lt;br /&gt;
&lt;br /&gt;
=== Laser rangefinder ===&lt;br /&gt;
&lt;br /&gt;
There is another common situtaion where people use a laser rangefinder in conjunction with GPS, to get the location of an object that is not reachable (for example a boat) or a tree trunk (under heavy canopy).&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
&lt;br /&gt;
GPSd http://gpsd.berlios.de/&lt;br /&gt;
&lt;br /&gt;
GPX http://www.topografix.com/gpx.asp http://en.wikipedia.org/wiki/GPX_(data_transfer)&lt;br /&gt;
&lt;br /&gt;
gypsy http://folks.o-hand.com/iain/gypsy/ GPS data multiplexer&lt;br /&gt;
&lt;br /&gt;
RINEX specs ftp://ftp.unibe.ch/aiub/rinex/&lt;br /&gt;
&lt;br /&gt;
=== Commercial software ===&lt;br /&gt;
&lt;br /&gt;
ESRI ArcPad http://www.tdsway.com/products/solo_field&lt;br /&gt;
&lt;br /&gt;
TDS Solo Field http://www.tdsway.com/products/solo_field&lt;br /&gt;
&lt;br /&gt;
Trimble Terrasync http://www.trimble.com/terrasync.shtml&lt;br /&gt;
&lt;br /&gt;
== People working on this project ==&lt;br /&gt;
&lt;br /&gt;
[[User:Brian H Wilson]] is blabbing a lot here and wishing he had more time to work on this.&lt;br /&gt;
&lt;br /&gt;
[[Category: GPS]]&lt;/div&gt;</summary>
		<author><name>Brian H Wilson</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/GPS_Data_Logger</id>
		<title>GPS Data Logger</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/GPS_Data_Logger"/>
				<updated>2008-08-24T15:38:47Z</updated>
		
		<summary type="html">&lt;p&gt;Brian H Wilson: /* Support for postprocessing? */  spelling fix&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page was created to address the use cases mentioned in [[GTA02 GPS]], including&lt;br /&gt;
&lt;br /&gt;
* I want to log GPS data for later analysis.&lt;br /&gt;
* I want to collect GPS data for scientific field work (forestry, biology, etc)&lt;br /&gt;
&lt;br /&gt;
The page was started on 17 August 2008 mostly as a thought exercise.&lt;br /&gt;
Please jump in and add to it.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
The typical commercial approach to managing GPS data is to create one big application that does everything well. Unfortunately everyone has a different idea of what &amp;quot;doing everything well&amp;quot; means. One person might want to use GPS to log and analyze bicycle rides while another does weed mapping and another might be doing asset management. One application cannot do all this well.&lt;br /&gt;
&lt;br /&gt;
A better approach is to break it up into a set of components. Each component can be a standalone application. This relies on some kind of multiplexer such as gpsd (does gypsy support multiplexing?) so that each app has access to the GPS data stream.&lt;br /&gt;
&lt;br /&gt;
Initially the main functions could be broken out these components.&lt;br /&gt;
&lt;br /&gt;
# A '''GPS multiplexer''' that talks to the GPS receiver and feeds data to many applications.&lt;br /&gt;
# A '''GPS Controller''' to that can talk to the mulitplexer (and hence the GPS receiver) to display status and adjust settings.&lt;br /&gt;
# A '''Data Logger''' that can run all the time and record GPS data.&lt;br /&gt;
# A '''Field Collection Tool''' that allows doing specific operations such as averaging GPS data while waiting at a point for increased accuracy and entering attributes for a point.&lt;br /&gt;
&lt;br /&gt;
'''Mapping''' We should consider how to support mapping as a part of the field collection tool; it is not strictly necessary but it can be very nice to have it incorporated. Likewise if you are logging a breadcrumb trail it can be very nice to be able to see it on the map. A mapping component will need to be able to update its display with data collected from the logger and the field collection tool.&lt;br /&gt;
&lt;br /&gt;
== Main components ==&lt;br /&gt;
&lt;br /&gt;
=== GPS multiplexer ===&lt;br /&gt;
&lt;br /&gt;
Look at gpsd and gypsy and either use one of them or use them for inspiration. &lt;br /&gt;
See the Gypsy author's take on GPSd here: http://folks.o-hand.com/iain/gypsy/why-not-gpsd.html&lt;br /&gt;
&lt;br /&gt;
So far Gypsy looks pretty good to me.&lt;br /&gt;
&lt;br /&gt;
Maybe the control program should be separated out from the multiplexer.&lt;br /&gt;
&lt;br /&gt;
Partial list of requirements for the multiplexer&lt;br /&gt;
* Control internal GPS receiver&lt;br /&gt;
* Control external GPS connected via serial port (USB or bluetooth)&lt;br /&gt;
* Feed data from the selected GPS receiver to multiple applications.&lt;br /&gt;
* Handle a RTCM stream to allow realtime DGPS postprocessing.&lt;br /&gt;
* Supply all attributes to applications, including such things as bearing, PDOP and satellites in use. (Not just time and position).&lt;br /&gt;
&lt;br /&gt;
Angle / inclination -- it might be possible to use the accelerometers in the smartphone to determine current inclination and calculate percent grade. You'd have to be able to calibrate this: mount the smartphone in a bracket and then read the acceleratometers to set it to 0 when on level ground.&lt;br /&gt;
&lt;br /&gt;
==== External GPS ====&lt;br /&gt;
&lt;br /&gt;
There is no reason we are limited to using the built-in GPS receiver. For applications requiring more accuracy (for example sub-meter), the GPS multiplexer should be able to accept data via USB or bluetooth and feed it to our applications. The controller program should be able to handle this situation.&lt;br /&gt;
&lt;br /&gt;
Bearing - some GPS receivers include an electronic compass that provides azimuth even when not moving. The multiplexer should know if bearing values are valid or not and indicate this. The value should indicate whether it is set for magnetic or true north.&lt;br /&gt;
&lt;br /&gt;
=== Support for postprocessing? ===&lt;br /&gt;
&lt;br /&gt;
Real-time DGPS correction possibilities include receiving an RTCM stream from an external device, receiving RTCM over an IP connection, and WAAS. Does the u-blox receiver support RTCM? Most receivers that support it just accept a stream of data from a serial line. You don't have to reverse engineer it, you just accept data from some source such as a DGPS Beacon Receiver and feed the output to the GPS receiver and you get something approaching 1 meter accuracy.&lt;br /&gt;
&lt;br /&gt;
Postprocessed DGPS correction requires recording pseudorange data and running an application later. In the open source world this means [http://en.wikipedia.org/wiki/RINEX RINEX]. Anyone with more knowledge of RINEX should jump in and edit this section.&lt;br /&gt;
&lt;br /&gt;
=== GPS controller ===&lt;br /&gt;
&lt;br /&gt;
''I think OM gps test program (what's it called) does much of this.''&lt;br /&gt;
&lt;br /&gt;
Some GPS receivers include a feature to stop logging or to issue warnings if data quality goes too low for any reason. Where should this be handled? In the multiplexer or in the applications? Maybe the settings should be applied to the multiplexer and it should issue warnings to the applications which would then decide what to do.&lt;br /&gt;
&lt;br /&gt;
=== Data Logger ===&lt;br /&gt;
&lt;br /&gt;
The basic concept of the logger is to create a bread crumb trail as you move about. &lt;br /&gt;
It has its own preference settings to determine if points are plotted based on change in position or on a time basis or both. &lt;br /&gt;
&lt;br /&gt;
It should also be possible to set what is logged. Possibilities include time, position, bearing, velocity, elevation, pseudo-range data, HDOP, PDOP, satellites used, type of GPS, type of antenna, DGPS on/off, type of DGPS.&lt;br /&gt;
&lt;br /&gt;
==== Speedometer, Pedomater -- Usage of logger by itself ====&lt;br /&gt;
&lt;br /&gt;
The data logger would be one crucial component in an application of GPS for bicyclists (and outdoor enthusiasts such as hikers and runners.) Other requirements would be a good display (to substitute for a speedometer) and a good mapping program. &lt;br /&gt;
&lt;br /&gt;
Should we expand on that on this page? It would be neat to have something that interoperates with the GPS multiplexer and the data logger so maybe we should?&lt;br /&gt;
&lt;br /&gt;
Speedometer functions would include tracking minimums, maximums, averages for speed, distance, and elevation (stopped, moving, combined). Bicyclists (and runners? I am not a runner...) want to know total climb.&lt;br /&gt;
&lt;br /&gt;
''I ride a bicycle and I use GPS as a speedometer and to do field work and I want to be able to do both with my Freerunner.'' [[User:Brian H Wilson|Brian H Wilson]] 19:38, 18 August 2008 (UTC)&lt;br /&gt;
&lt;br /&gt;
=== Field Collection Tool ===&lt;br /&gt;
&lt;br /&gt;
'''Attributes''' Mission planning should include setting up a file to be used for data collection, and that file should define attributes to be included. The data collector should be configurable to facilitate easy entry of the attribute data. For example, if you define a field to have a finite list of values, the values could be available as a drop down list.&lt;br /&gt;
&lt;br /&gt;
'''Point averaging''' Stand in one place and collect points until you are happy. The display should show current PDOP/HDOP and expected accuracy and number of readings used to create tehe point. Preferences should include storing all data used to create the averaged point.&lt;br /&gt;
&lt;br /&gt;
'''Points, lines and polygons.''' You should be able to collect all three. A typical use for polygons is to walk around a space while collecting GPS points to create a polygon showing the location of some physical object such as a wetland.&lt;br /&gt;
&lt;br /&gt;
==== Other related tools ====&lt;br /&gt;
&lt;br /&gt;
Other specialized field collection tools could be used for &lt;br /&gt;
&lt;br /&gt;
* Asset management, example: urban forestry, agriculture, public works&lt;br /&gt;
* Map making, for example to collect data for the Open Street Map project&lt;br /&gt;
* Geocaching&lt;br /&gt;
* ??? Add yours here ???&lt;br /&gt;
&lt;br /&gt;
== Data format and exchange ==&lt;br /&gt;
&lt;br /&gt;
The data should be stored internally in a compact form that is open or at least well documented (for example ESRI Shapefiles). Storing in XML based formats is bulky and should probably be avoided. &lt;br /&gt;
&lt;br /&gt;
There should be a desktop tool to manage transferring the data that has been collected from the smartphone to more portable exchange formats such as GPX and GML and KML. &amp;quot;GPS Office&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== RINEX ===&lt;br /&gt;
&lt;br /&gt;
Would RINEX be an appropriate general format for internal storage? No.&lt;br /&gt;
It's an exchange format but it's intended to include data required to perform post-processing.&lt;br /&gt;
It stores direct satellite observations, not things needed for navigation like calculated position.&lt;br /&gt;
&lt;br /&gt;
This guy wrote a program that takes Ublox Antares 4 data and writes it as RINEX data.&lt;br /&gt;
http://home.comcast.net/~dmilbert/softs/ant2rin.htm&lt;br /&gt;
&lt;br /&gt;
GPX would accommodate everything we need but it's ASCII XML and that means 1/2 the file is just XML formatting. It might be possible to used tokenized GPX to make it more compact.&lt;br /&gt;
&lt;br /&gt;
== More features ==&lt;br /&gt;
&lt;br /&gt;
All I can think of at the moment is rangefinders. I am sure there are others.&lt;br /&gt;
&lt;br /&gt;
=== Laser rangefinder ===&lt;br /&gt;
&lt;br /&gt;
There is another common situtaion where people use a laser rangefinder in conjunction with GPS, to get the location of an object that is not reachable (for example a boat) or a tree trunk (under heavy canopy).&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
&lt;br /&gt;
GPSd http://gpsd.berlios.de/&lt;br /&gt;
&lt;br /&gt;
GPX http://www.topografix.com/gpx.asp http://en.wikipedia.org/wiki/GPX_(data_transfer)&lt;br /&gt;
&lt;br /&gt;
gypsy http://folks.o-hand.com/iain/gypsy/ GPS data multiplexer&lt;br /&gt;
&lt;br /&gt;
RINEX specs ftp://ftp.unibe.ch/aiub/rinex/&lt;br /&gt;
&lt;br /&gt;
=== Commercial software ===&lt;br /&gt;
&lt;br /&gt;
ESRI ArcPad http://www.tdsway.com/products/solo_field&lt;br /&gt;
&lt;br /&gt;
TDS Solo Field http://www.tdsway.com/products/solo_field&lt;br /&gt;
&lt;br /&gt;
Trimble Terrasync http://www.trimble.com/terrasync.shtml&lt;br /&gt;
&lt;br /&gt;
== People working on this project ==&lt;br /&gt;
&lt;br /&gt;
[[User:Brian H Wilson]] is blabbing a lot here and wishing he had more time to work on this.&lt;br /&gt;
&lt;br /&gt;
[[Category: GPS]]&lt;/div&gt;</summary>
		<author><name>Brian H Wilson</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Talk:Flashing_the_Neo_FreeRunner</id>
		<title>Talk:Flashing the Neo FreeRunner</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Talk:Flashing_the_Neo_FreeRunner"/>
				<updated>2008-08-23T15:16:03Z</updated>
		
		<summary type="html">&lt;p&gt;Brian H Wilson: Talk:Flashing the Neo FreeRunner moved to Talk:Flashing the Neo Freerunner: Standardized the name.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;There is another page like this [[Flashing Openmoko]]  They should be merged [[User:Thewtex|thewtex]] 05:44, 21 July 2008 (UTC)&lt;br /&gt;
&lt;br /&gt;
That page is now about flashing the Neo 1973 [[User:Brian H Wilson|Brian H Wilson]] 04:12, 12 August 2008 (UTC)&lt;br /&gt;
&lt;br /&gt;
So, where are the u-boot images? --[[User:Gero|Gero]] 21:35, 27 July 2008 (UTC)&lt;br /&gt;
&lt;br /&gt;
The u-boot images are found with the daily builds.  See Freerunner/ASU daily builds in [[Latest Images]].  '''Note''' the file names are ''wrong''.  If you look through the dates, they all seem to have the same file names indicating version and git commit hash.  However, use the latest build, and you can check the true version by booting into u-boot, connecting to u-boot, and issuing the 'version' command. [[User:Thewtex|thewtex]] 04:40, 28 July 2008 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Erasing rootfs ==&lt;br /&gt;
&lt;br /&gt;
Is it still necessary to erase the rootfs partition before flashing a new one, if the new one is smaller? If so then we should add this as one of the steps.&lt;br /&gt;
&lt;br /&gt;
Also instructions on setting the boot menu timeout to something sensible would be a good thing to have in here, as hitting AUX every 20 seconds to keep the phone shutting down while flashing a rootfs is tedious.&lt;br /&gt;
&lt;br /&gt;
At least in my experience, it won't shut down when an image is being transferred.&lt;/div&gt;</summary>
		<author><name>Brian H Wilson</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Flashing_the_Neo_FreeRunner</id>
		<title>Flashing the Neo FreeRunner</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Flashing_the_Neo_FreeRunner"/>
				<updated>2008-08-23T15:16:03Z</updated>
		
		<summary type="html">&lt;p&gt;Brian H Wilson: Flashing the Neo FreeRunner moved to Flashing the Neo Freerunner: Standardized the name.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Openmoko regularly releases updated versions of the Openmoko root filesystem, the [[kernel]], and the [[Bootloader| U-Boot]] as binary images. These may be programmed into the Flash memory (NAND) of Neo FreeRunner. For that, you can use the USB cable and another computer which will run an Openmoko provided tool to flash the Neo FreeRunner &amp;quot;through&amp;quot; USB.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
All the components of the software in the FreeRunner are bundled together into binary images.&lt;br /&gt;
&lt;br /&gt;
On a desktop computer when you want to replace the operating system (OS), you would boot it from a CD-ROM drive, then copy OS files from the CD to the internal hard drive. The FreeRunner does not have a CD-ROM drive and files must typically be re-written/flashed directly into internal storage (NAND flash).  It is also possible to load all the OS files to and boot from a microSD.&lt;br /&gt;
&lt;br /&gt;
The FreeRunner has two kinds of internal program storage: NOR flash and NAND flash. The NOR flash is small and stores only a special boot program used when you need to re-write the contents of the NAND flash. NAND flash acts more like a hard drive.&lt;br /&gt;
&lt;br /&gt;
The NAND Flash is divided into 3 partitions for the bootloader, kernel, and root filesystem - so each of these components can be flashed separately. For example if you are trying to install a modified kernel, you only have to follow the steps to flash the kernel image.&lt;br /&gt;
&lt;br /&gt;
* '''bootloader''': a small program that runs first and starts everything else when the FreeRunner is powered on or reset (depending on [[Booting the Neo FreeRunner|how you reset it]], the version from NOR or NAND is booted).&lt;br /&gt;
* '''kernel''': the central component in the Linux operating system.&lt;br /&gt;
* '''root filesystem''': contains all the files that make up the commands and applications that you can run.&lt;br /&gt;
 &lt;br /&gt;
'''Before you start: Erasing the root filesystem or flashing the uboot are radical measures. Take the time to ponder the necessity. Sometimes problems can be fixed by updating only the kernel.'''&lt;br /&gt;
&lt;br /&gt;
== Alternative : running from microSD card ==&lt;br /&gt;
&lt;br /&gt;
You may install this distribution on the microSD card, in order to [[Booting from SD | boot from microSD card]]. That allows you to keep another distribution installed in NAND (for instance to test 2008.08 while still having 2007.2 for default boot).&lt;br /&gt;
&lt;br /&gt;
== Collect the things you need ==&lt;br /&gt;
&lt;br /&gt;
=== Download the DFU-util program ===&lt;br /&gt;
&lt;br /&gt;
You will download that program on your desktop computer. It will allow you to connect to the FreeRunner through the USB cable and control its bootloader. That connection uses a special protocol which addresses the bootloader's interface, and differs from USB networking. There is a separate page to describe it in more detail: [[dfu-util]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''MacOS X:''' [[MacOS_X#Graphical_Flashing_with_Openmoko_Flasher]]&lt;br /&gt;
&lt;br /&gt;
'''Linux:''' http://buildhost.openmoko.org/releases/Freerunner/dfu-util&lt;br /&gt;
&lt;br /&gt;
Make sure it is executable by setting the permissions with this command: chmod a+x dfu-util&lt;br /&gt;
&lt;br /&gt;
'''Note:''' dfu-util seems to consistently fail with a &amp;quot;-62&amp;quot; error on 64-bit Linux. If you have access to a 32-bit machine, use it instead!&lt;br /&gt;
There are some ubuntu64 interpid packages which work just fine for me in hardy too. So you might try at your own risk: [http://packages.ubuntu.com/de/intrepid/dfu-util]&lt;br /&gt;
&lt;br /&gt;
'''Windows:''' http://projects.openmoko.org/frs/?group_id=166&amp;amp;release_id=162 &lt;br /&gt;
&lt;br /&gt;
See additional driver installation instructions for Windows at [[Dfu-util-windows]]&lt;br /&gt;
&lt;br /&gt;
=== Download the image files that you will need ===&lt;br /&gt;
&lt;br /&gt;
Exactly what files you need depends on what you are trying to install. In most cases you will need to install a Kernel (uImage) and a Root Filesystem (rootfs). In rare cases, when there is a bug you need fixed, you will also install a new bootloader.&lt;br /&gt;
&lt;br /&gt;
Please read [[Distributions]] for choosing the distribution which fits your needs, and then see [[Download]] for downloading.&lt;br /&gt;
&lt;br /&gt;
== Boot the FreeRunner from NOR Flash ==&lt;br /&gt;
&lt;br /&gt;
[[Image:menu15.jpg|thumb|Booting from NOR Flash]]&lt;br /&gt;
&lt;br /&gt;
# Read the other sections of this page first, because you will have 30 seconds to enter the flashing commands, come back here when ready.&lt;br /&gt;
# Do not connect the USB cable from the PC to your Neo FreeRunner yet (disconnect it).&lt;br /&gt;
# Boot your Neo Freerunner into the NOR uBoot menu for flashing.&lt;br /&gt;
## Press and hold AUX button&lt;br /&gt;
## Press the Power button until the boot menu comes up&lt;br /&gt;
## This menu is labelled '''*** BOOT MENU (NOR) ***'''&lt;br /&gt;
## See also [[Booting the Neo FreeRunner]]&lt;br /&gt;
# Stay in NOR uBoot menu, do not to select or enter any item in menu. Now you will be able to flash, make backups of your Freerunner or query the Freerunner with dfu-util.&lt;br /&gt;
# The FreeRunner only stays at the NOR boot prompt for about 30 seconds and then shuts off unless you do something.&lt;br /&gt;
# Connect your Neo to the GNU/Linux or Windows host via a USB cable. &lt;br /&gt;
# Now you can enter the dfu-util commands on your PC as described below.&lt;br /&gt;
# If the Neo FreeRunner turns off before you press start flashing ('''screen goes black'''), go back to step 2. If you start flashing in time, the phone will not turn off meanwhile.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- The following, upto dfu-util -l is taken from the thread &amp;quot;Re: Freerunner (GTK2007.2) has suddenly become unbootable&amp;quot; on the Support list. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the dfu-util connection does '''not''' use Ethernet over USB - that is, you should not attempt to set up a usb0 network interface on your GNU/Linux host desktop (on Windows, you need a DFU class driver, or you can use the LibUSB-Win32 driver described on the [[Dfu-util-windows]] page). The dfu-util utility sets up its own connection to the FreeRunner. In fact, you will not be able to make an Ethernet-over-USB connection to the FreeRunner when it is at the uBoot menu; this type of connection is only available when the FreeRunner has booted fully.&lt;br /&gt;
&lt;br /&gt;
After connecting the FreeRunner to your host via USB cable, you can test whether dfu-util &amp;quot;sees&amp;quot; the FreeRunner by executing:&lt;br /&gt;
&lt;br /&gt;
   dfu-util -l&lt;br /&gt;
If you get error messages from the dfu-util command then try again. Often it works on the second try.&lt;br /&gt;
&lt;br /&gt;
== Do a backup ==&lt;br /&gt;
&lt;br /&gt;
If you have a working image that you're happy with but want to try something different, you should probably do a [[Pre-Flash Backup]].&lt;br /&gt;
&lt;br /&gt;
== Using dfu-util ==&lt;br /&gt;
&lt;br /&gt;
dfu-util can be used to read flash memory, write memory, and get information from the device.&lt;br /&gt;
&lt;br /&gt;
This is the general command format to write an image file to a (predefined) &amp;quot;partition name&amp;quot; (referred to as ''altsetting'' in dfu-util help/manual) :&lt;br /&gt;
&lt;br /&gt;
 dfu-util -a ''altsetting'' -R -D ''file_name''&lt;br /&gt;
&lt;br /&gt;
where:&amp;lt;br&amp;gt;&lt;br /&gt;
-a ''altsetting'' : Specify the altsetting of the DFU interface by name or by number&amp;lt;br&amp;gt;&lt;br /&gt;
-R  : Issue USB Reset signalling once we're finished&amp;lt;br&amp;gt;&lt;br /&gt;
-D  ''file_name'' : Write firmware from ''file_name'' into device&lt;br /&gt;
&lt;br /&gt;
On Linux, you run dfu-util from a command shell prompt. If you have not put it somewhere on your command path you probably need to prefix it with a &amp;quot;./&amp;quot; like this '''./dfu-util'''.&lt;br /&gt;
On some systems you need to be root before this will work and on Ubuntu you must preface the command with &amp;quot;sudo&amp;quot; or you will get the following error: &amp;quot;Cannot claim interface: could not claim interface 2: Operation not permitted&amp;quot;&lt;br /&gt;
&lt;br /&gt;
On Windows, you need to open a command window and run from a command line. Use Start-Run Program and type &amp;quot;cmd&amp;quot; to open a Window.&lt;br /&gt;
&lt;br /&gt;
More detailed manual for gfu-util is available here : [[Dfu-util]]&lt;br /&gt;
&lt;br /&gt;
== Flashing the Kernel ==&lt;br /&gt;
&lt;br /&gt;
 Note: The phone needs to be in the U-boot bootup menu for this to work. Get there by holding down the aux button while powering up the device.&lt;br /&gt;
&lt;br /&gt;
The command format is &lt;br /&gt;
&lt;br /&gt;
 dfu-util -a kernel -R -D ''/path/to/uImage''&lt;br /&gt;
&lt;br /&gt;
When flashing succeeds the following will be shown:&lt;br /&gt;
&lt;br /&gt;
 status(0) = No error condition is present&lt;br /&gt;
 Done!&lt;br /&gt;
&lt;br /&gt;
Flashing may fail with an error -110. This indicates that the kernel is too big for the default kernel partition. uboot can be used to change the size of the default partitions on the device. It may also mean that you are trying to put the wrong thing in the kernel space.&lt;br /&gt;
&lt;br /&gt;
== Flashing the Root Filesystem ==&lt;br /&gt;
&lt;br /&gt;
The root filesystem has to be an image in jffs2 format. If the file you downloaded is zipped or compressed (has a .gz, bz2, .zip, tar, tar.gz or .tgz extension) you have to uncompress it first.&lt;br /&gt;
&lt;br /&gt;
The command format is&lt;br /&gt;
&lt;br /&gt;
 dfu-util -a rootfs -R -D ''rootfs_filename.jffs2''&lt;br /&gt;
&lt;br /&gt;
where ''rootfs_filename.jffs2'' is the name of the file containing the root filesystem.&lt;br /&gt;
&lt;br /&gt;
When flashing succeeds the following will be shown:&lt;br /&gt;
&lt;br /&gt;
 status(0) = No error condition is present&lt;br /&gt;
 Done!&lt;br /&gt;
&lt;br /&gt;
== Flashing the boot loader to the NAND==&lt;br /&gt;
&lt;br /&gt;
The boot loader (U-boot) file should have a .bin extension. As with the root filesystem, if the file you downloaded is zipped or compressed (has a .gz or .zip extension) you have to uncompress it first.&lt;br /&gt;
&lt;br /&gt;
The command format is &lt;br /&gt;
&lt;br /&gt;
 dfu-util -a u-boot -R -D ''uboot.bin''&lt;br /&gt;
&lt;br /&gt;
where ''uboot.bin'' is the name of the boot loader binary image file.&lt;br /&gt;
&lt;br /&gt;
''Reminder'': You should have [[Flashing_the_Neo_FreeRunner#Boot_the_FreeRunner_from_NOR_Flash|boot from NOR first]], in order to flash the boot-loader in NAND. After flashing succesfully, make sure you reboot from NAND's newly flashed boot loader, to benefit from the updates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Taken from posts by Mikael Berthe &amp;lt;mikael.berthe@lilotux.net&amp;gt; and Torfinn Ingolfsen &amp;lt;tingox@gmail.com&amp;gt; to Support list, subject: Re: Upgrading u-boot needed ? --&amp;gt;&lt;br /&gt;
(Optional) After an upgrade, you may wish to check that the u-boot version matches the one you have just flashed. You can use 'grep  Bootloader /dev/mtdblock1' from a shell on the FreeRunner (and possibly the 1973 as well) to get the '''NAND''' u-boot version, like this:&lt;br /&gt;
   root@om-gta02:~# grep Bootloader /dev/mtdblock1&lt;br /&gt;
   Neo1973 Bootloader U-Boot 1.3.2+gitr18+64eb10cab8055084ae25ea4e73b66dd03cc1a0cb&lt;br /&gt;
&lt;br /&gt;
You can grep for the same string in /dev/mtdblock0 to retrieve the '''NOR''' u-boot version:&lt;br /&gt;
   root@om-gta02:~# grep  Bootloader /dev/mtdblock0&lt;br /&gt;
   Neo1973 Bootloader U-Boot 1.3.2-moko12&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ENDS ... subject: Re: Upgrading u-boot needed ? --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Reboot the FreeRunner from NAND ==&lt;br /&gt;
&lt;br /&gt;
You should now be able to boot into the new images.&lt;br /&gt;
&lt;br /&gt;
Pay attention '''to booting from the NAND flash this time''', in particular if you upgraded the boot-loader (in short: 1. press and hold ''power button'' down, and then 2. press ''aux button'')&lt;br /&gt;
&lt;br /&gt;
The boot menu should be labelled '''*** BOOT MENU (NAND) ***''' this time (see [[Booting#Log_into_U-Boot_in_the_NAND_Flash|booting from NAND]] for more detailed instructions).&lt;br /&gt;
&lt;br /&gt;
[[Category:Flashing Openmoko| ]]&lt;/div&gt;</summary>
		<author><name>Brian H Wilson</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/U-Boot</id>
		<title>U-Boot</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/U-Boot"/>
				<updated>2008-08-23T15:15:20Z</updated>
		
		<summary type="html">&lt;p&gt;Brian H Wilson: /* Related pages */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|Bootloader}}&lt;br /&gt;
&lt;br /&gt;
{{Bootloader}}&lt;br /&gt;
[[Image:GTA01-U-Boot.JPG|thumb|300px|u-boot menu on Neo1973]] [[Image:Neo1973 uboot splash closeup.jpg|thumb|300px|u-boot splash screen on Neo1973]]&lt;br /&gt;
&lt;br /&gt;
The bootloader used on the smartphones is called '''U-Boot'''. It takes care of device functionality until Openmoko is booted. This includes [[USB DFU]] for [[flashing Openmoko]], a splash screen, a boot menu, a console for [[bootloader commands]], configuration via [[bootloader environment]], and loading a [[kernel]]. &lt;br /&gt;
&lt;br /&gt;
There are various [[bootloader versions]] available.&lt;br /&gt;
&lt;br /&gt;
== Booting into U-boot ==&lt;br /&gt;
&lt;br /&gt;
* Make sure that your phone has had the battery and USB cable removed for at least 30 seconds.&lt;br /&gt;
* Hold in the AUX button on power-up to access the boot menu.&lt;br /&gt;
* Connect the Neo (ie not Debug Board) to a Linux host with the USB cable.&lt;br /&gt;
* Set the console to USB.&lt;br /&gt;
* Connect to /dev/ttyACM0 with a terminal program on the Linux host (you might need to chown uucp.uucp /dev/ttyACM0 )&lt;br /&gt;
* Note that the cdc_acm /dev/ttyACM0 access disappears as soon as the Neo boots, and is replaced by the cdc_ether usb0 network access.&lt;br /&gt;
* You're now at the bootloader prompt.&lt;br /&gt;
* Set the bootdelay uboot environment variable to -1 if you want it to always halt at the bootloader on power-up.&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
&lt;br /&gt;
All versions of the OM smartphone use the [http://u-boot.sourceforge.net/ u-boot] bootloader.&lt;br /&gt;
&lt;br /&gt;
More information on u-boot can be found at &lt;br /&gt;
* http://www.denx.de/wiki/DULG&lt;br /&gt;
* http://www.gumstix.org/tikiwiki/tiki-index.php?page=U-Boot&lt;br /&gt;
* http://linuxdevices.com/articles/AT5085702347.html&lt;br /&gt;
&lt;br /&gt;
Additions to the vanilla u-boot already implemented include: &lt;br /&gt;
* Support for boot from NAND flash using [[S3C2410 Steppingstone]]&lt;br /&gt;
* Support for S3C2410 NAND flash&lt;br /&gt;
* Support for downloading programs via S3C2410 USB Device Controller&lt;br /&gt;
* Support to display bootup logo / status on S3C2410 Framebuffer&lt;br /&gt;
&lt;br /&gt;
However, u-boot still doesn't support many of the features that GTA01 needs, such as&lt;br /&gt;
* Support for reading kernel/initrd from SD/Transflash&lt;br /&gt;
&lt;br /&gt;
[[User:HaraldWelte|HaraldWelte]] is working on those issues, and in fact most of them have already been implemented.&lt;br /&gt;
&lt;br /&gt;
== Bootloader source code ==&lt;br /&gt;
&lt;br /&gt;
The current bootloader source can be found at http://git.openmoko.org/?p=u-boot.git;a=shortlog;h=stable . &lt;br /&gt;
&lt;br /&gt;
To get u-boot by subversion:&lt;br /&gt;
&lt;br /&gt;
 svn co https://svn.openmoko.org/ openmoko/u-boot&lt;br /&gt;
&lt;br /&gt;
To build u-boot:&lt;br /&gt;
* Clone the git tree and check out the stable branch&lt;br /&gt;
* Set the CROSS_COMPILE environment variable to specify the prefix to your toolchain binaries&lt;br /&gt;
* Run &amp;quot;make gta02v5_config&amp;quot; (or gta01bv4_config, or whatever hardware revision you have)&lt;br /&gt;
* Run &amp;quot;make u-boot.udfu&amp;quot;. This will give you an image which you can install with dfu-util, or which you can upload into memory via JTAG (with a debug board)&lt;br /&gt;
&lt;br /&gt;
== Bootloader binary ==&lt;br /&gt;
&lt;br /&gt;
The latest bootloader binary builds can be found under http://buildhost.openmoko.org/daily/ in the subdirectory [device]/200808/[date]/.&lt;br /&gt;
&lt;br /&gt;
All versions of the GTA02 (Neo Freerunner) that have been sold to the public are version 5 hardware so look for a file with &amp;quot;gta02&amp;quot; and &amp;quot;v5&amp;quot; in the name, for example&lt;br /&gt;
uboot-gta02v5-latest.bin&lt;br /&gt;
&lt;br /&gt;
The file should be written to the NAND flash address 0x00000000 (size 0x30000) (the first [[partition]]).&lt;br /&gt;
&lt;br /&gt;
== Bootloader development ==&lt;br /&gt;
&lt;br /&gt;
=== QT2410 ===&lt;br /&gt;
If you want to do bootloader development on the QT2410, it's easier to work with a bootloader image that can be downloaded via USB into RAM instead of flashing.&lt;br /&gt;
&lt;br /&gt;
To do so, you need to edit the u-boot/include/configs/qt2410.h file, and change the &amp;quot;if 0&amp;quot; in Line 32 into a &amp;quot;if 1&amp;quot;, then recompile with &amp;quot;make&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The resulting &amp;quot;u-boot.bin&amp;quot; is _NOT SUITABLE_ for NAND flash, but only for direct execution from within ram, e.g. by using the [[s3c2410_boot_usb]] program.&lt;br /&gt;
&lt;br /&gt;
=== GTA01 ===&lt;br /&gt;
&lt;br /&gt;
Doing bootloader development on the GTA01 is a bit more tricky.  first, we don't have any NOR flash.  Second, there is no other way to boot _but_ from NAND.  Therefore, we also don't have a USB downloader like the QT2410.&lt;br /&gt;
&lt;br /&gt;
The main problem is:  The [[S3C2410 Steppingstone]] unconditionally copies the first 4k of flash into its internal SRAM.   That SRAM segment stays unconditionally mapped at physical address zero. How do we get around this&lt;br /&gt;
&lt;br /&gt;
=== GTA02 ===&lt;br /&gt;
&lt;br /&gt;
The first block holds a little 4KByte RAM buffer that is auto-filled&lt;br /&gt;
from NAND by CPU hardware, called &amp;quot;steppingstone&amp;quot; when we boot from&lt;br /&gt;
NAND, or the NOR is mapped in there.&lt;br /&gt;
&lt;br /&gt;
nCS0: 00000000 07FFFFFF  4K steppingstone or NOR (Aux held down) &amp;lt;br&amp;gt;&lt;br /&gt;
nCS1: 08000000 0FFFFFFF  Glamo  &amp;lt;br&amp;gt;&lt;br /&gt;
nCS2: 10000000 17FFFFFF  nothing mapped &amp;lt;br&amp;gt;&lt;br /&gt;
nCS3: 18000000 1FFFFFFF  NOR &amp;lt;br&amp;gt;&lt;br /&gt;
nCS4: 20000000 17FFFFFF  nothing mapped &amp;lt;br&amp;gt;&lt;br /&gt;
nCS5: 28000000 2FFFFFFF  nothing mapped &amp;lt;br&amp;gt;&lt;br /&gt;
nCS6: 30000000 37FFFFFF  on-MCP SDRAM 128MB &amp;lt;br&amp;gt;&lt;br /&gt;
nCS7: 38000000 3FFFFFFF  external SDRAM 128MB &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Using JTAG to boot from RAM ====&lt;br /&gt;
&lt;br /&gt;
So how can we boot from RAM? We use JTAG / OpenOCD to&lt;br /&gt;
&lt;br /&gt;
* Reset and halt the cpu at PC=0&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; reset halt&lt;br /&gt;
target halted in ARM state due to debug request, current mode: Supervisor&lt;br /&gt;
cpsr: 0x400000d3 pc: 0x00000000&lt;br /&gt;
MMU: disabled, D-Cache: disabled, I-Cache: disabled&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Download a small piece of code for low-level SDRAM timing initialization (overwrite 4k SRAM of steppingstone)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; load_binary /space/misc/gta01/u-boot.git/board/gta01/lowlevel_foo.bin 0            &lt;br /&gt;
downloaded 332 byte in 0s 21899us&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Assert a break point at address 0x33f80000 (which indicates that the low-level code has finished)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; bp 0x33f80000 4 hw&lt;br /&gt;
breakpoint added at address 0x33f80000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Run the code up to the break point&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; resume&lt;br /&gt;
Target 0 resumed&lt;br /&gt;
&amp;gt; Target 0 halted&lt;br /&gt;
target halted in ARM state due to breakpoint, current mode: Supervisor&lt;br /&gt;
cpsr: 0x600000d3 pc: 0x33f80000&lt;br /&gt;
MMU: disabled, D-Cache: disabled, I-Cache: enabled&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Download the u-boot RAM image to 0x33f80000&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; load_binary /space/misc/gta01/u-boot.git/u-boot.bin 0x33f80000&lt;br /&gt;
downloaded 135692 byte in 6s 567264us&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Resume processing&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; resume&lt;br /&gt;
Target 0 resumed&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At this point, the display backlight gets bright and we see the following familiar prompt on the serial console:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
U-Boot 1.1.6 (Jan 13 2007 - 23:44:23)&lt;br /&gt;
&lt;br /&gt;
DRAM:  128 MB&lt;br /&gt;
NAND:  64 MiB&lt;br /&gt;
*** Warning - bad CRC or NAND, using default environment&lt;br /&gt;
&lt;br /&gt;
In:    serial&lt;br /&gt;
Out:   serial&lt;br /&gt;
Err:   serial&lt;br /&gt;
Hit any key to stop autoboot:  0 &lt;br /&gt;
GTA01Bv2 # &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creating bootable images ==&lt;br /&gt;
&lt;br /&gt;
u-boot needs bootable images (such as kernels, but also initrd and others) in form of a so-called ''uImage''.  In order to create a ''uImage'' from e.g. a ''vmlinux'' kernel image, you can proceed as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
objcopy -O binary -R .note -R .comment -S vmlinux linux.bin&lt;br /&gt;
gzip -9 linux.bin&lt;br /&gt;
u-boot/tools/mkimage -A arm -O linux -T kernel -C gzip -a 30008000 -e 30008000 -n &amp;quot;Kernel Image QT2410&amp;quot; -d linux.bin.gz uImage&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Boot menu ==&lt;br /&gt;
[[Image:Neo1973 uboot menu.jpg|thumb|400px|u-boot boot menu on Neo1973]]&lt;br /&gt;
&lt;br /&gt;
As of the Phase-0 release, our u-boot version now features an on-screen boot menu. The items are defined by [[bootloader environment#menu|menu entries in the environment]].&lt;br /&gt;
&lt;br /&gt;
=== Accessing the boot menu ===&lt;br /&gt;
&lt;br /&gt;
You can access the boot menu by pressing and holding the [[Neo1973 AUX Button]] together with the power button while switching the phone on.&lt;br /&gt;
&lt;br /&gt;
=== Using the boot menu ===&lt;br /&gt;
&lt;br /&gt;
By pressing the [[Neo1973 AUX Button]] you can cycle through the menu items.  Use the ''POWER'' button to select one item. &lt;br /&gt;
&lt;br /&gt;
== Bootloader prompt ==&lt;br /&gt;
&lt;br /&gt;
=== Accessing the bootloader prompt ===&lt;br /&gt;
The bootloader prompt is available either on the serial console (via [[Debug Board]]), or as virtual USB Serial device (USB CDC_ACM).&lt;br /&gt;
Whether the serial port or usb is used depends on the u-boot environment variables '''stdin''', '''stdout''' and '''stderr'''.&lt;br /&gt;
&lt;br /&gt;
Whether or not you use usbtty, the first couple of messages will always be displayed on the serial console.&lt;br /&gt;
&lt;br /&gt;
The bootloader is currently configured to wait for three seconds.  If a key press on the '''stdin''' is received within those three seconds, auto-boot is aborted.&lt;br /&gt;
&lt;br /&gt;
==== Using usbtty from Linux ====&lt;br /&gt;
&lt;br /&gt;
Just by connecting the phone in u-boot mode to your Linux pc should make it detect a [[CDC ACM]] device, and you should get a new tty device called /dev/ttyACM0. If not, enable the CONFIG_USB_ACM (Device Drivers -&amp;gt; USB support -&amp;gt; USB Modem (CDC ACM) support). (Instructions for MacOS users are [[MacOS_X#USB_Serial|here]])&lt;br /&gt;
&lt;br /&gt;
Use your favourite terminal emulator (minicom, cu, zc, screen ...) to access it like any other serial port. If you don't have a favorite, try just: (cu is in the taylor-uucp package, use &amp;quot;apt-get install cu&amp;quot; if it is not yet installed)&lt;br /&gt;
 cu -l /dev/ttyACM0&lt;br /&gt;
&lt;br /&gt;
You might need to &lt;br /&gt;
 chown uucp.uucp /dev/ttyACM0&lt;br /&gt;
&lt;br /&gt;
to get the necessary rights (even as root).&lt;br /&gt;
&lt;br /&gt;
A nice alternative for cu is Werner Almesberger's [[NeoCon|neocon]].&lt;br /&gt;
&lt;br /&gt;
First, you should try to check whether the USB device shows up in 'lsusb' while you're running in u-boot mode:&lt;br /&gt;
&lt;br /&gt;
 # lsusb -d 1457:5119&lt;br /&gt;
 Bus 005 Device 079: ID 1457:5119  &lt;br /&gt;
&lt;br /&gt;
Second, let's see some more details about the available endpoints and configurations:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lsusb -v -d 1457:5119&lt;br /&gt;
Bus 005 Device 079: ID 1457:5119  &lt;br /&gt;
Device Descriptor:&lt;br /&gt;
  bLength                18&lt;br /&gt;
  bDescriptorType         1&lt;br /&gt;
  bcdUSB               1.10&lt;br /&gt;
  bDeviceClass            2 Communications&lt;br /&gt;
  bDeviceSubClass         0 &lt;br /&gt;
  bDeviceProtocol         0 &lt;br /&gt;
  bMaxPacketSize0        16&lt;br /&gt;
  idVendor           0x1457 &lt;br /&gt;
  idProduct          0x5119 &lt;br /&gt;
  bcdDevice            0.00&lt;br /&gt;
  iManufacturer           1 Openmoko, Inc&lt;br /&gt;
  iProduct                2 Neo1973 Bootloader U-Boot 1.2.0-g6c7cac8c-dirty-moko3&lt;br /&gt;
  iSerial                 3 0000000&lt;br /&gt;
  bNumConfigurations      1&lt;br /&gt;
  Configuration Descriptor:&lt;br /&gt;
    bLength                 9&lt;br /&gt;
    bDescriptorType         2&lt;br /&gt;
    wTotalLength           85&lt;br /&gt;
    bNumInterfaces          3&lt;br /&gt;
    bConfigurationValue     1&lt;br /&gt;
    iConfiguration          4 TTY via USB&lt;br /&gt;
    bmAttributes         0xc0&lt;br /&gt;
      Self Powered&lt;br /&gt;
    MaxPower                0mA&lt;br /&gt;
    Interface Descriptor:&lt;br /&gt;
      bLength                 9&lt;br /&gt;
      bDescriptorType         4&lt;br /&gt;
      bInterfaceNumber        0&lt;br /&gt;
      bAlternateSetting       0&lt;br /&gt;
      bNumEndpoints           1&lt;br /&gt;
      bInterfaceClass         2 Communications&lt;br /&gt;
      bInterfaceSubClass      2 Abstract (modem)&lt;br /&gt;
      bInterfaceProtocol      1 AT-commands (v.25ter)&lt;br /&gt;
      iInterface              6 Control Interface&lt;br /&gt;
      CDC Header:&lt;br /&gt;
        bcdCDC               0.6e&lt;br /&gt;
      CDC Call Management:&lt;br /&gt;
        bmCapabilities       0x00&lt;br /&gt;
        bDataInterface          1&lt;br /&gt;
      CDC ACM:&lt;br /&gt;
        bmCapabilities       0x00&lt;br /&gt;
      CDC Union:&lt;br /&gt;
        bMasterInterface        0&lt;br /&gt;
        bSlaveInterface         1 &lt;br /&gt;
      Endpoint Descriptor:&lt;br /&gt;
        bLength                 7&lt;br /&gt;
        bDescriptorType         5&lt;br /&gt;
        bEndpointAddress     0x81  EP 1 IN&lt;br /&gt;
        bmAttributes            3&lt;br /&gt;
          Transfer Type            Interrupt&lt;br /&gt;
          Synch Type               None&lt;br /&gt;
          Usage Type               Data&lt;br /&gt;
        wMaxPacketSize     0x0010  1x 16 bytes&lt;br /&gt;
        bInterval             255&lt;br /&gt;
    Interface Descriptor:&lt;br /&gt;
      bLength                 9&lt;br /&gt;
      bDescriptorType         4&lt;br /&gt;
      bInterfaceNumber        1&lt;br /&gt;
      bAlternateSetting       0&lt;br /&gt;
      bNumEndpoints           2&lt;br /&gt;
      bInterfaceClass        10 CDC Data&lt;br /&gt;
      bInterfaceSubClass      0 Unused&lt;br /&gt;
      bInterfaceProtocol      0 &lt;br /&gt;
      iInterface              5 Bulk Data Interface&lt;br /&gt;
      Endpoint Descriptor:&lt;br /&gt;
        bLength                 7&lt;br /&gt;
        bDescriptorType         5&lt;br /&gt;
        bEndpointAddress     0x02  EP 2 OUT&lt;br /&gt;
        bmAttributes            2&lt;br /&gt;
          Transfer Type            Bulk&lt;br /&gt;
          Synch Type               None&lt;br /&gt;
          Usage Type               Data&lt;br /&gt;
        wMaxPacketSize     0x0010  1x 16 bytes&lt;br /&gt;
        bInterval             255&lt;br /&gt;
      Endpoint Descriptor:&lt;br /&gt;
        bLength                 7&lt;br /&gt;
        bDescriptorType         5&lt;br /&gt;
        bEndpointAddress     0x83  EP 3 IN&lt;br /&gt;
        bmAttributes            2&lt;br /&gt;
          Transfer Type            Bulk&lt;br /&gt;
          Synch Type               None&lt;br /&gt;
          Usage Type               Data&lt;br /&gt;
        wMaxPacketSize     0x0010  1x 16 bytes&lt;br /&gt;
        bInterval             255&lt;br /&gt;
    Interface Descriptor:&lt;br /&gt;
      bLength                 9&lt;br /&gt;
      bDescriptorType         4&lt;br /&gt;
      bInterfaceNumber        2&lt;br /&gt;
      bAlternateSetting       0&lt;br /&gt;
      bNumEndpoints           0&lt;br /&gt;
      bInterfaceClass       254 Application Specific Interface&lt;br /&gt;
      bInterfaceSubClass      1 Device Firmware Update&lt;br /&gt;
      bInterfaceProtocol      1 &lt;br /&gt;
      iInterface              7 USB Device Firmware Upgrade&lt;br /&gt;
Device Status:     0x0001&lt;br /&gt;
  Self Powered&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, you can access it using your favourite terminal program.&lt;br /&gt;
&lt;br /&gt;
Then, if the environment is not set correctly, you will need to use the current console (e.g. serial console) to change the [[bootloader environment#console|console entries in the environment]]:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
GTA01Bv2 # setenv stderr usbtty&lt;br /&gt;
GTA01Bv2 # setenv stdout usbtty&lt;br /&gt;
GTA01Bv2 # setenv stdin usbtty&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Typical u-boot prompt ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
U-Boot 1.2.0-moko1 (Feb 16 2007 - 00:36:13)&lt;br /&gt;
&lt;br /&gt;
DRAM:  128 MB&lt;br /&gt;
NAND:  64 MiB&lt;br /&gt;
Found Environment offset in OOB..&lt;br /&gt;
Video: 640x480x8 31kHz 59Hz&lt;br /&gt;
USB:   S3C2410 USB Deviced&lt;br /&gt;
In:    serial&lt;br /&gt;
Out:   serial&lt;br /&gt;
Err:   serial&lt;br /&gt;
Hit any key to stop autoboot:  0 &lt;br /&gt;
GTA01Bv3 #&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Commands on the bootloader prompt ===&lt;br /&gt;
&lt;br /&gt;
:''See [[bootloader commands]].''&lt;br /&gt;
&lt;br /&gt;
=== What if I borked my bootloader environment and don't get a prompt anymore? ===&lt;br /&gt;
Found a solution here:&lt;br /&gt;
[[http://markmail.org/message/gqypwiohdet6x4am?q=almesberger+partition&amp;amp;page=1&amp;amp;refer=xbamkzwwsaobv7wa]]&lt;br /&gt;
&lt;br /&gt;
It works the following way:&lt;br /&gt;
* Get the devirginator:&lt;br /&gt;
 svn co http://svn.openmoko.org/trunk/src/host/devirginator&lt;br /&gt;
 cd devirginator&lt;br /&gt;
* Read the u-boot environment from the device:&lt;br /&gt;
 dfu-util -a u-boot_env -R -U env.in&lt;br /&gt;
* Create a file that contains everything you want to change in your u-boot environment or get it by issuing the following command:&lt;br /&gt;
 wget http://svn.openmoko.org/trunk/src/host/devirginator/environment.in&lt;br /&gt;
* Now let devirginator generate a new u-boot_env partition for us, - that contains the partition table from our u-boot_env, - and all changes we wanted to make; Note that the -D GTA02 is needed for the neo Freeruner only.&lt;br /&gt;
 ./envedit.pl -i env.in -f environment.in -o env.out -D GTA02&lt;br /&gt;
* On my box the partition layout didn't seem to match the idea of envedit.pl, so it issued 2 warnings:&lt;br /&gt;
 warning: environment is 262144 bytes, expected 16384&lt;br /&gt;
 CRC error: expected 0xc33e35fc, got 0x93097bfb&lt;br /&gt;
* In this case jut add a additional argument to the command line - that has to be the 1st argument, though, and that contains the size information we got from the warning:&lt;br /&gt;
 ./envedit.pl -s 262144 -i env.in -D GTA02 -f environment.in  -o env.out&lt;br /&gt;
* Now the perl script should no more output anything but write a new u-boot_env partition that we can upload to the device by:&lt;br /&gt;
 dfu-util -a u-boot_env -R -D env.out&lt;br /&gt;
&lt;br /&gt;
== Device Firmware Upgrade ==&lt;br /&gt;
&lt;br /&gt;
Our version of u-boot also implements [[USB DFU]]. This can be useful to&lt;br /&gt;
load files and kernel for quick testing.&lt;br /&gt;
&lt;br /&gt;
To find out whether your version of u-boot supports this, use the output of&lt;br /&gt;
 $ lsusb -v -d 1457:5119&lt;br /&gt;
while the phone is in u-boot mode.&lt;br /&gt;
&lt;br /&gt;
If it supports DFU, you should see the following snippet towards the end of the output:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    Interface Descriptor:&lt;br /&gt;
      bLength                 9&lt;br /&gt;
      bDescriptorType         4&lt;br /&gt;
      bInterfaceNumber        2&lt;br /&gt;
      bAlternateSetting       0&lt;br /&gt;
      bNumEndpoints           0&lt;br /&gt;
      bInterfaceClass       254 Application Specific Interface&lt;br /&gt;
      bInterfaceSubClass      1 Device Firmware Update&lt;br /&gt;
      bInterfaceProtocol      1 &lt;br /&gt;
      iInterface              0 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For information on how to do firmware upgrades, please see [[dfu-util]]. For neo 1973 you may see [[Flashing_Openmoko#Actually_flashing_things_into_the_device]], and for the FreeRunner : [[Flashing the Neo FreeRunner]].&lt;br /&gt;
&lt;br /&gt;
=== Booting files over DFU ===&lt;br /&gt;
&lt;br /&gt;
To load a file at memory address 0x32000000:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dfu-util -a 0 -D fileToLoad -R&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After that, send 'bootm 0x32000000' to u-boot or 'bootelf 0x32000000' if&lt;br /&gt;
its an elf file.&lt;br /&gt;
&lt;br /&gt;
Simple python script that can boot an ELF image - avoiding a ACM bug that breaks on large packets.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/usr/bin/python&lt;br /&gt;
import sys&lt;br /&gt;
import os&lt;br /&gt;
import time&lt;br /&gt;
&lt;br /&gt;
cmd1 = &amp;quot;neo backlight off\n&amp;quot;&lt;br /&gt;
cmd2 = &amp;quot;bootelf 0x32000000\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
def output(tty, str):&lt;br /&gt;
    for x in str:&lt;br /&gt;
        tty.write(x)&lt;br /&gt;
        tty.flush()&lt;br /&gt;
&lt;br /&gt;
if len(sys.argv) == 2:&lt;br /&gt;
    print &amp;quot;Loading %s...&amp;quot; % sys.argv[1]&lt;br /&gt;
&lt;br /&gt;
    loadfile = &amp;quot;dfu-util -a 0 -D %s -R&amp;quot; % sys.argv[1]&lt;br /&gt;
&lt;br /&gt;
    os.system(loadfile)&lt;br /&gt;
&lt;br /&gt;
    time.sleep(3)&lt;br /&gt;
&lt;br /&gt;
    tty = open(&amp;quot;/dev/ttyACM0&amp;quot;, &amp;quot;a&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
    output(tty, cmd1)&lt;br /&gt;
    output(tty, cmd2)&lt;br /&gt;
&lt;br /&gt;
    tty.close()&lt;br /&gt;
else:&lt;br /&gt;
    print &amp;quot;Usage: %s elffile&amp;quot; % sys.argv[0]&lt;br /&gt;
    print &amp;quot;&amp;quot;&lt;br /&gt;
    sys.exit(2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
=== USB connectivity problems ===&lt;br /&gt;
&lt;br /&gt;
I once got errors like this (in dmesg or /var/log/messages) on the host side while connecting the neo in u-boot:&lt;br /&gt;
&lt;br /&gt;
 usb 2-1: device descriptor read/64, error -110&lt;br /&gt;
 usb usb2: Controller not stopped yet!&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
 hub 4-0:1.0: port 1 disabled by hub (EMI?), re-enabling...&lt;br /&gt;
 usb 4-1: USB disconnect, address 2&lt;br /&gt;
&lt;br /&gt;
A possible solution is given below. Please note that if you have a usb keyboard or mouse then the command might cause trouble. &lt;br /&gt;
&lt;br /&gt;
 rmmod uhci_hcd ; modprobe uhci_hcd&lt;br /&gt;
&lt;br /&gt;
Another option is to plug the FR into a different USB port on the host, preferably one on the Motherboard not the hub.&lt;br /&gt;
&lt;br /&gt;
Disconnecting the Neo's USB while powering up may prevent this problem in the future.&lt;br /&gt;
&lt;br /&gt;
== Related pages ==&lt;br /&gt;
&lt;br /&gt;
See [[Flashing the Neo 1973]] and [[Flashing the Neo Freerunner]] for instructions on using dfu-util to install a new bootloader in your phone.&lt;br /&gt;
&lt;br /&gt;
[[Category:System Developers]]&lt;br /&gt;
[[Category:Flashing Openmoko]]&lt;/div&gt;</summary>
		<author><name>Brian H Wilson</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/U-Boot</id>
		<title>U-Boot</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/U-Boot"/>
				<updated>2008-08-23T15:14:32Z</updated>
		
		<summary type="html">&lt;p&gt;Brian H Wilson: /* USB connectivity problems */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|Bootloader}}&lt;br /&gt;
&lt;br /&gt;
{{Bootloader}}&lt;br /&gt;
[[Image:GTA01-U-Boot.JPG|thumb|300px|u-boot menu on Neo1973]] [[Image:Neo1973 uboot splash closeup.jpg|thumb|300px|u-boot splash screen on Neo1973]]&lt;br /&gt;
&lt;br /&gt;
The bootloader used on the smartphones is called '''U-Boot'''. It takes care of device functionality until Openmoko is booted. This includes [[USB DFU]] for [[flashing Openmoko]], a splash screen, a boot menu, a console for [[bootloader commands]], configuration via [[bootloader environment]], and loading a [[kernel]]. &lt;br /&gt;
&lt;br /&gt;
There are various [[bootloader versions]] available.&lt;br /&gt;
&lt;br /&gt;
== Booting into U-boot ==&lt;br /&gt;
&lt;br /&gt;
* Make sure that your phone has had the battery and USB cable removed for at least 30 seconds.&lt;br /&gt;
* Hold in the AUX button on power-up to access the boot menu.&lt;br /&gt;
* Connect the Neo (ie not Debug Board) to a Linux host with the USB cable.&lt;br /&gt;
* Set the console to USB.&lt;br /&gt;
* Connect to /dev/ttyACM0 with a terminal program on the Linux host (you might need to chown uucp.uucp /dev/ttyACM0 )&lt;br /&gt;
* Note that the cdc_acm /dev/ttyACM0 access disappears as soon as the Neo boots, and is replaced by the cdc_ether usb0 network access.&lt;br /&gt;
* You're now at the bootloader prompt.&lt;br /&gt;
* Set the bootdelay uboot environment variable to -1 if you want it to always halt at the bootloader on power-up.&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
&lt;br /&gt;
All versions of the OM smartphone use the [http://u-boot.sourceforge.net/ u-boot] bootloader.&lt;br /&gt;
&lt;br /&gt;
More information on u-boot can be found at &lt;br /&gt;
* http://www.denx.de/wiki/DULG&lt;br /&gt;
* http://www.gumstix.org/tikiwiki/tiki-index.php?page=U-Boot&lt;br /&gt;
* http://linuxdevices.com/articles/AT5085702347.html&lt;br /&gt;
&lt;br /&gt;
Additions to the vanilla u-boot already implemented include: &lt;br /&gt;
* Support for boot from NAND flash using [[S3C2410 Steppingstone]]&lt;br /&gt;
* Support for S3C2410 NAND flash&lt;br /&gt;
* Support for downloading programs via S3C2410 USB Device Controller&lt;br /&gt;
* Support to display bootup logo / status on S3C2410 Framebuffer&lt;br /&gt;
&lt;br /&gt;
However, u-boot still doesn't support many of the features that GTA01 needs, such as&lt;br /&gt;
* Support for reading kernel/initrd from SD/Transflash&lt;br /&gt;
&lt;br /&gt;
[[User:HaraldWelte|HaraldWelte]] is working on those issues, and in fact most of them have already been implemented.&lt;br /&gt;
&lt;br /&gt;
== Bootloader source code ==&lt;br /&gt;
&lt;br /&gt;
The current bootloader source can be found at http://git.openmoko.org/?p=u-boot.git;a=shortlog;h=stable . &lt;br /&gt;
&lt;br /&gt;
To get u-boot by subversion:&lt;br /&gt;
&lt;br /&gt;
 svn co https://svn.openmoko.org/ openmoko/u-boot&lt;br /&gt;
&lt;br /&gt;
To build u-boot:&lt;br /&gt;
* Clone the git tree and check out the stable branch&lt;br /&gt;
* Set the CROSS_COMPILE environment variable to specify the prefix to your toolchain binaries&lt;br /&gt;
* Run &amp;quot;make gta02v5_config&amp;quot; (or gta01bv4_config, or whatever hardware revision you have)&lt;br /&gt;
* Run &amp;quot;make u-boot.udfu&amp;quot;. This will give you an image which you can install with dfu-util, or which you can upload into memory via JTAG (with a debug board)&lt;br /&gt;
&lt;br /&gt;
== Bootloader binary ==&lt;br /&gt;
&lt;br /&gt;
The latest bootloader binary builds can be found under http://buildhost.openmoko.org/daily/ in the subdirectory [device]/200808/[date]/.&lt;br /&gt;
&lt;br /&gt;
All versions of the GTA02 (Neo Freerunner) that have been sold to the public are version 5 hardware so look for a file with &amp;quot;gta02&amp;quot; and &amp;quot;v5&amp;quot; in the name, for example&lt;br /&gt;
uboot-gta02v5-latest.bin&lt;br /&gt;
&lt;br /&gt;
The file should be written to the NAND flash address 0x00000000 (size 0x30000) (the first [[partition]]).&lt;br /&gt;
&lt;br /&gt;
== Bootloader development ==&lt;br /&gt;
&lt;br /&gt;
=== QT2410 ===&lt;br /&gt;
If you want to do bootloader development on the QT2410, it's easier to work with a bootloader image that can be downloaded via USB into RAM instead of flashing.&lt;br /&gt;
&lt;br /&gt;
To do so, you need to edit the u-boot/include/configs/qt2410.h file, and change the &amp;quot;if 0&amp;quot; in Line 32 into a &amp;quot;if 1&amp;quot;, then recompile with &amp;quot;make&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The resulting &amp;quot;u-boot.bin&amp;quot; is _NOT SUITABLE_ for NAND flash, but only for direct execution from within ram, e.g. by using the [[s3c2410_boot_usb]] program.&lt;br /&gt;
&lt;br /&gt;
=== GTA01 ===&lt;br /&gt;
&lt;br /&gt;
Doing bootloader development on the GTA01 is a bit more tricky.  first, we don't have any NOR flash.  Second, there is no other way to boot _but_ from NAND.  Therefore, we also don't have a USB downloader like the QT2410.&lt;br /&gt;
&lt;br /&gt;
The main problem is:  The [[S3C2410 Steppingstone]] unconditionally copies the first 4k of flash into its internal SRAM.   That SRAM segment stays unconditionally mapped at physical address zero. How do we get around this&lt;br /&gt;
&lt;br /&gt;
=== GTA02 ===&lt;br /&gt;
&lt;br /&gt;
The first block holds a little 4KByte RAM buffer that is auto-filled&lt;br /&gt;
from NAND by CPU hardware, called &amp;quot;steppingstone&amp;quot; when we boot from&lt;br /&gt;
NAND, or the NOR is mapped in there.&lt;br /&gt;
&lt;br /&gt;
nCS0: 00000000 07FFFFFF  4K steppingstone or NOR (Aux held down) &amp;lt;br&amp;gt;&lt;br /&gt;
nCS1: 08000000 0FFFFFFF  Glamo  &amp;lt;br&amp;gt;&lt;br /&gt;
nCS2: 10000000 17FFFFFF  nothing mapped &amp;lt;br&amp;gt;&lt;br /&gt;
nCS3: 18000000 1FFFFFFF  NOR &amp;lt;br&amp;gt;&lt;br /&gt;
nCS4: 20000000 17FFFFFF  nothing mapped &amp;lt;br&amp;gt;&lt;br /&gt;
nCS5: 28000000 2FFFFFFF  nothing mapped &amp;lt;br&amp;gt;&lt;br /&gt;
nCS6: 30000000 37FFFFFF  on-MCP SDRAM 128MB &amp;lt;br&amp;gt;&lt;br /&gt;
nCS7: 38000000 3FFFFFFF  external SDRAM 128MB &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Using JTAG to boot from RAM ====&lt;br /&gt;
&lt;br /&gt;
So how can we boot from RAM? We use JTAG / OpenOCD to&lt;br /&gt;
&lt;br /&gt;
* Reset and halt the cpu at PC=0&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; reset halt&lt;br /&gt;
target halted in ARM state due to debug request, current mode: Supervisor&lt;br /&gt;
cpsr: 0x400000d3 pc: 0x00000000&lt;br /&gt;
MMU: disabled, D-Cache: disabled, I-Cache: disabled&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Download a small piece of code for low-level SDRAM timing initialization (overwrite 4k SRAM of steppingstone)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; load_binary /space/misc/gta01/u-boot.git/board/gta01/lowlevel_foo.bin 0            &lt;br /&gt;
downloaded 332 byte in 0s 21899us&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Assert a break point at address 0x33f80000 (which indicates that the low-level code has finished)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; bp 0x33f80000 4 hw&lt;br /&gt;
breakpoint added at address 0x33f80000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Run the code up to the break point&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; resume&lt;br /&gt;
Target 0 resumed&lt;br /&gt;
&amp;gt; Target 0 halted&lt;br /&gt;
target halted in ARM state due to breakpoint, current mode: Supervisor&lt;br /&gt;
cpsr: 0x600000d3 pc: 0x33f80000&lt;br /&gt;
MMU: disabled, D-Cache: disabled, I-Cache: enabled&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Download the u-boot RAM image to 0x33f80000&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; load_binary /space/misc/gta01/u-boot.git/u-boot.bin 0x33f80000&lt;br /&gt;
downloaded 135692 byte in 6s 567264us&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Resume processing&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; resume&lt;br /&gt;
Target 0 resumed&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At this point, the display backlight gets bright and we see the following familiar prompt on the serial console:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
U-Boot 1.1.6 (Jan 13 2007 - 23:44:23)&lt;br /&gt;
&lt;br /&gt;
DRAM:  128 MB&lt;br /&gt;
NAND:  64 MiB&lt;br /&gt;
*** Warning - bad CRC or NAND, using default environment&lt;br /&gt;
&lt;br /&gt;
In:    serial&lt;br /&gt;
Out:   serial&lt;br /&gt;
Err:   serial&lt;br /&gt;
Hit any key to stop autoboot:  0 &lt;br /&gt;
GTA01Bv2 # &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creating bootable images ==&lt;br /&gt;
&lt;br /&gt;
u-boot needs bootable images (such as kernels, but also initrd and others) in form of a so-called ''uImage''.  In order to create a ''uImage'' from e.g. a ''vmlinux'' kernel image, you can proceed as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
objcopy -O binary -R .note -R .comment -S vmlinux linux.bin&lt;br /&gt;
gzip -9 linux.bin&lt;br /&gt;
u-boot/tools/mkimage -A arm -O linux -T kernel -C gzip -a 30008000 -e 30008000 -n &amp;quot;Kernel Image QT2410&amp;quot; -d linux.bin.gz uImage&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Boot menu ==&lt;br /&gt;
[[Image:Neo1973 uboot menu.jpg|thumb|400px|u-boot boot menu on Neo1973]]&lt;br /&gt;
&lt;br /&gt;
As of the Phase-0 release, our u-boot version now features an on-screen boot menu. The items are defined by [[bootloader environment#menu|menu entries in the environment]].&lt;br /&gt;
&lt;br /&gt;
=== Accessing the boot menu ===&lt;br /&gt;
&lt;br /&gt;
You can access the boot menu by pressing and holding the [[Neo1973 AUX Button]] together with the power button while switching the phone on.&lt;br /&gt;
&lt;br /&gt;
=== Using the boot menu ===&lt;br /&gt;
&lt;br /&gt;
By pressing the [[Neo1973 AUX Button]] you can cycle through the menu items.  Use the ''POWER'' button to select one item. &lt;br /&gt;
&lt;br /&gt;
== Bootloader prompt ==&lt;br /&gt;
&lt;br /&gt;
=== Accessing the bootloader prompt ===&lt;br /&gt;
The bootloader prompt is available either on the serial console (via [[Debug Board]]), or as virtual USB Serial device (USB CDC_ACM).&lt;br /&gt;
Whether the serial port or usb is used depends on the u-boot environment variables '''stdin''', '''stdout''' and '''stderr'''.&lt;br /&gt;
&lt;br /&gt;
Whether or not you use usbtty, the first couple of messages will always be displayed on the serial console.&lt;br /&gt;
&lt;br /&gt;
The bootloader is currently configured to wait for three seconds.  If a key press on the '''stdin''' is received within those three seconds, auto-boot is aborted.&lt;br /&gt;
&lt;br /&gt;
==== Using usbtty from Linux ====&lt;br /&gt;
&lt;br /&gt;
Just by connecting the phone in u-boot mode to your Linux pc should make it detect a [[CDC ACM]] device, and you should get a new tty device called /dev/ttyACM0. If not, enable the CONFIG_USB_ACM (Device Drivers -&amp;gt; USB support -&amp;gt; USB Modem (CDC ACM) support). (Instructions for MacOS users are [[MacOS_X#USB_Serial|here]])&lt;br /&gt;
&lt;br /&gt;
Use your favourite terminal emulator (minicom, cu, zc, screen ...) to access it like any other serial port. If you don't have a favorite, try just: (cu is in the taylor-uucp package, use &amp;quot;apt-get install cu&amp;quot; if it is not yet installed)&lt;br /&gt;
 cu -l /dev/ttyACM0&lt;br /&gt;
&lt;br /&gt;
You might need to &lt;br /&gt;
 chown uucp.uucp /dev/ttyACM0&lt;br /&gt;
&lt;br /&gt;
to get the necessary rights (even as root).&lt;br /&gt;
&lt;br /&gt;
A nice alternative for cu is Werner Almesberger's [[NeoCon|neocon]].&lt;br /&gt;
&lt;br /&gt;
First, you should try to check whether the USB device shows up in 'lsusb' while you're running in u-boot mode:&lt;br /&gt;
&lt;br /&gt;
 # lsusb -d 1457:5119&lt;br /&gt;
 Bus 005 Device 079: ID 1457:5119  &lt;br /&gt;
&lt;br /&gt;
Second, let's see some more details about the available endpoints and configurations:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lsusb -v -d 1457:5119&lt;br /&gt;
Bus 005 Device 079: ID 1457:5119  &lt;br /&gt;
Device Descriptor:&lt;br /&gt;
  bLength                18&lt;br /&gt;
  bDescriptorType         1&lt;br /&gt;
  bcdUSB               1.10&lt;br /&gt;
  bDeviceClass            2 Communications&lt;br /&gt;
  bDeviceSubClass         0 &lt;br /&gt;
  bDeviceProtocol         0 &lt;br /&gt;
  bMaxPacketSize0        16&lt;br /&gt;
  idVendor           0x1457 &lt;br /&gt;
  idProduct          0x5119 &lt;br /&gt;
  bcdDevice            0.00&lt;br /&gt;
  iManufacturer           1 Openmoko, Inc&lt;br /&gt;
  iProduct                2 Neo1973 Bootloader U-Boot 1.2.0-g6c7cac8c-dirty-moko3&lt;br /&gt;
  iSerial                 3 0000000&lt;br /&gt;
  bNumConfigurations      1&lt;br /&gt;
  Configuration Descriptor:&lt;br /&gt;
    bLength                 9&lt;br /&gt;
    bDescriptorType         2&lt;br /&gt;
    wTotalLength           85&lt;br /&gt;
    bNumInterfaces          3&lt;br /&gt;
    bConfigurationValue     1&lt;br /&gt;
    iConfiguration          4 TTY via USB&lt;br /&gt;
    bmAttributes         0xc0&lt;br /&gt;
      Self Powered&lt;br /&gt;
    MaxPower                0mA&lt;br /&gt;
    Interface Descriptor:&lt;br /&gt;
      bLength                 9&lt;br /&gt;
      bDescriptorType         4&lt;br /&gt;
      bInterfaceNumber        0&lt;br /&gt;
      bAlternateSetting       0&lt;br /&gt;
      bNumEndpoints           1&lt;br /&gt;
      bInterfaceClass         2 Communications&lt;br /&gt;
      bInterfaceSubClass      2 Abstract (modem)&lt;br /&gt;
      bInterfaceProtocol      1 AT-commands (v.25ter)&lt;br /&gt;
      iInterface              6 Control Interface&lt;br /&gt;
      CDC Header:&lt;br /&gt;
        bcdCDC               0.6e&lt;br /&gt;
      CDC Call Management:&lt;br /&gt;
        bmCapabilities       0x00&lt;br /&gt;
        bDataInterface          1&lt;br /&gt;
      CDC ACM:&lt;br /&gt;
        bmCapabilities       0x00&lt;br /&gt;
      CDC Union:&lt;br /&gt;
        bMasterInterface        0&lt;br /&gt;
        bSlaveInterface         1 &lt;br /&gt;
      Endpoint Descriptor:&lt;br /&gt;
        bLength                 7&lt;br /&gt;
        bDescriptorType         5&lt;br /&gt;
        bEndpointAddress     0x81  EP 1 IN&lt;br /&gt;
        bmAttributes            3&lt;br /&gt;
          Transfer Type            Interrupt&lt;br /&gt;
          Synch Type               None&lt;br /&gt;
          Usage Type               Data&lt;br /&gt;
        wMaxPacketSize     0x0010  1x 16 bytes&lt;br /&gt;
        bInterval             255&lt;br /&gt;
    Interface Descriptor:&lt;br /&gt;
      bLength                 9&lt;br /&gt;
      bDescriptorType         4&lt;br /&gt;
      bInterfaceNumber        1&lt;br /&gt;
      bAlternateSetting       0&lt;br /&gt;
      bNumEndpoints           2&lt;br /&gt;
      bInterfaceClass        10 CDC Data&lt;br /&gt;
      bInterfaceSubClass      0 Unused&lt;br /&gt;
      bInterfaceProtocol      0 &lt;br /&gt;
      iInterface              5 Bulk Data Interface&lt;br /&gt;
      Endpoint Descriptor:&lt;br /&gt;
        bLength                 7&lt;br /&gt;
        bDescriptorType         5&lt;br /&gt;
        bEndpointAddress     0x02  EP 2 OUT&lt;br /&gt;
        bmAttributes            2&lt;br /&gt;
          Transfer Type            Bulk&lt;br /&gt;
          Synch Type               None&lt;br /&gt;
          Usage Type               Data&lt;br /&gt;
        wMaxPacketSize     0x0010  1x 16 bytes&lt;br /&gt;
        bInterval             255&lt;br /&gt;
      Endpoint Descriptor:&lt;br /&gt;
        bLength                 7&lt;br /&gt;
        bDescriptorType         5&lt;br /&gt;
        bEndpointAddress     0x83  EP 3 IN&lt;br /&gt;
        bmAttributes            2&lt;br /&gt;
          Transfer Type            Bulk&lt;br /&gt;
          Synch Type               None&lt;br /&gt;
          Usage Type               Data&lt;br /&gt;
        wMaxPacketSize     0x0010  1x 16 bytes&lt;br /&gt;
        bInterval             255&lt;br /&gt;
    Interface Descriptor:&lt;br /&gt;
      bLength                 9&lt;br /&gt;
      bDescriptorType         4&lt;br /&gt;
      bInterfaceNumber        2&lt;br /&gt;
      bAlternateSetting       0&lt;br /&gt;
      bNumEndpoints           0&lt;br /&gt;
      bInterfaceClass       254 Application Specific Interface&lt;br /&gt;
      bInterfaceSubClass      1 Device Firmware Update&lt;br /&gt;
      bInterfaceProtocol      1 &lt;br /&gt;
      iInterface              7 USB Device Firmware Upgrade&lt;br /&gt;
Device Status:     0x0001&lt;br /&gt;
  Self Powered&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, you can access it using your favourite terminal program.&lt;br /&gt;
&lt;br /&gt;
Then, if the environment is not set correctly, you will need to use the current console (e.g. serial console) to change the [[bootloader environment#console|console entries in the environment]]:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
GTA01Bv2 # setenv stderr usbtty&lt;br /&gt;
GTA01Bv2 # setenv stdout usbtty&lt;br /&gt;
GTA01Bv2 # setenv stdin usbtty&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Typical u-boot prompt ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
U-Boot 1.2.0-moko1 (Feb 16 2007 - 00:36:13)&lt;br /&gt;
&lt;br /&gt;
DRAM:  128 MB&lt;br /&gt;
NAND:  64 MiB&lt;br /&gt;
Found Environment offset in OOB..&lt;br /&gt;
Video: 640x480x8 31kHz 59Hz&lt;br /&gt;
USB:   S3C2410 USB Deviced&lt;br /&gt;
In:    serial&lt;br /&gt;
Out:   serial&lt;br /&gt;
Err:   serial&lt;br /&gt;
Hit any key to stop autoboot:  0 &lt;br /&gt;
GTA01Bv3 #&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Commands on the bootloader prompt ===&lt;br /&gt;
&lt;br /&gt;
:''See [[bootloader commands]].''&lt;br /&gt;
&lt;br /&gt;
=== What if I borked my bootloader environment and don't get a prompt anymore? ===&lt;br /&gt;
Found a solution here:&lt;br /&gt;
[[http://markmail.org/message/gqypwiohdet6x4am?q=almesberger+partition&amp;amp;page=1&amp;amp;refer=xbamkzwwsaobv7wa]]&lt;br /&gt;
&lt;br /&gt;
It works the following way:&lt;br /&gt;
* Get the devirginator:&lt;br /&gt;
 svn co http://svn.openmoko.org/trunk/src/host/devirginator&lt;br /&gt;
 cd devirginator&lt;br /&gt;
* Read the u-boot environment from the device:&lt;br /&gt;
 dfu-util -a u-boot_env -R -U env.in&lt;br /&gt;
* Create a file that contains everything you want to change in your u-boot environment or get it by issuing the following command:&lt;br /&gt;
 wget http://svn.openmoko.org/trunk/src/host/devirginator/environment.in&lt;br /&gt;
* Now let devirginator generate a new u-boot_env partition for us, - that contains the partition table from our u-boot_env, - and all changes we wanted to make; Note that the -D GTA02 is needed for the neo Freeruner only.&lt;br /&gt;
 ./envedit.pl -i env.in -f environment.in -o env.out -D GTA02&lt;br /&gt;
* On my box the partition layout didn't seem to match the idea of envedit.pl, so it issued 2 warnings:&lt;br /&gt;
 warning: environment is 262144 bytes, expected 16384&lt;br /&gt;
 CRC error: expected 0xc33e35fc, got 0x93097bfb&lt;br /&gt;
* In this case jut add a additional argument to the command line - that has to be the 1st argument, though, and that contains the size information we got from the warning:&lt;br /&gt;
 ./envedit.pl -s 262144 -i env.in -D GTA02 -f environment.in  -o env.out&lt;br /&gt;
* Now the perl script should no more output anything but write a new u-boot_env partition that we can upload to the device by:&lt;br /&gt;
 dfu-util -a u-boot_env -R -D env.out&lt;br /&gt;
&lt;br /&gt;
== Device Firmware Upgrade ==&lt;br /&gt;
&lt;br /&gt;
Our version of u-boot also implements [[USB DFU]]. This can be useful to&lt;br /&gt;
load files and kernel for quick testing.&lt;br /&gt;
&lt;br /&gt;
To find out whether your version of u-boot supports this, use the output of&lt;br /&gt;
 $ lsusb -v -d 1457:5119&lt;br /&gt;
while the phone is in u-boot mode.&lt;br /&gt;
&lt;br /&gt;
If it supports DFU, you should see the following snippet towards the end of the output:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    Interface Descriptor:&lt;br /&gt;
      bLength                 9&lt;br /&gt;
      bDescriptorType         4&lt;br /&gt;
      bInterfaceNumber        2&lt;br /&gt;
      bAlternateSetting       0&lt;br /&gt;
      bNumEndpoints           0&lt;br /&gt;
      bInterfaceClass       254 Application Specific Interface&lt;br /&gt;
      bInterfaceSubClass      1 Device Firmware Update&lt;br /&gt;
      bInterfaceProtocol      1 &lt;br /&gt;
      iInterface              0 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For information on how to do firmware upgrades, please see [[dfu-util]]. For neo 1973 you may see [[Flashing_Openmoko#Actually_flashing_things_into_the_device]], and for the FreeRunner : [[Flashing the Neo FreeRunner]].&lt;br /&gt;
&lt;br /&gt;
=== Booting files over DFU ===&lt;br /&gt;
&lt;br /&gt;
To load a file at memory address 0x32000000:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dfu-util -a 0 -D fileToLoad -R&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After that, send 'bootm 0x32000000' to u-boot or 'bootelf 0x32000000' if&lt;br /&gt;
its an elf file.&lt;br /&gt;
&lt;br /&gt;
Simple python script that can boot an ELF image - avoiding a ACM bug that breaks on large packets.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/usr/bin/python&lt;br /&gt;
import sys&lt;br /&gt;
import os&lt;br /&gt;
import time&lt;br /&gt;
&lt;br /&gt;
cmd1 = &amp;quot;neo backlight off\n&amp;quot;&lt;br /&gt;
cmd2 = &amp;quot;bootelf 0x32000000\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
def output(tty, str):&lt;br /&gt;
    for x in str:&lt;br /&gt;
        tty.write(x)&lt;br /&gt;
        tty.flush()&lt;br /&gt;
&lt;br /&gt;
if len(sys.argv) == 2:&lt;br /&gt;
    print &amp;quot;Loading %s...&amp;quot; % sys.argv[1]&lt;br /&gt;
&lt;br /&gt;
    loadfile = &amp;quot;dfu-util -a 0 -D %s -R&amp;quot; % sys.argv[1]&lt;br /&gt;
&lt;br /&gt;
    os.system(loadfile)&lt;br /&gt;
&lt;br /&gt;
    time.sleep(3)&lt;br /&gt;
&lt;br /&gt;
    tty = open(&amp;quot;/dev/ttyACM0&amp;quot;, &amp;quot;a&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
    output(tty, cmd1)&lt;br /&gt;
    output(tty, cmd2)&lt;br /&gt;
&lt;br /&gt;
    tty.close()&lt;br /&gt;
else:&lt;br /&gt;
    print &amp;quot;Usage: %s elffile&amp;quot; % sys.argv[0]&lt;br /&gt;
    print &amp;quot;&amp;quot;&lt;br /&gt;
    sys.exit(2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
=== USB connectivity problems ===&lt;br /&gt;
&lt;br /&gt;
I once got errors like this (in dmesg or /var/log/messages) on the host side while connecting the neo in u-boot:&lt;br /&gt;
&lt;br /&gt;
 usb 2-1: device descriptor read/64, error -110&lt;br /&gt;
 usb usb2: Controller not stopped yet!&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
 hub 4-0:1.0: port 1 disabled by hub (EMI?), re-enabling...&lt;br /&gt;
 usb 4-1: USB disconnect, address 2&lt;br /&gt;
&lt;br /&gt;
A possible solution is given below. Please note that if you have a usb keyboard or mouse then the command might cause trouble. &lt;br /&gt;
&lt;br /&gt;
 rmmod uhci_hcd ; modprobe uhci_hcd&lt;br /&gt;
&lt;br /&gt;
Another option is to plug the FR into a different USB port on the host, preferably one on the Motherboard not the hub.&lt;br /&gt;
&lt;br /&gt;
Disconnecting the Neo's USB while powering up may prevent this problem in the future.&lt;br /&gt;
&lt;br /&gt;
== Related pages ==&lt;br /&gt;
&lt;br /&gt;
See [[Flashing Neo 1973]] and [[Flashing Freerunner]] for instructions on using dfu-util to install a new bootloader in your phone.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:System Developers]]&lt;br /&gt;
[[Category:Flashing Openmoko]]&lt;/div&gt;</summary>
		<author><name>Brian H Wilson</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/GTA02_revisions</id>
		<title>GTA02 revisions</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/GTA02_revisions"/>
				<updated>2008-08-22T19:44:14Z</updated>
		
		<summary type="html">&lt;p&gt;Brian H Wilson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page will give you an overview of all the revisions of the GTA02 hardware, both pre-release and planned future revisions. The internal codename of the [[Neo FreeRunner]] was GTA02.&lt;br /&gt;
&lt;br /&gt;
All Neo Freerunners that have been released to the public at this time are [[#GTA02v5|revision 5]]. (August 2008)&lt;br /&gt;
&lt;br /&gt;
== GTA02 specification ==&lt;br /&gt;
&lt;br /&gt;
The GTA02 will be a [[GTA01]] but with a major revision of everything. These components were added:&lt;br /&gt;
* Wifi: Atheros 802.11 b/g&lt;br /&gt;
* CPU: Samsung S3C2442 B54 SoC @ 400Mhz&lt;br /&gt;
* SMedia Glamo3362 Graphics Accelerator&lt;br /&gt;
* 2x ST 3D Accelerometers&lt;br /&gt;
* 256MB Flash&lt;br /&gt;
* 128MB SDRAM&lt;br /&gt;
* 2MB NOR Flash&lt;br /&gt;
* 1200mAh Battery&lt;br /&gt;
* 2 LEDs illuminating the two buttons. &lt;br /&gt;
* GPS: u-blox/Atmel ATR0635&lt;br /&gt;
* Bluetooth&lt;br /&gt;
* GSM/GPRS: 850/1800/1900 Mhz or 900/1800/1900 Mhz&lt;br /&gt;
* USB Host function with power&lt;br /&gt;
And it lost:&lt;br /&gt;
* One speaker, becoming mono. &lt;br /&gt;
&lt;br /&gt;
== Estimated time line ==&lt;br /&gt;
{{Todo|It should be nice if their are some dates next to the milestones}}&lt;br /&gt;
* GTA02v3 design finalized - DONE&lt;br /&gt;
* GTA02v3 power supply flaw found, GTA02v4 needed - DONE&lt;br /&gt;
* GTA02v4 design finalized - DONE&lt;br /&gt;
* GTA02v4 small number produced for Openmoko internal developer evaluation - DONE&lt;br /&gt;
* GTA02v4 thorough evaluation by Openmoko internal developers - In progress&lt;br /&gt;
* GTA02v4 flaw found, GTA02v5 needed - On hold while further development on drivers is done to ensure no further hardware bugs. - In progress&lt;br /&gt;
* GTA02v5 design finalized - DONE&lt;br /&gt;
* GTA02v5 small number produced for Openmoko internal developer evaluation - Done (around 20)&lt;br /&gt;
* GTA02v5 thorough evaluation by Openmoko internal developers - Done&lt;br /&gt;
* GTA02v5 produced in moderate volume - Done&lt;br /&gt;
* GTA02v5 goes on sale to community via web store - Done &lt;br /&gt;
&lt;br /&gt;
== GTA02v1 ==&lt;br /&gt;
First generation of prototypes that was given to internal Openmoko software developers. Total 30 pcs fabricated.&lt;br /&gt;
&lt;br /&gt;
*It is working just fine, but still based on 2440, with external NAND/SDRAM and no NOR flash&lt;br /&gt;
*Using the PCF50633 05 N3 due to 04 N3 not available, re-work power for basic schematics verification&lt;br /&gt;
*Using GTA01 SIM socket&lt;br /&gt;
*Add external debug port&lt;br /&gt;
*Still using Global locate A-GPS&lt;br /&gt;
* ATAG_REVISION: 0310&lt;br /&gt;
&lt;br /&gt;
== GTA02v2 ==&lt;br /&gt;
Second generation of prototypes, Total 50 pcs run at Taipei SMT factory MOUNT&lt;br /&gt;
&lt;br /&gt;
*Ideal is have 256 MB NAND on Samsung package, Due to chip availability Start using S3C2442 B43&lt;br /&gt;
*Using correct PMU PCF50633 04 N3&lt;br /&gt;
*Change new SIM socket&lt;br /&gt;
*Change to u-blox A-GPS&lt;br /&gt;
*Change LCM power from 3.3v to 1.8v&lt;br /&gt;
*USB power switch layout/pin assignment mistake, could not verify USB host supply 5v function&lt;br /&gt;
*GPS function verified ok with good sensitivity&lt;br /&gt;
* ATAG_REVISION: 0320&lt;br /&gt;
&lt;br /&gt;
== GTA02v3 ==&lt;br /&gt;
Production verification version, 2007/10/11 28 pcs fabricate at FIC SuZhou&lt;br /&gt;
&lt;br /&gt;
*Still using S3C2442 B43 for hardware verification&lt;br /&gt;
*Using control pilot run to verify S3C2442 B54 chips&amp;lt;br&amp;gt;&lt;br /&gt;
* ATAG_REVISION: 0330&lt;br /&gt;
&lt;br /&gt;
== GTA02v4 ==&lt;br /&gt;
Mass production release candidate version 1&lt;br /&gt;
&lt;br /&gt;
2 weeks after v3 gerber out, release the v4 gerber, and 2007/10/20 20 pcs fabricate at FIC SuZhou &lt;br /&gt;
&lt;br /&gt;
*Change LCM power from 1.8v to 3.3v for display stability issue&lt;br /&gt;
*fabricate another 200 pcs for yield rate/production verification&lt;br /&gt;
*fabricate 50 pcs with S3C2442 B43 (128 MB NAND) for quality comparsion&lt;br /&gt;
*USB host power chip have some output voltage stability issues with Vb/Vcc comes from different power source, need layout change to fix the issue&lt;br /&gt;
*Battery Coulomb design not working on A4&lt;br /&gt;
* ATAG_REVISION: 0340&lt;br /&gt;
&lt;br /&gt;
== GTA02v5 ==&lt;br /&gt;
Mass production candidate version 2/Mass production version&lt;br /&gt;
&lt;br /&gt;
* First batch fabricate 2008/1/14 at FIC SuZhou&lt;br /&gt;
* Mass production A5 trial run start from 2008 March, including some resistor/capacitor change compare with inital 100 pcs prototypes A5, and prototypes for GTA02 developers was tracked in the [[Prototypes| Prototypes Page]]&lt;br /&gt;
* Coulomb counter issue fixed&lt;br /&gt;
* USB host power switch fixed&lt;br /&gt;
* Need add capacitor for PMU Vbat input for stability issue, this could be done by direct SMT or hand rework&lt;br /&gt;
* Need rework (still using SMT in production) add capacitor for PMU Vbat input for PMU stability issue.&lt;br /&gt;
* Need manual rework GSM IR UART path a 100k pull down for better GSM deep sleep&lt;br /&gt;
* ATAG_REVISION: 0350&lt;br /&gt;
&lt;br /&gt;
===GTA02 mass Production version change list===&lt;br /&gt;
*PMU's LED power error: PMU potential damage issue&lt;br /&gt;
*NOR FLASH enable WP: User can write data into NOR FLASH.&lt;br /&gt;
*CE CS/RS fine tune: Audio's background noise too high&lt;br /&gt;
*I2C pull high resistor: The resistor is too high and signal is distorted &lt;br /&gt;
*GSM leakage current: TX_MODEM has a pull high resistor on IO_3V3&lt;br /&gt;
*Power consumption: Disable keep active function&lt;br /&gt;
*SDIO clock and esd protect resistor&lt;br /&gt;
*Refer to Datasheet: R1526 to 33K&lt;br /&gt;
*GSM modem on pin: The R1018 is too small and has some leakage current&lt;br /&gt;
*LED driving transistor: When GPIO is on, the transistor will be draw more current on LED. This is component change fix, do not need change PCB or re-work.&lt;br /&gt;
&lt;br /&gt;
== GTA02v6 ==&lt;br /&gt;
Mass production candidate version 3/Mass production version&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A6 will be fine tune version of A5, only minor schematic change for better product quality and version control. Capacitor and resistor change A6 also on mass production A5&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*First 100 pcs start from 2008 mid April, and factory make component placement mistake on GSM, second 100 pcs PCB arrive time TBD. &lt;br /&gt;
*Add capacitor space for Vbat, reduce the SMT effort&lt;br /&gt;
*Add GSM IR resistor for better GSM deep sleep&lt;br /&gt;
*Reserve 3 GPIO for hardware version control&lt;br /&gt;
*Fixed LEDs power usage (from about 150mW of v5 to about 25mW)&lt;br /&gt;
* ATAG_REVISION: 0360&lt;br /&gt;
&lt;br /&gt;
=== GTA02 A5 to A6 changes ===&lt;br /&gt;
*Power Glitch on VB_SYS: Add capacitor on layout, Mass production A5 also apply this change.&lt;br /&gt;
*G-sensor separate these interrupt pins: At A5, each accelerometer INT1/INT2 connected to same line, at A6 only INT1 was connected.&lt;br /&gt;
*GSM_modem power source  Reduce power's ripple when the phone is talking&lt;br /&gt;
*Keep active 	Disable keep active function, just fine tune&lt;br /&gt;
*GPIO for version control	&lt;br /&gt;
*GSM RX_IR has some noise  Add resistor and reduce GSM RX_IR noise and gsm can't enter suspend mode easily, apply on mass production A5.&lt;br /&gt;
*LED driving transistor	apply on mass production A5.&lt;br /&gt;
*LCM's VDDIO	We can totally power off LCM's power, save about extra 1mA.&lt;/div&gt;</summary>
		<author><name>Brian H Wilson</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/GTA02_revisions</id>
		<title>GTA02 revisions</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/GTA02_revisions"/>
				<updated>2008-08-22T19:43:29Z</updated>
		
		<summary type="html">&lt;p&gt;Brian H Wilson: Added statement that v5 is current revision&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page will give you an overview of all the revisions of the GTA02 hardware, both pre-release and planned future revisions. The internal codename of the [[Neo FreeRunner]] was GTA02.&lt;br /&gt;
&lt;br /&gt;
All Neo Freerunners that have been released to the public at this time are [[#GTA02V5|revision 5]]. (August 2008)&lt;br /&gt;
&lt;br /&gt;
== GTA02 specification ==&lt;br /&gt;
&lt;br /&gt;
The GTA02 will be a [[GTA01]] but with a major revision of everything. These components were added:&lt;br /&gt;
* Wifi: Atheros 802.11 b/g&lt;br /&gt;
* CPU: Samsung S3C2442 B54 SoC @ 400Mhz&lt;br /&gt;
* SMedia Glamo3362 Graphics Accelerator&lt;br /&gt;
* 2x ST 3D Accelerometers&lt;br /&gt;
* 256MB Flash&lt;br /&gt;
* 128MB SDRAM&lt;br /&gt;
* 2MB NOR Flash&lt;br /&gt;
* 1200mAh Battery&lt;br /&gt;
* 2 LEDs illuminating the two buttons. &lt;br /&gt;
* GPS: u-blox/Atmel ATR0635&lt;br /&gt;
* Bluetooth&lt;br /&gt;
* GSM/GPRS: 850/1800/1900 Mhz or 900/1800/1900 Mhz&lt;br /&gt;
* USB Host function with power&lt;br /&gt;
And it lost:&lt;br /&gt;
* One speaker, becoming mono. &lt;br /&gt;
&lt;br /&gt;
== Estimated time line ==&lt;br /&gt;
{{Todo|It should be nice if their are some dates next to the milestones}}&lt;br /&gt;
* GTA02v3 design finalized - DONE&lt;br /&gt;
* GTA02v3 power supply flaw found, GTA02v4 needed - DONE&lt;br /&gt;
* GTA02v4 design finalized - DONE&lt;br /&gt;
* GTA02v4 small number produced for Openmoko internal developer evaluation - DONE&lt;br /&gt;
* GTA02v4 thorough evaluation by Openmoko internal developers - In progress&lt;br /&gt;
* GTA02v4 flaw found, GTA02v5 needed - On hold while further development on drivers is done to ensure no further hardware bugs. - In progress&lt;br /&gt;
* GTA02v5 design finalized - DONE&lt;br /&gt;
* GTA02v5 small number produced for Openmoko internal developer evaluation - Done (around 20)&lt;br /&gt;
* GTA02v5 thorough evaluation by Openmoko internal developers - Done&lt;br /&gt;
* GTA02v5 produced in moderate volume - Done&lt;br /&gt;
* GTA02v5 goes on sale to community via web store - Done &lt;br /&gt;
&lt;br /&gt;
== GTA02v1 ==&lt;br /&gt;
First generation of prototypes that was given to internal Openmoko software developers. Total 30 pcs fabricated.&lt;br /&gt;
&lt;br /&gt;
*It is working just fine, but still based on 2440, with external NAND/SDRAM and no NOR flash&lt;br /&gt;
*Using the PCF50633 05 N3 due to 04 N3 not available, re-work power for basic schematics verification&lt;br /&gt;
*Using GTA01 SIM socket&lt;br /&gt;
*Add external debug port&lt;br /&gt;
*Still using Global locate A-GPS&lt;br /&gt;
* ATAG_REVISION: 0310&lt;br /&gt;
&lt;br /&gt;
== GTA02v2 ==&lt;br /&gt;
Second generation of prototypes, Total 50 pcs run at Taipei SMT factory MOUNT&lt;br /&gt;
&lt;br /&gt;
*Ideal is have 256 MB NAND on Samsung package, Due to chip availability Start using S3C2442 B43&lt;br /&gt;
*Using correct PMU PCF50633 04 N3&lt;br /&gt;
*Change new SIM socket&lt;br /&gt;
*Change to u-blox A-GPS&lt;br /&gt;
*Change LCM power from 3.3v to 1.8v&lt;br /&gt;
*USB power switch layout/pin assignment mistake, could not verify USB host supply 5v function&lt;br /&gt;
*GPS function verified ok with good sensitivity&lt;br /&gt;
* ATAG_REVISION: 0320&lt;br /&gt;
&lt;br /&gt;
== GTA02v3 ==&lt;br /&gt;
Production verification version, 2007/10/11 28 pcs fabricate at FIC SuZhou&lt;br /&gt;
&lt;br /&gt;
*Still using S3C2442 B43 for hardware verification&lt;br /&gt;
*Using control pilot run to verify S3C2442 B54 chips&amp;lt;br&amp;gt;&lt;br /&gt;
* ATAG_REVISION: 0330&lt;br /&gt;
&lt;br /&gt;
== GTA02v4 ==&lt;br /&gt;
Mass production release candidate version 1&lt;br /&gt;
&lt;br /&gt;
2 weeks after v3 gerber out, release the v4 gerber, and 2007/10/20 20 pcs fabricate at FIC SuZhou &lt;br /&gt;
&lt;br /&gt;
*Change LCM power from 1.8v to 3.3v for display stability issue&lt;br /&gt;
*fabricate another 200 pcs for yield rate/production verification&lt;br /&gt;
*fabricate 50 pcs with S3C2442 B43 (128 MB NAND) for quality comparsion&lt;br /&gt;
*USB host power chip have some output voltage stability issues with Vb/Vcc comes from different power source, need layout change to fix the issue&lt;br /&gt;
*Battery Coulomb design not working on A4&lt;br /&gt;
* ATAG_REVISION: 0340&lt;br /&gt;
&lt;br /&gt;
== GTA02v5 ==&lt;br /&gt;
Mass production candidate version 2/Mass production version&lt;br /&gt;
&lt;br /&gt;
* First batch fabricate 2008/1/14 at FIC SuZhou&lt;br /&gt;
* Mass production A5 trial run start from 2008 March, including some resistor/capacitor change compare with inital 100 pcs prototypes A5, and prototypes for GTA02 developers was tracked in the [[Prototypes| Prototypes Page]]&lt;br /&gt;
* Coulomb counter issue fixed&lt;br /&gt;
* USB host power switch fixed&lt;br /&gt;
* Need add capacitor for PMU Vbat input for stability issue, this could be done by direct SMT or hand rework&lt;br /&gt;
* Need rework (still using SMT in production) add capacitor for PMU Vbat input for PMU stability issue.&lt;br /&gt;
* Need manual rework GSM IR UART path a 100k pull down for better GSM deep sleep&lt;br /&gt;
* ATAG_REVISION: 0350&lt;br /&gt;
&lt;br /&gt;
===GTA02 mass Production version change list===&lt;br /&gt;
*PMU's LED power error: PMU potential damage issue&lt;br /&gt;
*NOR FLASH enable WP: User can write data into NOR FLASH.&lt;br /&gt;
*CE CS/RS fine tune: Audio's background noise too high&lt;br /&gt;
*I2C pull high resistor: The resistor is too high and signal is distorted &lt;br /&gt;
*GSM leakage current: TX_MODEM has a pull high resistor on IO_3V3&lt;br /&gt;
*Power consumption: Disable keep active function&lt;br /&gt;
*SDIO clock and esd protect resistor&lt;br /&gt;
*Refer to Datasheet: R1526 to 33K&lt;br /&gt;
*GSM modem on pin: The R1018 is too small and has some leakage current&lt;br /&gt;
*LED driving transistor: When GPIO is on, the transistor will be draw more current on LED. This is component change fix, do not need change PCB or re-work.&lt;br /&gt;
&lt;br /&gt;
== GTA02v6 ==&lt;br /&gt;
Mass production candidate version 3/Mass production version&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A6 will be fine tune version of A5, only minor schematic change for better product quality and version control. Capacitor and resistor change A6 also on mass production A5&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*First 100 pcs start from 2008 mid April, and factory make component placement mistake on GSM, second 100 pcs PCB arrive time TBD. &lt;br /&gt;
*Add capacitor space for Vbat, reduce the SMT effort&lt;br /&gt;
*Add GSM IR resistor for better GSM deep sleep&lt;br /&gt;
*Reserve 3 GPIO for hardware version control&lt;br /&gt;
*Fixed LEDs power usage (from about 150mW of v5 to about 25mW)&lt;br /&gt;
* ATAG_REVISION: 0360&lt;br /&gt;
&lt;br /&gt;
=== GTA02 A5 to A6 changes ===&lt;br /&gt;
*Power Glitch on VB_SYS: Add capacitor on layout, Mass production A5 also apply this change.&lt;br /&gt;
*G-sensor separate these interrupt pins: At A5, each accelerometer INT1/INT2 connected to same line, at A6 only INT1 was connected.&lt;br /&gt;
*GSM_modem power source  Reduce power's ripple when the phone is talking&lt;br /&gt;
*Keep active 	Disable keep active function, just fine tune&lt;br /&gt;
*GPIO for version control	&lt;br /&gt;
*GSM RX_IR has some noise  Add resistor and reduce GSM RX_IR noise and gsm can't enter suspend mode easily, apply on mass production A5.&lt;br /&gt;
*LED driving transistor	apply on mass production A5.&lt;br /&gt;
*LCM's VDDIO	We can totally power off LCM's power, save about extra 1mA.&lt;/div&gt;</summary>
		<author><name>Brian H Wilson</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/U-Boot</id>
		<title>U-Boot</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/U-Boot"/>
				<updated>2008-08-22T19:36:33Z</updated>
		
		<summary type="html">&lt;p&gt;Brian H Wilson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|Bootloader}}&lt;br /&gt;
&lt;br /&gt;
{{Bootloader}}&lt;br /&gt;
[[Image:GTA01-U-Boot.JPG|thumb|300px|u-boot menu on Neo1973]] [[Image:Neo1973 uboot splash closeup.jpg|thumb|300px|u-boot splash screen on Neo1973]]&lt;br /&gt;
&lt;br /&gt;
The bootloader used on the smartphones is called '''U-Boot'''. It takes care of device functionality until [[Openmoko]] is booted. This includes [[USB DFU]] for [[flashing Openmoko]], a splash screen, a boot menu, a console for [[bootloader commands]], configuration via [[bootloader environment]], and loading a [[kernel]]. &lt;br /&gt;
&lt;br /&gt;
There are various [[bootloader versions]] available.&lt;br /&gt;
&lt;br /&gt;
== Booting into U-boot ==&lt;br /&gt;
&lt;br /&gt;
* Make sure that your phone has had the battery and USB cable removed for at least 30 seconds.&lt;br /&gt;
* Hold in the AUX button on power-up to access the boot menu.&lt;br /&gt;
* Connect the Neo (ie not Debug Board) to a Linux host with the USB cable.&lt;br /&gt;
* Set the console to USB.&lt;br /&gt;
* Connect to /dev/ttyACM0 with a terminal program on the Linux host (you might need to chown uucp.uucp /dev/ttyACM0 )&lt;br /&gt;
* Note that the cdc_acm /dev/ttyACM0 access disappears as soon as the Neo boots, and is replaced by the cdc_ether usb0 network access.&lt;br /&gt;
* You're now at the bootloader prompt.&lt;br /&gt;
* Set the bootdelay uboot environment variable to -1 if you want it to always halt at the bootloader on power-up.&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
&lt;br /&gt;
All versions of the OM smartphone use the [http://u-boot.sourceforge.net/ u-boot] bootloader.&lt;br /&gt;
&lt;br /&gt;
More information on u-boot can be found at &lt;br /&gt;
* http://www.denx.de/wiki/DULG&lt;br /&gt;
* http://www.gumstix.org/tikiwiki/tiki-index.php?page=U-Boot&lt;br /&gt;
* http://linuxdevices.com/articles/AT5085702347.html&lt;br /&gt;
&lt;br /&gt;
Additions to the vanilla u-boot already implemented include: &lt;br /&gt;
* Support for boot from NAND flash using [[S3C2410 Steppingstone]]&lt;br /&gt;
* Support for S3C2410 NAND flash&lt;br /&gt;
* Support for downloading programs via S3C2410 USB Device Controller&lt;br /&gt;
* Support to display bootup logo / status on S3C2410 Framebuffer&lt;br /&gt;
&lt;br /&gt;
However, u-boot still doesn't support many of the features that GTA01 needs, such as&lt;br /&gt;
* Support for reading kernel/initrd from SD/Transflash&lt;br /&gt;
&lt;br /&gt;
[[User:HaraldWelte|HaraldWelte]] is working on those issues, and in fact most of them have already been implemented.&lt;br /&gt;
&lt;br /&gt;
== Bootloader source code ==&lt;br /&gt;
&lt;br /&gt;
The current bootloader source can be found at http://git.openmoko.org/?p=u-boot.git;a=shortlog;h=stable . &lt;br /&gt;
&lt;br /&gt;
To get u-boot by subversion:&lt;br /&gt;
&lt;br /&gt;
 svn co https://svn.openmoko.org/ openmoko/u-boot&lt;br /&gt;
&lt;br /&gt;
To build u-boot:&lt;br /&gt;
* Clone the git tree and check out the stable branch&lt;br /&gt;
* Set the CROSS_COMPILE environment variable to specify the prefix to your toolchain binaries&lt;br /&gt;
* Run &amp;quot;make gta02v5_config&amp;quot; (or gta01bv4_config, or whatever hardware revision you have)&lt;br /&gt;
* Run &amp;quot;make u-boot.udfu&amp;quot;. This will give you an image which you can install with dfu-util, or which you can upload into memory via JTAG (with a debug board)&lt;br /&gt;
&lt;br /&gt;
== Bootloader binary ==&lt;br /&gt;
&lt;br /&gt;
The latest bootloader binary builds can be found under http://buildhost.openmoko.org/daily/ in the subdirectory [device]/200808/[date]/.&lt;br /&gt;
&lt;br /&gt;
All versions of the GTA02 (Neo Freerunner) that have been sold to the public are version 5 hardware so look for a file with &amp;quot;gta02&amp;quot; and &amp;quot;v5&amp;quot; in the name, for example&lt;br /&gt;
uboot-gta02v5-latest.bin&lt;br /&gt;
&lt;br /&gt;
The file should be written to the NAND flash address 0x00000000 (size 0x30000) (the first [[partition]]).&lt;br /&gt;
&lt;br /&gt;
== Bootloader development ==&lt;br /&gt;
&lt;br /&gt;
=== QT2410 ===&lt;br /&gt;
If you want to do bootloader development on the QT2410, it's easier to work with a bootloader image that can be downloaded via USB into RAM instead of flashing.&lt;br /&gt;
&lt;br /&gt;
To do so, you need to edit the u-boot/include/configs/qt2410.h file, and change the &amp;quot;if 0&amp;quot; in Line 32 into a &amp;quot;if 1&amp;quot;, then recompile with &amp;quot;make&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The resulting &amp;quot;u-boot.bin&amp;quot; is _NOT SUITABLE_ for NAND flash, but only for direct execution from within ram, e.g. by using the [[s3c2410_boot_usb]] program.&lt;br /&gt;
&lt;br /&gt;
=== GTA01 ===&lt;br /&gt;
&lt;br /&gt;
Doing bootloader development on the GTA01 is a bit more tricky.  first, we don't have any NOR flash.  Second, there is no other way to boot _but_ from NAND.  Therefore, we also don't have a USB downloader like the QT2410.&lt;br /&gt;
&lt;br /&gt;
The main problem is:  The [[S3C2410 Steppingstone]] unconditionally copies the first 4k of flash into its internal SRAM.   That SRAM segment stays unconditionally mapped at physical address zero. How do we get around this&lt;br /&gt;
&lt;br /&gt;
=== GTA02 ===&lt;br /&gt;
&lt;br /&gt;
The first block holds a little 4KByte RAM buffer that is auto-filled&lt;br /&gt;
from NAND by CPU hardware, called &amp;quot;steppingstone&amp;quot; when we boot from&lt;br /&gt;
NAND, or the NOR is mapped in there.&lt;br /&gt;
&lt;br /&gt;
nCS0: 00000000 07FFFFFF  4K steppingstone or NOR (Aux held down) &amp;lt;br&amp;gt;&lt;br /&gt;
nCS1: 08000000 0FFFFFFF  Glamo  &amp;lt;br&amp;gt;&lt;br /&gt;
nCS2: 10000000 17FFFFFF  nothing mapped &amp;lt;br&amp;gt;&lt;br /&gt;
nCS3: 18000000 1FFFFFFF  NOR &amp;lt;br&amp;gt;&lt;br /&gt;
nCS4: 20000000 17FFFFFF  nothing mapped &amp;lt;br&amp;gt;&lt;br /&gt;
nCS5: 28000000 2FFFFFFF  nothing mapped &amp;lt;br&amp;gt;&lt;br /&gt;
nCS6: 30000000 37FFFFFF  on-MCP SDRAM 128MB &amp;lt;br&amp;gt;&lt;br /&gt;
nCS7: 38000000 3FFFFFFF  external SDRAM 128MB &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Using JTAG to boot from RAM ====&lt;br /&gt;
&lt;br /&gt;
So how can we boot from RAM? We use JTAG / OpenOCD to&lt;br /&gt;
&lt;br /&gt;
* Reset and halt the cpu at PC=0&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; reset halt&lt;br /&gt;
target halted in ARM state due to debug request, current mode: Supervisor&lt;br /&gt;
cpsr: 0x400000d3 pc: 0x00000000&lt;br /&gt;
MMU: disabled, D-Cache: disabled, I-Cache: disabled&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Download a small piece of code for low-level SDRAM timing initialization (overwrite 4k SRAM of steppingstone)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; load_binary /space/misc/gta01/u-boot.git/board/gta01/lowlevel_foo.bin 0            &lt;br /&gt;
downloaded 332 byte in 0s 21899us&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Assert a break point at address 0x33f80000 (which indicates that the low-level code has finished)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; bp 0x33f80000 4 hw&lt;br /&gt;
breakpoint added at address 0x33f80000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Run the code up to the break point&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; resume&lt;br /&gt;
Target 0 resumed&lt;br /&gt;
&amp;gt; Target 0 halted&lt;br /&gt;
target halted in ARM state due to breakpoint, current mode: Supervisor&lt;br /&gt;
cpsr: 0x600000d3 pc: 0x33f80000&lt;br /&gt;
MMU: disabled, D-Cache: disabled, I-Cache: enabled&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Download the u-boot RAM image to 0x33f80000&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; load_binary /space/misc/gta01/u-boot.git/u-boot.bin 0x33f80000&lt;br /&gt;
downloaded 135692 byte in 6s 567264us&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Resume processing&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; resume&lt;br /&gt;
Target 0 resumed&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At this point, the display backlight gets bright and we see the following familiar prompt on the serial console:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
U-Boot 1.1.6 (Jan 13 2007 - 23:44:23)&lt;br /&gt;
&lt;br /&gt;
DRAM:  128 MB&lt;br /&gt;
NAND:  64 MiB&lt;br /&gt;
*** Warning - bad CRC or NAND, using default environment&lt;br /&gt;
&lt;br /&gt;
In:    serial&lt;br /&gt;
Out:   serial&lt;br /&gt;
Err:   serial&lt;br /&gt;
Hit any key to stop autoboot:  0 &lt;br /&gt;
GTA01Bv2 # &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creating bootable images ==&lt;br /&gt;
&lt;br /&gt;
u-boot needs bootable images (such as kernels, but also initrd and others) in form of a so-called ''uImage''.  In order to create a ''uImage'' from e.g. a ''vmlinux'' kernel image, you can proceed as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
objcopy -O binary -R .note -R .comment -S vmlinux linux.bin&lt;br /&gt;
gzip -9 linux.bin&lt;br /&gt;
u-boot/tools/mkimage -A arm -O linux -T kernel -C gzip -a 30008000 -e 30008000 -n &amp;quot;Kernel Image QT2410&amp;quot; -d linux.bin.gz uImage&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Boot menu ==&lt;br /&gt;
[[Image:Neo1973 uboot menu.jpg|thumb|400px|u-boot boot menu on Neo1973]]&lt;br /&gt;
&lt;br /&gt;
As of the Phase-0 release, our u-boot version now features an on-screen boot menu. The items are defined by [[bootloader environment#menu|menu entries in the environment]].&lt;br /&gt;
&lt;br /&gt;
=== Accessing the boot menu ===&lt;br /&gt;
&lt;br /&gt;
You can access the boot menu by pressing and holding the [[Neo1973 AUX Button]] together with the power button while switching the phone on.&lt;br /&gt;
&lt;br /&gt;
=== Using the boot menu ===&lt;br /&gt;
&lt;br /&gt;
By pressing the [[Neo1973 AUX Button]] you can cycle through the menu items.  Use the ''POWER'' button to select one item. &lt;br /&gt;
&lt;br /&gt;
== Bootloader prompt ==&lt;br /&gt;
&lt;br /&gt;
=== Accessing the bootloader prompt ===&lt;br /&gt;
The bootloader prompt is available either on the serial console (via [[Debug Board]]), or as virtual USB Serial device (USB CDC_ACM).&lt;br /&gt;
Whether the serial port or usb is used depends on the u-boot environment variables '''stdin''', '''stdout''' and '''stderr'''.&lt;br /&gt;
&lt;br /&gt;
Whether or not you use usbtty, the first couple of messages will always be displayed on the serial console.&lt;br /&gt;
&lt;br /&gt;
The bootloader is currently configured to wait for three seconds.  If a key press on the '''stdin''' is received within those three seconds, auto-boot is aborted.&lt;br /&gt;
&lt;br /&gt;
==== Using usbtty from Linux ====&lt;br /&gt;
&lt;br /&gt;
Just by connecting the phone in u-boot mode to your Linux pc should make it detect a [[CDC ACM]] device, and you should get a new tty device called /dev/ttyACM0. If not, enable the CONFIG_USB_ACM (Device Drivers -&amp;gt; USB support -&amp;gt; USB Modem (CDC ACM) support). (Instructions for MacOS users are [[MacOS_X#USB_Serial|here]])&lt;br /&gt;
&lt;br /&gt;
Use your favourite terminal emulator (minicom, cu, zc, screen ...) to access it like any other serial port. If you don't have a favorite, try just: (cu is in the taylor-uucp package, use &amp;quot;apt-get install cu&amp;quot; if it is not yet installed)&lt;br /&gt;
 cu -l /dev/ttyACM0&lt;br /&gt;
&lt;br /&gt;
You might need to &lt;br /&gt;
 chown uucp.uucp /dev/ttyACM0&lt;br /&gt;
&lt;br /&gt;
to get the necessary rights (even as root).&lt;br /&gt;
&lt;br /&gt;
A nice alternative for cu is Werner Almesberger's [[NeoCon|neocon]].&lt;br /&gt;
&lt;br /&gt;
First, you should try to check whether the USB device shows up in 'lsusb' while you're running in u-boot mode:&lt;br /&gt;
&lt;br /&gt;
 # lsusb -d 1457:5119&lt;br /&gt;
 Bus 005 Device 079: ID 1457:5119  &lt;br /&gt;
&lt;br /&gt;
Second, let's see some more details about the available endpoints and configurations:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lsusb -v -d 1457:5119&lt;br /&gt;
Bus 005 Device 079: ID 1457:5119  &lt;br /&gt;
Device Descriptor:&lt;br /&gt;
  bLength                18&lt;br /&gt;
  bDescriptorType         1&lt;br /&gt;
  bcdUSB               1.10&lt;br /&gt;
  bDeviceClass            2 Communications&lt;br /&gt;
  bDeviceSubClass         0 &lt;br /&gt;
  bDeviceProtocol         0 &lt;br /&gt;
  bMaxPacketSize0        16&lt;br /&gt;
  idVendor           0x1457 &lt;br /&gt;
  idProduct          0x5119 &lt;br /&gt;
  bcdDevice            0.00&lt;br /&gt;
  iManufacturer           1 OpenMoko, Inc&lt;br /&gt;
  iProduct                2 Neo1973 Bootloader U-Boot 1.2.0-g6c7cac8c-dirty-moko3&lt;br /&gt;
  iSerial                 3 0000000&lt;br /&gt;
  bNumConfigurations      1&lt;br /&gt;
  Configuration Descriptor:&lt;br /&gt;
    bLength                 9&lt;br /&gt;
    bDescriptorType         2&lt;br /&gt;
    wTotalLength           85&lt;br /&gt;
    bNumInterfaces          3&lt;br /&gt;
    bConfigurationValue     1&lt;br /&gt;
    iConfiguration          4 TTY via USB&lt;br /&gt;
    bmAttributes         0xc0&lt;br /&gt;
      Self Powered&lt;br /&gt;
    MaxPower                0mA&lt;br /&gt;
    Interface Descriptor:&lt;br /&gt;
      bLength                 9&lt;br /&gt;
      bDescriptorType         4&lt;br /&gt;
      bInterfaceNumber        0&lt;br /&gt;
      bAlternateSetting       0&lt;br /&gt;
      bNumEndpoints           1&lt;br /&gt;
      bInterfaceClass         2 Communications&lt;br /&gt;
      bInterfaceSubClass      2 Abstract (modem)&lt;br /&gt;
      bInterfaceProtocol      1 AT-commands (v.25ter)&lt;br /&gt;
      iInterface              6 Control Interface&lt;br /&gt;
      CDC Header:&lt;br /&gt;
        bcdCDC               0.6e&lt;br /&gt;
      CDC Call Management:&lt;br /&gt;
        bmCapabilities       0x00&lt;br /&gt;
        bDataInterface          1&lt;br /&gt;
      CDC ACM:&lt;br /&gt;
        bmCapabilities       0x00&lt;br /&gt;
      CDC Union:&lt;br /&gt;
        bMasterInterface        0&lt;br /&gt;
        bSlaveInterface         1 &lt;br /&gt;
      Endpoint Descriptor:&lt;br /&gt;
        bLength                 7&lt;br /&gt;
        bDescriptorType         5&lt;br /&gt;
        bEndpointAddress     0x81  EP 1 IN&lt;br /&gt;
        bmAttributes            3&lt;br /&gt;
          Transfer Type            Interrupt&lt;br /&gt;
          Synch Type               None&lt;br /&gt;
          Usage Type               Data&lt;br /&gt;
        wMaxPacketSize     0x0010  1x 16 bytes&lt;br /&gt;
        bInterval             255&lt;br /&gt;
    Interface Descriptor:&lt;br /&gt;
      bLength                 9&lt;br /&gt;
      bDescriptorType         4&lt;br /&gt;
      bInterfaceNumber        1&lt;br /&gt;
      bAlternateSetting       0&lt;br /&gt;
      bNumEndpoints           2&lt;br /&gt;
      bInterfaceClass        10 CDC Data&lt;br /&gt;
      bInterfaceSubClass      0 Unused&lt;br /&gt;
      bInterfaceProtocol      0 &lt;br /&gt;
      iInterface              5 Bulk Data Interface&lt;br /&gt;
      Endpoint Descriptor:&lt;br /&gt;
        bLength                 7&lt;br /&gt;
        bDescriptorType         5&lt;br /&gt;
        bEndpointAddress     0x02  EP 2 OUT&lt;br /&gt;
        bmAttributes            2&lt;br /&gt;
          Transfer Type            Bulk&lt;br /&gt;
          Synch Type               None&lt;br /&gt;
          Usage Type               Data&lt;br /&gt;
        wMaxPacketSize     0x0010  1x 16 bytes&lt;br /&gt;
        bInterval             255&lt;br /&gt;
      Endpoint Descriptor:&lt;br /&gt;
        bLength                 7&lt;br /&gt;
        bDescriptorType         5&lt;br /&gt;
        bEndpointAddress     0x83  EP 3 IN&lt;br /&gt;
        bmAttributes            2&lt;br /&gt;
          Transfer Type            Bulk&lt;br /&gt;
          Synch Type               None&lt;br /&gt;
          Usage Type               Data&lt;br /&gt;
        wMaxPacketSize     0x0010  1x 16 bytes&lt;br /&gt;
        bInterval             255&lt;br /&gt;
    Interface Descriptor:&lt;br /&gt;
      bLength                 9&lt;br /&gt;
      bDescriptorType         4&lt;br /&gt;
      bInterfaceNumber        2&lt;br /&gt;
      bAlternateSetting       0&lt;br /&gt;
      bNumEndpoints           0&lt;br /&gt;
      bInterfaceClass       254 Application Specific Interface&lt;br /&gt;
      bInterfaceSubClass      1 Device Firmware Update&lt;br /&gt;
      bInterfaceProtocol      1 &lt;br /&gt;
      iInterface              7 USB Device Firmware Upgrade&lt;br /&gt;
Device Status:     0x0001&lt;br /&gt;
  Self Powered&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, you can access it using your favourite terminal program.&lt;br /&gt;
&lt;br /&gt;
Then, if the environment is not set correctly, you will need to use the current console (e.g. serial console) to change the [[bootloader environment#console|console entries in the environment]]:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
GTA01Bv2 # setenv stderr usbtty&lt;br /&gt;
GTA01Bv2 # setenv stdout usbtty&lt;br /&gt;
GTA01Bv2 # setenv stdin usbtty&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Typical u-boot prompt ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
U-Boot 1.2.0-moko1 (Feb 16 2007 - 00:36:13)&lt;br /&gt;
&lt;br /&gt;
DRAM:  128 MB&lt;br /&gt;
NAND:  64 MiB&lt;br /&gt;
Found Environment offset in OOB..&lt;br /&gt;
Video: 640x480x8 31kHz 59Hz&lt;br /&gt;
USB:   S3C2410 USB Deviced&lt;br /&gt;
In:    serial&lt;br /&gt;
Out:   serial&lt;br /&gt;
Err:   serial&lt;br /&gt;
Hit any key to stop autoboot:  0 &lt;br /&gt;
GTA01Bv3 #&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Commands on the bootloader prompt ===&lt;br /&gt;
&lt;br /&gt;
:''See [[bootloader commands]].''&lt;br /&gt;
&lt;br /&gt;
=== What if I borked my bootloader environment and don't get a prompt anymore? ===&lt;br /&gt;
Found a solution here:&lt;br /&gt;
[[http://markmail.org/message/gqypwiohdet6x4am?q=almesberger+partition&amp;amp;page=1&amp;amp;refer=xbamkzwwsaobv7wa]]&lt;br /&gt;
&lt;br /&gt;
It works the following way:&lt;br /&gt;
* Get the devirginator:&lt;br /&gt;
 svn co http://svn.openmoko.org/trunk/src/host/devirginator&lt;br /&gt;
 cd devirginator&lt;br /&gt;
* Read the u-boot environment from the device:&lt;br /&gt;
 dfu-util -a u-boot_env -R -U env.in&lt;br /&gt;
* Create a file that contains everything you want to change in your u-boot environment or get it by issuing the following command:&lt;br /&gt;
 wget http://svn.openmoko.org/trunk/src/host/devirginator/environment.in&lt;br /&gt;
* Now let devirginator generate a new u-boot_env partition for us, - that contains the partition table from our u-boot_env, - and all changes we wanted to make; Note that the -D GTA02 is needed for the neo Freeruner only.&lt;br /&gt;
 ./envedit.pl -i env.in -f environment.in -o env.out -D GTA02&lt;br /&gt;
* On my box the partition layout didn't seem to match the idea of envedit.pl, so it issued 2 warnings:&lt;br /&gt;
 warning: environment is 262144 bytes, expected 16384&lt;br /&gt;
 CRC error: expected 0xc33e35fc, got 0x93097bfb&lt;br /&gt;
* In this case jut add a additional argument to the command line - that has to be the 1st argument, though, and that contains the size information we got from the warning:&lt;br /&gt;
 ./envedit.pl -s 262144 -i env.in -D GTA02 -f environment.in  -o env.out&lt;br /&gt;
* Now the perl script should no more output anything but write a new u-boot_env partition that we can upload to the device by:&lt;br /&gt;
 dfu-util -a u-boot_env -R -D env.out&lt;br /&gt;
&lt;br /&gt;
== Device Firmware Upgrade ==&lt;br /&gt;
&lt;br /&gt;
Our version of u-boot also implements [[USB DFU]]. This can be useful to&lt;br /&gt;
load files and kernel for quick testing.&lt;br /&gt;
&lt;br /&gt;
To find out whether your version of u-boot supports this, use the output of&lt;br /&gt;
 $ lsusb -v -d 1457:5119&lt;br /&gt;
while the phone is in u-boot mode.&lt;br /&gt;
&lt;br /&gt;
If it supports DFU, you should see the following snippet towards the end of the output:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    Interface Descriptor:&lt;br /&gt;
      bLength                 9&lt;br /&gt;
      bDescriptorType         4&lt;br /&gt;
      bInterfaceNumber        2&lt;br /&gt;
      bAlternateSetting       0&lt;br /&gt;
      bNumEndpoints           0&lt;br /&gt;
      bInterfaceClass       254 Application Specific Interface&lt;br /&gt;
      bInterfaceSubClass      1 Device Firmware Update&lt;br /&gt;
      bInterfaceProtocol      1 &lt;br /&gt;
      iInterface              0 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For information on how to do firmware upgrades, please see [[dfu-util]]. For neo 1973 you may see [[Flashing_Openmoko#Actually_flashing_things_into_the_device]], and for the FreeRunner : [[Flashing the Neo FreeRunner]].&lt;br /&gt;
&lt;br /&gt;
=== Booting files over DFU ===&lt;br /&gt;
&lt;br /&gt;
To load a file at memory address 0x32000000:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dfu-util -a 0 -D fileToLoad -R&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After that, send 'bootm 0x32000000' to u-boot or 'bootelf 0x32000000' if&lt;br /&gt;
its an elf file.&lt;br /&gt;
&lt;br /&gt;
Simple python script that can boot an ELF image - avoiding a ACM bug that breaks on large packets.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/usr/bin/python&lt;br /&gt;
import sys&lt;br /&gt;
import os&lt;br /&gt;
import time&lt;br /&gt;
&lt;br /&gt;
cmd1 = &amp;quot;neo backlight off\n&amp;quot;&lt;br /&gt;
cmd2 = &amp;quot;bootelf 0x32000000\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
def output(tty, str):&lt;br /&gt;
    for x in str:&lt;br /&gt;
        tty.write(x)&lt;br /&gt;
        tty.flush()&lt;br /&gt;
&lt;br /&gt;
if len(sys.argv) == 2:&lt;br /&gt;
    print &amp;quot;Loading %s...&amp;quot; % sys.argv[1]&lt;br /&gt;
&lt;br /&gt;
    loadfile = &amp;quot;dfu-util -a 0 -D %s -R&amp;quot; % sys.argv[1]&lt;br /&gt;
&lt;br /&gt;
    os.system(loadfile)&lt;br /&gt;
&lt;br /&gt;
    time.sleep(3)&lt;br /&gt;
&lt;br /&gt;
    tty = open(&amp;quot;/dev/ttyACM0&amp;quot;, &amp;quot;a&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
    output(tty, cmd1)&lt;br /&gt;
    output(tty, cmd2)&lt;br /&gt;
&lt;br /&gt;
    tty.close()&lt;br /&gt;
else:&lt;br /&gt;
    print &amp;quot;Usage: %s elffile&amp;quot; % sys.argv[0]&lt;br /&gt;
    print &amp;quot;&amp;quot;&lt;br /&gt;
    sys.exit(2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
=== USB connectivity problems ===&lt;br /&gt;
&lt;br /&gt;
I once got errors like this (in dmesg or /var/log/messages) on the host side while connecting the neo in u-boot:&lt;br /&gt;
&lt;br /&gt;
 usb 2-1: device descriptor read/64, error -110&lt;br /&gt;
 usb usb2: Controller not stopped yet!&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
 hub 4-0:1.0: port 1 disabled by hub (EMI?), re-enabling...&lt;br /&gt;
 usb 4-1: USB disconnect, address 2&lt;br /&gt;
&lt;br /&gt;
A possible solution is given below. Please note that if you have a usb keyboard or mouse then the command might cause trouble. &lt;br /&gt;
&lt;br /&gt;
 rmmod uhci_hcd ; modprobe uhci_hcd&lt;br /&gt;
&lt;br /&gt;
Another option is to plug the FR into a different USB port on the host, preferably one on the Motherboard not the hub.&lt;br /&gt;
&lt;br /&gt;
Disconnecting the Neo's USB while powering up may prevent this problem in the future.&lt;br /&gt;
&lt;br /&gt;
See [[Flashing Openmoko]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:System Developers]]&lt;br /&gt;
[[Category:Flashing Openmoko]]&lt;/div&gt;</summary>
		<author><name>Brian H Wilson</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/U-Boot</id>
		<title>U-Boot</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/U-Boot"/>
				<updated>2008-08-22T19:12:25Z</updated>
		
		<summary type="html">&lt;p&gt;Brian H Wilson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|Bootloader}}&lt;br /&gt;
&lt;br /&gt;
{{Bootloader}}&lt;br /&gt;
[[Image:GTA01-U-Boot.JPG|thumb|300px|u-boot menu on Neo1973]] [[Image:Neo1973 uboot splash closeup.jpg|thumb|300px|u-boot splash screen on Neo1973]]&lt;br /&gt;
&lt;br /&gt;
The bootloader on the [[Neo1973]], '''U-Boot''', takes care of device functionality until [[Openmoko]] is booted. This includes [[USB DFU]] for [[flashing Openmoko]], a splash screen, a boot menu, a console for [[bootloader commands]], configuration via [[bootloader environment]], and loading a [[kernel]]. &lt;br /&gt;
&lt;br /&gt;
There are various [[bootloader versions]] available.&lt;br /&gt;
&lt;br /&gt;
== Booting into U-boot ==&lt;br /&gt;
&lt;br /&gt;
* Make sure that your phone has had the battery and USB cable removed for at least 30 seconds.&lt;br /&gt;
* Hold in the AUX button on power-up to access the boot menu.&lt;br /&gt;
* Connect the Neo (ie not Debug Board) to a Linux host with the USB cable.&lt;br /&gt;
* Set the console to USB.&lt;br /&gt;
* Connect to /dev/ttyACM0 with a terminal program on the Linux host (you might need to chown uucp.uucp /dev/ttyACM0 )&lt;br /&gt;
* Note that the cdc_acm /dev/ttyACM0 access disappears as soon as the Neo boots, and is replaced by the cdc_ether usb0 network access.&lt;br /&gt;
* You're now at the bootloader prompt.&lt;br /&gt;
* Set the bootdelay uboot environment variable to -1 if you want it to always halt at the bootloader on power-up.&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
&lt;br /&gt;
All versions of the OM smartphone use the [http://u-boot.sourceforge.net/ u-boot] bootloader.&lt;br /&gt;
&lt;br /&gt;
More information on u-boot can be found at &lt;br /&gt;
* http://www.denx.de/wiki/DULG&lt;br /&gt;
* http://www.gumstix.org/tikiwiki/tiki-index.php?page=U-Boot&lt;br /&gt;
* http://linuxdevices.com/articles/AT5085702347.html&lt;br /&gt;
&lt;br /&gt;
Additions to the vanilla u-boot already implemented include: &lt;br /&gt;
* Support for boot from NAND flash using [[S3C2410 Steppingstone]]&lt;br /&gt;
* Support for S3C2410 NAND flash&lt;br /&gt;
* Support for downloading programs via S3C2410 USB Device Controller&lt;br /&gt;
* Support to display bootup logo / status on S3C2410 Framebuffer&lt;br /&gt;
&lt;br /&gt;
However, u-boot still doesn't support many of the features that GTA01 needs, such as&lt;br /&gt;
* Support for reading kernel/initrd from SD/Transflash&lt;br /&gt;
&lt;br /&gt;
[[User:HaraldWelte|HaraldWelte]] is working on those issues, and in fact most of them have already been implemented.&lt;br /&gt;
&lt;br /&gt;
== Bootloader source code ==&lt;br /&gt;
&lt;br /&gt;
The current bootloader source can be found at http://git.openmoko.org/?p=u-boot.git;a=shortlog;h=stable . &lt;br /&gt;
&lt;br /&gt;
To get u-boot by subversion:&lt;br /&gt;
&lt;br /&gt;
 svn co https://svn.openmoko.org/ openmoko/u-boot&lt;br /&gt;
&lt;br /&gt;
To build u-boot:&lt;br /&gt;
* Clone the git tree and check out the stable branch&lt;br /&gt;
* Set the CROSS_COMPILE environment variable to specify the prefix to your toolchain binaries&lt;br /&gt;
* Run &amp;quot;make gta02v5_config&amp;quot; (or gta01bv4_config, or whatever hardware revision you have)&lt;br /&gt;
* Run &amp;quot;make u-boot.udfu&amp;quot;. This will give you an image which you can install with dfu-util, or which you can upload into memory via JTAG (with a debug board)&lt;br /&gt;
&lt;br /&gt;
== Bootloader binary ==&lt;br /&gt;
&lt;br /&gt;
The latest bootloader binary builds can be found under http://buildhost.openmoko.org/daily/ in the subdirectory [device]/200808/[date]/.&lt;br /&gt;
&lt;br /&gt;
All versions of the GTA02 (Neo Freerunner) that have been sold to the public are version 5 hardware so look for a file with &amp;quot;gta02&amp;quot; and &amp;quot;v5&amp;quot; in the name, for example&lt;br /&gt;
uboot-gta02v5-latest.bin&lt;br /&gt;
&lt;br /&gt;
The file should be written to the NAND flash address 0x00000000 (size 0x30000) (the first [[partition]]).&lt;br /&gt;
&lt;br /&gt;
== Bootloader development ==&lt;br /&gt;
&lt;br /&gt;
=== QT2410 ===&lt;br /&gt;
If you want to do bootloader development on the QT2410, it's easier to work with a bootloader image that can be downloaded via USB into RAM instead of flashing.&lt;br /&gt;
&lt;br /&gt;
To do so, you need to edit the u-boot/include/configs/qt2410.h file, and change the &amp;quot;if 0&amp;quot; in Line 32 into a &amp;quot;if 1&amp;quot;, then recompile with &amp;quot;make&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The resulting &amp;quot;u-boot.bin&amp;quot; is _NOT SUITABLE_ for NAND flash, but only for direct execution from within ram, e.g. by using the [[s3c2410_boot_usb]] program.&lt;br /&gt;
&lt;br /&gt;
=== GTA01 ===&lt;br /&gt;
&lt;br /&gt;
Doing bootloader development on the GTA01 is a bit more tricky.  first, we don't have any NOR flash.  Second, there is no other way to boot _but_ from NAND.  Therefore, we also don't have a USB downloader like the QT2410.&lt;br /&gt;
&lt;br /&gt;
The main problem is:  The [[S3C2410 Steppingstone]] unconditionally copies the first 4k of flash into its internal SRAM.   That SRAM segment stays unconditionally mapped at physical address zero. How do we get around this&lt;br /&gt;
&lt;br /&gt;
=== GTA02 ===&lt;br /&gt;
&lt;br /&gt;
The first block holds a little 4KByte RAM buffer that is auto-filled&lt;br /&gt;
from NAND by CPU hardware, called &amp;quot;steppingstone&amp;quot; when we boot from&lt;br /&gt;
NAND, or the NOR is mapped in there.&lt;br /&gt;
&lt;br /&gt;
nCS0: 00000000 07FFFFFF  4K steppingstone or NOR (Aux held down) &amp;lt;br&amp;gt;&lt;br /&gt;
nCS1: 08000000 0FFFFFFF  Glamo  &amp;lt;br&amp;gt;&lt;br /&gt;
nCS2: 10000000 17FFFFFF  nothing mapped &amp;lt;br&amp;gt;&lt;br /&gt;
nCS3: 18000000 1FFFFFFF  NOR &amp;lt;br&amp;gt;&lt;br /&gt;
nCS4: 20000000 17FFFFFF  nothing mapped &amp;lt;br&amp;gt;&lt;br /&gt;
nCS5: 28000000 2FFFFFFF  nothing mapped &amp;lt;br&amp;gt;&lt;br /&gt;
nCS6: 30000000 37FFFFFF  on-MCP SDRAM 128MB &amp;lt;br&amp;gt;&lt;br /&gt;
nCS7: 38000000 3FFFFFFF  external SDRAM 128MB &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Using JTAG to boot from RAM ====&lt;br /&gt;
&lt;br /&gt;
So how can we boot from RAM? We use JTAG / OpenOCD to&lt;br /&gt;
&lt;br /&gt;
* Reset and halt the cpu at PC=0&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; reset halt&lt;br /&gt;
target halted in ARM state due to debug request, current mode: Supervisor&lt;br /&gt;
cpsr: 0x400000d3 pc: 0x00000000&lt;br /&gt;
MMU: disabled, D-Cache: disabled, I-Cache: disabled&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Download a small piece of code for low-level SDRAM timing initialization (overwrite 4k SRAM of steppingstone)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; load_binary /space/misc/gta01/u-boot.git/board/gta01/lowlevel_foo.bin 0            &lt;br /&gt;
downloaded 332 byte in 0s 21899us&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Assert a break point at address 0x33f80000 (which indicates that the low-level code has finished)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; bp 0x33f80000 4 hw&lt;br /&gt;
breakpoint added at address 0x33f80000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Run the code up to the break point&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; resume&lt;br /&gt;
Target 0 resumed&lt;br /&gt;
&amp;gt; Target 0 halted&lt;br /&gt;
target halted in ARM state due to breakpoint, current mode: Supervisor&lt;br /&gt;
cpsr: 0x600000d3 pc: 0x33f80000&lt;br /&gt;
MMU: disabled, D-Cache: disabled, I-Cache: enabled&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Download the u-boot RAM image to 0x33f80000&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; load_binary /space/misc/gta01/u-boot.git/u-boot.bin 0x33f80000&lt;br /&gt;
downloaded 135692 byte in 6s 567264us&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Resume processing&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; resume&lt;br /&gt;
Target 0 resumed&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At this point, the display backlight gets bright and we see the following familiar prompt on the serial console:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
U-Boot 1.1.6 (Jan 13 2007 - 23:44:23)&lt;br /&gt;
&lt;br /&gt;
DRAM:  128 MB&lt;br /&gt;
NAND:  64 MiB&lt;br /&gt;
*** Warning - bad CRC or NAND, using default environment&lt;br /&gt;
&lt;br /&gt;
In:    serial&lt;br /&gt;
Out:   serial&lt;br /&gt;
Err:   serial&lt;br /&gt;
Hit any key to stop autoboot:  0 &lt;br /&gt;
GTA01Bv2 # &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creating bootable images ==&lt;br /&gt;
&lt;br /&gt;
u-boot needs bootable images (such as kernels, but also initrd and others) in form of a so-called ''uImage''.  In order to create a ''uImage'' from e.g. a ''vmlinux'' kernel image, you can proceed as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
objcopy -O binary -R .note -R .comment -S vmlinux linux.bin&lt;br /&gt;
gzip -9 linux.bin&lt;br /&gt;
u-boot/tools/mkimage -A arm -O linux -T kernel -C gzip -a 30008000 -e 30008000 -n &amp;quot;Kernel Image QT2410&amp;quot; -d linux.bin.gz uImage&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Boot menu ==&lt;br /&gt;
[[Image:Neo1973 uboot menu.jpg|thumb|400px|u-boot boot menu on Neo1973]]&lt;br /&gt;
&lt;br /&gt;
As of the Phase-0 release, our u-boot version now features an on-screen boot menu. The items are defined by [[bootloader environment#menu|menu entries in the environment]].&lt;br /&gt;
&lt;br /&gt;
=== Accessing the boot menu ===&lt;br /&gt;
&lt;br /&gt;
You can access the boot menu by pressing and holding the [[Neo1973 AUX Button]] together with the power button while switching the phone on.&lt;br /&gt;
&lt;br /&gt;
=== Using the boot menu ===&lt;br /&gt;
&lt;br /&gt;
By pressing the [[Neo1973 AUX Button]] you can cycle through the menu items.  Use the ''POWER'' button to select one item. &lt;br /&gt;
&lt;br /&gt;
== Bootloader prompt ==&lt;br /&gt;
&lt;br /&gt;
=== Accessing the bootloader prompt ===&lt;br /&gt;
The bootloader prompt is available either on the serial console (via [[Debug Board]]), or as virtual USB Serial device (USB CDC_ACM).&lt;br /&gt;
Whether the serial port or usb is used depends on the u-boot environment variables '''stdin''', '''stdout''' and '''stderr'''.&lt;br /&gt;
&lt;br /&gt;
Whether or not you use usbtty, the first couple of messages will always be displayed on the serial console.&lt;br /&gt;
&lt;br /&gt;
The bootloader is currently configured to wait for three seconds.  If a key press on the '''stdin''' is received within those three seconds, auto-boot is aborted.&lt;br /&gt;
&lt;br /&gt;
==== Using usbtty from Linux ====&lt;br /&gt;
&lt;br /&gt;
Just by connecting the phone in u-boot mode to your Linux pc should make it detect a [[CDC ACM]] device, and you should get a new tty device called /dev/ttyACM0. If not, enable the CONFIG_USB_ACM (Device Drivers -&amp;gt; USB support -&amp;gt; USB Modem (CDC ACM) support). (Instructions for MacOS users are [[MacOS_X#USB_Serial|here]])&lt;br /&gt;
&lt;br /&gt;
Use your favourite terminal emulator (minicom, cu, zc, screen ...) to access it like any other serial port. If you don't have a favorite, try just: (cu is in the taylor-uucp package, use &amp;quot;apt-get install cu&amp;quot; if it is not yet installed)&lt;br /&gt;
 cu -l /dev/ttyACM0&lt;br /&gt;
&lt;br /&gt;
You might need to &lt;br /&gt;
 chown uucp.uucp /dev/ttyACM0&lt;br /&gt;
&lt;br /&gt;
to get the necessary rights (even as root).&lt;br /&gt;
&lt;br /&gt;
A nice alternative for cu is Werner Almesberger's [[NeoCon|neocon]].&lt;br /&gt;
&lt;br /&gt;
First, you should try to check whether the USB device shows up in 'lsusb' while you're running in u-boot mode:&lt;br /&gt;
&lt;br /&gt;
 # lsusb -d 1457:5119&lt;br /&gt;
 Bus 005 Device 079: ID 1457:5119  &lt;br /&gt;
&lt;br /&gt;
Second, let's see some more details about the available endpoints and configurations:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lsusb -v -d 1457:5119&lt;br /&gt;
Bus 005 Device 079: ID 1457:5119  &lt;br /&gt;
Device Descriptor:&lt;br /&gt;
  bLength                18&lt;br /&gt;
  bDescriptorType         1&lt;br /&gt;
  bcdUSB               1.10&lt;br /&gt;
  bDeviceClass            2 Communications&lt;br /&gt;
  bDeviceSubClass         0 &lt;br /&gt;
  bDeviceProtocol         0 &lt;br /&gt;
  bMaxPacketSize0        16&lt;br /&gt;
  idVendor           0x1457 &lt;br /&gt;
  idProduct          0x5119 &lt;br /&gt;
  bcdDevice            0.00&lt;br /&gt;
  iManufacturer           1 OpenMoko, Inc&lt;br /&gt;
  iProduct                2 Neo1973 Bootloader U-Boot 1.2.0-g6c7cac8c-dirty-moko3&lt;br /&gt;
  iSerial                 3 0000000&lt;br /&gt;
  bNumConfigurations      1&lt;br /&gt;
  Configuration Descriptor:&lt;br /&gt;
    bLength                 9&lt;br /&gt;
    bDescriptorType         2&lt;br /&gt;
    wTotalLength           85&lt;br /&gt;
    bNumInterfaces          3&lt;br /&gt;
    bConfigurationValue     1&lt;br /&gt;
    iConfiguration          4 TTY via USB&lt;br /&gt;
    bmAttributes         0xc0&lt;br /&gt;
      Self Powered&lt;br /&gt;
    MaxPower                0mA&lt;br /&gt;
    Interface Descriptor:&lt;br /&gt;
      bLength                 9&lt;br /&gt;
      bDescriptorType         4&lt;br /&gt;
      bInterfaceNumber        0&lt;br /&gt;
      bAlternateSetting       0&lt;br /&gt;
      bNumEndpoints           1&lt;br /&gt;
      bInterfaceClass         2 Communications&lt;br /&gt;
      bInterfaceSubClass      2 Abstract (modem)&lt;br /&gt;
      bInterfaceProtocol      1 AT-commands (v.25ter)&lt;br /&gt;
      iInterface              6 Control Interface&lt;br /&gt;
      CDC Header:&lt;br /&gt;
        bcdCDC               0.6e&lt;br /&gt;
      CDC Call Management:&lt;br /&gt;
        bmCapabilities       0x00&lt;br /&gt;
        bDataInterface          1&lt;br /&gt;
      CDC ACM:&lt;br /&gt;
        bmCapabilities       0x00&lt;br /&gt;
      CDC Union:&lt;br /&gt;
        bMasterInterface        0&lt;br /&gt;
        bSlaveInterface         1 &lt;br /&gt;
      Endpoint Descriptor:&lt;br /&gt;
        bLength                 7&lt;br /&gt;
        bDescriptorType         5&lt;br /&gt;
        bEndpointAddress     0x81  EP 1 IN&lt;br /&gt;
        bmAttributes            3&lt;br /&gt;
          Transfer Type            Interrupt&lt;br /&gt;
          Synch Type               None&lt;br /&gt;
          Usage Type               Data&lt;br /&gt;
        wMaxPacketSize     0x0010  1x 16 bytes&lt;br /&gt;
        bInterval             255&lt;br /&gt;
    Interface Descriptor:&lt;br /&gt;
      bLength                 9&lt;br /&gt;
      bDescriptorType         4&lt;br /&gt;
      bInterfaceNumber        1&lt;br /&gt;
      bAlternateSetting       0&lt;br /&gt;
      bNumEndpoints           2&lt;br /&gt;
      bInterfaceClass        10 CDC Data&lt;br /&gt;
      bInterfaceSubClass      0 Unused&lt;br /&gt;
      bInterfaceProtocol      0 &lt;br /&gt;
      iInterface              5 Bulk Data Interface&lt;br /&gt;
      Endpoint Descriptor:&lt;br /&gt;
        bLength                 7&lt;br /&gt;
        bDescriptorType         5&lt;br /&gt;
        bEndpointAddress     0x02  EP 2 OUT&lt;br /&gt;
        bmAttributes            2&lt;br /&gt;
          Transfer Type            Bulk&lt;br /&gt;
          Synch Type               None&lt;br /&gt;
          Usage Type               Data&lt;br /&gt;
        wMaxPacketSize     0x0010  1x 16 bytes&lt;br /&gt;
        bInterval             255&lt;br /&gt;
      Endpoint Descriptor:&lt;br /&gt;
        bLength                 7&lt;br /&gt;
        bDescriptorType         5&lt;br /&gt;
        bEndpointAddress     0x83  EP 3 IN&lt;br /&gt;
        bmAttributes            2&lt;br /&gt;
          Transfer Type            Bulk&lt;br /&gt;
          Synch Type               None&lt;br /&gt;
          Usage Type               Data&lt;br /&gt;
        wMaxPacketSize     0x0010  1x 16 bytes&lt;br /&gt;
        bInterval             255&lt;br /&gt;
    Interface Descriptor:&lt;br /&gt;
      bLength                 9&lt;br /&gt;
      bDescriptorType         4&lt;br /&gt;
      bInterfaceNumber        2&lt;br /&gt;
      bAlternateSetting       0&lt;br /&gt;
      bNumEndpoints           0&lt;br /&gt;
      bInterfaceClass       254 Application Specific Interface&lt;br /&gt;
      bInterfaceSubClass      1 Device Firmware Update&lt;br /&gt;
      bInterfaceProtocol      1 &lt;br /&gt;
      iInterface              7 USB Device Firmware Upgrade&lt;br /&gt;
Device Status:     0x0001&lt;br /&gt;
  Self Powered&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, you can access it using your favourite terminal program.&lt;br /&gt;
&lt;br /&gt;
Then, if the environment is not set correctly, you will need to use the current console (e.g. serial console) to change the [[bootloader environment#console|console entries in the environment]]:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
GTA01Bv2 # setenv stderr usbtty&lt;br /&gt;
GTA01Bv2 # setenv stdout usbtty&lt;br /&gt;
GTA01Bv2 # setenv stdin usbtty&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Typical u-boot prompt ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
U-Boot 1.2.0-moko1 (Feb 16 2007 - 00:36:13)&lt;br /&gt;
&lt;br /&gt;
DRAM:  128 MB&lt;br /&gt;
NAND:  64 MiB&lt;br /&gt;
Found Environment offset in OOB..&lt;br /&gt;
Video: 640x480x8 31kHz 59Hz&lt;br /&gt;
USB:   S3C2410 USB Deviced&lt;br /&gt;
In:    serial&lt;br /&gt;
Out:   serial&lt;br /&gt;
Err:   serial&lt;br /&gt;
Hit any key to stop autoboot:  0 &lt;br /&gt;
GTA01Bv3 #&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Commands on the bootloader prompt ===&lt;br /&gt;
&lt;br /&gt;
:''See [[bootloader commands]].''&lt;br /&gt;
&lt;br /&gt;
=== What if I borked my bootloader environment and don't get a prompt anymore? ===&lt;br /&gt;
Found a solution here:&lt;br /&gt;
[[http://markmail.org/message/gqypwiohdet6x4am?q=almesberger+partition&amp;amp;page=1&amp;amp;refer=xbamkzwwsaobv7wa]]&lt;br /&gt;
&lt;br /&gt;
It works the following way:&lt;br /&gt;
* Get the devirginator:&lt;br /&gt;
 svn co http://svn.openmoko.org/trunk/src/host/devirginator&lt;br /&gt;
 cd devirginator&lt;br /&gt;
* Read the u-boot environment from the device:&lt;br /&gt;
 dfu-util -a u-boot_env -R -U env.in&lt;br /&gt;
* Create a file that contains everything you want to change in your u-boot environment or get it by issuing the following command:&lt;br /&gt;
 wget http://svn.openmoko.org/trunk/src/host/devirginator/environment.in&lt;br /&gt;
* Now let devirginator generate a new u-boot_env partition for us, - that contains the partition table from our u-boot_env, - and all changes we wanted to make; Note that the -D GTA02 is needed for the neo Freeruner only.&lt;br /&gt;
 ./envedit.pl -i env.in -f environment.in -o env.out -D GTA02&lt;br /&gt;
* On my box the partition layout didn't seem to match the idea of envedit.pl, so it issued 2 warnings:&lt;br /&gt;
 warning: environment is 262144 bytes, expected 16384&lt;br /&gt;
 CRC error: expected 0xc33e35fc, got 0x93097bfb&lt;br /&gt;
* In this case jut add a additional argument to the command line - that has to be the 1st argument, though, and that contains the size information we got from the warning:&lt;br /&gt;
 ./envedit.pl -s 262144 -i env.in -D GTA02 -f environment.in  -o env.out&lt;br /&gt;
* Now the perl script should no more output anything but write a new u-boot_env partition that we can upload to the device by:&lt;br /&gt;
 dfu-util -a u-boot_env -R -D env.out&lt;br /&gt;
&lt;br /&gt;
== Device Firmware Upgrade ==&lt;br /&gt;
&lt;br /&gt;
Our version of u-boot also implements [[USB DFU]]. This can be useful to&lt;br /&gt;
load files and kernel for quick testing.&lt;br /&gt;
&lt;br /&gt;
To find out whether your version of u-boot supports this, use the output of&lt;br /&gt;
 $ lsusb -v -d 1457:5119&lt;br /&gt;
while the phone is in u-boot mode.&lt;br /&gt;
&lt;br /&gt;
If it supports DFU, you should see the following snippet towards the end of the output:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    Interface Descriptor:&lt;br /&gt;
      bLength                 9&lt;br /&gt;
      bDescriptorType         4&lt;br /&gt;
      bInterfaceNumber        2&lt;br /&gt;
      bAlternateSetting       0&lt;br /&gt;
      bNumEndpoints           0&lt;br /&gt;
      bInterfaceClass       254 Application Specific Interface&lt;br /&gt;
      bInterfaceSubClass      1 Device Firmware Update&lt;br /&gt;
      bInterfaceProtocol      1 &lt;br /&gt;
      iInterface              0 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For information on how to do firmware upgrades, please see [[dfu-util]]. For neo 1973 you may see [[Flashing_Openmoko#Actually_flashing_things_into_the_device]], and for the FreeRunner : [[Flashing the Neo FreeRunner]].&lt;br /&gt;
&lt;br /&gt;
=== Booting files over DFU ===&lt;br /&gt;
&lt;br /&gt;
To load a file at memory address 0x32000000:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dfu-util -a 0 -D fileToLoad -R&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After that, send 'bootm 0x32000000' to u-boot or 'bootelf 0x32000000' if&lt;br /&gt;
its an elf file.&lt;br /&gt;
&lt;br /&gt;
Simple python script that can boot an ELF image - avoiding a ACM bug that breaks on large packets.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/usr/bin/python&lt;br /&gt;
import sys&lt;br /&gt;
import os&lt;br /&gt;
import time&lt;br /&gt;
&lt;br /&gt;
cmd1 = &amp;quot;neo backlight off\n&amp;quot;&lt;br /&gt;
cmd2 = &amp;quot;bootelf 0x32000000\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
def output(tty, str):&lt;br /&gt;
    for x in str:&lt;br /&gt;
        tty.write(x)&lt;br /&gt;
        tty.flush()&lt;br /&gt;
&lt;br /&gt;
if len(sys.argv) == 2:&lt;br /&gt;
    print &amp;quot;Loading %s...&amp;quot; % sys.argv[1]&lt;br /&gt;
&lt;br /&gt;
    loadfile = &amp;quot;dfu-util -a 0 -D %s -R&amp;quot; % sys.argv[1]&lt;br /&gt;
&lt;br /&gt;
    os.system(loadfile)&lt;br /&gt;
&lt;br /&gt;
    time.sleep(3)&lt;br /&gt;
&lt;br /&gt;
    tty = open(&amp;quot;/dev/ttyACM0&amp;quot;, &amp;quot;a&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
    output(tty, cmd1)&lt;br /&gt;
    output(tty, cmd2)&lt;br /&gt;
&lt;br /&gt;
    tty.close()&lt;br /&gt;
else:&lt;br /&gt;
    print &amp;quot;Usage: %s elffile&amp;quot; % sys.argv[0]&lt;br /&gt;
    print &amp;quot;&amp;quot;&lt;br /&gt;
    sys.exit(2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
=== USB connectivity problems ===&lt;br /&gt;
&lt;br /&gt;
I once got errors like this (in dmesg or /var/log/messages) on the host side while connecting the neo in u-boot:&lt;br /&gt;
&lt;br /&gt;
 usb 2-1: device descriptor read/64, error -110&lt;br /&gt;
 usb usb2: Controller not stopped yet!&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
 hub 4-0:1.0: port 1 disabled by hub (EMI?), re-enabling...&lt;br /&gt;
 usb 4-1: USB disconnect, address 2&lt;br /&gt;
&lt;br /&gt;
A possible solution is given below. Please note that if you have a usb keyboard or mouse then the command might cause trouble. &lt;br /&gt;
&lt;br /&gt;
 rmmod uhci_hcd ; modprobe uhci_hcd&lt;br /&gt;
&lt;br /&gt;
Another option is to plug the FR into a different USB port on the host, preferably one on the Motherboard not the hub.&lt;br /&gt;
&lt;br /&gt;
Disconnecting the Neo's USB while powering up may prevent this problem in the future.&lt;br /&gt;
&lt;br /&gt;
See [[Flashing Openmoko]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:System Developers]]&lt;br /&gt;
[[Category:Flashing Openmoko]]&lt;/div&gt;</summary>
		<author><name>Brian H Wilson</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/U-Boot</id>
		<title>U-Boot</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/U-Boot"/>
				<updated>2008-08-22T16:56:26Z</updated>
		
		<summary type="html">&lt;p&gt;Brian H Wilson: /* General */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|Bootloader}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Bootloader}}&lt;br /&gt;
[[Image:GTA01-U-Boot.JPG|thumb|300px|u-boot menu on Neo1973]] [[Image:Neo1973 uboot splash closeup.jpg|thumb|300px|u-boot splash screen on Neo1973]]&lt;br /&gt;
&lt;br /&gt;
The bootloader on the [[Neo1973]], '''U-Boot''', takes care of device functionality until [[Openmoko]] is booted. This includes [[USB DFU]] for [[flashing Openmoko]], a splash screen, a boot menu, a console for [[bootloader commands]], configuration via [[bootloader environment]], and loading a [[kernel]]. &lt;br /&gt;
&lt;br /&gt;
There are various [[bootloader versions]] available.&lt;br /&gt;
&lt;br /&gt;
== Phase0 Quick Start ==&lt;br /&gt;
* Make sure that your phone has had the battery and USB cable removed for at least 30 seconds.&lt;br /&gt;
* Connect the Neo (ie not Debug Board) to a Linux host with the USB cable.&lt;br /&gt;
* Hold in the AUX button on power-up to access the boot menu.&lt;br /&gt;
* Set the console to USB.&lt;br /&gt;
* Connect to /dev/ttyACM0 with a terminal program on the Linux host (you might need to chown uucp.uucp /dev/ttyACM0 )&lt;br /&gt;
* Note that the cdc_acm /dev/ttyACM0 access disappears as soon as the Neo boots, and is replaced by the cdc_ether usb0 network access.&lt;br /&gt;
* You're now at the bootloader prompt.&lt;br /&gt;
* Set the bootdelay uboot environment variable to -1 if you want it to always halt at the bootloader on power-up.&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
&lt;br /&gt;
All versions of the OM smartphone use the [http://u-boot.sourceforge.net/ u-boot] bootloader.&lt;br /&gt;
&lt;br /&gt;
More information on u-boot can be found at &lt;br /&gt;
* http://www.denx.de/wiki/DULG&lt;br /&gt;
* http://www.gumstix.org/tikiwiki/tiki-index.php?page=U-Boot&lt;br /&gt;
* http://linuxdevices.com/articles/AT5085702347.html&lt;br /&gt;
&lt;br /&gt;
Additions to the vanilla u-boot already implemented include: &lt;br /&gt;
* Support for boot from NAND flash using [[S3C2410 Steppingstone]]&lt;br /&gt;
* Support for S3C2410 NAND flash&lt;br /&gt;
* Support for downloading programs via S3C2410 USB Device Controller&lt;br /&gt;
* Support to display bootup logo / status on S3C2410 Framebuffer&lt;br /&gt;
&lt;br /&gt;
However, u-boot still doesn't support many of the features that GTA01 needs, such as&lt;br /&gt;
* Support for reading kernel/initrd from SD/Transflash&lt;br /&gt;
&lt;br /&gt;
[[User:HaraldWelte|HaraldWelte]] is working on those issues, and in fact most of them have already been implemented.&lt;br /&gt;
&lt;br /&gt;
== Bootloader source code ==&lt;br /&gt;
&lt;br /&gt;
The current bootloader source can be found at http://git.openmoko.org/?p=u-boot.git;a=shortlog;h=stable . &lt;br /&gt;
&lt;br /&gt;
To get u-boot by subversion:&lt;br /&gt;
&lt;br /&gt;
 svn co https://svn.openmoko.org/ openmoko/u-boot&lt;br /&gt;
&lt;br /&gt;
To build u-boot:&lt;br /&gt;
* Clone the git tree and check out the stable branch&lt;br /&gt;
* Set the CROSS_COMPILE environment variable to specify the prefix to your toolchain binaries&lt;br /&gt;
* Run &amp;quot;make gta02v5_config&amp;quot; (or gta01bv4_config, or whatever hardware revision you have)&lt;br /&gt;
* Run &amp;quot;make u-boot.udfu&amp;quot;. This will give you an image which you can install with dfu-util, or which you can upload into memory via JTAG (with a debug board)&lt;br /&gt;
&lt;br /&gt;
== Bootloader binary ==&lt;br /&gt;
&lt;br /&gt;
The latest bootloader binary builds can be found under http://buildhost.openmoko.org/daily/ in the subdirectory [device]/200808/[date]/.  It should be written to the NAND flash address 0x00000000 (size 0x30000) (the first [[partition]]).&lt;br /&gt;
&lt;br /&gt;
== Bootloader development ==&lt;br /&gt;
&lt;br /&gt;
=== QT2410 ===&lt;br /&gt;
If you want to do bootloader development on the QT2410, it's easier to work with a bootloader image that can be downloaded via USB into RAM instead of flashing.&lt;br /&gt;
&lt;br /&gt;
To do so, you need to edit the u-boot/include/configs/qt2410.h file, and change the &amp;quot;if 0&amp;quot; in Line 32 into a &amp;quot;if 1&amp;quot;, then recompile with &amp;quot;make&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The resulting &amp;quot;u-boot.bin&amp;quot; is _NOT SUITABLE_ for NAND flash, but only for direct execution from within ram, e.g. by using the [[s3c2410_boot_usb]] program.&lt;br /&gt;
&lt;br /&gt;
=== GTA01 ===&lt;br /&gt;
&lt;br /&gt;
Doing bootloader development on the GTA01 is a bit more tricky.  first, we don't have any NOR flash.  Second, there is no other way to boot _but_ from NAND.  Therefore, we also don't have a USB downloader like the QT2410.&lt;br /&gt;
&lt;br /&gt;
The main problem is:  The [[S3C2410 Steppingstone]] unconditionally copies the first 4k of flash into its internal SRAM.   That SRAM segment stays unconditionally mapped at physical address zero. How do we get around this&lt;br /&gt;
&lt;br /&gt;
=== GTA02 ===&lt;br /&gt;
&lt;br /&gt;
The first block holds a little 4KByte RAM buffer that is auto-filled&lt;br /&gt;
from NAND by CPU hardware, called &amp;quot;steppingstone&amp;quot; when we boot from&lt;br /&gt;
NAND, or the NOR is mapped in there.&lt;br /&gt;
&lt;br /&gt;
nCS0: 00000000 07FFFFFF  4K steppingstone or NOR (Aux held down) &amp;lt;br&amp;gt;&lt;br /&gt;
nCS1: 08000000 0FFFFFFF  Glamo  &amp;lt;br&amp;gt;&lt;br /&gt;
nCS2: 10000000 17FFFFFF  nothing mapped &amp;lt;br&amp;gt;&lt;br /&gt;
nCS3: 18000000 1FFFFFFF  NOR &amp;lt;br&amp;gt;&lt;br /&gt;
nCS4: 20000000 17FFFFFF  nothing mapped &amp;lt;br&amp;gt;&lt;br /&gt;
nCS5: 28000000 2FFFFFFF  nothing mapped &amp;lt;br&amp;gt;&lt;br /&gt;
nCS6: 30000000 37FFFFFF  on-MCP SDRAM 128MB &amp;lt;br&amp;gt;&lt;br /&gt;
nCS7: 38000000 3FFFFFFF  external SDRAM 128MB &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Using JTAG to boot from RAM ====&lt;br /&gt;
&lt;br /&gt;
So how can we boot from RAM? We use JTAG / OpenOCD to&lt;br /&gt;
&lt;br /&gt;
* Reset and halt the cpu at PC=0&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; reset halt&lt;br /&gt;
target halted in ARM state due to debug request, current mode: Supervisor&lt;br /&gt;
cpsr: 0x400000d3 pc: 0x00000000&lt;br /&gt;
MMU: disabled, D-Cache: disabled, I-Cache: disabled&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Download a small piece of code for low-level SDRAM timing initialization (overwrite 4k SRAM of steppingstone)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; load_binary /space/misc/gta01/u-boot.git/board/gta01/lowlevel_foo.bin 0            &lt;br /&gt;
downloaded 332 byte in 0s 21899us&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Assert a break point at address 0x33f80000 (which indicates that the low-level code has finished)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; bp 0x33f80000 4 hw&lt;br /&gt;
breakpoint added at address 0x33f80000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Run the code up to the break point&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; resume&lt;br /&gt;
Target 0 resumed&lt;br /&gt;
&amp;gt; Target 0 halted&lt;br /&gt;
target halted in ARM state due to breakpoint, current mode: Supervisor&lt;br /&gt;
cpsr: 0x600000d3 pc: 0x33f80000&lt;br /&gt;
MMU: disabled, D-Cache: disabled, I-Cache: enabled&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Download the u-boot RAM image to 0x33f80000&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; load_binary /space/misc/gta01/u-boot.git/u-boot.bin 0x33f80000&lt;br /&gt;
downloaded 135692 byte in 6s 567264us&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Resume processing&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; resume&lt;br /&gt;
Target 0 resumed&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At this point, the display backlight gets bright and we see the following familiar prompt on the serial console:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
U-Boot 1.1.6 (Jan 13 2007 - 23:44:23)&lt;br /&gt;
&lt;br /&gt;
DRAM:  128 MB&lt;br /&gt;
NAND:  64 MiB&lt;br /&gt;
*** Warning - bad CRC or NAND, using default environment&lt;br /&gt;
&lt;br /&gt;
In:    serial&lt;br /&gt;
Out:   serial&lt;br /&gt;
Err:   serial&lt;br /&gt;
Hit any key to stop autoboot:  0 &lt;br /&gt;
GTA01Bv2 # &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creating bootable images ==&lt;br /&gt;
&lt;br /&gt;
u-boot needs bootable images (such as kernels, but also initrd and others) in form of a so-called ''uImage''.  In order to create a ''uImage'' from e.g. a ''vmlinux'' kernel image, you can proceed as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
objcopy -O binary -R .note -R .comment -S vmlinux linux.bin&lt;br /&gt;
gzip -9 linux.bin&lt;br /&gt;
u-boot/tools/mkimage -A arm -O linux -T kernel -C gzip -a 30008000 -e 30008000 -n &amp;quot;Kernel Image QT2410&amp;quot; -d linux.bin.gz uImage&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Boot menu ==&lt;br /&gt;
[[Image:Neo1973 uboot menu.jpg|thumb|400px|u-boot boot menu on Neo1973]]&lt;br /&gt;
&lt;br /&gt;
As of the Phase-0 release, our u-boot version now features an on-screen boot menu. The items are defined by [[bootloader environment#menu|menu entries in the environment]].&lt;br /&gt;
&lt;br /&gt;
=== Accessing the boot menu ===&lt;br /&gt;
&lt;br /&gt;
You can access the boot menu by pressing and holding the [[Neo1973 AUX Button]] together with the power button while switching the phone on.&lt;br /&gt;
&lt;br /&gt;
=== Using the boot menu ===&lt;br /&gt;
&lt;br /&gt;
By pressing the [[Neo1973 AUX Button]] you can cycle through the menu items.  Use the ''POWER'' button to select one item. &lt;br /&gt;
&lt;br /&gt;
== Bootloader prompt ==&lt;br /&gt;
&lt;br /&gt;
=== Accessing the bootloader prompt ===&lt;br /&gt;
The bootloader prompt is available either on the serial console (via [[Debug Board]]), or as virtual USB Serial device (USB CDC_ACM).&lt;br /&gt;
Whether the serial port or usb is used depends on the u-boot environment variables '''stdin''', '''stdout''' and '''stderr'''.&lt;br /&gt;
&lt;br /&gt;
Whether or not you use usbtty, the first couple of messages will always be displayed on the serial console.&lt;br /&gt;
&lt;br /&gt;
The bootloader is currently configured to wait for three seconds.  If a key press on the '''stdin''' is received within those three seconds, auto-boot is aborted.&lt;br /&gt;
&lt;br /&gt;
==== Using usbtty from Linux ====&lt;br /&gt;
&lt;br /&gt;
Just by connecting the phone in u-boot mode to your Linux pc should make it detect a [[CDC ACM]] device, and you should get a new tty device called /dev/ttyACM0. If not, enable the CONFIG_USB_ACM (Device Drivers -&amp;gt; USB support -&amp;gt; USB Modem (CDC ACM) support). (Instructions for MacOS users are [[MacOS_X#USB_Serial|here]])&lt;br /&gt;
&lt;br /&gt;
Use your favourite terminal emulator (minicom, cu, zc, screen ...) to access it like any other serial port. If you don't have a favorite, try just: (cu is in the taylor-uucp package, use &amp;quot;apt-get install cu&amp;quot; if it is not yet installed)&lt;br /&gt;
 cu -l /dev/ttyACM0&lt;br /&gt;
&lt;br /&gt;
You might need to &lt;br /&gt;
 chown uucp.uucp /dev/ttyACM0&lt;br /&gt;
&lt;br /&gt;
to get the necessary rights (even as root).&lt;br /&gt;
&lt;br /&gt;
A nice alternative for cu is Werner Almesberger's [[NeoCon|neocon]].&lt;br /&gt;
&lt;br /&gt;
First, you should try to check whether the USB device shows up in 'lsusb' while you're running in u-boot mode:&lt;br /&gt;
&lt;br /&gt;
 # lsusb -d 1457:5119&lt;br /&gt;
 Bus 005 Device 079: ID 1457:5119  &lt;br /&gt;
&lt;br /&gt;
Second, let's see some more details about the available endpoints and configurations:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lsusb -v -d 1457:5119&lt;br /&gt;
Bus 005 Device 079: ID 1457:5119  &lt;br /&gt;
Device Descriptor:&lt;br /&gt;
  bLength                18&lt;br /&gt;
  bDescriptorType         1&lt;br /&gt;
  bcdUSB               1.10&lt;br /&gt;
  bDeviceClass            2 Communications&lt;br /&gt;
  bDeviceSubClass         0 &lt;br /&gt;
  bDeviceProtocol         0 &lt;br /&gt;
  bMaxPacketSize0        16&lt;br /&gt;
  idVendor           0x1457 &lt;br /&gt;
  idProduct          0x5119 &lt;br /&gt;
  bcdDevice            0.00&lt;br /&gt;
  iManufacturer           1 OpenMoko, Inc&lt;br /&gt;
  iProduct                2 Neo1973 Bootloader U-Boot 1.2.0-g6c7cac8c-dirty-moko3&lt;br /&gt;
  iSerial                 3 0000000&lt;br /&gt;
  bNumConfigurations      1&lt;br /&gt;
  Configuration Descriptor:&lt;br /&gt;
    bLength                 9&lt;br /&gt;
    bDescriptorType         2&lt;br /&gt;
    wTotalLength           85&lt;br /&gt;
    bNumInterfaces          3&lt;br /&gt;
    bConfigurationValue     1&lt;br /&gt;
    iConfiguration          4 TTY via USB&lt;br /&gt;
    bmAttributes         0xc0&lt;br /&gt;
      Self Powered&lt;br /&gt;
    MaxPower                0mA&lt;br /&gt;
    Interface Descriptor:&lt;br /&gt;
      bLength                 9&lt;br /&gt;
      bDescriptorType         4&lt;br /&gt;
      bInterfaceNumber        0&lt;br /&gt;
      bAlternateSetting       0&lt;br /&gt;
      bNumEndpoints           1&lt;br /&gt;
      bInterfaceClass         2 Communications&lt;br /&gt;
      bInterfaceSubClass      2 Abstract (modem)&lt;br /&gt;
      bInterfaceProtocol      1 AT-commands (v.25ter)&lt;br /&gt;
      iInterface              6 Control Interface&lt;br /&gt;
      CDC Header:&lt;br /&gt;
        bcdCDC               0.6e&lt;br /&gt;
      CDC Call Management:&lt;br /&gt;
        bmCapabilities       0x00&lt;br /&gt;
        bDataInterface          1&lt;br /&gt;
      CDC ACM:&lt;br /&gt;
        bmCapabilities       0x00&lt;br /&gt;
      CDC Union:&lt;br /&gt;
        bMasterInterface        0&lt;br /&gt;
        bSlaveInterface         1 &lt;br /&gt;
      Endpoint Descriptor:&lt;br /&gt;
        bLength                 7&lt;br /&gt;
        bDescriptorType         5&lt;br /&gt;
        bEndpointAddress     0x81  EP 1 IN&lt;br /&gt;
        bmAttributes            3&lt;br /&gt;
          Transfer Type            Interrupt&lt;br /&gt;
          Synch Type               None&lt;br /&gt;
          Usage Type               Data&lt;br /&gt;
        wMaxPacketSize     0x0010  1x 16 bytes&lt;br /&gt;
        bInterval             255&lt;br /&gt;
    Interface Descriptor:&lt;br /&gt;
      bLength                 9&lt;br /&gt;
      bDescriptorType         4&lt;br /&gt;
      bInterfaceNumber        1&lt;br /&gt;
      bAlternateSetting       0&lt;br /&gt;
      bNumEndpoints           2&lt;br /&gt;
      bInterfaceClass        10 CDC Data&lt;br /&gt;
      bInterfaceSubClass      0 Unused&lt;br /&gt;
      bInterfaceProtocol      0 &lt;br /&gt;
      iInterface              5 Bulk Data Interface&lt;br /&gt;
      Endpoint Descriptor:&lt;br /&gt;
        bLength                 7&lt;br /&gt;
        bDescriptorType         5&lt;br /&gt;
        bEndpointAddress     0x02  EP 2 OUT&lt;br /&gt;
        bmAttributes            2&lt;br /&gt;
          Transfer Type            Bulk&lt;br /&gt;
          Synch Type               None&lt;br /&gt;
          Usage Type               Data&lt;br /&gt;
        wMaxPacketSize     0x0010  1x 16 bytes&lt;br /&gt;
        bInterval             255&lt;br /&gt;
      Endpoint Descriptor:&lt;br /&gt;
        bLength                 7&lt;br /&gt;
        bDescriptorType         5&lt;br /&gt;
        bEndpointAddress     0x83  EP 3 IN&lt;br /&gt;
        bmAttributes            2&lt;br /&gt;
          Transfer Type            Bulk&lt;br /&gt;
          Synch Type               None&lt;br /&gt;
          Usage Type               Data&lt;br /&gt;
        wMaxPacketSize     0x0010  1x 16 bytes&lt;br /&gt;
        bInterval             255&lt;br /&gt;
    Interface Descriptor:&lt;br /&gt;
      bLength                 9&lt;br /&gt;
      bDescriptorType         4&lt;br /&gt;
      bInterfaceNumber        2&lt;br /&gt;
      bAlternateSetting       0&lt;br /&gt;
      bNumEndpoints           0&lt;br /&gt;
      bInterfaceClass       254 Application Specific Interface&lt;br /&gt;
      bInterfaceSubClass      1 Device Firmware Update&lt;br /&gt;
      bInterfaceProtocol      1 &lt;br /&gt;
      iInterface              7 USB Device Firmware Upgrade&lt;br /&gt;
Device Status:     0x0001&lt;br /&gt;
  Self Powered&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, you can access it using your favourite terminal program.&lt;br /&gt;
&lt;br /&gt;
Then, if the environment is not set correctly, you will need to use the current console (e.g. serial console) to change the [[bootloader environment#console|console entries in the environment]]:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
GTA01Bv2 # setenv stderr usbtty&lt;br /&gt;
GTA01Bv2 # setenv stdout usbtty&lt;br /&gt;
GTA01Bv2 # setenv stdin usbtty&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Typical u-boot prompt ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
U-Boot 1.2.0-moko1 (Feb 16 2007 - 00:36:13)&lt;br /&gt;
&lt;br /&gt;
DRAM:  128 MB&lt;br /&gt;
NAND:  64 MiB&lt;br /&gt;
Found Environment offset in OOB..&lt;br /&gt;
Video: 640x480x8 31kHz 59Hz&lt;br /&gt;
USB:   S3C2410 USB Deviced&lt;br /&gt;
In:    serial&lt;br /&gt;
Out:   serial&lt;br /&gt;
Err:   serial&lt;br /&gt;
Hit any key to stop autoboot:  0 &lt;br /&gt;
GTA01Bv3 #&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Commands on the bootloader prompt ===&lt;br /&gt;
&lt;br /&gt;
:''See [[bootloader commands]].''&lt;br /&gt;
&lt;br /&gt;
=== What if I borked my bootloader environment and don't get a prompt anymore? ===&lt;br /&gt;
Found a solution here:&lt;br /&gt;
[[http://markmail.org/message/gqypwiohdet6x4am?q=almesberger+partition&amp;amp;page=1&amp;amp;refer=xbamkzwwsaobv7wa]]&lt;br /&gt;
&lt;br /&gt;
It works the following way:&lt;br /&gt;
* Get the devirginator:&lt;br /&gt;
 svn co http://svn.openmoko.org/trunk/src/host/devirginator&lt;br /&gt;
 cd devirginator&lt;br /&gt;
* Read the u-boot environment from the device:&lt;br /&gt;
 dfu-util -a u-boot_env -R -U env.in&lt;br /&gt;
* Create a file that contains everything you want to change in your u-boot environment or get it by issuing the following command:&lt;br /&gt;
 wget http://svn.openmoko.org/trunk/src/host/devirginator/environment.in&lt;br /&gt;
* Now let devirginator generate a new u-boot_env partition for us, - that contains the partition table from our u-boot_env, - and all changes we wanted to make; Note that the -D GTA02 is needed for the neo Freeruner only.&lt;br /&gt;
 ./envedit.pl -i env.in -f environment.in -o env.out -D GTA02&lt;br /&gt;
* On my box the partition layout didn't seem to match the idea of envedit.pl, so it issued 2 warnings:&lt;br /&gt;
 warning: environment is 262144 bytes, expected 16384&lt;br /&gt;
 CRC error: expected 0xc33e35fc, got 0x93097bfb&lt;br /&gt;
* In this case jut add a additional argument to the command line - that has to be the 1st argument, though, and that contains the size information we got from the warning:&lt;br /&gt;
 ./envedit.pl -s 262144 -i env.in -D GTA02 -f environment.in  -o env.out&lt;br /&gt;
* Now the perl script should no more output anything but write a new u-boot_env partition that we can upload to the device by:&lt;br /&gt;
 dfu-util -a u-boot_env -R -D env.out&lt;br /&gt;
&lt;br /&gt;
== Device Firmware Upgrade ==&lt;br /&gt;
&lt;br /&gt;
Our version of u-boot also implements [[USB DFU]]. This can be useful to&lt;br /&gt;
load files and kernel for quick testing.&lt;br /&gt;
&lt;br /&gt;
To find out whether your version of u-boot supports this, use the output of&lt;br /&gt;
 $ lsusb -v -d 1457:5119&lt;br /&gt;
while the phone is in u-boot mode.&lt;br /&gt;
&lt;br /&gt;
If it supports DFU, you should see the following snippet towards the end of the output:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    Interface Descriptor:&lt;br /&gt;
      bLength                 9&lt;br /&gt;
      bDescriptorType         4&lt;br /&gt;
      bInterfaceNumber        2&lt;br /&gt;
      bAlternateSetting       0&lt;br /&gt;
      bNumEndpoints           0&lt;br /&gt;
      bInterfaceClass       254 Application Specific Interface&lt;br /&gt;
      bInterfaceSubClass      1 Device Firmware Update&lt;br /&gt;
      bInterfaceProtocol      1 &lt;br /&gt;
      iInterface              0 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For information on how to do firmware upgrades, please see [[dfu-util]]. For neo 1973 you may see [[Flashing_Openmoko#Actually_flashing_things_into_the_device]], and for the FreeRunner : [[Flashing the Neo FreeRunner]].&lt;br /&gt;
&lt;br /&gt;
=== Booting files over DFU ===&lt;br /&gt;
&lt;br /&gt;
To load a file at memory address 0x32000000:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dfu-util -a 0 -D fileToLoad -R&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After that, send 'bootm 0x32000000' to u-boot or 'bootelf 0x32000000' if&lt;br /&gt;
its an elf file.&lt;br /&gt;
&lt;br /&gt;
Simple python script that can boot an ELF image - avoiding a ACM bug that breaks on large packets.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/usr/bin/python&lt;br /&gt;
import sys&lt;br /&gt;
import os&lt;br /&gt;
import time&lt;br /&gt;
&lt;br /&gt;
cmd1 = &amp;quot;neo backlight off\n&amp;quot;&lt;br /&gt;
cmd2 = &amp;quot;bootelf 0x32000000\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
def output(tty, str):&lt;br /&gt;
    for x in str:&lt;br /&gt;
        tty.write(x)&lt;br /&gt;
        tty.flush()&lt;br /&gt;
&lt;br /&gt;
if len(sys.argv) == 2:&lt;br /&gt;
    print &amp;quot;Loading %s...&amp;quot; % sys.argv[1]&lt;br /&gt;
&lt;br /&gt;
    loadfile = &amp;quot;dfu-util -a 0 -D %s -R&amp;quot; % sys.argv[1]&lt;br /&gt;
&lt;br /&gt;
    os.system(loadfile)&lt;br /&gt;
&lt;br /&gt;
    time.sleep(3)&lt;br /&gt;
&lt;br /&gt;
    tty = open(&amp;quot;/dev/ttyACM0&amp;quot;, &amp;quot;a&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
    output(tty, cmd1)&lt;br /&gt;
    output(tty, cmd2)&lt;br /&gt;
&lt;br /&gt;
    tty.close()&lt;br /&gt;
else:&lt;br /&gt;
    print &amp;quot;Usage: %s elffile&amp;quot; % sys.argv[0]&lt;br /&gt;
    print &amp;quot;&amp;quot;&lt;br /&gt;
    sys.exit(2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
=== USB connectivity problems ===&lt;br /&gt;
&lt;br /&gt;
I once got errors like this (in dmesg or /var/log/messages) on the host side while connecting the neo in u-boot:&lt;br /&gt;
&lt;br /&gt;
 usb 2-1: device descriptor read/64, error -110&lt;br /&gt;
 usb usb2: Controller not stopped yet!&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
 hub 4-0:1.0: port 1 disabled by hub (EMI?), re-enabling...&lt;br /&gt;
 usb 4-1: USB disconnect, address 2&lt;br /&gt;
&lt;br /&gt;
A possible solution is given below. Please note that if you have a usb keyboard or mouse then the command might cause trouble. &lt;br /&gt;
&lt;br /&gt;
 rmmod uhci_hcd ; modprobe uhci_hcd&lt;br /&gt;
&lt;br /&gt;
Another option is to plug the FR into a different USB port on the host, preferably one on the Motherboard not the hub.&lt;br /&gt;
&lt;br /&gt;
Disconnecting the Neo's USB while powering up may prevent this problem in the future.&lt;br /&gt;
&lt;br /&gt;
See [[Flashing Openmoko]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:System Developers]]&lt;br /&gt;
[[Category:Flashing Openmoko]]&lt;/div&gt;</summary>
		<author><name>Brian H Wilson</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/GPS_Data_Logger</id>
		<title>GPS Data Logger</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/GPS_Data_Logger"/>
				<updated>2008-08-19T21:23:09Z</updated>
		
		<summary type="html">&lt;p&gt;Brian H Wilson: /* GPS multiplexer */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page was created to address the use cases mentioned in [[GTA02 GPS]], including&lt;br /&gt;
&lt;br /&gt;
* I want to log GPS data for later analysis.&lt;br /&gt;
* I want to collect GPS data for scientific field work (forestry, biology, etc)&lt;br /&gt;
&lt;br /&gt;
The page was started on 17 August 2008 mostly as a thought exercise.&lt;br /&gt;
Please jump in and add to it.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
The typical commercial approach to managing GPS data is to create one big application that does everything well. Unfortunately everyone has a different idea of what &amp;quot;doing everything well&amp;quot; means. One person might want to use GPS to log and analyze bicycle rides while another does weed mapping and another might be doing asset management. One application cannot do all this well.&lt;br /&gt;
&lt;br /&gt;
A better approach is to break it up into a set of components. Each component can be a standalone application. This relies on some kind of multiplexer such as gpsd (does gypsy support multiplexing?) so that each app has access to the GPS data stream.&lt;br /&gt;
&lt;br /&gt;
Initially the main functions could be broken out these components.&lt;br /&gt;
&lt;br /&gt;
# A '''GPS multiplexer''' that talks to the GPS receiver and feeds data to many applications.&lt;br /&gt;
# A '''GPS Controller''' to that can talk to the mulitplexer (and hence the GPS receiver) to display status and adjust settings.&lt;br /&gt;
# A '''Data Logger''' that can run all the time and record GPS data.&lt;br /&gt;
# A '''Field Collection Tool''' that allows doing specific operations such as averaging GPS data while waiting at a point for increased accuracy and entering attributes for a point.&lt;br /&gt;
&lt;br /&gt;
'''Mapping''' We should consider how to support mapping as a part of the field collection tool; it is not strictly necessary but it can be very nice to have it incorporated. Likewise if you are logging a breadcrumb trail it can be very nice to be able to see it on the map. A mapping component will need to be able to update its display with data collected from the logger and the field collection tool.&lt;br /&gt;
&lt;br /&gt;
== Main components ==&lt;br /&gt;
&lt;br /&gt;
=== GPS multiplexer ===&lt;br /&gt;
&lt;br /&gt;
Look at gpsd and gypsy and either use one of them or use them for inspiration. &lt;br /&gt;
See the Gypsy author's take on GPSd here: http://folks.o-hand.com/iain/gypsy/why-not-gpsd.html&lt;br /&gt;
&lt;br /&gt;
So far Gypsy looks pretty good to me.&lt;br /&gt;
&lt;br /&gt;
Maybe the control program should be separated out from the multiplexer.&lt;br /&gt;
&lt;br /&gt;
Partial list of requirements for the multiplexer&lt;br /&gt;
* Control internal GPS receiver&lt;br /&gt;
* Control external GPS connected via serial port (USB or bluetooth)&lt;br /&gt;
* Feed data from the selected GPS receiver to multiple applications.&lt;br /&gt;
* Handle a RTCM stream to allow realtime DGPS postprocessing.&lt;br /&gt;
* Supply all attributes to applications, including such things as bearing, PDOP and satellites in use. (Not just time and position).&lt;br /&gt;
&lt;br /&gt;
Angle / inclination -- it might be possible to use the accelerometers in the smartphone to determine current inclination and calculate percent grade. You'd have to be able to calibrate this: mount the smartphone in a bracket and then read the acceleratometers to set it to 0 when on level ground.&lt;br /&gt;
&lt;br /&gt;
==== External GPS ====&lt;br /&gt;
&lt;br /&gt;
There is no reason we are limited to using the built-in GPS receiver. For applications requiring more accuracy (for example sub-meter), the GPS multiplexer should be able to accept data via USB or bluetooth and feed it to our applications. The controller program should be able to handle this situation.&lt;br /&gt;
&lt;br /&gt;
Bearing - some GPS receivers include an electronic compass that provides azimuth even when not moving. The multiplexer should know if bearing values are valid or not and indicate this. The value should indicate whether it is set for magnetic or true north.&lt;br /&gt;
&lt;br /&gt;
=== Support for postprocessing? ===&lt;br /&gt;
&lt;br /&gt;
Real-time DGPS correction possibilities include receiving an RTCM stream from an external device, receiving RTCM over an IP connection, and WAAS. Does the Ublox receiver support RTCM? Most receivers that support it just accept a stream of data from a serial line. You don't have to reverse engineer it, you just accept data from some source such as a DGPS Beacon Receiver and feed the output to the GPS receiver and you get something approaching 1 meter accuracy.&lt;br /&gt;
&lt;br /&gt;
Postprocessed DGPS correction requires recording pseudorange data and running an application later. In the open source world this means [http://en.wikipedia.org/wiki/RINEX RINEX]. Anyone with more knowledge of RINEX should jump in and edit this section.&lt;br /&gt;
&lt;br /&gt;
=== GPS controller ===&lt;br /&gt;
&lt;br /&gt;
''I think OM gps test program (what's it called) does much of this.''&lt;br /&gt;
&lt;br /&gt;
Some GPS receivers include a feature to stop logging or to issue warnings if data quality goes too low for any reason. Where should this be handled? In the multiplexer or in the applications? Maybe the settings should be applied to the multiplexer and it should issue warnings to the applications which would then decide what to do.&lt;br /&gt;
&lt;br /&gt;
=== Data Logger ===&lt;br /&gt;
&lt;br /&gt;
The basic concept of the logger is to create a bread crumb trail as you move about. &lt;br /&gt;
It has its own preference settings to determine if points are plotted based on change in position or on a time basis or both. &lt;br /&gt;
&lt;br /&gt;
It should also be possible to set what is logged. Possibilities include time, position, bearing, velocity, elevation, pseudo-range data, HDOP, PDOP, satellites used, type of GPS, type of antenna, DGPS on/off, type of DGPS.&lt;br /&gt;
&lt;br /&gt;
==== Speedometer, Pedomater -- Usage of logger by itself ====&lt;br /&gt;
&lt;br /&gt;
The data logger would be one crucial component in an application of GPS for bicyclists (and outdoor enthusiasts such as hikers and runners.) Other requirements would be a good display (to substitute for a speedometer) and a good mapping program. &lt;br /&gt;
&lt;br /&gt;
Should we expand on that on this page? It would be neat to have something that interoperates with the GPS multiplexer and the data logger so maybe we should?&lt;br /&gt;
&lt;br /&gt;
Speedometer functions would include tracking minimums, maximums, averages for speed, distance, and elevation (stopped, moving, combined). Bicyclists (and runners? I am not a runner...) want to know total climb.&lt;br /&gt;
&lt;br /&gt;
''I ride a bicycle and I use GPS as a speedometer and to do field work and I want to be able to do both with my Freerunner.'' [[User:Brian H Wilson|Brian H Wilson]] 19:38, 18 August 2008 (UTC)&lt;br /&gt;
&lt;br /&gt;
=== Field Collection Tool ===&lt;br /&gt;
&lt;br /&gt;
'''Attributes''' Mission planning should include setting up a file to be used for data collection, and that file should define attributes to be included. The data collector should be configurable to facilitate easy entry of the attribute data. For example, if you define a field to have a finite list of values, the values could be available as a drop down list.&lt;br /&gt;
&lt;br /&gt;
'''Point averaging''' Stand in one place and collect points until you are happy. The display should show current PDOP/HDOP and expected accuracy and number of readings used to create tehe point. Preferences should include storing all data used to create the averaged point.&lt;br /&gt;
&lt;br /&gt;
'''Points, lines and polygons.''' You should be able to collect all three. A typical use for polygons is to walk around a space while collecting GPS points to create a polygon showing the location of some physical object such as a wetland.&lt;br /&gt;
&lt;br /&gt;
==== Other related tools ====&lt;br /&gt;
&lt;br /&gt;
Other specialized field collection tools could be used for &lt;br /&gt;
&lt;br /&gt;
* Asset management, example: urban forestry, agriculture, public works&lt;br /&gt;
* Map making, for example to collect data for the Open Street Map project&lt;br /&gt;
* Geocaching&lt;br /&gt;
* ??? Add yours here ???&lt;br /&gt;
&lt;br /&gt;
== Data format and exchange ==&lt;br /&gt;
&lt;br /&gt;
The data should be stored internally in a compact form that is open or at least well documented (for example ESRI Shapefiles). Storing in XML based formats is bulky and should probably be avoided. &lt;br /&gt;
&lt;br /&gt;
There should be a desktop tool to manage transferring the data that has been collected from the smartphone to more portable exchange formats such as GPX and GML and KML. &amp;quot;GPS Office&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== RINEX ===&lt;br /&gt;
&lt;br /&gt;
Would RINEX be an appropriate general format for internal storage? No.&lt;br /&gt;
It's an exchange format but it's intended to include data required to perform post-processing.&lt;br /&gt;
It stores direct satellite observations, not things needed for navigation like calculated position.&lt;br /&gt;
&lt;br /&gt;
This guy wrote a program that takes Ublox Antares 4 data and writes it as RINEX data.&lt;br /&gt;
http://home.comcast.net/~dmilbert/softs/ant2rin.htm&lt;br /&gt;
&lt;br /&gt;
GPX would accommodate everything we need but it's ASCII XML and that means 1/2 the file is just XML formatting. It might be possible to used tokenized GPX to make it more compact.&lt;br /&gt;
&lt;br /&gt;
== More features ==&lt;br /&gt;
&lt;br /&gt;
All I can think of at the moment is rangefinders. I am sure there are others.&lt;br /&gt;
&lt;br /&gt;
=== Laser rangefinder ===&lt;br /&gt;
&lt;br /&gt;
There is another common situtaion where people use a laser rangefinder in conjunction with GPS, to get the location of an object that is not reachable (for example a boat) or a tree trunk (under heavy canopy).&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
&lt;br /&gt;
GPSd http://gpsd.berlios.de/&lt;br /&gt;
&lt;br /&gt;
GPX http://www.topografix.com/gpx.asp http://en.wikipedia.org/wiki/GPX_(data_transfer)&lt;br /&gt;
&lt;br /&gt;
gypsy http://folks.o-hand.com/iain/gypsy/ GPS data multiplexer&lt;br /&gt;
&lt;br /&gt;
RINEX specs ftp://ftp.unibe.ch/aiub/rinex/&lt;br /&gt;
&lt;br /&gt;
=== Commercial software ===&lt;br /&gt;
&lt;br /&gt;
ESRI ArcPad http://www.tdsway.com/products/solo_field&lt;br /&gt;
&lt;br /&gt;
TDS Solo Field http://www.tdsway.com/products/solo_field&lt;br /&gt;
&lt;br /&gt;
Trimble Terrasync http://www.trimble.com/terrasync.shtml&lt;br /&gt;
&lt;br /&gt;
== People working on this project ==&lt;br /&gt;
&lt;br /&gt;
[[User:Brian H Wilson]] is blabbing a lot here and wishing he had more time to work on this.&lt;br /&gt;
&lt;br /&gt;
[[Category: GPS]]&lt;/div&gt;</summary>
		<author><name>Brian H Wilson</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/GPS_Data_Logger</id>
		<title>GPS Data Logger</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/GPS_Data_Logger"/>
				<updated>2008-08-19T21:08:37Z</updated>
		
		<summary type="html">&lt;p&gt;Brian H Wilson: /* External links */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page was created to address the use cases mentioned in [[GTA02 GPS]], including&lt;br /&gt;
&lt;br /&gt;
* I want to log GPS data for later analysis.&lt;br /&gt;
* I want to collect GPS data for scientific field work (forestry, biology, etc)&lt;br /&gt;
&lt;br /&gt;
The page was started on 17 August 2008 mostly as a thought exercise.&lt;br /&gt;
Please jump in and add to it.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
The typical commercial approach to managing GPS data is to create one big application that does everything well. Unfortunately everyone has a different idea of what &amp;quot;doing everything well&amp;quot; means. One person might want to use GPS to log and analyze bicycle rides while another does weed mapping and another might be doing asset management. One application cannot do all this well.&lt;br /&gt;
&lt;br /&gt;
A better approach is to break it up into a set of components. Each component can be a standalone application. This relies on some kind of multiplexer such as gpsd (does gypsy support multiplexing?) so that each app has access to the GPS data stream.&lt;br /&gt;
&lt;br /&gt;
Initially the main functions could be broken out these components.&lt;br /&gt;
&lt;br /&gt;
# A '''GPS multiplexer''' that talks to the GPS receiver and feeds data to many applications.&lt;br /&gt;
# A '''GPS Controller''' to that can talk to the mulitplexer (and hence the GPS receiver) to display status and adjust settings.&lt;br /&gt;
# A '''Data Logger''' that can run all the time and record GPS data.&lt;br /&gt;
# A '''Field Collection Tool''' that allows doing specific operations such as averaging GPS data while waiting at a point for increased accuracy and entering attributes for a point.&lt;br /&gt;
&lt;br /&gt;
'''Mapping''' We should consider how to support mapping as a part of the field collection tool; it is not strictly necessary but it can be very nice to have it incorporated. Likewise if you are logging a breadcrumb trail it can be very nice to be able to see it on the map. A mapping component will need to be able to update its display with data collected from the logger and the field collection tool.&lt;br /&gt;
&lt;br /&gt;
== Main components ==&lt;br /&gt;
&lt;br /&gt;
=== GPS multiplexer ===&lt;br /&gt;
&lt;br /&gt;
Look at gpsd and gypsy (and the related religious wars) and either use one of them or use them for inspiration. &lt;br /&gt;
&lt;br /&gt;
Partial list of requirements for the multiplexer&lt;br /&gt;
* Control internal GPS receiver&lt;br /&gt;
* Control external GPS connected via serial port (USB or bluetooth)&lt;br /&gt;
* Feed data from the selected GPS receiver to multiple applications.&lt;br /&gt;
* Handle a RTCM stream to allow realtime DGPS postprocessing.&lt;br /&gt;
* Supply all attributes to applications, including such things as bearing, PDOP and satellites in use. (Not just time and position).&lt;br /&gt;
&lt;br /&gt;
Angle / inclination -- it might be possible to use the accelerometers in the smartphone to determine current inclination and calculate percent grade. You'd have to be able to calibrate this: mount the smartphone in a bracket and then read the acceleratometers to set it to 0 when on level ground.&lt;br /&gt;
&lt;br /&gt;
==== External GPS ====&lt;br /&gt;
&lt;br /&gt;
There is no reason we are limited to using the built-in GPS receiver. For applications requiring more accuracy (for example sub-meter), the GPS multiplexer should be able to accept data via USB or bluetooth and feed it to our applications. The controller program should be able to handle this situation.&lt;br /&gt;
&lt;br /&gt;
Bearing - some GPS receivers include an electronic compass that provides azimuth even when not moving. The multiplexer should know if bearing values are valid or not and indicate this. The value should indicate whether it is set for magnetic or true north.&lt;br /&gt;
&lt;br /&gt;
=== Support for postprocessing? ===&lt;br /&gt;
&lt;br /&gt;
Real-time DGPS correction possibilities include receiving an RTCM stream from an external device, receiving RTCM over an IP connection, and WAAS. Does the Ublox receiver support RTCM? Most receivers that support it just accept a stream of data from a serial line. You don't have to reverse engineer it, you just accept data from some source such as a DGPS Beacon Receiver and feed the output to the GPS receiver and you get something approaching 1 meter accuracy.&lt;br /&gt;
&lt;br /&gt;
Postprocessed DGPS correction requires recording pseudorange data and running an application later. In the open source world this means [http://en.wikipedia.org/wiki/RINEX RINEX]. Anyone with more knowledge of RINEX should jump in and edit this section.&lt;br /&gt;
&lt;br /&gt;
=== GPS controller ===&lt;br /&gt;
&lt;br /&gt;
''I think OM gps test program (what's it called) does much of this.''&lt;br /&gt;
&lt;br /&gt;
Some GPS receivers include a feature to stop logging or to issue warnings if data quality goes too low for any reason. Where should this be handled? In the multiplexer or in the applications? Maybe the settings should be applied to the multiplexer and it should issue warnings to the applications which would then decide what to do.&lt;br /&gt;
&lt;br /&gt;
=== Data Logger ===&lt;br /&gt;
&lt;br /&gt;
The basic concept of the logger is to create a bread crumb trail as you move about. &lt;br /&gt;
It has its own preference settings to determine if points are plotted based on change in position or on a time basis or both. &lt;br /&gt;
&lt;br /&gt;
It should also be possible to set what is logged. Possibilities include time, position, bearing, velocity, elevation, pseudo-range data, HDOP, PDOP, satellites used, type of GPS, type of antenna, DGPS on/off, type of DGPS.&lt;br /&gt;
&lt;br /&gt;
==== Speedometer, Pedomater -- Usage of logger by itself ====&lt;br /&gt;
&lt;br /&gt;
The data logger would be one crucial component in an application of GPS for bicyclists (and outdoor enthusiasts such as hikers and runners.) Other requirements would be a good display (to substitute for a speedometer) and a good mapping program. &lt;br /&gt;
&lt;br /&gt;
Should we expand on that on this page? It would be neat to have something that interoperates with the GPS multiplexer and the data logger so maybe we should?&lt;br /&gt;
&lt;br /&gt;
Speedometer functions would include tracking minimums, maximums, averages for speed, distance, and elevation (stopped, moving, combined). Bicyclists (and runners? I am not a runner...) want to know total climb.&lt;br /&gt;
&lt;br /&gt;
''I ride a bicycle and I use GPS as a speedometer and to do field work and I want to be able to do both with my Freerunner.'' [[User:Brian H Wilson|Brian H Wilson]] 19:38, 18 August 2008 (UTC)&lt;br /&gt;
&lt;br /&gt;
=== Field Collection Tool ===&lt;br /&gt;
&lt;br /&gt;
'''Attributes''' Mission planning should include setting up a file to be used for data collection, and that file should define attributes to be included. The data collector should be configurable to facilitate easy entry of the attribute data. For example, if you define a field to have a finite list of values, the values could be available as a drop down list.&lt;br /&gt;
&lt;br /&gt;
'''Point averaging''' Stand in one place and collect points until you are happy. The display should show current PDOP/HDOP and expected accuracy and number of readings used to create tehe point. Preferences should include storing all data used to create the averaged point.&lt;br /&gt;
&lt;br /&gt;
'''Points, lines and polygons.''' You should be able to collect all three. A typical use for polygons is to walk around a space while collecting GPS points to create a polygon showing the location of some physical object such as a wetland.&lt;br /&gt;
&lt;br /&gt;
==== Other related tools ====&lt;br /&gt;
&lt;br /&gt;
Other specialized field collection tools could be used for &lt;br /&gt;
&lt;br /&gt;
* Asset management, example: urban forestry, agriculture, public works&lt;br /&gt;
* Map making, for example to collect data for the Open Street Map project&lt;br /&gt;
* Geocaching&lt;br /&gt;
* ??? Add yours here ???&lt;br /&gt;
&lt;br /&gt;
== Data format and exchange ==&lt;br /&gt;
&lt;br /&gt;
The data should be stored internally in a compact form that is open or at least well documented (for example ESRI Shapefiles). Storing in XML based formats is bulky and should probably be avoided. &lt;br /&gt;
&lt;br /&gt;
There should be a desktop tool to manage transferring the data that has been collected from the smartphone to more portable exchange formats such as GPX and GML and KML. &amp;quot;GPS Office&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== RINEX ===&lt;br /&gt;
&lt;br /&gt;
Would RINEX be an appropriate general format for internal storage? No.&lt;br /&gt;
It's an exchange format but it's intended to include data required to perform post-processing.&lt;br /&gt;
It stores direct satellite observations, not things needed for navigation like calculated position.&lt;br /&gt;
&lt;br /&gt;
This guy wrote a program that takes Ublox Antares 4 data and writes it as RINEX data.&lt;br /&gt;
http://home.comcast.net/~dmilbert/softs/ant2rin.htm&lt;br /&gt;
&lt;br /&gt;
GPX would accommodate everything we need but it's ASCII XML and that means 1/2 the file is just XML formatting. It might be possible to used tokenized GPX to make it more compact.&lt;br /&gt;
&lt;br /&gt;
== More features ==&lt;br /&gt;
&lt;br /&gt;
All I can think of at the moment is rangefinders. I am sure there are others.&lt;br /&gt;
&lt;br /&gt;
=== Laser rangefinder ===&lt;br /&gt;
&lt;br /&gt;
There is another common situtaion where people use a laser rangefinder in conjunction with GPS, to get the location of an object that is not reachable (for example a boat) or a tree trunk (under heavy canopy).&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
&lt;br /&gt;
GPSd http://gpsd.berlios.de/&lt;br /&gt;
&lt;br /&gt;
GPX http://www.topografix.com/gpx.asp http://en.wikipedia.org/wiki/GPX_(data_transfer)&lt;br /&gt;
&lt;br /&gt;
gypsy http://folks.o-hand.com/iain/gypsy/ GPS data multiplexer&lt;br /&gt;
&lt;br /&gt;
RINEX specs ftp://ftp.unibe.ch/aiub/rinex/&lt;br /&gt;
&lt;br /&gt;
=== Commercial software ===&lt;br /&gt;
&lt;br /&gt;
ESRI ArcPad http://www.tdsway.com/products/solo_field&lt;br /&gt;
&lt;br /&gt;
TDS Solo Field http://www.tdsway.com/products/solo_field&lt;br /&gt;
&lt;br /&gt;
Trimble Terrasync http://www.trimble.com/terrasync.shtml&lt;br /&gt;
&lt;br /&gt;
== People working on this project ==&lt;br /&gt;
&lt;br /&gt;
[[User:Brian H Wilson]] is blabbing a lot here and wishing he had more time to work on this.&lt;br /&gt;
&lt;br /&gt;
[[Category: GPS]]&lt;/div&gt;</summary>
		<author><name>Brian H Wilson</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/GPS_Data_Logger</id>
		<title>GPS Data Logger</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/GPS_Data_Logger"/>
				<updated>2008-08-19T21:07:13Z</updated>
		
		<summary type="html">&lt;p&gt;Brian H Wilson: /* External links */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page was created to address the use cases mentioned in [[GTA02 GPS]], including&lt;br /&gt;
&lt;br /&gt;
* I want to log GPS data for later analysis.&lt;br /&gt;
* I want to collect GPS data for scientific field work (forestry, biology, etc)&lt;br /&gt;
&lt;br /&gt;
The page was started on 17 August 2008 mostly as a thought exercise.&lt;br /&gt;
Please jump in and add to it.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
The typical commercial approach to managing GPS data is to create one big application that does everything well. Unfortunately everyone has a different idea of what &amp;quot;doing everything well&amp;quot; means. One person might want to use GPS to log and analyze bicycle rides while another does weed mapping and another might be doing asset management. One application cannot do all this well.&lt;br /&gt;
&lt;br /&gt;
A better approach is to break it up into a set of components. Each component can be a standalone application. This relies on some kind of multiplexer such as gpsd (does gypsy support multiplexing?) so that each app has access to the GPS data stream.&lt;br /&gt;
&lt;br /&gt;
Initially the main functions could be broken out these components.&lt;br /&gt;
&lt;br /&gt;
# A '''GPS multiplexer''' that talks to the GPS receiver and feeds data to many applications.&lt;br /&gt;
# A '''GPS Controller''' to that can talk to the mulitplexer (and hence the GPS receiver) to display status and adjust settings.&lt;br /&gt;
# A '''Data Logger''' that can run all the time and record GPS data.&lt;br /&gt;
# A '''Field Collection Tool''' that allows doing specific operations such as averaging GPS data while waiting at a point for increased accuracy and entering attributes for a point.&lt;br /&gt;
&lt;br /&gt;
'''Mapping''' We should consider how to support mapping as a part of the field collection tool; it is not strictly necessary but it can be very nice to have it incorporated. Likewise if you are logging a breadcrumb trail it can be very nice to be able to see it on the map. A mapping component will need to be able to update its display with data collected from the logger and the field collection tool.&lt;br /&gt;
&lt;br /&gt;
== Main components ==&lt;br /&gt;
&lt;br /&gt;
=== GPS multiplexer ===&lt;br /&gt;
&lt;br /&gt;
Look at gpsd and gypsy (and the related religious wars) and either use one of them or use them for inspiration. &lt;br /&gt;
&lt;br /&gt;
Partial list of requirements for the multiplexer&lt;br /&gt;
* Control internal GPS receiver&lt;br /&gt;
* Control external GPS connected via serial port (USB or bluetooth)&lt;br /&gt;
* Feed data from the selected GPS receiver to multiple applications.&lt;br /&gt;
* Handle a RTCM stream to allow realtime DGPS postprocessing.&lt;br /&gt;
* Supply all attributes to applications, including such things as bearing, PDOP and satellites in use. (Not just time and position).&lt;br /&gt;
&lt;br /&gt;
Angle / inclination -- it might be possible to use the accelerometers in the smartphone to determine current inclination and calculate percent grade. You'd have to be able to calibrate this: mount the smartphone in a bracket and then read the acceleratometers to set it to 0 when on level ground.&lt;br /&gt;
&lt;br /&gt;
==== External GPS ====&lt;br /&gt;
&lt;br /&gt;
There is no reason we are limited to using the built-in GPS receiver. For applications requiring more accuracy (for example sub-meter), the GPS multiplexer should be able to accept data via USB or bluetooth and feed it to our applications. The controller program should be able to handle this situation.&lt;br /&gt;
&lt;br /&gt;
Bearing - some GPS receivers include an electronic compass that provides azimuth even when not moving. The multiplexer should know if bearing values are valid or not and indicate this. The value should indicate whether it is set for magnetic or true north.&lt;br /&gt;
&lt;br /&gt;
=== Support for postprocessing? ===&lt;br /&gt;
&lt;br /&gt;
Real-time DGPS correction possibilities include receiving an RTCM stream from an external device, receiving RTCM over an IP connection, and WAAS. Does the Ublox receiver support RTCM? Most receivers that support it just accept a stream of data from a serial line. You don't have to reverse engineer it, you just accept data from some source such as a DGPS Beacon Receiver and feed the output to the GPS receiver and you get something approaching 1 meter accuracy.&lt;br /&gt;
&lt;br /&gt;
Postprocessed DGPS correction requires recording pseudorange data and running an application later. In the open source world this means [http://en.wikipedia.org/wiki/RINEX RINEX]. Anyone with more knowledge of RINEX should jump in and edit this section.&lt;br /&gt;
&lt;br /&gt;
=== GPS controller ===&lt;br /&gt;
&lt;br /&gt;
''I think OM gps test program (what's it called) does much of this.''&lt;br /&gt;
&lt;br /&gt;
Some GPS receivers include a feature to stop logging or to issue warnings if data quality goes too low for any reason. Where should this be handled? In the multiplexer or in the applications? Maybe the settings should be applied to the multiplexer and it should issue warnings to the applications which would then decide what to do.&lt;br /&gt;
&lt;br /&gt;
=== Data Logger ===&lt;br /&gt;
&lt;br /&gt;
The basic concept of the logger is to create a bread crumb trail as you move about. &lt;br /&gt;
It has its own preference settings to determine if points are plotted based on change in position or on a time basis or both. &lt;br /&gt;
&lt;br /&gt;
It should also be possible to set what is logged. Possibilities include time, position, bearing, velocity, elevation, pseudo-range data, HDOP, PDOP, satellites used, type of GPS, type of antenna, DGPS on/off, type of DGPS.&lt;br /&gt;
&lt;br /&gt;
==== Speedometer, Pedomater -- Usage of logger by itself ====&lt;br /&gt;
&lt;br /&gt;
The data logger would be one crucial component in an application of GPS for bicyclists (and outdoor enthusiasts such as hikers and runners.) Other requirements would be a good display (to substitute for a speedometer) and a good mapping program. &lt;br /&gt;
&lt;br /&gt;
Should we expand on that on this page? It would be neat to have something that interoperates with the GPS multiplexer and the data logger so maybe we should?&lt;br /&gt;
&lt;br /&gt;
Speedometer functions would include tracking minimums, maximums, averages for speed, distance, and elevation (stopped, moving, combined). Bicyclists (and runners? I am not a runner...) want to know total climb.&lt;br /&gt;
&lt;br /&gt;
''I ride a bicycle and I use GPS as a speedometer and to do field work and I want to be able to do both with my Freerunner.'' [[User:Brian H Wilson|Brian H Wilson]] 19:38, 18 August 2008 (UTC)&lt;br /&gt;
&lt;br /&gt;
=== Field Collection Tool ===&lt;br /&gt;
&lt;br /&gt;
'''Attributes''' Mission planning should include setting up a file to be used for data collection, and that file should define attributes to be included. The data collector should be configurable to facilitate easy entry of the attribute data. For example, if you define a field to have a finite list of values, the values could be available as a drop down list.&lt;br /&gt;
&lt;br /&gt;
'''Point averaging''' Stand in one place and collect points until you are happy. The display should show current PDOP/HDOP and expected accuracy and number of readings used to create tehe point. Preferences should include storing all data used to create the averaged point.&lt;br /&gt;
&lt;br /&gt;
'''Points, lines and polygons.''' You should be able to collect all three. A typical use for polygons is to walk around a space while collecting GPS points to create a polygon showing the location of some physical object such as a wetland.&lt;br /&gt;
&lt;br /&gt;
==== Other related tools ====&lt;br /&gt;
&lt;br /&gt;
Other specialized field collection tools could be used for &lt;br /&gt;
&lt;br /&gt;
* Asset management, example: urban forestry, agriculture, public works&lt;br /&gt;
* Map making, for example to collect data for the Open Street Map project&lt;br /&gt;
* Geocaching&lt;br /&gt;
* ??? Add yours here ???&lt;br /&gt;
&lt;br /&gt;
== Data format and exchange ==&lt;br /&gt;
&lt;br /&gt;
The data should be stored internally in a compact form that is open or at least well documented (for example ESRI Shapefiles). Storing in XML based formats is bulky and should probably be avoided. &lt;br /&gt;
&lt;br /&gt;
There should be a desktop tool to manage transferring the data that has been collected from the smartphone to more portable exchange formats such as GPX and GML and KML. &amp;quot;GPS Office&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== RINEX ===&lt;br /&gt;
&lt;br /&gt;
Would RINEX be an appropriate general format for internal storage? No.&lt;br /&gt;
It's an exchange format but it's intended to include data required to perform post-processing.&lt;br /&gt;
It stores direct satellite observations, not things needed for navigation like calculated position.&lt;br /&gt;
&lt;br /&gt;
This guy wrote a program that takes Ublox Antares 4 data and writes it as RINEX data.&lt;br /&gt;
http://home.comcast.net/~dmilbert/softs/ant2rin.htm&lt;br /&gt;
&lt;br /&gt;
GPX would accommodate everything we need but it's ASCII XML and that means 1/2 the file is just XML formatting. It might be possible to used tokenized GPX to make it more compact.&lt;br /&gt;
&lt;br /&gt;
== More features ==&lt;br /&gt;
&lt;br /&gt;
All I can think of at the moment is rangefinders. I am sure there are others.&lt;br /&gt;
&lt;br /&gt;
=== Laser rangefinder ===&lt;br /&gt;
&lt;br /&gt;
There is another common situtaion where people use a laser rangefinder in conjunction with GPS, to get the location of an object that is not reachable (for example a boat) or a tree trunk (under heavy canopy).&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
&lt;br /&gt;
GPSd http://gpsd.berlios.de/&lt;br /&gt;
&lt;br /&gt;
GPX http://www.topografix.com/gpx.asp http://en.wikipedia.org/wiki/GPX_(data_transfer)&lt;br /&gt;
&lt;br /&gt;
RINEX specs ftp://ftp.unibe.ch/aiub/rinex/&lt;br /&gt;
&lt;br /&gt;
=== Commercial software ===&lt;br /&gt;
&lt;br /&gt;
ESRI ArcPad http://www.tdsway.com/products/solo_field&lt;br /&gt;
&lt;br /&gt;
TDS Solo Field http://www.tdsway.com/products/solo_field&lt;br /&gt;
&lt;br /&gt;
Trimble Terrasync http://www.trimble.com/terrasync.shtml&lt;br /&gt;
&lt;br /&gt;
== People working on this project ==&lt;br /&gt;
&lt;br /&gt;
[[User:Brian H Wilson]] is blabbing a lot here and wishing he had more time to work on this.&lt;br /&gt;
&lt;br /&gt;
[[Category: GPS]]&lt;/div&gt;</summary>
		<author><name>Brian H Wilson</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/GPS_Data_Logger</id>
		<title>GPS Data Logger</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/GPS_Data_Logger"/>
				<updated>2008-08-19T18:04:43Z</updated>
		
		<summary type="html">&lt;p&gt;Brian H Wilson: /* RINEX */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page was created to address the use cases mentioned in [[GTA02 GPS]], including&lt;br /&gt;
&lt;br /&gt;
* I want to log GPS data for later analysis.&lt;br /&gt;
* I want to collect GPS data for scientific field work (forestry, biology, etc)&lt;br /&gt;
&lt;br /&gt;
The page was started on 17 August 2008 mostly as a thought exercise.&lt;br /&gt;
Please jump in and add to it.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
The typical commercial approach to managing GPS data is to create one big application that does everything well. Unfortunately everyone has a different idea of what &amp;quot;doing everything well&amp;quot; means. One person might want to use GPS to log and analyze bicycle rides while another does weed mapping and another might be doing asset management. One application cannot do all this well.&lt;br /&gt;
&lt;br /&gt;
A better approach is to break it up into a set of components. Each component can be a standalone application. This relies on some kind of multiplexer such as gpsd (does gypsy support multiplexing?) so that each app has access to the GPS data stream.&lt;br /&gt;
&lt;br /&gt;
Initially the main functions could be broken out these components.&lt;br /&gt;
&lt;br /&gt;
# A '''GPS multiplexer''' that talks to the GPS receiver and feeds data to many applications.&lt;br /&gt;
# A '''GPS Controller''' to that can talk to the mulitplexer (and hence the GPS receiver) to display status and adjust settings.&lt;br /&gt;
# A '''Data Logger''' that can run all the time and record GPS data.&lt;br /&gt;
# A '''Field Collection Tool''' that allows doing specific operations such as averaging GPS data while waiting at a point for increased accuracy and entering attributes for a point.&lt;br /&gt;
&lt;br /&gt;
'''Mapping''' We should consider how to support mapping as a part of the field collection tool; it is not strictly necessary but it can be very nice to have it incorporated. Likewise if you are logging a breadcrumb trail it can be very nice to be able to see it on the map. A mapping component will need to be able to update its display with data collected from the logger and the field collection tool.&lt;br /&gt;
&lt;br /&gt;
== Main components ==&lt;br /&gt;
&lt;br /&gt;
=== GPS multiplexer ===&lt;br /&gt;
&lt;br /&gt;
Look at gpsd and gypsy (and the related religious wars) and either use one of them or use them for inspiration. &lt;br /&gt;
&lt;br /&gt;
Partial list of requirements for the multiplexer&lt;br /&gt;
* Control internal GPS receiver&lt;br /&gt;
* Control external GPS connected via serial port (USB or bluetooth)&lt;br /&gt;
* Feed data from the selected GPS receiver to multiple applications.&lt;br /&gt;
* Handle a RTCM stream to allow realtime DGPS postprocessing.&lt;br /&gt;
* Supply all attributes to applications, including such things as bearing, PDOP and satellites in use. (Not just time and position).&lt;br /&gt;
&lt;br /&gt;
Angle / inclination -- it might be possible to use the accelerometers in the smartphone to determine current inclination and calculate percent grade. You'd have to be able to calibrate this: mount the smartphone in a bracket and then read the acceleratometers to set it to 0 when on level ground.&lt;br /&gt;
&lt;br /&gt;
==== External GPS ====&lt;br /&gt;
&lt;br /&gt;
There is no reason we are limited to using the built-in GPS receiver. For applications requiring more accuracy (for example sub-meter), the GPS multiplexer should be able to accept data via USB or bluetooth and feed it to our applications. The controller program should be able to handle this situation.&lt;br /&gt;
&lt;br /&gt;
Bearing - some GPS receivers include an electronic compass that provides azimuth even when not moving. The multiplexer should know if bearing values are valid or not and indicate this. The value should indicate whether it is set for magnetic or true north.&lt;br /&gt;
&lt;br /&gt;
=== Support for postprocessing? ===&lt;br /&gt;
&lt;br /&gt;
Real-time DGPS correction possibilities include receiving an RTCM stream from an external device, receiving RTCM over an IP connection, and WAAS. Does the Ublox receiver support RTCM? Most receivers that support it just accept a stream of data from a serial line. You don't have to reverse engineer it, you just accept data from some source such as a DGPS Beacon Receiver and feed the output to the GPS receiver and you get something approaching 1 meter accuracy.&lt;br /&gt;
&lt;br /&gt;
Postprocessed DGPS correction requires recording pseudorange data and running an application later. In the open source world this means [http://en.wikipedia.org/wiki/RINEX RINEX]. Anyone with more knowledge of RINEX should jump in and edit this section.&lt;br /&gt;
&lt;br /&gt;
=== GPS controller ===&lt;br /&gt;
&lt;br /&gt;
''I think OM gps test program (what's it called) does much of this.''&lt;br /&gt;
&lt;br /&gt;
Some GPS receivers include a feature to stop logging or to issue warnings if data quality goes too low for any reason. Where should this be handled? In the multiplexer or in the applications? Maybe the settings should be applied to the multiplexer and it should issue warnings to the applications which would then decide what to do.&lt;br /&gt;
&lt;br /&gt;
=== Data Logger ===&lt;br /&gt;
&lt;br /&gt;
The basic concept of the logger is to create a bread crumb trail as you move about. &lt;br /&gt;
It has its own preference settings to determine if points are plotted based on change in position or on a time basis or both. &lt;br /&gt;
&lt;br /&gt;
It should also be possible to set what is logged. Possibilities include time, position, bearing, velocity, elevation, pseudo-range data, HDOP, PDOP, satellites used, type of GPS, type of antenna, DGPS on/off, type of DGPS.&lt;br /&gt;
&lt;br /&gt;
==== Speedometer, Pedomater -- Usage of logger by itself ====&lt;br /&gt;
&lt;br /&gt;
The data logger would be one crucial component in an application of GPS for bicyclists (and outdoor enthusiasts such as hikers and runners.) Other requirements would be a good display (to substitute for a speedometer) and a good mapping program. &lt;br /&gt;
&lt;br /&gt;
Should we expand on that on this page? It would be neat to have something that interoperates with the GPS multiplexer and the data logger so maybe we should?&lt;br /&gt;
&lt;br /&gt;
Speedometer functions would include tracking minimums, maximums, averages for speed, distance, and elevation (stopped, moving, combined). Bicyclists (and runners? I am not a runner...) want to know total climb.&lt;br /&gt;
&lt;br /&gt;
''I ride a bicycle and I use GPS as a speedometer and to do field work and I want to be able to do both with my Freerunner.'' [[User:Brian H Wilson|Brian H Wilson]] 19:38, 18 August 2008 (UTC)&lt;br /&gt;
&lt;br /&gt;
=== Field Collection Tool ===&lt;br /&gt;
&lt;br /&gt;
'''Attributes''' Mission planning should include setting up a file to be used for data collection, and that file should define attributes to be included. The data collector should be configurable to facilitate easy entry of the attribute data. For example, if you define a field to have a finite list of values, the values could be available as a drop down list.&lt;br /&gt;
&lt;br /&gt;
'''Point averaging''' Stand in one place and collect points until you are happy. The display should show current PDOP/HDOP and expected accuracy and number of readings used to create tehe point. Preferences should include storing all data used to create the averaged point.&lt;br /&gt;
&lt;br /&gt;
'''Points, lines and polygons.''' You should be able to collect all three. A typical use for polygons is to walk around a space while collecting GPS points to create a polygon showing the location of some physical object such as a wetland.&lt;br /&gt;
&lt;br /&gt;
==== Other related tools ====&lt;br /&gt;
&lt;br /&gt;
Other specialized field collection tools could be used for &lt;br /&gt;
&lt;br /&gt;
* Asset management, example: urban forestry, agriculture, public works&lt;br /&gt;
* Map making, for example to collect data for the Open Street Map project&lt;br /&gt;
* Geocaching&lt;br /&gt;
* ??? Add yours here ???&lt;br /&gt;
&lt;br /&gt;
== Data format and exchange ==&lt;br /&gt;
&lt;br /&gt;
The data should be stored internally in a compact form that is open or at least well documented (for example ESRI Shapefiles). Storing in XML based formats is bulky and should probably be avoided. &lt;br /&gt;
&lt;br /&gt;
There should be a desktop tool to manage transferring the data that has been collected from the smartphone to more portable exchange formats such as GPX and GML and KML. &amp;quot;GPS Office&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== RINEX ===&lt;br /&gt;
&lt;br /&gt;
Would RINEX be an appropriate general format for internal storage? No.&lt;br /&gt;
It's an exchange format but it's intended to include data required to perform post-processing.&lt;br /&gt;
It stores direct satellite observations, not things needed for navigation like calculated position.&lt;br /&gt;
&lt;br /&gt;
This guy wrote a program that takes Ublox Antares 4 data and writes it as RINEX data.&lt;br /&gt;
http://home.comcast.net/~dmilbert/softs/ant2rin.htm&lt;br /&gt;
&lt;br /&gt;
GPX would accommodate everything we need but it's ASCII XML and that means 1/2 the file is just XML formatting. It might be possible to used tokenized GPX to make it more compact.&lt;br /&gt;
&lt;br /&gt;
== More features ==&lt;br /&gt;
&lt;br /&gt;
All I can think of at the moment is rangefinders. I am sure there are others.&lt;br /&gt;
&lt;br /&gt;
=== Laser rangefinder ===&lt;br /&gt;
&lt;br /&gt;
There is another common situtaion where people use a laser rangefinder in conjunction with GPS, to get the location of an object that is not reachable (for example a boat) or a tree trunk (under heavy canopy).&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
&lt;br /&gt;
ESRI ArcPad http://www.tdsway.com/products/solo_field&lt;br /&gt;
&lt;br /&gt;
GPSd http://gpsd.berlios.de/&lt;br /&gt;
&lt;br /&gt;
GPX http://www.topografix.com/gpx.asp http://en.wikipedia.org/wiki/GPX_(data_transfer)&lt;br /&gt;
&lt;br /&gt;
RINEX specs ftp://ftp.unibe.ch/aiub/rinex/&lt;br /&gt;
&lt;br /&gt;
TDS Solo Field http://www.tdsway.com/products/solo_field&lt;br /&gt;
&lt;br /&gt;
Trimble Terrasync http://www.trimble.com/terrasync.shtml&lt;br /&gt;
&lt;br /&gt;
== People working on this project ==&lt;br /&gt;
&lt;br /&gt;
[[User:Brian H Wilson]] is blabbing a lot here and wishing he had more time to work on this.&lt;br /&gt;
&lt;br /&gt;
[[Category: GPS]]&lt;/div&gt;</summary>
		<author><name>Brian H Wilson</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/GPS_Data_Logger</id>
		<title>GPS Data Logger</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/GPS_Data_Logger"/>
				<updated>2008-08-19T04:11:37Z</updated>
		
		<summary type="html">&lt;p&gt;Brian H Wilson: /* External links */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page was created to address the use cases mentioned in [[GTA02 GPS]], including&lt;br /&gt;
&lt;br /&gt;
* I want to log GPS data for later analysis.&lt;br /&gt;
* I want to collect GPS data for scientific field work (forestry, biology, etc)&lt;br /&gt;
&lt;br /&gt;
The page was started on 17 August 2008 mostly as a thought exercise.&lt;br /&gt;
Please jump in and add to it.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
The typical commercial approach to managing GPS data is to create one big application that does everything well. Unfortunately everyone has a different idea of what &amp;quot;doing everything well&amp;quot; means. One person might want to use GPS to log and analyze bicycle rides while another does weed mapping and another might be doing asset management. One application cannot do all this well.&lt;br /&gt;
&lt;br /&gt;
A better approach is to break it up into a set of components. Each component can be a standalone application. This relies on some kind of multiplexer such as gpsd (does gypsy support multiplexing?) so that each app has access to the GPS data stream.&lt;br /&gt;
&lt;br /&gt;
Initially the main functions could be broken out these components.&lt;br /&gt;
&lt;br /&gt;
# A '''GPS multiplexer''' that talks to the GPS receiver and feeds data to many applications.&lt;br /&gt;
# A '''GPS Controller''' to that can talk to the mulitplexer (and hence the GPS receiver) to display status and adjust settings.&lt;br /&gt;
# A '''Data Logger''' that can run all the time and record GPS data.&lt;br /&gt;
# A '''Field Collection Tool''' that allows doing specific operations such as averaging GPS data while waiting at a point for increased accuracy and entering attributes for a point.&lt;br /&gt;
&lt;br /&gt;
'''Mapping''' We should consider how to support mapping as a part of the field collection tool; it is not strictly necessary but it can be very nice to have it incorporated. Likewise if you are logging a breadcrumb trail it can be very nice to be able to see it on the map. A mapping component will need to be able to update its display with data collected from the logger and the field collection tool.&lt;br /&gt;
&lt;br /&gt;
== Main components ==&lt;br /&gt;
&lt;br /&gt;
=== GPS multiplexer ===&lt;br /&gt;
&lt;br /&gt;
Look at gpsd and gypsy (and the related religious wars) and either use one of them or use them for inspiration. &lt;br /&gt;
&lt;br /&gt;
Partial list of requirements for the multiplexer&lt;br /&gt;
* Control internal GPS receiver&lt;br /&gt;
* Control external GPS connected via serial port (USB or bluetooth)&lt;br /&gt;
* Feed data from the selected GPS receiver to multiple applications.&lt;br /&gt;
* Handle a RTCM stream to allow realtime DGPS postprocessing.&lt;br /&gt;
* Supply all attributes to applications, including such things as bearing, PDOP and satellites in use. (Not just time and position).&lt;br /&gt;
&lt;br /&gt;
Angle / inclination -- it might be possible to use the accelerometers in the smartphone to determine current inclination and calculate percent grade. You'd have to be able to calibrate this: mount the smartphone in a bracket and then read the acceleratometers to set it to 0 when on level ground.&lt;br /&gt;
&lt;br /&gt;
==== External GPS ====&lt;br /&gt;
&lt;br /&gt;
There is no reason we are limited to using the built-in GPS receiver. For applications requiring more accuracy (for example sub-meter), the GPS multiplexer should be able to accept data via USB or bluetooth and feed it to our applications. The controller program should be able to handle this situation.&lt;br /&gt;
&lt;br /&gt;
Bearing - some GPS receivers include an electronic compass that provides azimuth even when not moving. The multiplexer should know if bearing values are valid or not and indicate this. The value should indicate whether it is set for magnetic or true north.&lt;br /&gt;
&lt;br /&gt;
=== Support for postprocessing? ===&lt;br /&gt;
&lt;br /&gt;
Real-time DGPS correction possibilities include receiving an RTCM stream from an external device, receiving RTCM over an IP connection, and WAAS. Does the Ublox receiver support RTCM? Most receivers that support it just accept a stream of data from a serial line. You don't have to reverse engineer it, you just accept data from some source such as a DGPS Beacon Receiver and feed the output to the GPS receiver and you get something approaching 1 meter accuracy.&lt;br /&gt;
&lt;br /&gt;
Postprocessed DGPS correction requires recording pseudorange data and running an application later. In the open source world this means [http://en.wikipedia.org/wiki/RINEX RINEX]. Anyone with more knowledge of RINEX should jump in and edit this section.&lt;br /&gt;
&lt;br /&gt;
=== GPS controller ===&lt;br /&gt;
&lt;br /&gt;
''I think OM gps test program (what's it called) does much of this.''&lt;br /&gt;
&lt;br /&gt;
Some GPS receivers include a feature to stop logging or to issue warnings if data quality goes too low for any reason. Where should this be handled? In the multiplexer or in the applications? Maybe the settings should be applied to the multiplexer and it should issue warnings to the applications which would then decide what to do.&lt;br /&gt;
&lt;br /&gt;
=== Data Logger ===&lt;br /&gt;
&lt;br /&gt;
The basic concept of the logger is to create a bread crumb trail as you move about. &lt;br /&gt;
It has its own preference settings to determine if points are plotted based on change in position or on a time basis or both. &lt;br /&gt;
&lt;br /&gt;
It should also be possible to set what is logged. Possibilities include time, position, bearing, velocity, elevation, pseudo-range data, HDOP, PDOP, satellites used, type of GPS, type of antenna, DGPS on/off, type of DGPS.&lt;br /&gt;
&lt;br /&gt;
==== Speedometer, Pedomater -- Usage of logger by itself ====&lt;br /&gt;
&lt;br /&gt;
The data logger would be one crucial component in an application of GPS for bicyclists (and outdoor enthusiasts such as hikers and runners.) Other requirements would be a good display (to substitute for a speedometer) and a good mapping program. &lt;br /&gt;
&lt;br /&gt;
Should we expand on that on this page? It would be neat to have something that interoperates with the GPS multiplexer and the data logger so maybe we should?&lt;br /&gt;
&lt;br /&gt;
Speedometer functions would include tracking minimums, maximums, averages for speed, distance, and elevation (stopped, moving, combined). Bicyclists (and runners? I am not a runner...) want to know total climb.&lt;br /&gt;
&lt;br /&gt;
''I ride a bicycle and I use GPS as a speedometer and to do field work and I want to be able to do both with my Freerunner.'' [[User:Brian H Wilson|Brian H Wilson]] 19:38, 18 August 2008 (UTC)&lt;br /&gt;
&lt;br /&gt;
=== Field Collection Tool ===&lt;br /&gt;
&lt;br /&gt;
'''Attributes''' Mission planning should include setting up a file to be used for data collection, and that file should define attributes to be included. The data collector should be configurable to facilitate easy entry of the attribute data. For example, if you define a field to have a finite list of values, the values could be available as a drop down list.&lt;br /&gt;
&lt;br /&gt;
'''Point averaging''' Stand in one place and collect points until you are happy. The display should show current PDOP/HDOP and expected accuracy and number of readings used to create tehe point. Preferences should include storing all data used to create the averaged point.&lt;br /&gt;
&lt;br /&gt;
'''Points, lines and polygons.''' You should be able to collect all three. A typical use for polygons is to walk around a space while collecting GPS points to create a polygon showing the location of some physical object such as a wetland.&lt;br /&gt;
&lt;br /&gt;
==== Other related tools ====&lt;br /&gt;
&lt;br /&gt;
Other specialized field collection tools could be used for &lt;br /&gt;
&lt;br /&gt;
* Asset management, example: urban forestry, agriculture, public works&lt;br /&gt;
* Map making, for example to collect data for the Open Street Map project&lt;br /&gt;
* Geocaching&lt;br /&gt;
* ??? Add yours here ???&lt;br /&gt;
&lt;br /&gt;
== Data format and exchange ==&lt;br /&gt;
&lt;br /&gt;
The data should be stored internally in a compact form that is open or at least well documented (for example ESRI Shapefiles). Storing in XML based formats is bulky and should probably be avoided. &lt;br /&gt;
&lt;br /&gt;
There should be a desktop tool to manage transferring the data that has been collected from the smartphone to more portable exchange formats such as GPX and GML and KML. &amp;quot;GPS Office&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== RINEX ===&lt;br /&gt;
&lt;br /&gt;
Would RINEX be an appropriate general format for internal storage? No.&lt;br /&gt;
It's an exchange format but it's intended to include data required to perform post-processing.&lt;br /&gt;
It stores direct satellite observations, not things needed for navigation like calculated position.&lt;br /&gt;
&lt;br /&gt;
This guy wrote a program that takes Ublox Antares 4 data and writes it as RINEX data.&lt;br /&gt;
http://home.comcast.net/~dmilbert/softs/ant2rin.htm&lt;br /&gt;
&lt;br /&gt;
GPX would accommodate everything we need but it's ASCII XML and that means 1/2 the file is just XML formatting. It might be possible to used tokenized GPX to make it more compact.&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
&lt;br /&gt;
ESRI ArcPad http://www.tdsway.com/products/solo_field&lt;br /&gt;
&lt;br /&gt;
GPSd http://gpsd.berlios.de/&lt;br /&gt;
&lt;br /&gt;
GPX http://www.topografix.com/gpx.asp http://en.wikipedia.org/wiki/GPX_(data_transfer)&lt;br /&gt;
&lt;br /&gt;
RINEX specs ftp://ftp.unibe.ch/aiub/rinex/&lt;br /&gt;
&lt;br /&gt;
TDS Solo Field http://www.tdsway.com/products/solo_field&lt;br /&gt;
&lt;br /&gt;
Trimble Terrasync http://www.trimble.com/terrasync.shtml&lt;br /&gt;
&lt;br /&gt;
== People working on this project ==&lt;br /&gt;
&lt;br /&gt;
[[User:Brian H Wilson]] is blabbing a lot here and wishing he had more time to work on this.&lt;br /&gt;
&lt;br /&gt;
[[Category: GPS]]&lt;/div&gt;</summary>
		<author><name>Brian H Wilson</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/GPS_Data_Logger</id>
		<title>GPS Data Logger</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/GPS_Data_Logger"/>
				<updated>2008-08-19T04:06:31Z</updated>
		
		<summary type="html">&lt;p&gt;Brian H Wilson: /* People working on this project */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page was created to address the use cases mentioned in [[GTA02 GPS]], including&lt;br /&gt;
&lt;br /&gt;
* I want to log GPS data for later analysis.&lt;br /&gt;
* I want to collect GPS data for scientific field work (forestry, biology, etc)&lt;br /&gt;
&lt;br /&gt;
The page was started on 17 August 2008 mostly as a thought exercise.&lt;br /&gt;
Please jump in and add to it.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
The typical commercial approach to managing GPS data is to create one big application that does everything well. Unfortunately everyone has a different idea of what &amp;quot;doing everything well&amp;quot; means. One person might want to use GPS to log and analyze bicycle rides while another does weed mapping and another might be doing asset management. One application cannot do all this well.&lt;br /&gt;
&lt;br /&gt;
A better approach is to break it up into a set of components. Each component can be a standalone application. This relies on some kind of multiplexer such as gpsd (does gypsy support multiplexing?) so that each app has access to the GPS data stream.&lt;br /&gt;
&lt;br /&gt;
Initially the main functions could be broken out these components.&lt;br /&gt;
&lt;br /&gt;
# A '''GPS multiplexer''' that talks to the GPS receiver and feeds data to many applications.&lt;br /&gt;
# A '''GPS Controller''' to that can talk to the mulitplexer (and hence the GPS receiver) to display status and adjust settings.&lt;br /&gt;
# A '''Data Logger''' that can run all the time and record GPS data.&lt;br /&gt;
# A '''Field Collection Tool''' that allows doing specific operations such as averaging GPS data while waiting at a point for increased accuracy and entering attributes for a point.&lt;br /&gt;
&lt;br /&gt;
'''Mapping''' We should consider how to support mapping as a part of the field collection tool; it is not strictly necessary but it can be very nice to have it incorporated. Likewise if you are logging a breadcrumb trail it can be very nice to be able to see it on the map. A mapping component will need to be able to update its display with data collected from the logger and the field collection tool.&lt;br /&gt;
&lt;br /&gt;
== Main components ==&lt;br /&gt;
&lt;br /&gt;
=== GPS multiplexer ===&lt;br /&gt;
&lt;br /&gt;
Look at gpsd and gypsy (and the related religious wars) and either use one of them or use them for inspiration. &lt;br /&gt;
&lt;br /&gt;
Partial list of requirements for the multiplexer&lt;br /&gt;
* Control internal GPS receiver&lt;br /&gt;
* Control external GPS connected via serial port (USB or bluetooth)&lt;br /&gt;
* Feed data from the selected GPS receiver to multiple applications.&lt;br /&gt;
* Handle a RTCM stream to allow realtime DGPS postprocessing.&lt;br /&gt;
* Supply all attributes to applications, including such things as bearing, PDOP and satellites in use. (Not just time and position).&lt;br /&gt;
&lt;br /&gt;
Angle / inclination -- it might be possible to use the accelerometers in the smartphone to determine current inclination and calculate percent grade. You'd have to be able to calibrate this: mount the smartphone in a bracket and then read the acceleratometers to set it to 0 when on level ground.&lt;br /&gt;
&lt;br /&gt;
==== External GPS ====&lt;br /&gt;
&lt;br /&gt;
There is no reason we are limited to using the built-in GPS receiver. For applications requiring more accuracy (for example sub-meter), the GPS multiplexer should be able to accept data via USB or bluetooth and feed it to our applications. The controller program should be able to handle this situation.&lt;br /&gt;
&lt;br /&gt;
Bearing - some GPS receivers include an electronic compass that provides azimuth even when not moving. The multiplexer should know if bearing values are valid or not and indicate this. The value should indicate whether it is set for magnetic or true north.&lt;br /&gt;
&lt;br /&gt;
=== Support for postprocessing? ===&lt;br /&gt;
&lt;br /&gt;
Real-time DGPS correction possibilities include receiving an RTCM stream from an external device, receiving RTCM over an IP connection, and WAAS. Does the Ublox receiver support RTCM? Most receivers that support it just accept a stream of data from a serial line. You don't have to reverse engineer it, you just accept data from some source such as a DGPS Beacon Receiver and feed the output to the GPS receiver and you get something approaching 1 meter accuracy.&lt;br /&gt;
&lt;br /&gt;
Postprocessed DGPS correction requires recording pseudorange data and running an application later. In the open source world this means [http://en.wikipedia.org/wiki/RINEX RINEX]. Anyone with more knowledge of RINEX should jump in and edit this section.&lt;br /&gt;
&lt;br /&gt;
=== GPS controller ===&lt;br /&gt;
&lt;br /&gt;
''I think OM gps test program (what's it called) does much of this.''&lt;br /&gt;
&lt;br /&gt;
Some GPS receivers include a feature to stop logging or to issue warnings if data quality goes too low for any reason. Where should this be handled? In the multiplexer or in the applications? Maybe the settings should be applied to the multiplexer and it should issue warnings to the applications which would then decide what to do.&lt;br /&gt;
&lt;br /&gt;
=== Data Logger ===&lt;br /&gt;
&lt;br /&gt;
The basic concept of the logger is to create a bread crumb trail as you move about. &lt;br /&gt;
It has its own preference settings to determine if points are plotted based on change in position or on a time basis or both. &lt;br /&gt;
&lt;br /&gt;
It should also be possible to set what is logged. Possibilities include time, position, bearing, velocity, elevation, pseudo-range data, HDOP, PDOP, satellites used, type of GPS, type of antenna, DGPS on/off, type of DGPS.&lt;br /&gt;
&lt;br /&gt;
==== Speedometer, Pedomater -- Usage of logger by itself ====&lt;br /&gt;
&lt;br /&gt;
The data logger would be one crucial component in an application of GPS for bicyclists (and outdoor enthusiasts such as hikers and runners.) Other requirements would be a good display (to substitute for a speedometer) and a good mapping program. &lt;br /&gt;
&lt;br /&gt;
Should we expand on that on this page? It would be neat to have something that interoperates with the GPS multiplexer and the data logger so maybe we should?&lt;br /&gt;
&lt;br /&gt;
Speedometer functions would include tracking minimums, maximums, averages for speed, distance, and elevation (stopped, moving, combined). Bicyclists (and runners? I am not a runner...) want to know total climb.&lt;br /&gt;
&lt;br /&gt;
''I ride a bicycle and I use GPS as a speedometer and to do field work and I want to be able to do both with my Freerunner.'' [[User:Brian H Wilson|Brian H Wilson]] 19:38, 18 August 2008 (UTC)&lt;br /&gt;
&lt;br /&gt;
=== Field Collection Tool ===&lt;br /&gt;
&lt;br /&gt;
'''Attributes''' Mission planning should include setting up a file to be used for data collection, and that file should define attributes to be included. The data collector should be configurable to facilitate easy entry of the attribute data. For example, if you define a field to have a finite list of values, the values could be available as a drop down list.&lt;br /&gt;
&lt;br /&gt;
'''Point averaging''' Stand in one place and collect points until you are happy. The display should show current PDOP/HDOP and expected accuracy and number of readings used to create tehe point. Preferences should include storing all data used to create the averaged point.&lt;br /&gt;
&lt;br /&gt;
'''Points, lines and polygons.''' You should be able to collect all three. A typical use for polygons is to walk around a space while collecting GPS points to create a polygon showing the location of some physical object such as a wetland.&lt;br /&gt;
&lt;br /&gt;
==== Other related tools ====&lt;br /&gt;
&lt;br /&gt;
Other specialized field collection tools could be used for &lt;br /&gt;
&lt;br /&gt;
* Asset management, example: urban forestry, agriculture, public works&lt;br /&gt;
* Map making, for example to collect data for the Open Street Map project&lt;br /&gt;
* Geocaching&lt;br /&gt;
* ??? Add yours here ???&lt;br /&gt;
&lt;br /&gt;
== Data format and exchange ==&lt;br /&gt;
&lt;br /&gt;
The data should be stored internally in a compact form that is open or at least well documented (for example ESRI Shapefiles). Storing in XML based formats is bulky and should probably be avoided. &lt;br /&gt;
&lt;br /&gt;
There should be a desktop tool to manage transferring the data that has been collected from the smartphone to more portable exchange formats such as GPX and GML and KML. &amp;quot;GPS Office&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== RINEX ===&lt;br /&gt;
&lt;br /&gt;
Would RINEX be an appropriate general format for internal storage? No.&lt;br /&gt;
It's an exchange format but it's intended to include data required to perform post-processing.&lt;br /&gt;
It stores direct satellite observations, not things needed for navigation like calculated position.&lt;br /&gt;
&lt;br /&gt;
This guy wrote a program that takes Ublox Antares 4 data and writes it as RINEX data.&lt;br /&gt;
http://home.comcast.net/~dmilbert/softs/ant2rin.htm&lt;br /&gt;
&lt;br /&gt;
GPX would accommodate everything we need but it's ASCII XML and that means 1/2 the file is just XML formatting. It might be possible to used tokenized GPX to make it more compact.&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
&lt;br /&gt;
GPSd http://gpsd.berlios.de/&lt;br /&gt;
&lt;br /&gt;
GPX http://www.topografix.com/gpx.asp http://en.wikipedia.org/wiki/GPX_(data_transfer)&lt;br /&gt;
&lt;br /&gt;
RINEX specs ftp://ftp.unibe.ch/aiub/rinex/&lt;br /&gt;
&lt;br /&gt;
== People working on this project ==&lt;br /&gt;
&lt;br /&gt;
[[User:Brian H Wilson]] is blabbing a lot here and wishing he had more time to work on this.&lt;br /&gt;
&lt;br /&gt;
[[Category: GPS]]&lt;/div&gt;</summary>
		<author><name>Brian H Wilson</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/GPS_Data_Logger</id>
		<title>GPS Data Logger</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/GPS_Data_Logger"/>
				<updated>2008-08-19T04:06:06Z</updated>
		
		<summary type="html">&lt;p&gt;Brian H Wilson: /* RINEX */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page was created to address the use cases mentioned in [[GTA02 GPS]], including&lt;br /&gt;
&lt;br /&gt;
* I want to log GPS data for later analysis.&lt;br /&gt;
* I want to collect GPS data for scientific field work (forestry, biology, etc)&lt;br /&gt;
&lt;br /&gt;
The page was started on 17 August 2008 mostly as a thought exercise.&lt;br /&gt;
Please jump in and add to it.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
The typical commercial approach to managing GPS data is to create one big application that does everything well. Unfortunately everyone has a different idea of what &amp;quot;doing everything well&amp;quot; means. One person might want to use GPS to log and analyze bicycle rides while another does weed mapping and another might be doing asset management. One application cannot do all this well.&lt;br /&gt;
&lt;br /&gt;
A better approach is to break it up into a set of components. Each component can be a standalone application. This relies on some kind of multiplexer such as gpsd (does gypsy support multiplexing?) so that each app has access to the GPS data stream.&lt;br /&gt;
&lt;br /&gt;
Initially the main functions could be broken out these components.&lt;br /&gt;
&lt;br /&gt;
# A '''GPS multiplexer''' that talks to the GPS receiver and feeds data to many applications.&lt;br /&gt;
# A '''GPS Controller''' to that can talk to the mulitplexer (and hence the GPS receiver) to display status and adjust settings.&lt;br /&gt;
# A '''Data Logger''' that can run all the time and record GPS data.&lt;br /&gt;
# A '''Field Collection Tool''' that allows doing specific operations such as averaging GPS data while waiting at a point for increased accuracy and entering attributes for a point.&lt;br /&gt;
&lt;br /&gt;
'''Mapping''' We should consider how to support mapping as a part of the field collection tool; it is not strictly necessary but it can be very nice to have it incorporated. Likewise if you are logging a breadcrumb trail it can be very nice to be able to see it on the map. A mapping component will need to be able to update its display with data collected from the logger and the field collection tool.&lt;br /&gt;
&lt;br /&gt;
== Main components ==&lt;br /&gt;
&lt;br /&gt;
=== GPS multiplexer ===&lt;br /&gt;
&lt;br /&gt;
Look at gpsd and gypsy (and the related religious wars) and either use one of them or use them for inspiration. &lt;br /&gt;
&lt;br /&gt;
Partial list of requirements for the multiplexer&lt;br /&gt;
* Control internal GPS receiver&lt;br /&gt;
* Control external GPS connected via serial port (USB or bluetooth)&lt;br /&gt;
* Feed data from the selected GPS receiver to multiple applications.&lt;br /&gt;
* Handle a RTCM stream to allow realtime DGPS postprocessing.&lt;br /&gt;
* Supply all attributes to applications, including such things as bearing, PDOP and satellites in use. (Not just time and position).&lt;br /&gt;
&lt;br /&gt;
Angle / inclination -- it might be possible to use the accelerometers in the smartphone to determine current inclination and calculate percent grade. You'd have to be able to calibrate this: mount the smartphone in a bracket and then read the acceleratometers to set it to 0 when on level ground.&lt;br /&gt;
&lt;br /&gt;
==== External GPS ====&lt;br /&gt;
&lt;br /&gt;
There is no reason we are limited to using the built-in GPS receiver. For applications requiring more accuracy (for example sub-meter), the GPS multiplexer should be able to accept data via USB or bluetooth and feed it to our applications. The controller program should be able to handle this situation.&lt;br /&gt;
&lt;br /&gt;
Bearing - some GPS receivers include an electronic compass that provides azimuth even when not moving. The multiplexer should know if bearing values are valid or not and indicate this. The value should indicate whether it is set for magnetic or true north.&lt;br /&gt;
&lt;br /&gt;
=== Support for postprocessing? ===&lt;br /&gt;
&lt;br /&gt;
Real-time DGPS correction possibilities include receiving an RTCM stream from an external device, receiving RTCM over an IP connection, and WAAS. Does the Ublox receiver support RTCM? Most receivers that support it just accept a stream of data from a serial line. You don't have to reverse engineer it, you just accept data from some source such as a DGPS Beacon Receiver and feed the output to the GPS receiver and you get something approaching 1 meter accuracy.&lt;br /&gt;
&lt;br /&gt;
Postprocessed DGPS correction requires recording pseudorange data and running an application later. In the open source world this means [http://en.wikipedia.org/wiki/RINEX RINEX]. Anyone with more knowledge of RINEX should jump in and edit this section.&lt;br /&gt;
&lt;br /&gt;
=== GPS controller ===&lt;br /&gt;
&lt;br /&gt;
''I think OM gps test program (what's it called) does much of this.''&lt;br /&gt;
&lt;br /&gt;
Some GPS receivers include a feature to stop logging or to issue warnings if data quality goes too low for any reason. Where should this be handled? In the multiplexer or in the applications? Maybe the settings should be applied to the multiplexer and it should issue warnings to the applications which would then decide what to do.&lt;br /&gt;
&lt;br /&gt;
=== Data Logger ===&lt;br /&gt;
&lt;br /&gt;
The basic concept of the logger is to create a bread crumb trail as you move about. &lt;br /&gt;
It has its own preference settings to determine if points are plotted based on change in position or on a time basis or both. &lt;br /&gt;
&lt;br /&gt;
It should also be possible to set what is logged. Possibilities include time, position, bearing, velocity, elevation, pseudo-range data, HDOP, PDOP, satellites used, type of GPS, type of antenna, DGPS on/off, type of DGPS.&lt;br /&gt;
&lt;br /&gt;
==== Speedometer, Pedomater -- Usage of logger by itself ====&lt;br /&gt;
&lt;br /&gt;
The data logger would be one crucial component in an application of GPS for bicyclists (and outdoor enthusiasts such as hikers and runners.) Other requirements would be a good display (to substitute for a speedometer) and a good mapping program. &lt;br /&gt;
&lt;br /&gt;
Should we expand on that on this page? It would be neat to have something that interoperates with the GPS multiplexer and the data logger so maybe we should?&lt;br /&gt;
&lt;br /&gt;
Speedometer functions would include tracking minimums, maximums, averages for speed, distance, and elevation (stopped, moving, combined). Bicyclists (and runners? I am not a runner...) want to know total climb.&lt;br /&gt;
&lt;br /&gt;
''I ride a bicycle and I use GPS as a speedometer and to do field work and I want to be able to do both with my Freerunner.'' [[User:Brian H Wilson|Brian H Wilson]] 19:38, 18 August 2008 (UTC)&lt;br /&gt;
&lt;br /&gt;
=== Field Collection Tool ===&lt;br /&gt;
&lt;br /&gt;
'''Attributes''' Mission planning should include setting up a file to be used for data collection, and that file should define attributes to be included. The data collector should be configurable to facilitate easy entry of the attribute data. For example, if you define a field to have a finite list of values, the values could be available as a drop down list.&lt;br /&gt;
&lt;br /&gt;
'''Point averaging''' Stand in one place and collect points until you are happy. The display should show current PDOP/HDOP and expected accuracy and number of readings used to create tehe point. Preferences should include storing all data used to create the averaged point.&lt;br /&gt;
&lt;br /&gt;
'''Points, lines and polygons.''' You should be able to collect all three. A typical use for polygons is to walk around a space while collecting GPS points to create a polygon showing the location of some physical object such as a wetland.&lt;br /&gt;
&lt;br /&gt;
==== Other related tools ====&lt;br /&gt;
&lt;br /&gt;
Other specialized field collection tools could be used for &lt;br /&gt;
&lt;br /&gt;
* Asset management, example: urban forestry, agriculture, public works&lt;br /&gt;
* Map making, for example to collect data for the Open Street Map project&lt;br /&gt;
* Geocaching&lt;br /&gt;
* ??? Add yours here ???&lt;br /&gt;
&lt;br /&gt;
== Data format and exchange ==&lt;br /&gt;
&lt;br /&gt;
The data should be stored internally in a compact form that is open or at least well documented (for example ESRI Shapefiles). Storing in XML based formats is bulky and should probably be avoided. &lt;br /&gt;
&lt;br /&gt;
There should be a desktop tool to manage transferring the data that has been collected from the smartphone to more portable exchange formats such as GPX and GML and KML. &amp;quot;GPS Office&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== RINEX ===&lt;br /&gt;
&lt;br /&gt;
Would RINEX be an appropriate general format for internal storage? No.&lt;br /&gt;
It's an exchange format but it's intended to include data required to perform post-processing.&lt;br /&gt;
It stores direct satellite observations, not things needed for navigation like calculated position.&lt;br /&gt;
&lt;br /&gt;
This guy wrote a program that takes Ublox Antares 4 data and writes it as RINEX data.&lt;br /&gt;
http://home.comcast.net/~dmilbert/softs/ant2rin.htm&lt;br /&gt;
&lt;br /&gt;
GPX would accommodate everything we need but it's ASCII XML and that means 1/2 the file is just XML formatting. It might be possible to used tokenized GPX to make it more compact.&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
&lt;br /&gt;
GPSd http://gpsd.berlios.de/&lt;br /&gt;
&lt;br /&gt;
GPX http://www.topografix.com/gpx.asp http://en.wikipedia.org/wiki/GPX_(data_transfer)&lt;br /&gt;
&lt;br /&gt;
RINEX specs ftp://ftp.unibe.ch/aiub/rinex/&lt;br /&gt;
&lt;br /&gt;
== People working on this project ==&lt;br /&gt;
&lt;br /&gt;
[[User:Brian H Wilson]] blabbing a lot and wishing he had more time to work on this.&lt;br /&gt;
&lt;br /&gt;
[[Category: GPS]]&lt;/div&gt;</summary>
		<author><name>Brian H Wilson</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/GPS_Data_Logger</id>
		<title>GPS Data Logger</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/GPS_Data_Logger"/>
				<updated>2008-08-19T00:06:36Z</updated>
		
		<summary type="html">&lt;p&gt;Brian H Wilson: /* RINEX */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page was created to address the use cases mentioned in [[GTA02 GPS]], including&lt;br /&gt;
&lt;br /&gt;
* I want to log GPS data for later analysis.&lt;br /&gt;
* I want to collect GPS data for scientific field work (forestry, biology, etc)&lt;br /&gt;
&lt;br /&gt;
The page was started on 17 August 2008 mostly as a thought exercise.&lt;br /&gt;
Please jump in and add to it.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
The typical commercial approach to managing GPS data is to create one big application that does everything well. Unfortunately everyone has a different idea of what &amp;quot;doing everything well&amp;quot; means. One person might want to use GPS to log and analyze bicycle rides while another does weed mapping and another might be doing asset management. One application cannot do all this well.&lt;br /&gt;
&lt;br /&gt;
A better approach is to break it up into a set of components. Each component can be a standalone application. This relies on some kind of multiplexer such as gpsd (does gypsy support multiplexing?) so that each app has access to the GPS data stream.&lt;br /&gt;
&lt;br /&gt;
Initially the main functions could be broken out these components.&lt;br /&gt;
&lt;br /&gt;
# A '''GPS multiplexer''' that talks to the GPS receiver and feeds data to many applications.&lt;br /&gt;
# A '''GPS Controller''' to that can talk to the mulitplexer (and hence the GPS receiver) to display status and adjust settings.&lt;br /&gt;
# A '''Data Logger''' that can run all the time and record GPS data.&lt;br /&gt;
# A '''Field Collection Tool''' that allows doing specific operations such as averaging GPS data while waiting at a point for increased accuracy and entering attributes for a point.&lt;br /&gt;
&lt;br /&gt;
'''Mapping''' We should consider how to support mapping as a part of the field collection tool; it is not strictly necessary but it can be very nice to have it incorporated. Likewise if you are logging a breadcrumb trail it can be very nice to be able to see it on the map. A mapping component will need to be able to update its display with data collected from the logger and the field collection tool.&lt;br /&gt;
&lt;br /&gt;
== Main components ==&lt;br /&gt;
&lt;br /&gt;
=== GPS multiplexer ===&lt;br /&gt;
&lt;br /&gt;
Look at gpsd and gypsy (and the related religious wars) and either use one of them or use them for inspiration. &lt;br /&gt;
&lt;br /&gt;
Partial list of requirements for the multiplexer&lt;br /&gt;
* Control internal GPS receiver&lt;br /&gt;
* Control external GPS connected via serial port (USB or bluetooth)&lt;br /&gt;
* Feed data from the selected GPS receiver to multiple applications.&lt;br /&gt;
* Handle a RTCM stream to allow realtime DGPS postprocessing.&lt;br /&gt;
* Supply all attributes to applications, including such things as bearing, PDOP and satellites in use. (Not just time and position).&lt;br /&gt;
&lt;br /&gt;
Angle / inclination -- it might be possible to use the accelerometers in the smartphone to determine current inclination and calculate percent grade. You'd have to be able to calibrate this: mount the smartphone in a bracket and then read the acceleratometers to set it to 0 when on level ground.&lt;br /&gt;
&lt;br /&gt;
==== External GPS ====&lt;br /&gt;
&lt;br /&gt;
There is no reason we are limited to using the built-in GPS receiver. For applications requiring more accuracy (for example sub-meter), the GPS multiplexer should be able to accept data via USB or bluetooth and feed it to our applications. The controller program should be able to handle this situation.&lt;br /&gt;
&lt;br /&gt;
Bearing - some GPS receivers include an electronic compass that provides azimuth even when not moving. The multiplexer should know if bearing values are valid or not and indicate this. The value should indicate whether it is set for magnetic or true north.&lt;br /&gt;
&lt;br /&gt;
=== Support for postprocessing? ===&lt;br /&gt;
&lt;br /&gt;
Real-time DGPS correction possibilities include receiving an RTCM stream from an external device, receiving RTCM over an IP connection, and WAAS. Does the Ublox receiver support RTCM? Most receivers that support it just accept a stream of data from a serial line. You don't have to reverse engineer it, you just accept data from some source such as a DGPS Beacon Receiver and feed the output to the GPS receiver and you get something approaching 1 meter accuracy.&lt;br /&gt;
&lt;br /&gt;
Postprocessed DGPS correction requires recording pseudorange data and running an application later. In the open source world this means [http://en.wikipedia.org/wiki/RINEX RINEX]. Anyone with more knowledge of RINEX should jump in and edit this section.&lt;br /&gt;
&lt;br /&gt;
=== GPS controller ===&lt;br /&gt;
&lt;br /&gt;
''I think OM gps test program (what's it called) does much of this.''&lt;br /&gt;
&lt;br /&gt;
Some GPS receivers include a feature to stop logging or to issue warnings if data quality goes too low for any reason. Where should this be handled? In the multiplexer or in the applications? Maybe the settings should be applied to the multiplexer and it should issue warnings to the applications which would then decide what to do.&lt;br /&gt;
&lt;br /&gt;
=== Data Logger ===&lt;br /&gt;
&lt;br /&gt;
The basic concept of the logger is to create a bread crumb trail as you move about. &lt;br /&gt;
It has its own preference settings to determine if points are plotted based on change in position or on a time basis or both. &lt;br /&gt;
&lt;br /&gt;
It should also be possible to set what is logged. Possibilities include time, position, bearing, velocity, elevation, pseudo-range data, HDOP, PDOP, satellites used, type of GPS, type of antenna, DGPS on/off, type of DGPS.&lt;br /&gt;
&lt;br /&gt;
==== Speedometer, Pedomater -- Usage of logger by itself ====&lt;br /&gt;
&lt;br /&gt;
The data logger would be one crucial component in an application of GPS for bicyclists (and outdoor enthusiasts such as hikers and runners.) Other requirements would be a good display (to substitute for a speedometer) and a good mapping program. &lt;br /&gt;
&lt;br /&gt;
Should we expand on that on this page? It would be neat to have something that interoperates with the GPS multiplexer and the data logger so maybe we should?&lt;br /&gt;
&lt;br /&gt;
Speedometer functions would include tracking minimums, maximums, averages for speed, distance, and elevation (stopped, moving, combined). Bicyclists (and runners? I am not a runner...) want to know total climb.&lt;br /&gt;
&lt;br /&gt;
''I ride a bicycle and I use GPS as a speedometer and to do field work and I want to be able to do both with my Freerunner.'' [[User:Brian H Wilson|Brian H Wilson]] 19:38, 18 August 2008 (UTC)&lt;br /&gt;
&lt;br /&gt;
=== Field Collection Tool ===&lt;br /&gt;
&lt;br /&gt;
'''Attributes''' Mission planning should include setting up a file to be used for data collection, and that file should define attributes to be included. The data collector should be configurable to facilitate easy entry of the attribute data. For example, if you define a field to have a finite list of values, the values could be available as a drop down list.&lt;br /&gt;
&lt;br /&gt;
'''Point averaging''' Stand in one place and collect points until you are happy. The display should show current PDOP/HDOP and expected accuracy and number of readings used to create tehe point. Preferences should include storing all data used to create the averaged point.&lt;br /&gt;
&lt;br /&gt;
'''Points, lines and polygons.''' You should be able to collect all three. A typical use for polygons is to walk around a space while collecting GPS points to create a polygon showing the location of some physical object such as a wetland.&lt;br /&gt;
&lt;br /&gt;
==== Other related tools ====&lt;br /&gt;
&lt;br /&gt;
Other specialized field collection tools could be used for &lt;br /&gt;
&lt;br /&gt;
* Asset management, example: urban forestry, agriculture, public works&lt;br /&gt;
* Map making, for example to collect data for the Open Street Map project&lt;br /&gt;
* Geocaching&lt;br /&gt;
* ??? Add yours here ???&lt;br /&gt;
&lt;br /&gt;
== Data format and exchange ==&lt;br /&gt;
&lt;br /&gt;
The data should be stored internally in a compact form that is open or at least well documented (for example ESRI Shapefiles). Storing in XML based formats is bulky and should probably be avoided. &lt;br /&gt;
&lt;br /&gt;
There should be a desktop tool to manage transferring the data that has been collected from the smartphone to more portable exchange formats such as GPX and GML and KML. &amp;quot;GPS Office&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== RINEX ===&lt;br /&gt;
&lt;br /&gt;
Would RINEX be an appropriate general format for internal storage? No.&lt;br /&gt;
It's an exchange format but it's intended to include data required to perform post-processing.&lt;br /&gt;
It stores direct satellite observations, not things needed for navigation like calculated position.&lt;br /&gt;
&lt;br /&gt;
Specs are here: ftp://ftp.unibe.ch/aiub/rinex/&lt;br /&gt;
&lt;br /&gt;
This guy wrote a program that takes Ublox Antares 4 data and writes it as RINEX data.&lt;br /&gt;
http://home.comcast.net/~dmilbert/softs/ant2rin.htm&lt;br /&gt;
&lt;br /&gt;
GPX would accomodate everything we need but it's ASCII XML and that means 1/2 the file is just XML formatting. We'd probably be better off recording raw NMEA streams.&lt;br /&gt;
&lt;br /&gt;
== People working on this project ==&lt;br /&gt;
&lt;br /&gt;
[[User:Brian H Wilson]] blabbing a lot and wishing he had more time to work on this.&lt;br /&gt;
&lt;br /&gt;
[[Category: GPS]]&lt;/div&gt;</summary>
		<author><name>Brian H Wilson</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/GPS_Data_Logger</id>
		<title>GPS Data Logger</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/GPS_Data_Logger"/>
				<updated>2008-08-18T22:42:03Z</updated>
		
		<summary type="html">&lt;p&gt;Brian H Wilson: /* GPS multiplexer */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page was created to address the use cases mentioned in [[GTA02 GPS]], including&lt;br /&gt;
&lt;br /&gt;
* I want to log GPS data for later analysis.&lt;br /&gt;
* I want to collect GPS data for scientific field work (forestry, biology, etc)&lt;br /&gt;
&lt;br /&gt;
The page was started on 17 August 2008 mostly as a thought exercise.&lt;br /&gt;
Please jump in and add to it.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
The typical commercial approach to managing GPS data is to create one big application that does everything well. Unfortunately everyone has a different idea of what &amp;quot;doing everything well&amp;quot; means. One person might want to use GPS to log and analyze bicycle rides while another does weed mapping and another might be doing asset management. One application cannot do all this well.&lt;br /&gt;
&lt;br /&gt;
A better approach is to break it up into a set of components. Each component can be a standalone application. This relies on some kind of multiplexer such as gpsd (does gypsy support multiplexing?) so that each app has access to the GPS data stream.&lt;br /&gt;
&lt;br /&gt;
Initially the main functions could be broken out these components.&lt;br /&gt;
&lt;br /&gt;
# A '''GPS multiplexer''' that talks to the GPS receiver and feeds data to many applications.&lt;br /&gt;
# A '''GPS Controller''' to that can talk to the mulitplexer (and hence the GPS receiver) to display status and adjust settings.&lt;br /&gt;
# A '''Data Logger''' that can run all the time and record GPS data.&lt;br /&gt;
# A '''Field Collection Tool''' that allows doing specific operations such as averaging GPS data while waiting at a point for increased accuracy and entering attributes for a point.&lt;br /&gt;
&lt;br /&gt;
'''Mapping''' We should consider how to support mapping as a part of the field collection tool; it is not strictly necessary but it can be very nice to have it incorporated. Likewise if you are logging a breadcrumb trail it can be very nice to be able to see it on the map. A mapping component will need to be able to update its display with data collected from the logger and the field collection tool.&lt;br /&gt;
&lt;br /&gt;
== Main components ==&lt;br /&gt;
&lt;br /&gt;
=== GPS multiplexer ===&lt;br /&gt;
&lt;br /&gt;
Look at gpsd and gypsy (and the related religious wars) and either use one of them or use them for inspiration. &lt;br /&gt;
&lt;br /&gt;
Partial list of requirements for the multiplexer&lt;br /&gt;
* Control internal GPS receiver&lt;br /&gt;
* Control external GPS connected via serial port (USB or bluetooth)&lt;br /&gt;
* Feed data from the selected GPS receiver to multiple applications.&lt;br /&gt;
* Handle a RTCM stream to allow realtime DGPS postprocessing.&lt;br /&gt;
* Supply all attributes to applications, including such things as bearing, PDOP and satellites in use. (Not just time and position).&lt;br /&gt;
&lt;br /&gt;
Angle / inclination -- it might be possible to use the accelerometers in the smartphone to determine current inclination and calculate percent grade. You'd have to be able to calibrate this: mount the smartphone in a bracket and then read the acceleratometers to set it to 0 when on level ground.&lt;br /&gt;
&lt;br /&gt;
==== External GPS ====&lt;br /&gt;
&lt;br /&gt;
There is no reason we are limited to using the built-in GPS receiver. For applications requiring more accuracy (for example sub-meter), the GPS multiplexer should be able to accept data via USB or bluetooth and feed it to our applications. The controller program should be able to handle this situation.&lt;br /&gt;
&lt;br /&gt;
Bearing - some GPS receivers include an electronic compass that provides azimuth even when not moving. The multiplexer should know if bearing values are valid or not and indicate this. The value should indicate whether it is set for magnetic or true north.&lt;br /&gt;
&lt;br /&gt;
=== Support for postprocessing? ===&lt;br /&gt;
&lt;br /&gt;
Real-time DGPS correction possibilities include receiving an RTCM stream from an external device, receiving RTCM over an IP connection, and WAAS. Does the Ublox receiver support RTCM? Most receivers that support it just accept a stream of data from a serial line. You don't have to reverse engineer it, you just accept data from some source such as a DGPS Beacon Receiver and feed the output to the GPS receiver and you get something approaching 1 meter accuracy.&lt;br /&gt;
&lt;br /&gt;
Postprocessed DGPS correction requires recording pseudorange data and running an application later. In the open source world this means [http://en.wikipedia.org/wiki/RINEX RINEX]. Anyone with more knowledge of RINEX should jump in and edit this section.&lt;br /&gt;
&lt;br /&gt;
=== GPS controller ===&lt;br /&gt;
&lt;br /&gt;
''I think OM gps test program (what's it called) does much of this.''&lt;br /&gt;
&lt;br /&gt;
Some GPS receivers include a feature to stop logging or to issue warnings if data quality goes too low for any reason. Where should this be handled? In the multiplexer or in the applications? Maybe the settings should be applied to the multiplexer and it should issue warnings to the applications which would then decide what to do.&lt;br /&gt;
&lt;br /&gt;
=== Data Logger ===&lt;br /&gt;
&lt;br /&gt;
The basic concept of the logger is to create a bread crumb trail as you move about. &lt;br /&gt;
It has its own preference settings to determine if points are plotted based on change in position or on a time basis or both. &lt;br /&gt;
&lt;br /&gt;
It should also be possible to set what is logged. Possibilities include time, position, bearing, velocity, elevation, pseudo-range data, HDOP, PDOP, satellites used, type of GPS, type of antenna, DGPS on/off, type of DGPS.&lt;br /&gt;
&lt;br /&gt;
==== Speedometer, Pedomater -- Usage of logger by itself ====&lt;br /&gt;
&lt;br /&gt;
The data logger would be one crucial component in an application of GPS for bicyclists (and outdoor enthusiasts such as hikers and runners.) Other requirements would be a good display (to substitute for a speedometer) and a good mapping program. &lt;br /&gt;
&lt;br /&gt;
Should we expand on that on this page? It would be neat to have something that interoperates with the GPS multiplexer and the data logger so maybe we should?&lt;br /&gt;
&lt;br /&gt;
Speedometer functions would include tracking minimums, maximums, averages for speed, distance, and elevation (stopped, moving, combined). Bicyclists (and runners? I am not a runner...) want to know total climb.&lt;br /&gt;
&lt;br /&gt;
''I ride a bicycle and I use GPS as a speedometer and to do field work and I want to be able to do both with my Freerunner.'' [[User:Brian H Wilson|Brian H Wilson]] 19:38, 18 August 2008 (UTC)&lt;br /&gt;
&lt;br /&gt;
=== Field Collection Tool ===&lt;br /&gt;
&lt;br /&gt;
'''Attributes''' Mission planning should include setting up a file to be used for data collection, and that file should define attributes to be included. The data collector should be configurable to facilitate easy entry of the attribute data. For example, if you define a field to have a finite list of values, the values could be available as a drop down list.&lt;br /&gt;
&lt;br /&gt;
'''Point averaging''' Stand in one place and collect points until you are happy. The display should show current PDOP/HDOP and expected accuracy and number of readings used to create tehe point. Preferences should include storing all data used to create the averaged point.&lt;br /&gt;
&lt;br /&gt;
'''Points, lines and polygons.''' You should be able to collect all three. A typical use for polygons is to walk around a space while collecting GPS points to create a polygon showing the location of some physical object such as a wetland.&lt;br /&gt;
&lt;br /&gt;
==== Other related tools ====&lt;br /&gt;
&lt;br /&gt;
Other specialized field collection tools could be used for &lt;br /&gt;
&lt;br /&gt;
* Asset management, example: urban forestry, agriculture, public works&lt;br /&gt;
* Map making, for example to collect data for the Open Street Map project&lt;br /&gt;
* Geocaching&lt;br /&gt;
* ??? Add yours here ???&lt;br /&gt;
&lt;br /&gt;
== Data format and exchange ==&lt;br /&gt;
&lt;br /&gt;
The data should be stored internally in a compact form that is open or at least well documented (for example ESRI Shapefiles). Storing in XML based formats is bulky and should probably be avoided. &lt;br /&gt;
&lt;br /&gt;
There should be a desktop tool to manage transferring the data that has been collected from the smartphone to more portable exchange formats such as GPX and GML and KML. &amp;quot;GPS Office&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== RINEX ===&lt;br /&gt;
&lt;br /&gt;
Would RINEX be an appropriate general format for internal storage?&lt;br /&gt;
It's an exchange format but it's intended to include data required to perform post-processing.&lt;br /&gt;
It might be overkill for applications that don't require post-processing. &lt;br /&gt;
&lt;br /&gt;
Specs are here: ftp://ftp.unibe.ch/aiub/rinex/&lt;br /&gt;
&lt;br /&gt;
This guy wrote a program that takes Ublox Antares 4 data and writes it as RINEX data.&lt;br /&gt;
http://home.comcast.net/~dmilbert/softs/ant2rin.htm&lt;br /&gt;
&lt;br /&gt;
== People working on this project ==&lt;br /&gt;
&lt;br /&gt;
[[User:Brian H Wilson]] blabbing a lot and wishing he had more time to work on this.&lt;br /&gt;
&lt;br /&gt;
[[Category: GPS]]&lt;/div&gt;</summary>
		<author><name>Brian H Wilson</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/GPS_Data_Logger</id>
		<title>GPS Data Logger</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/GPS_Data_Logger"/>
				<updated>2008-08-18T22:37:55Z</updated>
		
		<summary type="html">&lt;p&gt;Brian H Wilson: /* Data Logger */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page was created to address the use cases mentioned in [[GTA02 GPS]], including&lt;br /&gt;
&lt;br /&gt;
* I want to log GPS data for later analysis.&lt;br /&gt;
* I want to collect GPS data for scientific field work (forestry, biology, etc)&lt;br /&gt;
&lt;br /&gt;
The page was started on 17 August 2008 mostly as a thought exercise.&lt;br /&gt;
Please jump in and add to it.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
The typical commercial approach to managing GPS data is to create one big application that does everything well. Unfortunately everyone has a different idea of what &amp;quot;doing everything well&amp;quot; means. One person might want to use GPS to log and analyze bicycle rides while another does weed mapping and another might be doing asset management. One application cannot do all this well.&lt;br /&gt;
&lt;br /&gt;
A better approach is to break it up into a set of components. Each component can be a standalone application. This relies on some kind of multiplexer such as gpsd (does gypsy support multiplexing?) so that each app has access to the GPS data stream.&lt;br /&gt;
&lt;br /&gt;
Initially the main functions could be broken out these components.&lt;br /&gt;
&lt;br /&gt;
# A '''GPS multiplexer''' that talks to the GPS receiver and feeds data to many applications.&lt;br /&gt;
# A '''GPS Controller''' to that can talk to the mulitplexer (and hence the GPS receiver) to display status and adjust settings.&lt;br /&gt;
# A '''Data Logger''' that can run all the time and record GPS data.&lt;br /&gt;
# A '''Field Collection Tool''' that allows doing specific operations such as averaging GPS data while waiting at a point for increased accuracy and entering attributes for a point.&lt;br /&gt;
&lt;br /&gt;
'''Mapping''' We should consider how to support mapping as a part of the field collection tool; it is not strictly necessary but it can be very nice to have it incorporated. Likewise if you are logging a breadcrumb trail it can be very nice to be able to see it on the map. A mapping component will need to be able to update its display with data collected from the logger and the field collection tool.&lt;br /&gt;
&lt;br /&gt;
== Main components ==&lt;br /&gt;
&lt;br /&gt;
=== GPS multiplexer ===&lt;br /&gt;
&lt;br /&gt;
Look at gpsd and gypsy (and the related religious wars) and either use one of them or use them for inspiration. &lt;br /&gt;
&lt;br /&gt;
Partial list of requirements for the multiplexer&lt;br /&gt;
* Control internal GPS receiver&lt;br /&gt;
* Control external GPS connected via serial port (USB or bluetooth)&lt;br /&gt;
* Feed data from the selected GPS receiver to multiple applications.&lt;br /&gt;
* Handle a RTCM stream to allow realtime DGPS postprocessing.&lt;br /&gt;
* Supply all attributes to applications, including such things as PDOP and satellites in use. (Not just time and position)&lt;br /&gt;
&lt;br /&gt;
==== External GPS ====&lt;br /&gt;
&lt;br /&gt;
There is no reason we are limited to using the built-in GPS receiver. For applications requiring more accuracy (for example sub-meter), the GPS multiplexer should be able to accept data via USB or bluetooth and feed it to our applications. The controller program should be able to handle this situation.&lt;br /&gt;
&lt;br /&gt;
=== Support for postprocessing? ===&lt;br /&gt;
&lt;br /&gt;
Real-time DGPS correction possibilities include receiving an RTCM stream from an external device, receiving RTCM over an IP connection, and WAAS. Does the Ublox receiver support RTCM? Most receivers that support it just accept a stream of data from a serial line. You don't have to reverse engineer it, you just accept data from some source such as a DGPS Beacon Receiver and feed the output to the GPS receiver and you get something approaching 1 meter accuracy.&lt;br /&gt;
&lt;br /&gt;
Postprocessed DGPS correction requires recording pseudorange data and running an application later. In the open source world this means [http://en.wikipedia.org/wiki/RINEX RINEX]. Anyone with more knowledge of RINEX should jump in and edit this section.&lt;br /&gt;
&lt;br /&gt;
=== GPS controller ===&lt;br /&gt;
&lt;br /&gt;
''I think OM gps test program (what's it called) does much of this.''&lt;br /&gt;
&lt;br /&gt;
Some GPS receivers include a feature to stop logging or to issue warnings if data quality goes too low for any reason. Where should this be handled? In the multiplexer or in the applications? Maybe the settings should be applied to the multiplexer and it should issue warnings to the applications which would then decide what to do.&lt;br /&gt;
&lt;br /&gt;
=== Data Logger ===&lt;br /&gt;
&lt;br /&gt;
The basic concept of the logger is to create a bread crumb trail as you move about. &lt;br /&gt;
It has its own preference settings to determine if points are plotted based on change in position or on a time basis or both. &lt;br /&gt;
&lt;br /&gt;
It should also be possible to set what is logged. Possibilities include time, position, bearing, velocity, elevation, pseudo-range data, HDOP, PDOP, satellites used, type of GPS, type of antenna, DGPS on/off, type of DGPS.&lt;br /&gt;
&lt;br /&gt;
==== Speedometer, Pedomater -- Usage of logger by itself ====&lt;br /&gt;
&lt;br /&gt;
The data logger would be one crucial component in an application of GPS for bicyclists (and outdoor enthusiasts such as hikers and runners.) Other requirements would be a good display (to substitute for a speedometer) and a good mapping program. &lt;br /&gt;
&lt;br /&gt;
Should we expand on that on this page? It would be neat to have something that interoperates with the GPS multiplexer and the data logger so maybe we should?&lt;br /&gt;
&lt;br /&gt;
Speedometer functions would include tracking minimums, maximums, averages for speed, distance, and elevation (stopped, moving, combined). Bicyclists (and runners? I am not a runner...) want to know total climb.&lt;br /&gt;
&lt;br /&gt;
''I ride a bicycle and I use GPS as a speedometer and to do field work and I want to be able to do both with my Freerunner.'' [[User:Brian H Wilson|Brian H Wilson]] 19:38, 18 August 2008 (UTC)&lt;br /&gt;
&lt;br /&gt;
=== Field Collection Tool ===&lt;br /&gt;
&lt;br /&gt;
'''Attributes''' Mission planning should include setting up a file to be used for data collection, and that file should define attributes to be included. The data collector should be configurable to facilitate easy entry of the attribute data. For example, if you define a field to have a finite list of values, the values could be available as a drop down list.&lt;br /&gt;
&lt;br /&gt;
'''Point averaging''' Stand in one place and collect points until you are happy. The display should show current PDOP/HDOP and expected accuracy and number of readings used to create tehe point. Preferences should include storing all data used to create the averaged point.&lt;br /&gt;
&lt;br /&gt;
'''Points, lines and polygons.''' You should be able to collect all three. A typical use for polygons is to walk around a space while collecting GPS points to create a polygon showing the location of some physical object such as a wetland.&lt;br /&gt;
&lt;br /&gt;
==== Other related tools ====&lt;br /&gt;
&lt;br /&gt;
Other specialized field collection tools could be used for &lt;br /&gt;
&lt;br /&gt;
* Asset management, example: urban forestry, agriculture, public works&lt;br /&gt;
* Map making, for example to collect data for the Open Street Map project&lt;br /&gt;
* Geocaching&lt;br /&gt;
* ??? Add yours here ???&lt;br /&gt;
&lt;br /&gt;
== Data format and exchange ==&lt;br /&gt;
&lt;br /&gt;
The data should be stored internally in a compact form that is open or at least well documented (for example ESRI Shapefiles). Storing in XML based formats is bulky and should probably be avoided. &lt;br /&gt;
&lt;br /&gt;
There should be a desktop tool to manage transferring the data that has been collected from the smartphone to more portable exchange formats such as GPX and GML and KML. &amp;quot;GPS Office&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== RINEX ===&lt;br /&gt;
&lt;br /&gt;
Would RINEX be an appropriate general format for internal storage?&lt;br /&gt;
It's an exchange format but it's intended to include data required to perform post-processing.&lt;br /&gt;
It might be overkill for applications that don't require post-processing. &lt;br /&gt;
&lt;br /&gt;
Specs are here: ftp://ftp.unibe.ch/aiub/rinex/&lt;br /&gt;
&lt;br /&gt;
This guy wrote a program that takes Ublox Antares 4 data and writes it as RINEX data.&lt;br /&gt;
http://home.comcast.net/~dmilbert/softs/ant2rin.htm&lt;br /&gt;
&lt;br /&gt;
== People working on this project ==&lt;br /&gt;
&lt;br /&gt;
[[User:Brian H Wilson]] blabbing a lot and wishing he had more time to work on this.&lt;br /&gt;
&lt;br /&gt;
[[Category: GPS]]&lt;/div&gt;</summary>
		<author><name>Brian H Wilson</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/GPS_Data_Logger</id>
		<title>GPS Data Logger</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/GPS_Data_Logger"/>
				<updated>2008-08-18T22:34:34Z</updated>
		
		<summary type="html">&lt;p&gt;Brian H Wilson: /* RINEX */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page was created to address the use cases mentioned in [[GTA02 GPS]], including&lt;br /&gt;
&lt;br /&gt;
* I want to log GPS data for later analysis.&lt;br /&gt;
* I want to collect GPS data for scientific field work (forestry, biology, etc)&lt;br /&gt;
&lt;br /&gt;
The page was started on 17 August 2008 mostly as a thought exercise.&lt;br /&gt;
Please jump in and add to it.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
The typical commercial approach to managing GPS data is to create one big application that does everything well. Unfortunately everyone has a different idea of what &amp;quot;doing everything well&amp;quot; means. One person might want to use GPS to log and analyze bicycle rides while another does weed mapping and another might be doing asset management. One application cannot do all this well.&lt;br /&gt;
&lt;br /&gt;
A better approach is to break it up into a set of components. Each component can be a standalone application. This relies on some kind of multiplexer such as gpsd (does gypsy support multiplexing?) so that each app has access to the GPS data stream.&lt;br /&gt;
&lt;br /&gt;
Initially the main functions could be broken out these components.&lt;br /&gt;
&lt;br /&gt;
# A '''GPS multiplexer''' that talks to the GPS receiver and feeds data to many applications.&lt;br /&gt;
# A '''GPS Controller''' to that can talk to the mulitplexer (and hence the GPS receiver) to display status and adjust settings.&lt;br /&gt;
# A '''Data Logger''' that can run all the time and record GPS data.&lt;br /&gt;
# A '''Field Collection Tool''' that allows doing specific operations such as averaging GPS data while waiting at a point for increased accuracy and entering attributes for a point.&lt;br /&gt;
&lt;br /&gt;
'''Mapping''' We should consider how to support mapping as a part of the field collection tool; it is not strictly necessary but it can be very nice to have it incorporated. Likewise if you are logging a breadcrumb trail it can be very nice to be able to see it on the map. A mapping component will need to be able to update its display with data collected from the logger and the field collection tool.&lt;br /&gt;
&lt;br /&gt;
== Main components ==&lt;br /&gt;
&lt;br /&gt;
=== GPS multiplexer ===&lt;br /&gt;
&lt;br /&gt;
Look at gpsd and gypsy (and the related religious wars) and either use one of them or use them for inspiration. &lt;br /&gt;
&lt;br /&gt;
Partial list of requirements for the multiplexer&lt;br /&gt;
* Control internal GPS receiver&lt;br /&gt;
* Control external GPS connected via serial port (USB or bluetooth)&lt;br /&gt;
* Feed data from the selected GPS receiver to multiple applications.&lt;br /&gt;
* Handle a RTCM stream to allow realtime DGPS postprocessing.&lt;br /&gt;
* Supply all attributes to applications, including such things as PDOP and satellites in use. (Not just time and position)&lt;br /&gt;
&lt;br /&gt;
==== External GPS ====&lt;br /&gt;
&lt;br /&gt;
There is no reason we are limited to using the built-in GPS receiver. For applications requiring more accuracy (for example sub-meter), the GPS multiplexer should be able to accept data via USB or bluetooth and feed it to our applications. The controller program should be able to handle this situation.&lt;br /&gt;
&lt;br /&gt;
=== Support for postprocessing? ===&lt;br /&gt;
&lt;br /&gt;
Real-time DGPS correction possibilities include receiving an RTCM stream from an external device, receiving RTCM over an IP connection, and WAAS. Does the Ublox receiver support RTCM? Most receivers that support it just accept a stream of data from a serial line. You don't have to reverse engineer it, you just accept data from some source such as a DGPS Beacon Receiver and feed the output to the GPS receiver and you get something approaching 1 meter accuracy.&lt;br /&gt;
&lt;br /&gt;
Postprocessed DGPS correction requires recording pseudorange data and running an application later. In the open source world this means [http://en.wikipedia.org/wiki/RINEX RINEX]. Anyone with more knowledge of RINEX should jump in and edit this section.&lt;br /&gt;
&lt;br /&gt;
=== GPS controller ===&lt;br /&gt;
&lt;br /&gt;
''I think OM gps test program (what's it called) does much of this.''&lt;br /&gt;
&lt;br /&gt;
Some GPS receivers include a feature to stop logging or to issue warnings if data quality goes too low for any reason. Where should this be handled? In the multiplexer or in the applications? Maybe the settings should be applied to the multiplexer and it should issue warnings to the applications which would then decide what to do.&lt;br /&gt;
&lt;br /&gt;
=== Data Logger ===&lt;br /&gt;
&lt;br /&gt;
The basic concept of the logger is to create a bread crumb trail as you move about. &lt;br /&gt;
It has its own preference settings to determine if points are plotted based on change in position or on a time basis or both. &lt;br /&gt;
&lt;br /&gt;
It should also be possible to set what is logged. Possibilities include time, position, bearing, velocity, elevation, pseudo-range data, HDOP, PDOP, satellites used, type of GPS, type of antenna, DGPS on/off, type of DGPS.&lt;br /&gt;
&lt;br /&gt;
The data logger would be one crucial component in an application of GPS for bicyclists (and outdoor enthusiasts like hikers and runners.) Other requirements would be a good display (to substitute for a speedometer) and a good mapping program. &lt;br /&gt;
&lt;br /&gt;
Should we expand on that on this page? It would be neat to have something that interoperates with the GPS multiplexer and the data logger so maybe we should?&lt;br /&gt;
&lt;br /&gt;
''I ride a bicycle and I use GPS as a speedometer and to do field work and I want to be able to do both with my Freerunner.'' [[User:Brian H Wilson|Brian H Wilson]] 19:38, 18 August 2008 (UTC)&lt;br /&gt;
&lt;br /&gt;
=== Field Collection Tool ===&lt;br /&gt;
&lt;br /&gt;
'''Attributes''' Mission planning should include setting up a file to be used for data collection, and that file should define attributes to be included. The data collector should be configurable to facilitate easy entry of the attribute data. For example, if you define a field to have a finite list of values, the values could be available as a drop down list.&lt;br /&gt;
&lt;br /&gt;
'''Point averaging''' Stand in one place and collect points until you are happy. The display should show current PDOP/HDOP and expected accuracy and number of readings used to create tehe point. Preferences should include storing all data used to create the averaged point.&lt;br /&gt;
&lt;br /&gt;
'''Points, lines and polygons.''' You should be able to collect all three. A typical use for polygons is to walk around a space while collecting GPS points to create a polygon showing the location of some physical object such as a wetland.&lt;br /&gt;
&lt;br /&gt;
==== Other related tools ====&lt;br /&gt;
&lt;br /&gt;
Other specialized field collection tools could be used for &lt;br /&gt;
&lt;br /&gt;
* Asset management, example: urban forestry, agriculture, public works&lt;br /&gt;
* Map making, for example to collect data for the Open Street Map project&lt;br /&gt;
* Geocaching&lt;br /&gt;
* ??? Add yours here ???&lt;br /&gt;
&lt;br /&gt;
== Data format and exchange ==&lt;br /&gt;
&lt;br /&gt;
The data should be stored internally in a compact form that is open or at least well documented (for example ESRI Shapefiles). Storing in XML based formats is bulky and should probably be avoided. &lt;br /&gt;
&lt;br /&gt;
There should be a desktop tool to manage transferring the data that has been collected from the smartphone to more portable exchange formats such as GPX and GML and KML. &amp;quot;GPS Office&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== RINEX ===&lt;br /&gt;
&lt;br /&gt;
Would RINEX be an appropriate general format for internal storage?&lt;br /&gt;
It's an exchange format but it's intended to include data required to perform post-processing.&lt;br /&gt;
It might be overkill for applications that don't require post-processing. &lt;br /&gt;
&lt;br /&gt;
Specs are here: ftp://ftp.unibe.ch/aiub/rinex/&lt;br /&gt;
&lt;br /&gt;
This guy wrote a program that takes Ublox Antares 4 data and writes it as RINEX data.&lt;br /&gt;
http://home.comcast.net/~dmilbert/softs/ant2rin.htm&lt;br /&gt;
&lt;br /&gt;
== People working on this project ==&lt;br /&gt;
&lt;br /&gt;
[[User:Brian H Wilson]] blabbing a lot and wishing he had more time to work on this.&lt;br /&gt;
&lt;br /&gt;
[[Category: GPS]]&lt;/div&gt;</summary>
		<author><name>Brian H Wilson</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/GPS_Data_Logger</id>
		<title>GPS Data Logger</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/GPS_Data_Logger"/>
				<updated>2008-08-18T22:32:43Z</updated>
		
		<summary type="html">&lt;p&gt;Brian H Wilson: /* Data format and exchange */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page was created to address the use cases mentioned in [[GTA02 GPS]], including&lt;br /&gt;
&lt;br /&gt;
* I want to log GPS data for later analysis.&lt;br /&gt;
* I want to collect GPS data for scientific field work (forestry, biology, etc)&lt;br /&gt;
&lt;br /&gt;
The page was started on 17 August 2008 mostly as a thought exercise.&lt;br /&gt;
Please jump in and add to it.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
The typical commercial approach to managing GPS data is to create one big application that does everything well. Unfortunately everyone has a different idea of what &amp;quot;doing everything well&amp;quot; means. One person might want to use GPS to log and analyze bicycle rides while another does weed mapping and another might be doing asset management. One application cannot do all this well.&lt;br /&gt;
&lt;br /&gt;
A better approach is to break it up into a set of components. Each component can be a standalone application. This relies on some kind of multiplexer such as gpsd (does gypsy support multiplexing?) so that each app has access to the GPS data stream.&lt;br /&gt;
&lt;br /&gt;
Initially the main functions could be broken out these components.&lt;br /&gt;
&lt;br /&gt;
# A '''GPS multiplexer''' that talks to the GPS receiver and feeds data to many applications.&lt;br /&gt;
# A '''GPS Controller''' to that can talk to the mulitplexer (and hence the GPS receiver) to display status and adjust settings.&lt;br /&gt;
# A '''Data Logger''' that can run all the time and record GPS data.&lt;br /&gt;
# A '''Field Collection Tool''' that allows doing specific operations such as averaging GPS data while waiting at a point for increased accuracy and entering attributes for a point.&lt;br /&gt;
&lt;br /&gt;
'''Mapping''' We should consider how to support mapping as a part of the field collection tool; it is not strictly necessary but it can be very nice to have it incorporated. Likewise if you are logging a breadcrumb trail it can be very nice to be able to see it on the map. A mapping component will need to be able to update its display with data collected from the logger and the field collection tool.&lt;br /&gt;
&lt;br /&gt;
== Main components ==&lt;br /&gt;
&lt;br /&gt;
=== GPS multiplexer ===&lt;br /&gt;
&lt;br /&gt;
Look at gpsd and gypsy (and the related religious wars) and either use one of them or use them for inspiration. &lt;br /&gt;
&lt;br /&gt;
Partial list of requirements for the multiplexer&lt;br /&gt;
* Control internal GPS receiver&lt;br /&gt;
* Control external GPS connected via serial port (USB or bluetooth)&lt;br /&gt;
* Feed data from the selected GPS receiver to multiple applications.&lt;br /&gt;
* Handle a RTCM stream to allow realtime DGPS postprocessing.&lt;br /&gt;
* Supply all attributes to applications, including such things as PDOP and satellites in use. (Not just time and position)&lt;br /&gt;
&lt;br /&gt;
==== External GPS ====&lt;br /&gt;
&lt;br /&gt;
There is no reason we are limited to using the built-in GPS receiver. For applications requiring more accuracy (for example sub-meter), the GPS multiplexer should be able to accept data via USB or bluetooth and feed it to our applications. The controller program should be able to handle this situation.&lt;br /&gt;
&lt;br /&gt;
=== Support for postprocessing? ===&lt;br /&gt;
&lt;br /&gt;
Real-time DGPS correction possibilities include receiving an RTCM stream from an external device, receiving RTCM over an IP connection, and WAAS. Does the Ublox receiver support RTCM? Most receivers that support it just accept a stream of data from a serial line. You don't have to reverse engineer it, you just accept data from some source such as a DGPS Beacon Receiver and feed the output to the GPS receiver and you get something approaching 1 meter accuracy.&lt;br /&gt;
&lt;br /&gt;
Postprocessed DGPS correction requires recording pseudorange data and running an application later. In the open source world this means [http://en.wikipedia.org/wiki/RINEX RINEX]. Anyone with more knowledge of RINEX should jump in and edit this section.&lt;br /&gt;
&lt;br /&gt;
=== GPS controller ===&lt;br /&gt;
&lt;br /&gt;
''I think OM gps test program (what's it called) does much of this.''&lt;br /&gt;
&lt;br /&gt;
Some GPS receivers include a feature to stop logging or to issue warnings if data quality goes too low for any reason. Where should this be handled? In the multiplexer or in the applications? Maybe the settings should be applied to the multiplexer and it should issue warnings to the applications which would then decide what to do.&lt;br /&gt;
&lt;br /&gt;
=== Data Logger ===&lt;br /&gt;
&lt;br /&gt;
The basic concept of the logger is to create a bread crumb trail as you move about. &lt;br /&gt;
It has its own preference settings to determine if points are plotted based on change in position or on a time basis or both. &lt;br /&gt;
&lt;br /&gt;
It should also be possible to set what is logged. Possibilities include time, position, bearing, velocity, elevation, pseudo-range data, HDOP, PDOP, satellites used, type of GPS, type of antenna, DGPS on/off, type of DGPS.&lt;br /&gt;
&lt;br /&gt;
The data logger would be one crucial component in an application of GPS for bicyclists (and outdoor enthusiasts like hikers and runners.) Other requirements would be a good display (to substitute for a speedometer) and a good mapping program. &lt;br /&gt;
&lt;br /&gt;
Should we expand on that on this page? It would be neat to have something that interoperates with the GPS multiplexer and the data logger so maybe we should?&lt;br /&gt;
&lt;br /&gt;
''I ride a bicycle and I use GPS as a speedometer and to do field work and I want to be able to do both with my Freerunner.'' [[User:Brian H Wilson|Brian H Wilson]] 19:38, 18 August 2008 (UTC)&lt;br /&gt;
&lt;br /&gt;
=== Field Collection Tool ===&lt;br /&gt;
&lt;br /&gt;
'''Attributes''' Mission planning should include setting up a file to be used for data collection, and that file should define attributes to be included. The data collector should be configurable to facilitate easy entry of the attribute data. For example, if you define a field to have a finite list of values, the values could be available as a drop down list.&lt;br /&gt;
&lt;br /&gt;
'''Point averaging''' Stand in one place and collect points until you are happy. The display should show current PDOP/HDOP and expected accuracy and number of readings used to create tehe point. Preferences should include storing all data used to create the averaged point.&lt;br /&gt;
&lt;br /&gt;
'''Points, lines and polygons.''' You should be able to collect all three. A typical use for polygons is to walk around a space while collecting GPS points to create a polygon showing the location of some physical object such as a wetland.&lt;br /&gt;
&lt;br /&gt;
==== Other related tools ====&lt;br /&gt;
&lt;br /&gt;
Other specialized field collection tools could be used for &lt;br /&gt;
&lt;br /&gt;
* Asset management, example: urban forestry, agriculture, public works&lt;br /&gt;
* Map making, for example to collect data for the Open Street Map project&lt;br /&gt;
* Geocaching&lt;br /&gt;
* ??? Add yours here ???&lt;br /&gt;
&lt;br /&gt;
== Data format and exchange ==&lt;br /&gt;
&lt;br /&gt;
The data should be stored internally in a compact form that is open or at least well documented (for example ESRI Shapefiles). Storing in XML based formats is bulky and should probably be avoided. &lt;br /&gt;
&lt;br /&gt;
There should be a desktop tool to manage transferring the data that has been collected from the smartphone to more portable exchange formats such as GPX and GML and KML. &amp;quot;GPS Office&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== RINEX ===&lt;br /&gt;
&lt;br /&gt;
Would RINEX be an appropriate format for internal storage?&lt;br /&gt;
It's an exchange format.&lt;br /&gt;
&lt;br /&gt;
Specs are here: ftp://ftp.unibe.ch/aiub/rinex/&lt;br /&gt;
&lt;br /&gt;
This guy wrote a program that takes Ublox Antares 4 data and writes it as RINEX data.&lt;br /&gt;
http://home.comcast.net/~dmilbert/softs/ant2rin.htm&lt;br /&gt;
&lt;br /&gt;
== People working on this project ==&lt;br /&gt;
&lt;br /&gt;
[[User:Brian H Wilson]] blabbing a lot and wishing he had more time to work on this.&lt;br /&gt;
&lt;br /&gt;
[[Category: GPS]]&lt;/div&gt;</summary>
		<author><name>Brian H Wilson</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/GPS_Data_Logger</id>
		<title>GPS Data Logger</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/GPS_Data_Logger"/>
				<updated>2008-08-18T19:51:02Z</updated>
		
		<summary type="html">&lt;p&gt;Brian H Wilson: /* Field Collection Tool */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page was created to address the use cases mentioned in [[GTA02 GPS]], including&lt;br /&gt;
&lt;br /&gt;
* I want to log GPS data for later analysis.&lt;br /&gt;
* I want to collect GPS data for scientific field work (forestry, biology, etc)&lt;br /&gt;
&lt;br /&gt;
The page was started on 17 August 2008 mostly as a thought exercise.&lt;br /&gt;
Please jump in and add to it.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
The typical commercial approach to managing GPS data is to create one big application that does everything well. Unfortunately everyone has a different idea of what &amp;quot;doing everything well&amp;quot; means. One person might want to use GPS to log and analyze bicycle rides while another does weed mapping and another might be doing asset management. One application cannot do all this well.&lt;br /&gt;
&lt;br /&gt;
A better approach is to break it up into a set of components. Each component can be a standalone application. This relies on some kind of multiplexer such as gpsd (does gypsy support multiplexing?) so that each app has access to the GPS data stream.&lt;br /&gt;
&lt;br /&gt;
Initially the main functions could be broken out these components.&lt;br /&gt;
&lt;br /&gt;
# A '''GPS multiplexer''' that talks to the GPS receiver and feeds data to many applications.&lt;br /&gt;
# A '''GPS Controller''' to that can talk to the mulitplexer (and hence the GPS receiver) to display status and adjust settings.&lt;br /&gt;
# A '''Data Logger''' that can run all the time and record GPS data.&lt;br /&gt;
# A '''Field Collection Tool''' that allows doing specific operations such as averaging GPS data while waiting at a point for increased accuracy and entering attributes for a point.&lt;br /&gt;
&lt;br /&gt;
'''Mapping''' We should consider how to support mapping as a part of the field collection tool; it is not strictly necessary but it can be very nice to have it incorporated. Likewise if you are logging a breadcrumb trail it can be very nice to be able to see it on the map. A mapping component will need to be able to update its display with data collected from the logger and the field collection tool.&lt;br /&gt;
&lt;br /&gt;
== Main components ==&lt;br /&gt;
&lt;br /&gt;
=== GPS multiplexer ===&lt;br /&gt;
&lt;br /&gt;
Look at gpsd and gypsy (and the related religious wars) and either use one of them or use them for inspiration. &lt;br /&gt;
&lt;br /&gt;
Partial list of requirements for the multiplexer&lt;br /&gt;
* Control internal GPS receiver&lt;br /&gt;
* Control external GPS connected via serial port (USB or bluetooth)&lt;br /&gt;
* Feed data from the selected GPS receiver to multiple applications.&lt;br /&gt;
* Handle a RTCM stream to allow realtime DGPS postprocessing.&lt;br /&gt;
* Supply all attributes to applications, including such things as PDOP and satellites in use. (Not just time and position)&lt;br /&gt;
&lt;br /&gt;
==== External GPS ====&lt;br /&gt;
&lt;br /&gt;
There is no reason we are limited to using the built-in GPS receiver. For applications requiring more accuracy (for example sub-meter), the GPS multiplexer should be able to accept data via USB or bluetooth and feed it to our applications. The controller program should be able to handle this situation.&lt;br /&gt;
&lt;br /&gt;
=== Support for postprocessing? ===&lt;br /&gt;
&lt;br /&gt;
Real-time DGPS correction possibilities include receiving an RTCM stream from an external device, receiving RTCM over an IP connection, and WAAS. Does the Ublox receiver support RTCM? Most receivers that support it just accept a stream of data from a serial line. You don't have to reverse engineer it, you just accept data from some source such as a DGPS Beacon Receiver and feed the output to the GPS receiver and you get something approaching 1 meter accuracy.&lt;br /&gt;
&lt;br /&gt;
Postprocessed DGPS correction requires recording pseudorange data and running an application later. In the open source world this means [http://en.wikipedia.org/wiki/RINEX RINEX]. Anyone with more knowledge of RINEX should jump in and edit this section.&lt;br /&gt;
&lt;br /&gt;
=== GPS controller ===&lt;br /&gt;
&lt;br /&gt;
''I think OM gps test program (what's it called) does much of this.''&lt;br /&gt;
&lt;br /&gt;
Some GPS receivers include a feature to stop logging or to issue warnings if data quality goes too low for any reason. Where should this be handled? In the multiplexer or in the applications? Maybe the settings should be applied to the multiplexer and it should issue warnings to the applications which would then decide what to do.&lt;br /&gt;
&lt;br /&gt;
=== Data Logger ===&lt;br /&gt;
&lt;br /&gt;
The basic concept of the logger is to create a bread crumb trail as you move about. &lt;br /&gt;
It has its own preference settings to determine if points are plotted based on change in position or on a time basis or both. &lt;br /&gt;
&lt;br /&gt;
It should also be possible to set what is logged. Possibilities include time, position, bearing, velocity, elevation, pseudo-range data, HDOP, PDOP, satellites used, type of GPS, type of antenna, DGPS on/off, type of DGPS.&lt;br /&gt;
&lt;br /&gt;
The data logger would be one crucial component in an application of GPS for bicyclists (and outdoor enthusiasts like hikers and runners.) Other requirements would be a good display (to substitute for a speedometer) and a good mapping program. &lt;br /&gt;
&lt;br /&gt;
Should we expand on that on this page? It would be neat to have something that interoperates with the GPS multiplexer and the data logger so maybe we should?&lt;br /&gt;
&lt;br /&gt;
''I ride a bicycle and I use GPS as a speedometer and to do field work and I want to be able to do both with my Freerunner.'' [[User:Brian H Wilson|Brian H Wilson]] 19:38, 18 August 2008 (UTC)&lt;br /&gt;
&lt;br /&gt;
=== Field Collection Tool ===&lt;br /&gt;
&lt;br /&gt;
'''Attributes''' Mission planning should include setting up a file to be used for data collection, and that file should define attributes to be included. The data collector should be configurable to facilitate easy entry of the attribute data. For example, if you define a field to have a finite list of values, the values could be available as a drop down list.&lt;br /&gt;
&lt;br /&gt;
'''Point averaging''' Stand in one place and collect points until you are happy. The display should show current PDOP/HDOP and expected accuracy and number of readings used to create tehe point. Preferences should include storing all data used to create the averaged point.&lt;br /&gt;
&lt;br /&gt;
'''Points, lines and polygons.''' You should be able to collect all three. A typical use for polygons is to walk around a space while collecting GPS points to create a polygon showing the location of some physical object such as a wetland.&lt;br /&gt;
&lt;br /&gt;
==== Other related tools ====&lt;br /&gt;
&lt;br /&gt;
Other specialized field collection tools could be used for &lt;br /&gt;
&lt;br /&gt;
* Asset management, example: urban forestry, agriculture, public works&lt;br /&gt;
* Map making, for example to collect data for the Open Street Map project&lt;br /&gt;
* Geocaching&lt;br /&gt;
* ??? Add yours here ???&lt;br /&gt;
&lt;br /&gt;
== Data format and exchange ==&lt;br /&gt;
&lt;br /&gt;
The data should be stored internally in a compact form that is open or at least well documented (for example ESRI Shapefiles). Storing in XML based formats is bulky and should probably be avoided. &lt;br /&gt;
&lt;br /&gt;
There should be a desktop tool to manage transferring the data that has been collected from the smartphone to more portable exchange formats such as GPX and GML and KML. &amp;quot;GPS Office&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== People working on this project ==&lt;br /&gt;
&lt;br /&gt;
[[User:Brian H Wilson]] blabbing a lot and wishing he had more time to work on this.&lt;br /&gt;
&lt;br /&gt;
[[Category: GPS]]&lt;/div&gt;</summary>
		<author><name>Brian H Wilson</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/GPS_Data_Logger</id>
		<title>GPS Data Logger</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/GPS_Data_Logger"/>
				<updated>2008-08-18T19:46:21Z</updated>
		
		<summary type="html">&lt;p&gt;Brian H Wilson: /* Data format and exchange */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page was created to address the use cases mentioned in [[GTA02 GPS]], including&lt;br /&gt;
&lt;br /&gt;
* I want to log GPS data for later analysis.&lt;br /&gt;
* I want to collect GPS data for scientific field work (forestry, biology, etc)&lt;br /&gt;
&lt;br /&gt;
The page was started on 17 August 2008 mostly as a thought exercise.&lt;br /&gt;
Please jump in and add to it.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
The typical commercial approach to managing GPS data is to create one big application that does everything well. Unfortunately everyone has a different idea of what &amp;quot;doing everything well&amp;quot; means. One person might want to use GPS to log and analyze bicycle rides while another does weed mapping and another might be doing asset management. One application cannot do all this well.&lt;br /&gt;
&lt;br /&gt;
A better approach is to break it up into a set of components. Each component can be a standalone application. This relies on some kind of multiplexer such as gpsd (does gypsy support multiplexing?) so that each app has access to the GPS data stream.&lt;br /&gt;
&lt;br /&gt;
Initially the main functions could be broken out these components.&lt;br /&gt;
&lt;br /&gt;
# A '''GPS multiplexer''' that talks to the GPS receiver and feeds data to many applications.&lt;br /&gt;
# A '''GPS Controller''' to that can talk to the mulitplexer (and hence the GPS receiver) to display status and adjust settings.&lt;br /&gt;
# A '''Data Logger''' that can run all the time and record GPS data.&lt;br /&gt;
# A '''Field Collection Tool''' that allows doing specific operations such as averaging GPS data while waiting at a point for increased accuracy and entering attributes for a point.&lt;br /&gt;
&lt;br /&gt;
'''Mapping''' We should consider how to support mapping as a part of the field collection tool; it is not strictly necessary but it can be very nice to have it incorporated. Likewise if you are logging a breadcrumb trail it can be very nice to be able to see it on the map. A mapping component will need to be able to update its display with data collected from the logger and the field collection tool.&lt;br /&gt;
&lt;br /&gt;
== Main components ==&lt;br /&gt;
&lt;br /&gt;
=== GPS multiplexer ===&lt;br /&gt;
&lt;br /&gt;
Look at gpsd and gypsy (and the related religious wars) and either use one of them or use them for inspiration. &lt;br /&gt;
&lt;br /&gt;
Partial list of requirements for the multiplexer&lt;br /&gt;
* Control internal GPS receiver&lt;br /&gt;
* Control external GPS connected via serial port (USB or bluetooth)&lt;br /&gt;
* Feed data from the selected GPS receiver to multiple applications.&lt;br /&gt;
* Handle a RTCM stream to allow realtime DGPS postprocessing.&lt;br /&gt;
* Supply all attributes to applications, including such things as PDOP and satellites in use. (Not just time and position)&lt;br /&gt;
&lt;br /&gt;
==== External GPS ====&lt;br /&gt;
&lt;br /&gt;
There is no reason we are limited to using the built-in GPS receiver. For applications requiring more accuracy (for example sub-meter), the GPS multiplexer should be able to accept data via USB or bluetooth and feed it to our applications. The controller program should be able to handle this situation.&lt;br /&gt;
&lt;br /&gt;
=== Support for postprocessing? ===&lt;br /&gt;
&lt;br /&gt;
Real-time DGPS correction possibilities include receiving an RTCM stream from an external device, receiving RTCM over an IP connection, and WAAS. Does the Ublox receiver support RTCM? Most receivers that support it just accept a stream of data from a serial line. You don't have to reverse engineer it, you just accept data from some source such as a DGPS Beacon Receiver and feed the output to the GPS receiver and you get something approaching 1 meter accuracy.&lt;br /&gt;
&lt;br /&gt;
Postprocessed DGPS correction requires recording pseudorange data and running an application later. In the open source world this means [http://en.wikipedia.org/wiki/RINEX RINEX]. Anyone with more knowledge of RINEX should jump in and edit this section.&lt;br /&gt;
&lt;br /&gt;
=== GPS controller ===&lt;br /&gt;
&lt;br /&gt;
''I think OM gps test program (what's it called) does much of this.''&lt;br /&gt;
&lt;br /&gt;
Some GPS receivers include a feature to stop logging or to issue warnings if data quality goes too low for any reason. Where should this be handled? In the multiplexer or in the applications? Maybe the settings should be applied to the multiplexer and it should issue warnings to the applications which would then decide what to do.&lt;br /&gt;
&lt;br /&gt;
=== Data Logger ===&lt;br /&gt;
&lt;br /&gt;
The basic concept of the logger is to create a bread crumb trail as you move about. &lt;br /&gt;
It has its own preference settings to determine if points are plotted based on change in position or on a time basis or both. &lt;br /&gt;
&lt;br /&gt;
It should also be possible to set what is logged. Possibilities include time, position, bearing, velocity, elevation, pseudo-range data, HDOP, PDOP, satellites used, type of GPS, type of antenna, DGPS on/off, type of DGPS.&lt;br /&gt;
&lt;br /&gt;
The data logger would be one crucial component in an application of GPS for bicyclists (and outdoor enthusiasts like hikers and runners.) Other requirements would be a good display (to substitute for a speedometer) and a good mapping program. &lt;br /&gt;
&lt;br /&gt;
Should we expand on that on this page? It would be neat to have something that interoperates with the GPS multiplexer and the data logger so maybe we should?&lt;br /&gt;
&lt;br /&gt;
''I ride a bicycle and I use GPS as a speedometer and to do field work and I want to be able to do both with my Freerunner.'' [[User:Brian H Wilson|Brian H Wilson]] 19:38, 18 August 2008 (UTC)&lt;br /&gt;
&lt;br /&gt;
=== Field Collection Tool ===&lt;br /&gt;
&lt;br /&gt;
'''Attributes''' Mission planning should include setting up a file to be used for data collection, and that file should define attributes to be included. The data collector should be configurable to facilitate easy entry of the attribute data. For example, if you define a field to have a finite list of values, the values could be available as a drop down list.&lt;br /&gt;
&lt;br /&gt;
'''Point averaging''' Stand in one place and collect points until you are happy. The display should show current PDOP/HDOP and expected accuracy and number of readings used to create tehe point. Preferences should include storing all data used to create the averaged point.&lt;br /&gt;
&lt;br /&gt;
'''Points, lines and polygons.''' You should be able to collect all three. A typical use for polygons is to walk around a space while collecting GPS points to create a polygon showing the location of some physical object such as a wetland.&lt;br /&gt;
&lt;br /&gt;
== Data format and exchange ==&lt;br /&gt;
&lt;br /&gt;
The data should be stored internally in a compact form that is open or at least well documented (for example ESRI Shapefiles). Storing in XML based formats is bulky and should probably be avoided. &lt;br /&gt;
&lt;br /&gt;
There should be a desktop tool to manage transferring the data that has been collected from the smartphone to more portable exchange formats such as GPX and GML and KML. &amp;quot;GPS Office&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== People working on this project ==&lt;br /&gt;
&lt;br /&gt;
[[User:Brian H Wilson]] blabbing a lot and wishing he had more time to work on this.&lt;br /&gt;
&lt;br /&gt;
[[Category: GPS]]&lt;/div&gt;</summary>
		<author><name>Brian H Wilson</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/GPS_Data_Logger</id>
		<title>GPS Data Logger</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/GPS_Data_Logger"/>
				<updated>2008-08-18T19:45:21Z</updated>
		
		<summary type="html">&lt;p&gt;Brian H Wilson: /* Overview */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page was created to address the use cases mentioned in [[GTA02 GPS]], including&lt;br /&gt;
&lt;br /&gt;
* I want to log GPS data for later analysis.&lt;br /&gt;
* I want to collect GPS data for scientific field work (forestry, biology, etc)&lt;br /&gt;
&lt;br /&gt;
The page was started on 17 August 2008 mostly as a thought exercise.&lt;br /&gt;
Please jump in and add to it.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
The typical commercial approach to managing GPS data is to create one big application that does everything well. Unfortunately everyone has a different idea of what &amp;quot;doing everything well&amp;quot; means. One person might want to use GPS to log and analyze bicycle rides while another does weed mapping and another might be doing asset management. One application cannot do all this well.&lt;br /&gt;
&lt;br /&gt;
A better approach is to break it up into a set of components. Each component can be a standalone application. This relies on some kind of multiplexer such as gpsd (does gypsy support multiplexing?) so that each app has access to the GPS data stream.&lt;br /&gt;
&lt;br /&gt;
Initially the main functions could be broken out these components.&lt;br /&gt;
&lt;br /&gt;
# A '''GPS multiplexer''' that talks to the GPS receiver and feeds data to many applications.&lt;br /&gt;
# A '''GPS Controller''' to that can talk to the mulitplexer (and hence the GPS receiver) to display status and adjust settings.&lt;br /&gt;
# A '''Data Logger''' that can run all the time and record GPS data.&lt;br /&gt;
# A '''Field Collection Tool''' that allows doing specific operations such as averaging GPS data while waiting at a point for increased accuracy and entering attributes for a point.&lt;br /&gt;
&lt;br /&gt;
'''Mapping''' We should consider how to support mapping as a part of the field collection tool; it is not strictly necessary but it can be very nice to have it incorporated. Likewise if you are logging a breadcrumb trail it can be very nice to be able to see it on the map. A mapping component will need to be able to update its display with data collected from the logger and the field collection tool.&lt;br /&gt;
&lt;br /&gt;
== Main components ==&lt;br /&gt;
&lt;br /&gt;
=== GPS multiplexer ===&lt;br /&gt;
&lt;br /&gt;
Look at gpsd and gypsy (and the related religious wars) and either use one of them or use them for inspiration. &lt;br /&gt;
&lt;br /&gt;
Partial list of requirements for the multiplexer&lt;br /&gt;
* Control internal GPS receiver&lt;br /&gt;
* Control external GPS connected via serial port (USB or bluetooth)&lt;br /&gt;
* Feed data from the selected GPS receiver to multiple applications.&lt;br /&gt;
* Handle a RTCM stream to allow realtime DGPS postprocessing.&lt;br /&gt;
* Supply all attributes to applications, including such things as PDOP and satellites in use. (Not just time and position)&lt;br /&gt;
&lt;br /&gt;
==== External GPS ====&lt;br /&gt;
&lt;br /&gt;
There is no reason we are limited to using the built-in GPS receiver. For applications requiring more accuracy (for example sub-meter), the GPS multiplexer should be able to accept data via USB or bluetooth and feed it to our applications. The controller program should be able to handle this situation.&lt;br /&gt;
&lt;br /&gt;
=== Support for postprocessing? ===&lt;br /&gt;
&lt;br /&gt;
Real-time DGPS correction possibilities include receiving an RTCM stream from an external device, receiving RTCM over an IP connection, and WAAS. Does the Ublox receiver support RTCM? Most receivers that support it just accept a stream of data from a serial line. You don't have to reverse engineer it, you just accept data from some source such as a DGPS Beacon Receiver and feed the output to the GPS receiver and you get something approaching 1 meter accuracy.&lt;br /&gt;
&lt;br /&gt;
Postprocessed DGPS correction requires recording pseudorange data and running an application later. In the open source world this means [http://en.wikipedia.org/wiki/RINEX RINEX]. Anyone with more knowledge of RINEX should jump in and edit this section.&lt;br /&gt;
&lt;br /&gt;
=== GPS controller ===&lt;br /&gt;
&lt;br /&gt;
''I think OM gps test program (what's it called) does much of this.''&lt;br /&gt;
&lt;br /&gt;
Some GPS receivers include a feature to stop logging or to issue warnings if data quality goes too low for any reason. Where should this be handled? In the multiplexer or in the applications? Maybe the settings should be applied to the multiplexer and it should issue warnings to the applications which would then decide what to do.&lt;br /&gt;
&lt;br /&gt;
=== Data Logger ===&lt;br /&gt;
&lt;br /&gt;
The basic concept of the logger is to create a bread crumb trail as you move about. &lt;br /&gt;
It has its own preference settings to determine if points are plotted based on change in position or on a time basis or both. &lt;br /&gt;
&lt;br /&gt;
It should also be possible to set what is logged. Possibilities include time, position, bearing, velocity, elevation, pseudo-range data, HDOP, PDOP, satellites used, type of GPS, type of antenna, DGPS on/off, type of DGPS.&lt;br /&gt;
&lt;br /&gt;
The data logger would be one crucial component in an application of GPS for bicyclists (and outdoor enthusiasts like hikers and runners.) Other requirements would be a good display (to substitute for a speedometer) and a good mapping program. &lt;br /&gt;
&lt;br /&gt;
Should we expand on that on this page? It would be neat to have something that interoperates with the GPS multiplexer and the data logger so maybe we should?&lt;br /&gt;
&lt;br /&gt;
''I ride a bicycle and I use GPS as a speedometer and to do field work and I want to be able to do both with my Freerunner.'' [[User:Brian H Wilson|Brian H Wilson]] 19:38, 18 August 2008 (UTC)&lt;br /&gt;
&lt;br /&gt;
=== Field Collection Tool ===&lt;br /&gt;
&lt;br /&gt;
'''Attributes''' Mission planning should include setting up a file to be used for data collection, and that file should define attributes to be included. The data collector should be configurable to facilitate easy entry of the attribute data. For example, if you define a field to have a finite list of values, the values could be available as a drop down list.&lt;br /&gt;
&lt;br /&gt;
'''Point averaging''' Stand in one place and collect points until you are happy. The display should show current PDOP/HDOP and expected accuracy and number of readings used to create tehe point. Preferences should include storing all data used to create the averaged point.&lt;br /&gt;
&lt;br /&gt;
'''Points, lines and polygons.''' You should be able to collect all three. A typical use for polygons is to walk around a space while collecting GPS points to create a polygon showing the location of some physical object such as a wetland.&lt;br /&gt;
&lt;br /&gt;
== Data format and exchange ==&lt;br /&gt;
&lt;br /&gt;
The data should be stored internally in a compact form that is open or at least well documented (for example ESRI Shapefiles). Storing in XML based formats is bulky and should probably be avoided. &lt;br /&gt;
&lt;br /&gt;
There should be a desktop tool to manage transferring the data that has been collected from the smartphone to more portable exchange formats such as GPX and GML and KML. &amp;quot;GPS Office&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[Category: GPS]]&lt;/div&gt;</summary>
		<author><name>Brian H Wilson</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/GPS_Data_Logger</id>
		<title>GPS Data Logger</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/GPS_Data_Logger"/>
				<updated>2008-08-18T19:43:44Z</updated>
		
		<summary type="html">&lt;p&gt;Brian H Wilson: /* Field Collection Tool */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page was created to address the use cases mentioned in [[GTA02 GPS]], including&lt;br /&gt;
&lt;br /&gt;
* I want to log GPS data for later analysis.&lt;br /&gt;
* I want to collect GPS data for scientific field work (forestry, biology, etc)&lt;br /&gt;
&lt;br /&gt;
The page was started on 17 August 2008 mostly as a thought exercise.&lt;br /&gt;
Please jump in and add to it.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
The typical commercial approach to managing GPS data is to create one big application that does everything well. Unfortunately everyone has a different idea of what &amp;quot;doing everything well&amp;quot; means. One person might want to use GPS to log and analyze bicycle rides while another does weed mapping and another might be doing asset management. One application cannot do all this well.&lt;br /&gt;
&lt;br /&gt;
A better approach is to break it up into a set of components. Each component can be a standalone application. This relies on some kind of multiplexer such as gpsd (does gypsy support multiplexing?) so that each app has access to the GPS data stream.&lt;br /&gt;
&lt;br /&gt;
Initially the main functions could be broken out these components.&lt;br /&gt;
&lt;br /&gt;
# A '''GPS multiplexer''' that talks to the GPS receiver and feeds data to many applications.&lt;br /&gt;
# A '''GPS Controller''' to that can talk to the mulitplexer (and hence the GPS receiver) to display status and adjust settings.&lt;br /&gt;
# A '''Data Logger''' that can run all the time and record GPS data.&lt;br /&gt;
# A '''Field Collection Tool''' that allows doing specific operations such as averaging GPS data while waiting at a point for increased accuracy and entering attributes for a point.&lt;br /&gt;
&lt;br /&gt;
== Main components ==&lt;br /&gt;
&lt;br /&gt;
=== GPS multiplexer ===&lt;br /&gt;
&lt;br /&gt;
Look at gpsd and gypsy (and the related religious wars) and either use one of them or use them for inspiration. &lt;br /&gt;
&lt;br /&gt;
Partial list of requirements for the multiplexer&lt;br /&gt;
* Control internal GPS receiver&lt;br /&gt;
* Control external GPS connected via serial port (USB or bluetooth)&lt;br /&gt;
* Feed data from the selected GPS receiver to multiple applications.&lt;br /&gt;
* Handle a RTCM stream to allow realtime DGPS postprocessing.&lt;br /&gt;
* Supply all attributes to applications, including such things as PDOP and satellites in use. (Not just time and position)&lt;br /&gt;
&lt;br /&gt;
==== External GPS ====&lt;br /&gt;
&lt;br /&gt;
There is no reason we are limited to using the built-in GPS receiver. For applications requiring more accuracy (for example sub-meter), the GPS multiplexer should be able to accept data via USB or bluetooth and feed it to our applications. The controller program should be able to handle this situation.&lt;br /&gt;
&lt;br /&gt;
=== Support for postprocessing? ===&lt;br /&gt;
&lt;br /&gt;
Real-time DGPS correction possibilities include receiving an RTCM stream from an external device, receiving RTCM over an IP connection, and WAAS. Does the Ublox receiver support RTCM? Most receivers that support it just accept a stream of data from a serial line. You don't have to reverse engineer it, you just accept data from some source such as a DGPS Beacon Receiver and feed the output to the GPS receiver and you get something approaching 1 meter accuracy.&lt;br /&gt;
&lt;br /&gt;
Postprocessed DGPS correction requires recording pseudorange data and running an application later. In the open source world this means [http://en.wikipedia.org/wiki/RINEX RINEX]. Anyone with more knowledge of RINEX should jump in and edit this section.&lt;br /&gt;
&lt;br /&gt;
=== GPS controller ===&lt;br /&gt;
&lt;br /&gt;
''I think OM gps test program (what's it called) does much of this.''&lt;br /&gt;
&lt;br /&gt;
Some GPS receivers include a feature to stop logging or to issue warnings if data quality goes too low for any reason. Where should this be handled? In the multiplexer or in the applications? Maybe the settings should be applied to the multiplexer and it should issue warnings to the applications which would then decide what to do.&lt;br /&gt;
&lt;br /&gt;
=== Data Logger ===&lt;br /&gt;
&lt;br /&gt;
The basic concept of the logger is to create a bread crumb trail as you move about. &lt;br /&gt;
It has its own preference settings to determine if points are plotted based on change in position or on a time basis or both. &lt;br /&gt;
&lt;br /&gt;
It should also be possible to set what is logged. Possibilities include time, position, bearing, velocity, elevation, pseudo-range data, HDOP, PDOP, satellites used, type of GPS, type of antenna, DGPS on/off, type of DGPS.&lt;br /&gt;
&lt;br /&gt;
The data logger would be one crucial component in an application of GPS for bicyclists (and outdoor enthusiasts like hikers and runners.) Other requirements would be a good display (to substitute for a speedometer) and a good mapping program. &lt;br /&gt;
&lt;br /&gt;
Should we expand on that on this page? It would be neat to have something that interoperates with the GPS multiplexer and the data logger so maybe we should?&lt;br /&gt;
&lt;br /&gt;
''I ride a bicycle and I use GPS as a speedometer and to do field work and I want to be able to do both with my Freerunner.'' [[User:Brian H Wilson|Brian H Wilson]] 19:38, 18 August 2008 (UTC)&lt;br /&gt;
&lt;br /&gt;
=== Field Collection Tool ===&lt;br /&gt;
&lt;br /&gt;
'''Attributes''' Mission planning should include setting up a file to be used for data collection, and that file should define attributes to be included. The data collector should be configurable to facilitate easy entry of the attribute data. For example, if you define a field to have a finite list of values, the values could be available as a drop down list.&lt;br /&gt;
&lt;br /&gt;
'''Point averaging''' Stand in one place and collect points until you are happy. The display should show current PDOP/HDOP and expected accuracy and number of readings used to create tehe point. Preferences should include storing all data used to create the averaged point.&lt;br /&gt;
&lt;br /&gt;
'''Points, lines and polygons.''' You should be able to collect all three. A typical use for polygons is to walk around a space while collecting GPS points to create a polygon showing the location of some physical object such as a wetland.&lt;br /&gt;
&lt;br /&gt;
== Data format and exchange ==&lt;br /&gt;
&lt;br /&gt;
The data should be stored internally in a compact form that is open or at least well documented (for example ESRI Shapefiles). Storing in XML based formats is bulky and should probably be avoided. &lt;br /&gt;
&lt;br /&gt;
There should be a desktop tool to manage transferring the data that has been collected from the smartphone to more portable exchange formats such as GPX and GML and KML. &amp;quot;GPS Office&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[Category: GPS]]&lt;/div&gt;</summary>
		<author><name>Brian H Wilson</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/GPS_Data_Logger</id>
		<title>GPS Data Logger</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/GPS_Data_Logger"/>
				<updated>2008-08-18T19:38:47Z</updated>
		
		<summary type="html">&lt;p&gt;Brian H Wilson: /* Data Logger */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page was created to address the use cases mentioned in [[GTA02 GPS]], including&lt;br /&gt;
&lt;br /&gt;
* I want to log GPS data for later analysis.&lt;br /&gt;
* I want to collect GPS data for scientific field work (forestry, biology, etc)&lt;br /&gt;
&lt;br /&gt;
The page was started on 17 August 2008 mostly as a thought exercise.&lt;br /&gt;
Please jump in and add to it.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
The typical commercial approach to managing GPS data is to create one big application that does everything well. Unfortunately everyone has a different idea of what &amp;quot;doing everything well&amp;quot; means. One person might want to use GPS to log and analyze bicycle rides while another does weed mapping and another might be doing asset management. One application cannot do all this well.&lt;br /&gt;
&lt;br /&gt;
A better approach is to break it up into a set of components. Each component can be a standalone application. This relies on some kind of multiplexer such as gpsd (does gypsy support multiplexing?) so that each app has access to the GPS data stream.&lt;br /&gt;
&lt;br /&gt;
Initially the main functions could be broken out these components.&lt;br /&gt;
&lt;br /&gt;
# A '''GPS multiplexer''' that talks to the GPS receiver and feeds data to many applications.&lt;br /&gt;
# A '''GPS Controller''' to that can talk to the mulitplexer (and hence the GPS receiver) to display status and adjust settings.&lt;br /&gt;
# A '''Data Logger''' that can run all the time and record GPS data.&lt;br /&gt;
# A '''Field Collection Tool''' that allows doing specific operations such as averaging GPS data while waiting at a point for increased accuracy and entering attributes for a point.&lt;br /&gt;
&lt;br /&gt;
== Main components ==&lt;br /&gt;
&lt;br /&gt;
=== GPS multiplexer ===&lt;br /&gt;
&lt;br /&gt;
Look at gpsd and gypsy (and the related religious wars) and either use one of them or use them for inspiration. &lt;br /&gt;
&lt;br /&gt;
Partial list of requirements for the multiplexer&lt;br /&gt;
* Control internal GPS receiver&lt;br /&gt;
* Control external GPS connected via serial port (USB or bluetooth)&lt;br /&gt;
* Feed data from the selected GPS receiver to multiple applications.&lt;br /&gt;
* Handle a RTCM stream to allow realtime DGPS postprocessing.&lt;br /&gt;
* Supply all attributes to applications, including such things as PDOP and satellites in use. (Not just time and position)&lt;br /&gt;
&lt;br /&gt;
==== External GPS ====&lt;br /&gt;
&lt;br /&gt;
There is no reason we are limited to using the built-in GPS receiver. For applications requiring more accuracy (for example sub-meter), the GPS multiplexer should be able to accept data via USB or bluetooth and feed it to our applications. The controller program should be able to handle this situation.&lt;br /&gt;
&lt;br /&gt;
=== Support for postprocessing? ===&lt;br /&gt;
&lt;br /&gt;
Real-time DGPS correction possibilities include receiving an RTCM stream from an external device, receiving RTCM over an IP connection, and WAAS. Does the Ublox receiver support RTCM? Most receivers that support it just accept a stream of data from a serial line. You don't have to reverse engineer it, you just accept data from some source such as a DGPS Beacon Receiver and feed the output to the GPS receiver and you get something approaching 1 meter accuracy.&lt;br /&gt;
&lt;br /&gt;
Postprocessed DGPS correction requires recording pseudorange data and running an application later. In the open source world this means [http://en.wikipedia.org/wiki/RINEX RINEX]. Anyone with more knowledge of RINEX should jump in and edit this section.&lt;br /&gt;
&lt;br /&gt;
=== GPS controller ===&lt;br /&gt;
&lt;br /&gt;
''I think OM gps test program (what's it called) does much of this.''&lt;br /&gt;
&lt;br /&gt;
Some GPS receivers include a feature to stop logging or to issue warnings if data quality goes too low for any reason. Where should this be handled? In the multiplexer or in the applications? Maybe the settings should be applied to the multiplexer and it should issue warnings to the applications which would then decide what to do.&lt;br /&gt;
&lt;br /&gt;
=== Data Logger ===&lt;br /&gt;
&lt;br /&gt;
The basic concept of the logger is to create a bread crumb trail as you move about. &lt;br /&gt;
It has its own preference settings to determine if points are plotted based on change in position or on a time basis or both. &lt;br /&gt;
&lt;br /&gt;
It should also be possible to set what is logged. Possibilities include time, position, bearing, velocity, elevation, pseudo-range data, HDOP, PDOP, satellites used, type of GPS, type of antenna, DGPS on/off, type of DGPS.&lt;br /&gt;
&lt;br /&gt;
The data logger would be one crucial component in an application of GPS for bicyclists (and outdoor enthusiasts like hikers and runners.) Other requirements would be a good display (to substitute for a speedometer) and a good mapping program. &lt;br /&gt;
&lt;br /&gt;
Should we expand on that on this page? It would be neat to have something that interoperates with the GPS multiplexer and the data logger so maybe we should?&lt;br /&gt;
&lt;br /&gt;
''I ride a bicycle and I use GPS as a speedometer and to do field work and I want to be able to do both with my Freerunner.'' [[User:Brian H Wilson|Brian H Wilson]] 19:38, 18 August 2008 (UTC)&lt;br /&gt;
&lt;br /&gt;
=== Field Collection Tool ===&lt;br /&gt;
&lt;br /&gt;
'''Attributes''' Mission planning should include setting up a file to be used for data collection, and that file should define attributes to be included. The data collector should be configurable to facilitate easy entry of the attribute data. For example, if you define a field to have a finite list of values, the values could be available as a drop down list.&lt;br /&gt;
&lt;br /&gt;
'''Point averaging''' Stand in one place and collect points until you are happy. The display should show current PDOP/HDOP and expected accuracy and number of readings used to create tehe point. Preferences should include storing all data used to create the averaged point.&lt;br /&gt;
&lt;br /&gt;
'''Points, lines and polygons.''' You should be able to collect all three. A typical use for polygons is to walk around a space while collecting GPS points to create a polygon showing the location of some physical object such as a wetland.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: GPS]]&lt;/div&gt;</summary>
		<author><name>Brian H Wilson</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/GPS_Data_Logger</id>
		<title>GPS Data Logger</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/GPS_Data_Logger"/>
				<updated>2008-08-18T19:36:23Z</updated>
		
		<summary type="html">&lt;p&gt;Brian H Wilson: /* Overview */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page was created to address the use cases mentioned in [[GTA02 GPS]], including&lt;br /&gt;
&lt;br /&gt;
* I want to log GPS data for later analysis.&lt;br /&gt;
* I want to collect GPS data for scientific field work (forestry, biology, etc)&lt;br /&gt;
&lt;br /&gt;
The page was started on 17 August 2008 mostly as a thought exercise.&lt;br /&gt;
Please jump in and add to it.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
The typical commercial approach to managing GPS data is to create one big application that does everything well. Unfortunately everyone has a different idea of what &amp;quot;doing everything well&amp;quot; means. One person might want to use GPS to log and analyze bicycle rides while another does weed mapping and another might be doing asset management. One application cannot do all this well.&lt;br /&gt;
&lt;br /&gt;
A better approach is to break it up into a set of components. Each component can be a standalone application. This relies on some kind of multiplexer such as gpsd (does gypsy support multiplexing?) so that each app has access to the GPS data stream.&lt;br /&gt;
&lt;br /&gt;
Initially the main functions could be broken out these components.&lt;br /&gt;
&lt;br /&gt;
# A '''GPS multiplexer''' that talks to the GPS receiver and feeds data to many applications.&lt;br /&gt;
# A '''GPS Controller''' to that can talk to the mulitplexer (and hence the GPS receiver) to display status and adjust settings.&lt;br /&gt;
# A '''Data Logger''' that can run all the time and record GPS data.&lt;br /&gt;
# A '''Field Collection Tool''' that allows doing specific operations such as averaging GPS data while waiting at a point for increased accuracy and entering attributes for a point.&lt;br /&gt;
&lt;br /&gt;
== Main components ==&lt;br /&gt;
&lt;br /&gt;
=== GPS multiplexer ===&lt;br /&gt;
&lt;br /&gt;
Look at gpsd and gypsy (and the related religious wars) and either use one of them or use them for inspiration. &lt;br /&gt;
&lt;br /&gt;
Partial list of requirements for the multiplexer&lt;br /&gt;
* Control internal GPS receiver&lt;br /&gt;
* Control external GPS connected via serial port (USB or bluetooth)&lt;br /&gt;
* Feed data from the selected GPS receiver to multiple applications.&lt;br /&gt;
* Handle a RTCM stream to allow realtime DGPS postprocessing.&lt;br /&gt;
* Supply all attributes to applications, including such things as PDOP and satellites in use. (Not just time and position)&lt;br /&gt;
&lt;br /&gt;
==== External GPS ====&lt;br /&gt;
&lt;br /&gt;
There is no reason we are limited to using the built-in GPS receiver. For applications requiring more accuracy (for example sub-meter), the GPS multiplexer should be able to accept data via USB or bluetooth and feed it to our applications. The controller program should be able to handle this situation.&lt;br /&gt;
&lt;br /&gt;
=== Support for postprocessing? ===&lt;br /&gt;
&lt;br /&gt;
Real-time DGPS correction possibilities include receiving an RTCM stream from an external device, receiving RTCM over an IP connection, and WAAS. Does the Ublox receiver support RTCM? Most receivers that support it just accept a stream of data from a serial line. You don't have to reverse engineer it, you just accept data from some source such as a DGPS Beacon Receiver and feed the output to the GPS receiver and you get something approaching 1 meter accuracy.&lt;br /&gt;
&lt;br /&gt;
Postprocessed DGPS correction requires recording pseudorange data and running an application later. In the open source world this means [http://en.wikipedia.org/wiki/RINEX RINEX]. Anyone with more knowledge of RINEX should jump in and edit this section.&lt;br /&gt;
&lt;br /&gt;
=== GPS controller ===&lt;br /&gt;
&lt;br /&gt;
''I think OM gps test program (what's it called) does much of this.''&lt;br /&gt;
&lt;br /&gt;
Some GPS receivers include a feature to stop logging or to issue warnings if data quality goes too low for any reason. Where should this be handled? In the multiplexer or in the applications? Maybe the settings should be applied to the multiplexer and it should issue warnings to the applications which would then decide what to do.&lt;br /&gt;
&lt;br /&gt;
=== Data Logger ===&lt;br /&gt;
&lt;br /&gt;
The basic concept of the logger is to create a bread crumb trail as you move about. &lt;br /&gt;
It has its own preference settings to determine if points are plotted based on change in position or on a time basis or both. &lt;br /&gt;
&lt;br /&gt;
It should also be possible to set what is logged. Possibilities include time, position, bearing, velocity, elevation, pseudo-range data, HDOP, PDOP, satellites used, type of GPS, type of antenna, DGPS on/off, type of DGPS.&lt;br /&gt;
&lt;br /&gt;
The data logger would be one crucial component in an application of GPS for bicyclists (and outdoor enthusiasts like hikers and runners.) Other requirements would be a good display (to substitute for a speedometer) and a good mapping program. &lt;br /&gt;
Should we expand on that on this page? I'd like something that interoperates with the GPS multiplexer and  the data logger so maybe we should? [[User:Brian H Wilson|Brian H Wilson]] 19:34, 18 August 2008 (UTC)&lt;br /&gt;
&lt;br /&gt;
=== Field Collection Tool ===&lt;br /&gt;
&lt;br /&gt;
'''Attributes''' Mission planning should include setting up a file to be used for data collection, and that file should define attributes to be included. The data collector should be configurable to facilitate easy entry of the attribute data. For example, if you define a field to have a finite list of values, the values could be available as a drop down list.&lt;br /&gt;
&lt;br /&gt;
'''Point averaging''' Stand in one place and collect points until you are happy. The display should show current PDOP/HDOP and expected accuracy and number of readings used to create tehe point. Preferences should include storing all data used to create the averaged point.&lt;br /&gt;
&lt;br /&gt;
'''Points, lines and polygons.''' You should be able to collect all three. A typical use for polygons is to walk around a space while collecting GPS points to create a polygon showing the location of some physical object such as a wetland.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: GPS]]&lt;/div&gt;</summary>
		<author><name>Brian H Wilson</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/GPS_Data_Logger</id>
		<title>GPS Data Logger</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/GPS_Data_Logger"/>
				<updated>2008-08-18T19:34:53Z</updated>
		
		<summary type="html">&lt;p&gt;Brian H Wilson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page was created to address the use cases mentioned in [[GTA02 GPS]], including&lt;br /&gt;
&lt;br /&gt;
* I want to log GPS data for later analysis.&lt;br /&gt;
* I want to collect GPS data for scientific field work (forestry, biology, etc)&lt;br /&gt;
&lt;br /&gt;
The page was started on 17 August 2008 mostly as a thought exercise.&lt;br /&gt;
Please jump in and add to it.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
The typical commercial approach is to create one big application that does everything well. Unfortunately everyone has a different idea of what &amp;quot;doing everything well&amp;quot; means. One person might want to use GPS to log and analyze bicycle rides while another does weed mapping and another might be doing asset management. One application cannot do all this well.&lt;br /&gt;
&lt;br /&gt;
A better approach is to break it up into a set of components. Each component can be a standalone application. This relies on some kind of multiplexer such as gpsd (does gypsy support this?) so that each app has access to the GPS data stream.&lt;br /&gt;
&lt;br /&gt;
Initially the main functions could be broken out these components.&lt;br /&gt;
&lt;br /&gt;
# A '''GPS multiplexer''' that talks to the GPS receiver and feeds data to many applications.&lt;br /&gt;
# A '''GPS Controller''' to that can talk to the mulitplexer (and hence the GPS receiver) to display status and adjust settings.&lt;br /&gt;
# A '''Data Logger''' that can run all the time and record GPS data.&lt;br /&gt;
# A '''Field Collection Tool''' that allows doing specific operations such as averaging GPS data while waiting at a point for increased accuracy and entering attributes for a point.&lt;br /&gt;
&lt;br /&gt;
== Main components ==&lt;br /&gt;
&lt;br /&gt;
=== GPS multiplexer ===&lt;br /&gt;
&lt;br /&gt;
Look at gpsd and gypsy (and the related religious wars) and either use one of them or use them for inspiration. &lt;br /&gt;
&lt;br /&gt;
Partial list of requirements for the multiplexer&lt;br /&gt;
* Control internal GPS receiver&lt;br /&gt;
* Control external GPS connected via serial port (USB or bluetooth)&lt;br /&gt;
* Feed data from the selected GPS receiver to multiple applications.&lt;br /&gt;
* Handle a RTCM stream to allow realtime DGPS postprocessing.&lt;br /&gt;
* Supply all attributes to applications, including such things as PDOP and satellites in use. (Not just time and position)&lt;br /&gt;
&lt;br /&gt;
==== External GPS ====&lt;br /&gt;
&lt;br /&gt;
There is no reason we are limited to using the built-in GPS receiver. For applications requiring more accuracy (for example sub-meter), the GPS multiplexer should be able to accept data via USB or bluetooth and feed it to our applications. The controller program should be able to handle this situation.&lt;br /&gt;
&lt;br /&gt;
=== Support for postprocessing? ===&lt;br /&gt;
&lt;br /&gt;
Real-time DGPS correction possibilities include receiving an RTCM stream from an external device, receiving RTCM over an IP connection, and WAAS. Does the Ublox receiver support RTCM? Most receivers that support it just accept a stream of data from a serial line. You don't have to reverse engineer it, you just accept data from some source such as a DGPS Beacon Receiver and feed the output to the GPS receiver and you get something approaching 1 meter accuracy.&lt;br /&gt;
&lt;br /&gt;
Postprocessed DGPS correction requires recording pseudorange data and running an application later. In the open source world this means [http://en.wikipedia.org/wiki/RINEX RINEX]. Anyone with more knowledge of RINEX should jump in and edit this section.&lt;br /&gt;
&lt;br /&gt;
=== GPS controller ===&lt;br /&gt;
&lt;br /&gt;
''I think OM gps test program (what's it called) does much of this.''&lt;br /&gt;
&lt;br /&gt;
Some GPS receivers include a feature to stop logging or to issue warnings if data quality goes too low for any reason. Where should this be handled? In the multiplexer or in the applications? Maybe the settings should be applied to the multiplexer and it should issue warnings to the applications which would then decide what to do.&lt;br /&gt;
&lt;br /&gt;
=== Data Logger ===&lt;br /&gt;
&lt;br /&gt;
The basic concept of the logger is to create a bread crumb trail as you move about. &lt;br /&gt;
It has its own preference settings to determine if points are plotted based on change in position or on a time basis or both. &lt;br /&gt;
&lt;br /&gt;
It should also be possible to set what is logged. Possibilities include time, position, bearing, velocity, elevation, pseudo-range data, HDOP, PDOP, satellites used, type of GPS, type of antenna, DGPS on/off, type of DGPS.&lt;br /&gt;
&lt;br /&gt;
The data logger would be one crucial component in an application of GPS for bicyclists (and outdoor enthusiasts like hikers and runners.) Other requirements would be a good display (to substitute for a speedometer) and a good mapping program. &lt;br /&gt;
Should we expand on that on this page? I'd like something that interoperates with the GPS multiplexer and  the data logger so maybe we should? [[User:Brian H Wilson|Brian H Wilson]] 19:34, 18 August 2008 (UTC)&lt;br /&gt;
&lt;br /&gt;
=== Field Collection Tool ===&lt;br /&gt;
&lt;br /&gt;
'''Attributes''' Mission planning should include setting up a file to be used for data collection, and that file should define attributes to be included. The data collector should be configurable to facilitate easy entry of the attribute data. For example, if you define a field to have a finite list of values, the values could be available as a drop down list.&lt;br /&gt;
&lt;br /&gt;
'''Point averaging''' Stand in one place and collect points until you are happy. The display should show current PDOP/HDOP and expected accuracy and number of readings used to create tehe point. Preferences should include storing all data used to create the averaged point.&lt;br /&gt;
&lt;br /&gt;
'''Points, lines and polygons.''' You should be able to collect all three. A typical use for polygons is to walk around a space while collecting GPS points to create a polygon showing the location of some physical object such as a wetland.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: GPS]]&lt;/div&gt;</summary>
		<author><name>Brian H Wilson</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/GPS_Data_Logger</id>
		<title>GPS Data Logger</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/GPS_Data_Logger"/>
				<updated>2008-08-18T18:39:07Z</updated>
		
		<summary type="html">&lt;p&gt;Brian H Wilson: New page: This page addresses the use cases mentioned in GTA02 GPS, including           Category: GPS&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page addresses the use cases mentioned in [[GTA02 GPS]], including&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: GPS]]&lt;/div&gt;</summary>
		<author><name>Brian H Wilson</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/GPS_applications</id>
		<title>GPS applications</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/GPS_applications"/>
				<updated>2008-08-18T18:37:34Z</updated>
		
		<summary type="html">&lt;p&gt;Brian H Wilson: /* Use cases */  Removed link to email that was not really relevant. Added link to new data logger page.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Possible GPS applications ==&lt;br /&gt;
&lt;br /&gt;
As people develop more sophisticated GPS applications, please note them here.&lt;br /&gt;
&lt;br /&gt;
=== Use cases ===&lt;br /&gt;
&lt;br /&gt;
* I want to look at maps. &lt;br /&gt;
* I want to be able to prepare data and load my own maps.&lt;br /&gt;
* I want to load map data in a WKB (well known binary) format such as shapefiles.&lt;br /&gt;
* I want to go somewhere; please tell me how to get there. Routing.&lt;br /&gt;
* I want to help with the [[Openstreetmap]] project by collecting data.&lt;br /&gt;
* I want to use [[Openstreetmap]] data in a map viewer.&lt;br /&gt;
* I want to use the smartphone GPS to go [[Geocaching]]&lt;br /&gt;
* I want the GPS to update profile settings based on my location. Example, mute the phone ringer when I am at work.&lt;br /&gt;
* I want to log GPS data for later analysis. [[GPS Data Logger]]&lt;br /&gt;
* I want to collect GPS data for scientific field work (forestry, biology, etc)&lt;br /&gt;
&lt;br /&gt;
=== Applications software ===&lt;br /&gt;
&lt;br /&gt;
'''Please note if a program works or if it's vapourware.'''&lt;br /&gt;
&lt;br /&gt;
* Cairo-based mapping (I wonder what this is?)&lt;br /&gt;
* [http://www.kflog.org/cumulus/ Cumulus] GPS software for glider pilots (and pilots in general), has a port for Qtopia and pulls (world) maps from the KFLog flight planner project. I think someone has put a project like this on the projects website * [http://wiki.openstreetmap.org/index.php/Pyroute Pyroute] is a routing program written in Python by Ojw, and a mobile phone GUI for maps, GPS, and routing.&lt;br /&gt;
:* [http://wiki.openstreetmap.org/index.php/Rana Ran&amp;amp;aacute;] is the new version of pyroute&lt;br /&gt;
* [http://wiki.openstreetmap.org/index.php/Gosmore Gosmore] is a routing and viewer of OSM XML data such as the planet.osm.&lt;br /&gt;
* [[GPS Sight]], a popular Openmoko project under LGPL.&lt;br /&gt;
* [[GPS-Trail]] a simple trail logger.&lt;br /&gt;
* [[GPS_Navigation#roadmap|roadmap]] mapping system using freely available maps (US census TIGER, DGLib, shapefiles).&lt;br /&gt;
* [[Navit]] a car navigation system with routing engine.&lt;br /&gt;
* [http://svn.projects.openmoko.org/svnroot/openmoko-agpsui Openmoko AGPS UI project].* [[Orrery]], an unpopular Openmoko project for displaying the night sky.&lt;br /&gt;
* [[qpegps]] qtopia (arm PDA) based map viewer with gps features&lt;br /&gt;
* [[QMapControl]] Qtopia based mapping widget. Displays maps and custom data, also other widgets can be bound to coordinates. GPS parser for the gllin output included.&lt;br /&gt;
[http://projects.openmoko.org/projects/openvario/ here].&lt;br /&gt;
* [http://www.tangogps.org TangoGPS] mapping program. Downloads maps on demand and caches them, very efficient. '''Works very well.'''&lt;/div&gt;</summary>
		<author><name>Brian H Wilson</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Manually_using_GPS</id>
		<title>Manually using GPS</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Manually_using_GPS"/>
				<updated>2008-08-15T20:34:33Z</updated>
		
		<summary type="html">&lt;p&gt;Brian H Wilson: Manually using GPS moved to GPS on the Neo 1973: THe page name did not make any sense and info is only for the Neo 1973&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[GPS on the Neo 1973]]&lt;/div&gt;</summary>
		<author><name>Brian H Wilson</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/GPS_on_the_Neo_1973</id>
		<title>GPS on the Neo 1973</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/GPS_on_the_Neo_1973"/>
				<updated>2008-08-15T20:34:33Z</updated>
		
		<summary type="html">&lt;p&gt;Brian H Wilson: Manually using GPS moved to GPS on the Neo 1973: THe page name did not make any sense and info is only for the Neo 1973&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Neo1973 device contains an integrated GPS. The particular device&lt;br /&gt;
is marketed as an AGPS, and there is some [[Hardware:AGPS |&lt;br /&gt;
discussion]] available as to what significance that &amp;quot;A&amp;quot; might have.&lt;br /&gt;
&lt;br /&gt;
All purchased phones do not include the GPS binary driver.  [http://lists.openmoko.org/pipermail/community/2007-July/008466.html] &lt;br /&gt;
But finally, as described in [[November_29%2C_2007_Community_Update]], the binary driver is available to the community now.&lt;br /&gt;
&lt;br /&gt;
There is an ongoing effort to write a Free Software&lt;br /&gt;
program that could be used instead of this binary-only program. See&lt;br /&gt;
[[Hammerhead/Protocol]] for details and the latest status.&lt;br /&gt;
&lt;br /&gt;
== Quick test (driver output to console) on Neo1973 Phase 1 ==&lt;br /&gt;
''Main article: [[Getting GPS console output with gllin]]''&lt;br /&gt;
&lt;br /&gt;
To get the output of this driver, read the file /tmp/nmeaNP (it is actually a pipe, not a file). The simplest way is to open another ssh connection to the phone and use cat:&lt;br /&gt;
 cat /tmp/nmeaNP&lt;br /&gt;
&lt;br /&gt;
This way it is possible to see the first results very easily.&lt;br /&gt;
&lt;br /&gt;
== The &amp;quot;GPS Sight&amp;quot; program with graphic interface ==&lt;br /&gt;
''Main article: [[GPS Sight]]''&lt;br /&gt;
&lt;br /&gt;
There is also a working open source GPS preview program to get the gllin output to the graphical environment. It can immediately show the location, altitude, speed and curved distance from selected point. This program can also draw the covered path (no background map). &lt;br /&gt;
&lt;br /&gt;
== The old program in /home/root/DM2/gps ==&lt;br /&gt;
''Main article - [[Phase 1 GPS driver]]''&lt;br /&gt;
&lt;br /&gt;
In the very early shipment to 50 Phase 1 developers, a binary-only program for talking to the the GPS was accidentally included &lt;br /&gt;
in /home/root/DM2/gps, (and presumably, the same binary would function on a P0 device). It was compiled to OABI format which now is obsolete as OM2007.2 builds are in EABI format, but developers suggested tricks to run it with ''chroot''. These approaches seem now obsolete and the old binary seems even no longer easily available.&lt;br /&gt;
&lt;br /&gt;
== Bluetooth GPS ==&lt;br /&gt;
&lt;br /&gt;
He also [http://pavelmachek.livejournal.com/39659.html succeeded]&lt;br /&gt;
at getting the Neo1973 to act like a bluetooth GPS with the following&lt;br /&gt;
script: (Note that this script has bad problems if you run it more than once. You can get a &amp;quot;time traveling GPS&amp;quot; effect, with the GPS showing you your past position).&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 killall rfcomm tail&lt;br /&gt;
 mknod /dev/rfcomm0 c 216 0&lt;br /&gt;
 echo 1 &amp;gt; /sys/devices/platform/s3c2410-i2c/i2c-0/0-0008/gta01-pm-bt.0/power_on&lt;br /&gt;
 sleep 1&lt;br /&gt;
 hciconfig hci0 up name linuxgps&lt;br /&gt;
 sleep 1&lt;br /&gt;
 sdpd&lt;br /&gt;
 sleep 1&lt;br /&gt;
 sdptool add SP&lt;br /&gt;
 (&lt;br /&gt;
         while true; do&lt;br /&gt;
         rfcomm listen /dev/rfcomm0 1&lt;br /&gt;
         sleep 1&lt;br /&gt;
         done&lt;br /&gt;
 ) &amp;amp;&lt;br /&gt;
 (&lt;br /&gt;
         while true; do&lt;br /&gt;
             tail -f /tmp/gps.nmea &amp;gt; /dev/rfcomm0&lt;br /&gt;
             echo 1 &amp;gt; /sys/class/leds/gta01\:vibrator/brightness&lt;br /&gt;
             sleep 1&lt;br /&gt;
             echo 0 &amp;gt; /sys/class/leds/gta01\:vibrator/brightness&lt;br /&gt;
         done&lt;br /&gt;
 ) &amp;amp;&lt;br /&gt;
&lt;br /&gt;
== Using UDP ==&lt;br /&gt;
&lt;br /&gt;
gllin sends a udp packet per nmea sentence on port 6000. this is a much cleaner aproach because using files will fill up memory or rootfs (the latter will result in the need for reflashing).&lt;br /&gt;
&lt;br /&gt;
i switch off writing to /tmp/nmeaNP and logging to log/... with&lt;br /&gt;
&lt;br /&gt;
 -np&lt;br /&gt;
 -nmea&lt;br /&gt;
&lt;br /&gt;
the help says that -nmea is the default, fact is that gllin logs nmea sentences into ./log/&amp;lt;date&amp;gt; wich will fill up mem or rootfs for long running tests. the following python script reads the nmea sentences (you need to have python-io installed to get the socket module):&lt;br /&gt;
&lt;br /&gt;
 #!/usr/bin/python&lt;br /&gt;
 import sys&lt;br /&gt;
 import socket&lt;br /&gt;
 s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)&lt;br /&gt;
 s.bind(('127.0.0.1', 6000))&lt;br /&gt;
 while True:&lt;br /&gt;
     line = s.recv(1024)&lt;br /&gt;
     sys.stdout.write(line)&lt;br /&gt;
     sys.stdout.flush()&lt;br /&gt;
&lt;br /&gt;
the program just prints those to stdout but other methods are possible (i feed them into a NMEA parser).&lt;br /&gt;
&lt;br /&gt;
benefits are that both programs can be started and stopped at will. none needs the other. gllin will not terminate if /tmp/nmeaNP is not there or not read from. the `cat /tmp/nmeaNP | gzip &amp;gt; gps.gz` is a useless idea anyway because the files in log/ (current directory) contains the NMEA data already.&lt;br /&gt;
&lt;br /&gt;
== NMEA ==&lt;br /&gt;
The ouput from the binary driver seems to follow the NMEA standard. &lt;br /&gt;
&lt;br /&gt;
Some information about it is available at [http://gpsinformation.org/dale/nmea.htm gpsinformation.org] and on [http://en.wikipedia.org/wiki/NMEA Wikipedia].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:GPS]]&lt;/div&gt;</summary>
		<author><name>Brian H Wilson</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Getting_GPS_console_output_with_gllin</id>
		<title>Getting GPS console output with gllin</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Getting_GPS_console_output_with_gllin"/>
				<updated>2008-08-15T20:31:48Z</updated>
		
		<summary type="html">&lt;p&gt;Brian H Wilson: Added intro comment&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[gllin]] is the driver used to access GPS data in the Neo 1973. If you have a Freerunner you don't need to look at this page.&lt;br /&gt;
&lt;br /&gt;
== How to see gllin output ==&lt;br /&gt;
&lt;br /&gt;
This page describes the &amp;quot;quick start&amp;quot; procedure allowing to see the first output and actually use the GPS device in the command line mode, using the [[gllin]] driver.&lt;br /&gt;
&lt;br /&gt;
After you download and install the gllin_1.0+r350-r0_fic-gta01.ipk (or similar), it creates the folder 'gllin' in the root home. This folder contains the executable with the same name which starts the driver.&lt;br /&gt;
&lt;br /&gt;
To get the output of this driver, read the file /tmp/nmeaNP (it is actually a pipe, not a file). The simplest way is to open another ssh connection to the phone and use cat:&lt;br /&gt;
 cat /tmp/nmeaNP&lt;br /&gt;
Type cat ''after'' you start the gllin, not before. The output from the GPS driver looks like&lt;br /&gt;
 $GPRMC,235946.99,V,,,,,,,120180,,,N*78&lt;br /&gt;
 $GPGSA,A,1,,,,,,,,,,,,,11.2,5.0,10.0*36&lt;br /&gt;
 $GPGGA,235946.99,,,,,00,00,5.0,,M,0.0001999,M,0.0020199,*57&lt;br /&gt;
 (and so on). &lt;br /&gt;
&lt;br /&gt;
The data are presented in [http://gpsinformation.org/dale/nmea.htm NMEA format] which gives a lot of data. The coordinates themselves are reported with the two messages (GPRMC and GPGGA) that are described below. Both messages occur in the normal output (also in conditions when the the device does not see any satellites and cannot give actually report the coordinates). They consist of multiple comma separated fields. Even numeric fields like coordinates under some circumstances are empty. Empty fields are easy to recognize because commas are included anyway. &lt;br /&gt;
&lt;br /&gt;
Below we discuss both messages, giving the real examples that were taken in  surroundings of Zurich (official coordinates 47°22′N, 8°33′E with approximate elevation about 408 m) early morning (about 6:44 UTC), in the 8th of January 2008.&lt;br /&gt;
&lt;br /&gt;
== GPRMC message ==&lt;br /&gt;
GPRMC tels the latitude, longitude, speed, time and date. Hence the proper signal could also be used to set up the clock. If the device can see the satellites, the message looks like&lt;br /&gt;
&lt;br /&gt;
GPRMC,064459.00,A,4723.078551,N,00831.004788,E,000.0,000.0,080108,,,A*50&lt;br /&gt;
&lt;br /&gt;
Where:&lt;br /&gt;
*'''064459.00'''    Fix taken at 6:44:59.00 UTC (early morning)&lt;br /&gt;
*'''A'''            '''A''' for the normal (active) message or '''V''' for the void message. Void messages are described below.&lt;br /&gt;
*'''4723.078551,N'''   Latitude 47 degrees 23.078551 minutes North.&lt;br /&gt;
*'''00831.004788,E'''  Longitude 8 degrees 31.004788 minutes East&lt;br /&gt;
*'''000.0'''        Ground speed in knots (we are just standing in place). Multiply by 1.852 to get kilometers per hour.&lt;br /&gt;
*'''000.0'''        Track angle in degrees&lt;br /&gt;
*'''080108'''       Date - 8th of January 2008 (year goes last, 240307 is 24th of March 2007)&lt;br /&gt;
*'''(empty)'''      Would be magnetic variation&lt;br /&gt;
*'''&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;50'''           The checksum, begins with *&lt;br /&gt;
&lt;br /&gt;
If the device cannot see the satellites properly (it usually does not work indoors unless very close to the window), it puts 'V' (void) at the output. In this case the GPRMC messages look like&lt;br /&gt;
&lt;br /&gt;
GPRMC,114031.52,V,,,,,,,120108,,,N*76&lt;br /&gt;
&lt;br /&gt;
In this case it is necessary to go to the more open place. It may take several minutes before device reports the correct location.&lt;br /&gt;
&lt;br /&gt;
== GPGGA message ==&lt;br /&gt;
This message does not tell the speed but it tells the number of satellites, estimates the quality and gives the altitude. The message looks like &lt;br /&gt;
&lt;br /&gt;
GPGGA,064458.00,4723.078480,N,00831.004426,E,1,06,1.0,464.0,M,0.271000,M,0.0100505,*42 &lt;br /&gt;
&lt;br /&gt;
Here&lt;br /&gt;
*'''064458.00'''    Current time is 06:44:54 UTC (the test was done early morning)&lt;br /&gt;
*'''4723.078480,N'''   Latitude 47 degrees 23.078480 seconds North&lt;br /&gt;
*'''00831.004426'''  Longitude 8 deg 31.004426 seconds East&lt;br /&gt;
*'''1'''            Fix quality: 0 = invalid, 1 = GPS fix (SPS),                               2 = DGPS fix, 3 = PPS fix, 4 = Real Time Kinematic, 5 = Float RTK,                               6 = estimated, 7 = manual input, 8 = simulation mode&lt;br /&gt;
*'''06'''           Number of satellites being tracked (six are seen)&lt;br /&gt;
*'''1.0'''          Horizontal dilution of position&lt;br /&gt;
*'''464.0,M'''      Altitude (in meters) above mean sea level. &lt;br /&gt;
*'''0.271000, M'''       Height of geoid (mean sea level) above WGS84 ellipsoid&lt;br /&gt;
*'''0.0100505''' time in seconds since last DGPS update&lt;br /&gt;
* Following the spec, next should go the  DGPS station ID number but seems missing.&lt;br /&gt;
* '''&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;42''' the checksum, always begins with *&lt;br /&gt;
&lt;br /&gt;
If the device cannot see the satellites properly it reports the zero quality. The number of satellites can also be checked. For instance, the device indoors may report:&lt;br /&gt;
&lt;br /&gt;
GPGGA,120213.58,,,,,00,00,1.0,,M,0.0001999,M,0.0020599,*56&lt;br /&gt;
&lt;br /&gt;
Which means that the UTM time is 12:02:13.58 (correct), the quality is 0 and no any satellites can be seen. This explains why the coordinate fields are empty.&lt;br /&gt;
&lt;br /&gt;
== Using grep ==&lt;br /&gt;
The trivial way to concentrate on one type of the GPS messages is to use grep which is installed in the phone:&lt;br /&gt;
 cat /tmp/nmeaNP | grep GPRMC&lt;br /&gt;
&lt;br /&gt;
From other interesting messages, device emits GPGSV (detailed information about satellites and where they are in the sky). See [http://gpsinformation.org/dale/nmea.htm NMEA documenation] for details.&lt;br /&gt;
&lt;br /&gt;
== Using awk ==&lt;br /&gt;
The awk tool provides some more elegant parsing capabilities.  For example, find your current location with&lt;br /&gt;
 awk -F, '/\$GPGGA/ {print (substr($3,0,2) + (substr($3,3) / 60.0)) $4,  (substr($5,0,3) + (substr($5,4) / 60.0)) $6}' /tmp/nmeaNP&lt;br /&gt;
&lt;br /&gt;
[[Category:GPS]]&lt;br /&gt;
[[Category:Application Developer]]&lt;/div&gt;</summary>
		<author><name>Brian H Wilson</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Hammerhead/Protocol</id>
		<title>Hammerhead/Protocol</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Hammerhead/Protocol"/>
				<updated>2008-08-15T20:28:18Z</updated>
		
		<summary type="html">&lt;p&gt;Brian H Wilson: Added intro&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hammerhead is the GPS receiver chip used in the Neo 1973. The only way currently to use it is via a closed-source binary program. This page describes efforts to write an open source driver. (Mostly abandoned since the release of the Neo Freerunner which uses a different chipsset) &lt;br /&gt;
&lt;br /&gt;
== Repository ==&lt;br /&gt;
&lt;br /&gt;
We have set up a SCM repository for experimental code and documentation at http://projects.linuxtogo.org/projects/sphyrna.&lt;br /&gt;
&lt;br /&gt;
[[User:mmontour]] has created a quick and dirty gtk program called 'satscan' which performs the first steps of a cold-start acquisition. It scans through the satellite numbers 8 at a time in several different frequency bands, and displays a symbol on the screen indicating the strength of each signal. The program (which includes portions of 'hhtest.c') is available here: [http://members.shaw.ca/mmontour/satscan/]. Description/screenshots are  &lt;br /&gt;
&lt;br /&gt;
[http://openmoko.togaware.com/survivor/SatScan.html]&lt;br /&gt;
&lt;br /&gt;
== Background resources ==&lt;br /&gt;
&lt;br /&gt;
Christian did some stracing on TomTom device, and result is great logs at http://www.maintech.de/download/hammerhead-strace.log . 'pH5' on IRC has put up some traces at http://linuxtogo.org/~ph5/tmp/gllin (a cold start, a hot start and a somewhat longer trace). He even has a software that can init and send command to phase-1 openmoko device in http://linuxtogo.org/~ph5/tmp/hhtest.c . (Please use strace -s9999 -x to produce traces).  http://folks.o-hand.com/andrew/strace-schwartz-oabi is a log of all library calls (i.e. a superset of system calls) made by gllin during a hot start and acquiring the time (but no fix), except acos() because printing all acos() calls would fill gigabytes per second.&lt;br /&gt;
&lt;br /&gt;
A file giving doppler information on the above longtrace NMEA is on [http://www.mauve.plus.com/gps].&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/GPS_signals GPS signals at wikipedia] seems to be required reading for very basics, along with  [http://www.colorado.edu/geography/gcraft/notes/gps/gps.html this page from University of Colorado] for more in depth stuff.&lt;br /&gt;
&lt;br /&gt;
http://home.earthlink.net/~cwkelley/ has sources for open-source GPS receiver, and &lt;br /&gt;
http://home.earthlink.net/~cwkelley/documentation.htm is its documentation.&lt;br /&gt;
&lt;br /&gt;
https://okeefesrv.geomatics.ucalgary.ca/essentials/index.html provides a library of useful GPS-related algorithms under a 3-clause BSD license. &lt;br /&gt;
&lt;br /&gt;
GP2021 is &amp;quot;dumb&amp;quot; GPS receiver, similar to hammerhead. (But I think it communicates over ISA bus, not over serial). However, its data sheets are freely available. Well, hammerhead marketing tells us that their GPS chip is something special, http://www.gpsworld.com/gpsworld/article/articleDetail.jsp?id=3053 . It seems to differ from &amp;quot;dumb&amp;quot; receivers by doing code phase search in hardware, directly.&lt;br /&gt;
&lt;br /&gt;
There is an interesting paper on increasing accuracy of commercial GPSs that may be applicable. [http://www.ion.org/search/view_abstract.cfm?jp=j&amp;amp;idno=2439].&lt;br /&gt;
Other interesting papers. [http://gauss.gge.unb.ca/papers.pdf/iongpsgnss2003.beran.pdf] [http://topo.epfl.ch/documents/EuroSDR/beran05.pdf] &lt;br /&gt;
&lt;br /&gt;
=== Packet format &amp;amp; comm protocol ===&lt;br /&gt;
&lt;br /&gt;
See sphyrna project for up-to-date decoding info.&lt;br /&gt;
&lt;br /&gt;
[[Category:GPS]]&lt;/div&gt;</summary>
		<author><name>Brian H Wilson</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Neo_1973_hardware</id>
		<title>Neo 1973 hardware</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Neo_1973_hardware"/>
				<updated>2008-08-15T20:26:07Z</updated>
		
		<summary type="html">&lt;p&gt;Brian H Wilson: /* AGPS */  Fixed link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Box}}&lt;br /&gt;
&lt;br /&gt;
[[Openmoko]] is a software distribution stack that sits on top of a [[hardware]] platform.  The [[Neo1973]] phone is the first hardware platform to take advantage of Openmoko.  You can find specifics of the [[:Category:Neo1973 Hardware | Neo1973 Hardware]] by reviewing this introduction page and the pages in the category as shown at the bottom of this page.&lt;br /&gt;
&lt;br /&gt;
'''Note that this page is about the first Openmoko phone which is now discontinued. See details on the second Openmoko phone at this page - [[Neo FreeRunner GTA02 Hardware]].'''&lt;br /&gt;
&lt;br /&gt;
[[Image:Gta01b v3 top.jpg|thumb|400px|display (top) side]]&lt;br /&gt;
[[Image:Gta01b v3 bottom.jpg|thumb|400px|component (back) side]]&lt;br /&gt;
&lt;br /&gt;
==User experiences of Phase 0 hardware==&lt;br /&gt;
[[Wishlist:Neo1973_P0_Review]]&lt;br /&gt;
&lt;br /&gt;
==User reports of robustness==&lt;br /&gt;
User experiences - drops onto concrete - ... [[Neo1973 Robustness]]&lt;br /&gt;
&lt;br /&gt;
== Physical Dimensions ==&lt;br /&gt;
* 120.7 x 62 x 18.5 mm (4.75 x 2.44 x 0.728 inch)&lt;br /&gt;
* 184 +/- 5 g (6.5 ounces)&lt;br /&gt;
* For the purposes of acquiring/cutting a properly sized screen protector, the display hole of the case is about 45 x 59 mm, while the top cover internal frame can house up to a 53 x 74 mm protector; sizes much larger than the display hole would obviously necessitate removing the front cover for installation.&lt;br /&gt;
* A Useful size comparison between the Neo1973, iPhone, Motorola A1200 and the SEM600i can be seen at [http://www.sizeasy.com/page/size_comparison/5512-Neo1973-vs-Apple-iPhone-vs-M600i-2-vs-A-1200 sizeasy]&lt;br /&gt;
&lt;br /&gt;
== Main components ==&lt;br /&gt;
=== Processor ===&lt;br /&gt;
The main Processor (CPU) of the Neo1973 is a Samsung S3C2410AL-26 (Capable of running up to 266 MHz)&lt;br /&gt;
&lt;br /&gt;
* Product Homepage: [http://www.samsung.com/global/business/semiconductor/productInfo.do?fmly_id=229&amp;amp;partnum=S3C2410 S3C2410.htm]&lt;br /&gt;
* User Manual: [http://www.samsung.com/global/business/semiconductor/productRightMenuDown.do?doc_file=26537 2410UserManual.pdf]&lt;br /&gt;
* Core: ARM920T&lt;br /&gt;
* Instruction Set: ARMv4&lt;br /&gt;
* BSDL File: [http://www.samsung.com/global/business/semiconductor/productRightMenuDown.do?doc_file=26554 S3C2410_BGA_BSDLJTAGFILE.bsd]&lt;br /&gt;
* GPIO Assignments: https://svn.openmoko.org/trunk/doc/hardware/GTA01Bv4/gpio.txt&lt;br /&gt;
&lt;br /&gt;
=== Flash ===&lt;br /&gt;
64MB Samsung NAND flash (K9F1208U0B) attached to S3C2410 NAND controller.&lt;br /&gt;
&lt;br /&gt;
* Product Homepage: [http://www.samsung.com/global/business/semiconductor/productInfo.do?fmly_id=158&amp;amp;partnum=K9F1208U0B]&lt;br /&gt;
* Data Sheet: [http://www.samsung.com/global/system/business/semiconductor/product/2007/6/11/NANDFlash/SLC_SmallBlock/512Mbit/K9F1208U0B/ds_k9f1208x0b_rev03.pdf]&lt;br /&gt;
* Connected to: S3C2410 NAND controller&lt;br /&gt;
&lt;br /&gt;
This is the only flash memory in the device.  The S3C2410 boots directly from nand, using the [[S3C2410 Steppingstone]].&lt;br /&gt;
&lt;br /&gt;
We only use free software, no proprietary flash file systems.  For a full description of how it is used, see [[NAND bad blocks]]&lt;br /&gt;
&lt;br /&gt;
=== RAM ===&lt;br /&gt;
128MB SDRAM (2x Samsung K4M511633C) attached to S3C2410 SDRAM controller&lt;br /&gt;
* Product Homepage: [http://www.samsung.com/global/business/semiconductor/productInfo.do?fmly_id=136&amp;amp;partnum=K4M511633C]&lt;br /&gt;
* Data Sheet: [http://www.samsung.com/global/system/business/semiconductor/product/2007/6/11/MobileSDRAM/MobileSDRSDRAM/512Mbit/K4M511633C/ds_k4m511633c.pdf]&lt;br /&gt;
* Connected to: S3C2410 &lt;br /&gt;
&lt;br /&gt;
=== GSM/GPRS ===&lt;br /&gt;
The [[GSM]] (including GPRS) modem is Texas Instruments Calypso based.&lt;br /&gt;
&lt;br /&gt;
* Connected to: S3C2410 UART1 (full-uart, RxD, TxD, CTS, RTS), /dev/ttySAC0 in userspace&lt;br /&gt;
* PM Driver: https://svn.openmoko.org/trunk/src/target/kernel/patches/gta01-power_control.patch&lt;br /&gt;
* Accessible GSM/GPRS antenna jack (if battery cover is removed)&lt;br /&gt;
&lt;br /&gt;
==== CALYPSO digital baseband ====&lt;br /&gt;
Unfortunately we cannot provide many details on the GSM chipset due to very tight NDAs.  However, this is not neccessarily required, since it interfaces using a standard UART serial line with the S3C2410.  On that interface, [http://www.3gpp.org/ftp/Specs/archive/07_series/07.05/ GSM 07.05], [http://www.3gpp.org/ftp/Specs/archive/07_series/07.10/ GSM 07.10] and other standardized protocols are used.&lt;br /&gt;
&lt;br /&gt;
==== TWL3014 analog baseband ====&lt;br /&gt;
Product Homepage: [http://focus.ti.com/general/docs/wtbu/wtbuproductcontent.tsp?templateId=6123&amp;amp;navigationId=12295&amp;amp;contentId=4703 TWL3014]&lt;br /&gt;
&lt;br /&gt;
==== TRF6151 RF Transceiver ====&lt;br /&gt;
Product Homepage: [http://focus.ti.com/general/docs/wtbu/wtbuproductcontent.tsp?templateId=6123&amp;amp;navigationId=12296&amp;amp;contentId=4701 TRF6151] &amp;lt;br&amp;gt;&lt;br /&gt;
GPRS Class12/CS4 &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [[Hardware:AGPS|AGPS]] ===&lt;br /&gt;
Hammerhead PMB 2520 AGPS from Global Locate.&lt;br /&gt;
&lt;br /&gt;
* Product Homepage: [http://www.globalocate.com/SEMICONDUCTORS/SEMI_HAMMER_Frameset.htm Hammerhead]&lt;br /&gt;
* Connected to: S3C2410 UART2 (full-uart, RxD, TxD, CTS, RTS) /dev/ttySAC1 in userspace&lt;br /&gt;
* Driver: Implemented as a binary with NMEA output suitable for the gpsd daemon ([[gpsd]])&lt;br /&gt;
* PM Driver: https://svn.openmoko.org/trunk/src/target/kernel/patches/gta01-power_control.patch&lt;br /&gt;
* Externally-accessible GPS antenna connector of type MMCX&lt;br /&gt;
&lt;br /&gt;
A binary (closed source) driver is available - see [[gllin]]. &lt;br /&gt;
Efforts to reverse engineer the protocol are partially detailed in [[Hammerhead/Protocol]], these have stalled since the announcement that the Neo FreeRunner will use a different GPS.&lt;br /&gt;
&lt;br /&gt;
=== microSD-Card ===&lt;br /&gt;
The Neo1973 has one microSD aka Transflash slot.&lt;br /&gt;
It supports SDHC.  MicroSD slot is [[Disassembling_Neo1973#Opening_back_cover|under battery]].&lt;br /&gt;
* Connected to: S3C2410 MMC/SD controller&lt;br /&gt;
* Mounted to: /media/card&lt;br /&gt;
* Driver: https://svn.openmoko.org/trunk/src/target/kernel/patches/s3c_mci.patch&lt;br /&gt;
* [[Supported microSD cards]]&lt;br /&gt;
* Specifications: [http://www.sdcard.org/confirm/confirm_memorycard.aspx SD Simplified Specification], [http://www.mmca.org/compliance/buy_spec/AN_MMCA050419.pdf MMC (partial)], [http://www.sandisk.com/Assets/File/OEM/Manuals/manual-rs-mmcv1.0.pdf MMC (product manual)]&lt;br /&gt;
&lt;br /&gt;
=== LCD Module (LCM) ===&lt;br /&gt;
This is a 2.8&amp;quot; diagonal (1.7&amp;quot; x 2.27&amp;quot; - 43mm x 58mm) 480x640 toppoly (tpo) TD028TTEC1 module (283 DPI), using a Toshiba JBT6K74 TFT LCD Driver Chipset.&lt;br /&gt;
* Homepage: [http://www.tpo.biz/ENG/business-eng/Activer-Matrix-VGA.htm Activer-Matrix-VGA.htm]&lt;br /&gt;
* Driver: https://svn.openmoko.org/trunk/src/target/kernel/patches/gta01-jbt6k74.patch&lt;br /&gt;
* Backlight Driver: https://svn.openmoko.org/trunk/src/target/kernel/patches/gta01-backlight.patch&lt;br /&gt;
* Connected to: S3C2410 Display Controller and S3C2410 SPI Interface channel 1&lt;br /&gt;
* Backlight controllable via /sys/class/backlight/gta01-bl&lt;br /&gt;
&lt;br /&gt;
==== Touch Screen ====&lt;br /&gt;
* Connected to: S3C2410 TS controller&lt;br /&gt;
* Driver: https://svn.openmoko.org/trunk/src/target/kernel/patches/s3c2410_touchscreen.patch&lt;br /&gt;
&lt;br /&gt;
==== Stylus ====&lt;br /&gt;
&lt;br /&gt;
Seemingly identical to [http://cgi.ebay.com/4in1-PDA-Stylus-LED-Light-Torch-Laser-Pointer-Pen-h7_W0QQitemZ280089656134QQihZ018QQcategoryZ48677QQrdZ1QQcmdZViewItem this one on ebay]&lt;br /&gt;
&lt;br /&gt;
=== Bluetooth ===&lt;br /&gt;
Delta DFBM-CS320 Class2 Module, using CSR BlueCore4 (V2.0+EDR).&lt;br /&gt;
&lt;br /&gt;
* Data Sheet: [http://www.delta.com.tw/product/cp/vco/BT/download/pdf/CS/2.DFBM-CS320.pdf 2.DFBM-CS320.pdf]&lt;br /&gt;
* CSR Data Sheet: [http://www.csrsupport.com/download/2302/CS-101564-DSP10%20BlueCore4-ROM%20Product%20Data%20Sheet.pdf CS-101564-DSP10 BlueCore4-ROM Product Data Sheet.pdf]&lt;br /&gt;
* Driver: Stock Linux Kernel BlueZ&lt;br /&gt;
* Connected to: S3C2410 USB Host controller (OHCI)&lt;br /&gt;
* PM Driver: https://svn.openmoko.org/trunk/src/target/kernel/patches/gta01-power_control.patch&lt;br /&gt;
&lt;br /&gt;
=== Vibrator ===&lt;br /&gt;
* Driver: https://svn.openmoko.org/trunk/src/target/kernel/patches/gta01-vibrator.patch&lt;br /&gt;
* Connected to: S3C2410 GPIO&lt;br /&gt;
* Controllable via /sys/class/leds/gta01:vibrator&lt;br /&gt;
&lt;br /&gt;
=== USB Host ===&lt;br /&gt;
The USB Host controller is inside the S3C2410&lt;br /&gt;
* Driver: Stock Linux kernel ohci_hcd&lt;br /&gt;
&lt;br /&gt;
=== USB Device ===&lt;br /&gt;
The USB Device controller is inside the S3C2410 &lt;br /&gt;
* Driver: https://svn.openmoko.org/trunk/src/target/kernel/patches/s3c2410_udc.patch&lt;br /&gt;
* Please see [[USB Product IDs]] on information about which Vendor/Product IDs we use&lt;br /&gt;
* 1200mAh lithium battery charges when connected to powered host.&lt;br /&gt;
* Mini-B connector [http://www.cypressindustries.com/enlarge.asp?Img=products/images/ccmusbb-32005-601.gif this one].&lt;br /&gt;
* This can be used as a USB host: [[Neo1973_USB_host]]&lt;br /&gt;
&lt;br /&gt;
=== I2C Devices ===&lt;br /&gt;
The I2C is a simple communication standard intended to move small amounts of data a few inches between chips.&lt;br /&gt;
Please see [[I2C | Neo I2C Devices]] for more information &amp;amp; a list of devices &amp;amp; the addresses currently in use &amp;amp; documented for the Neo1973.&lt;br /&gt;
&lt;br /&gt;
=== Audio ===&lt;br /&gt;
See also: [[Neo1973 Audio Subsystem]]&lt;br /&gt;
&lt;br /&gt;
==== Wolfson Codec ====&lt;br /&gt;
&lt;br /&gt;
''Main article: [[WM8753]]''&lt;br /&gt;
&lt;br /&gt;
There's a [[WM8753]] Wolfson Microelectronics ''codec'' (This is not a &amp;quot;smart&amp;quot; codec that can interpret MP3/... it is a simple dumb &amp;quot;sound card&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== Stereo Amplifier ====&lt;br /&gt;
There's a National Semiconductor [[LM4857]] Stereo Amplifier at the analog audio output of the WM8753&lt;br /&gt;
&lt;br /&gt;
* Product Homepage: [http://www.national.com/pf/LM/LM4857.html LM4857.html]&lt;br /&gt;
* Data Sheet: [http://www.national.com/ds.cgi/LM/LM4857.pdf LM4857.pdf]&lt;br /&gt;
* Connects to: S3C2410 I2C (Control)&lt;br /&gt;
&lt;br /&gt;
==== Analog wired Headset ====&lt;br /&gt;
There's a four-ring 2.5mm stereo jack which provides connectivity to old-fashioned wired headsets.&lt;br /&gt;
&lt;br /&gt;
The headsets used by Motorola smartphones (A780,A1200, ...) and the V-360 have a compatible configuration.&lt;br /&gt;
&lt;br /&gt;
Pinout: [http://lists.openmoko.org/pipermail/community/2008-March/013791.html]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
base = ground &lt;br /&gt;
speaker left  (internal impedance 33R) to ground. (+jackinsert detection)&lt;br /&gt;
speaker right (internal impedance 33R) to ground.&lt;br /&gt;
tip = mic electret condenser type, to ground. &lt;br /&gt;
      bias (power for mic) 2K2 from +3.3v(wolfson codec) &lt;br /&gt;
      (+HoldButton shortcircuit to ground)&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Bluetooth Headset ====&lt;br /&gt;
This one is wired via PCM bus from the CSR Bluetooth chip to the Wolfson codec.&lt;br /&gt;
&lt;br /&gt;
=== Power Management ===&lt;br /&gt;
A Philips PCF50606 is used for [[Neo1973_Power_Management|power management]].&lt;br /&gt;
&lt;br /&gt;
* Data Sheet: [http://www.nxp.com/acrobat/literature/9397/75009763.pdf PCF50606/605]&lt;br /&gt;
* User Manual: [http://www.rockbox.org/twiki/pub/Main/DataSheets/pcf50606.pdf pcf50606.pdf]&lt;br /&gt;
* Connected to: S3C2410 via I2C, client address is 0x08. &lt;br /&gt;
* Driver Source: https://svn.openmoko.org/trunk/src/target/kernel/patches/gta01-pcf50606.patch&lt;br /&gt;
&lt;br /&gt;
=== Battery ===&lt;br /&gt;
The [[Neo1973 Battery]] is compatible with a Nokia BL5C battery.&lt;br /&gt;
According to [http://lists.openmoko.org/pipermail/community/2007-February/003758.html this] post on the mailinglist.&lt;br /&gt;
[http://wiki.openmoko.org/index.php?title=Image:Neo1973-with-BL5C-battery.png Photo] of the battery inside the Neo1973.&lt;br /&gt;
&lt;br /&gt;
=== Buttons ===&lt;br /&gt;
The Neo1973 features two buttons:&lt;br /&gt;
# [[Neo1973 Power Button|The Power Button]]&lt;br /&gt;
# [[Neo1973 AUX Button|The &amp;quot;Aux&amp;quot; button]]&lt;br /&gt;
&lt;br /&gt;
=== Alternate cases ===&lt;br /&gt;
A number of alternate case designs have been suggested and requested.&lt;br /&gt;
&lt;br /&gt;
[[Neo1973 case schematics]]&lt;br /&gt;
&lt;br /&gt;
[[Alternate Neo1973 case designs]]&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
=== GTA01 ===&lt;br /&gt;
This is the most simple, non-bluetooth version of the prototype.&lt;br /&gt;
&lt;br /&gt;
==== GTA01v3 ====&lt;br /&gt;
First generation of prototypes that was given to internal OpenMoko software developers.&lt;br /&gt;
&lt;br /&gt;
Unfortunately not useful at all due to non-working touchscreen.&lt;br /&gt;
&lt;br /&gt;
* ATAG_REVISION: 0x0000130&lt;br /&gt;
&lt;br /&gt;
==== GTA01v4 ====&lt;br /&gt;
Second generation of prototypes that was given to [[User:HaraldWelte|Harald]] +[[User:Mickey|Mickey]].&lt;br /&gt;
&lt;br /&gt;
Unfortunately still not useful due to half-working touchscreen.&lt;br /&gt;
&lt;br /&gt;
* ATAG_REVISION: 0x00000140&lt;br /&gt;
&lt;br /&gt;
=== GTA01B ===&lt;br /&gt;
This is the bluetooth-enabled fork of GTA01&lt;br /&gt;
&lt;br /&gt;
==== GTA01Bv2 ====&lt;br /&gt;
This is the first produced version of the bluetooth-enabled version.&lt;br /&gt;
&lt;br /&gt;
* ATAG_REVISION: 0x00000220&lt;br /&gt;
&lt;br /&gt;
==== GTA01Bv3 ====&lt;br /&gt;
This is the second produced version of the bluetooth-enabled version. It contains mainly GPS-related fixes.&lt;br /&gt;
&lt;br /&gt;
* ATAG_REVISION: 0x00000230&lt;br /&gt;
&lt;br /&gt;
This is the version that is shipped in [[Neo1973#Phase_0_.28GTA01Bv3.29|Phase 0]].&lt;br /&gt;
&lt;br /&gt;
===== GTA01Bv3 Errata =====&lt;br /&gt;
====== PMU unable to resume from suspend ======&lt;br /&gt;
Due to use of wrong GPIO/EINT pin, the PMU cannot wake-up the phone after suspend.  This means, specifically, '''the following events can not bring the phone back from suspend-to-ram''':&lt;br /&gt;
* PMU RTC Alarm&lt;br /&gt;
* Power button press&lt;br /&gt;
* Charger events (charger insertion/removal/error)&lt;br /&gt;
* Low battery&lt;br /&gt;
&lt;br /&gt;
====== Stand-by time extremely low ======&lt;br /&gt;
This is due to a design bug resulting in at least 30mA additional standby current, since we cannot properly switch off the power supply to the S3C2410 PLL's.  There is nothing we can do to change this with post-production fixes.  GTA01Bv4 will address this issue.&lt;br /&gt;
&lt;br /&gt;
====== GSM doesn't resume phone from suspend ======&lt;br /&gt;
The GSM modem currently doesn't signalize a wakeup interrupt to the S3C2410 in case there's some noteworthy event, such as incoming call, loss of network, incoming SMS or the like.&lt;br /&gt;
&lt;br /&gt;
This is a serious issue, but can be fixed with a GSM Modem Firmware update.&lt;br /&gt;
&lt;br /&gt;
====== GSM Sidetone too loud ======&lt;br /&gt;
The local feedback sidetone (see [http://en.wikipedia.org/wiki/Sidetone]) is too loud.  This will be addressed in a GSM firmware update&lt;br /&gt;
&lt;br /&gt;
====== Bad block ======&lt;br /&gt;
Due to an error in the production process, the factory-programmed NAND bad block information has been lost.  This means that some blocks in the flash will wear out rapidly, which might become as bad as rendering the device unusable.&lt;br /&gt;
&lt;br /&gt;
==== GTA01Bv4 ====&lt;br /&gt;
This is the version that is being shipped in [[Neo1973#Phase_1_.28GTA01Bv4.29|Phase 1]]&lt;br /&gt;
&lt;br /&gt;
===== Looks =====&lt;br /&gt;
This is what the GTA01Bv4 PCB looks like without the shielding cans, which will be fitted later.&lt;br /&gt;
[[Image:Gta01b_v4_front.jpg|thumb|400px|Component side]]&lt;br /&gt;
[[Image:Gta01b_v4_back.jpg|thumb|400px|Display side]]&lt;br /&gt;
&lt;br /&gt;
===== Errata =====&lt;br /&gt;
&lt;br /&gt;
There were two versions of GTA01Bv4: some were given away (red mainboard), and some were sold (green mainboard). The given-away have [[one transistor too many]].&lt;br /&gt;
&lt;br /&gt;
===== Changes from GTA01Bv3 =====&lt;br /&gt;
# Fix all Errata items from GTA01Bv3&lt;br /&gt;
# Add I2C, SPI and one irq and wakeup capable GPIO pin to debug port plus have test pads for all these signals (for soldering wires directly on the pcb)&lt;br /&gt;
# Fix a number of production related details and minor hardware details that are not user-visible&lt;br /&gt;
&lt;br /&gt;
===GTA02===&lt;br /&gt;
The [[GTA02#.22Phase_2.22_.28GTA02.2C_.22Mass_Market.22.29|GTA02]] is now called the Neo FreeRunner and shipped within the &amp;quot;Mass Market launch&amp;quot; (see [http://wiki.openmoko.org/wiki/Neo1973#.22Phase_2.22_.28GTA02.2C_.22Mass_Market.22.29|timeline]).&lt;br /&gt;
It is a new main release with [[Neo1973:_GTA01Bv4_versus_GTA02_comparison|features added]]&lt;br /&gt;
&lt;br /&gt;
===Debug Connector===&lt;br /&gt;
This is the connector used to connect the [[Debug Board]] and possibly other hardware.&lt;br /&gt;
&lt;br /&gt;
Connections are:&lt;br /&gt;
* 39 - GND&lt;br /&gt;
* 38 - STDI&lt;br /&gt;
* 37 - _RESET&lt;br /&gt;
* 36 - STMS&lt;br /&gt;
* 35 - STCK&lt;br /&gt;
* 34 - STDO&lt;br /&gt;
* 33 - GSM_EN&lt;br /&gt;
* 29 - _STRST&lt;br /&gt;
* 19 - X_I2C_SCL (H-TP4703)&lt;br /&gt;
* 18 - X_I2C_SDA (H-TP4704)&lt;br /&gt;
* 17 - SPI_CLK0&lt;br /&gt;
* 16 - SPI_MOSI0&lt;br /&gt;
* 15 - SPI-MISO0 &lt;br /&gt;
* 14 - SS0&lt;br /&gt;
* 13 - EINT3 (H-TP4705)&lt;br /&gt;
* 3 - MODEM_TXD (H-TP4701)&lt;br /&gt;
* 2 - MODEM_RXD (H-TP4702)&lt;br /&gt;
&lt;br /&gt;
Information from [http://people.openmoko.org/roh/Debugport_GTA01bv4.png].&lt;br /&gt;
&lt;br /&gt;
===Test points===&lt;br /&gt;
&lt;br /&gt;
* GSM RTS - H-TP1531&lt;br /&gt;
* GSM CTS - H-TP1530&lt;br /&gt;
* GSM Modem on - R10818 - ungrounded end&lt;br /&gt;
* GSM_EN - R1501 (not present) - ungrounded end&lt;br /&gt;
&lt;br /&gt;
== Distinguishing hardware revisions ==&lt;br /&gt;
=== Inside the [[Bootloader]] ===&lt;br /&gt;
Every hardware revision has its own u-boot image type.  Thus, the bootloader has the revision hard-coded.&lt;br /&gt;
The hardware revision is passed on to the kernel via the ATAG mechanism (ATAG_REVISION)&lt;br /&gt;
&lt;br /&gt;
=== Inside the [[Kernel]] ===&lt;br /&gt;
The kernel receives the ATAG_REVISION during bootup, and saves its contents in the &amp;quot;system_rev&amp;quot; global variable.&lt;br /&gt;
&lt;br /&gt;
=== From Userspace ===&lt;br /&gt;
The kernel exports the system_rev variable in /proc/cpuinfo as &amp;quot;Revision :&amp;quot; line.&lt;br /&gt;
&lt;br /&gt;
??? So does GTA01Bv4 equal the cat /proc/cpuinfo output of&lt;br /&gt;
 Hardware        : GTA01&lt;br /&gt;
 Revision        : 0240&lt;br /&gt;
&lt;br /&gt;
== Approval ==&lt;br /&gt;
*CE compliance is needed before a product can be sold in the EU. The CE mark indicates that a product complies to the relevant legislation, defined in the  [http://ec.europa.eu/enterprise/newapproach/standardization/harmstds/reflist.html harmonised standards]. This refers also to the most relevant, for the Neo1973,  [http://ec.europa.eu/enterprise/newapproach/standardization/harmstds/reflist/emc.html Directive 89/336/EEC on electromagnetic compatibility] (EMC is the art of assuring [http://en.wikipedia.org/wiki/Electromagnetic_compatibility electromagnetic compatibility] between products). The standards are defined by [http://www.cenelec.org CENELEC] (European Committee for Electrotechnical Standardization), but not verified by any authority. It is the responsibilty of the manufacturer to convince himself that a product is in compliance, and is obligated to be able to prove this (with relevant technical documentation) for a specific product to the authorities on request. Whether the current Phase 1 devices are actually tested against the directives are unknown, no documentation has been disclosed, other than the fact that the devices bear the CE mark.&lt;br /&gt;
&lt;br /&gt;
*[http://www.fcc.gov/ FCC]&lt;br /&gt;
&lt;br /&gt;
===GTA01 FCC test report===&lt;br /&gt;
&lt;br /&gt;
[http://people.openmoko.org/tony_tu/GTA01/certificate/FCC/ FCC test report]&lt;br /&gt;
&lt;br /&gt;
===GTA01 CE test report===&lt;br /&gt;
&lt;br /&gt;
[http://people.openmoko.org/tony_tu/GTA01/certificate/CE/ CE test report]&lt;br /&gt;
&lt;br /&gt;
===GTA01 NCC test report===&lt;br /&gt;
&lt;br /&gt;
For Taiwan Import usage:&lt;br /&gt;
&lt;br /&gt;
[http://people.openmoko.org/tony_tu/GTA01/certificate/NCC/ NCC test report]&lt;br /&gt;
&lt;br /&gt;
[[Category:Neo1973 Hardware]]&lt;/div&gt;</summary>
		<author><name>Brian H Wilson</name></author>	</entry>

	</feed>