http://wiki.openmoko.org/api.php?action=feedcontributions&user=Brian+H+Wilson&feedformat=atomOpenmoko - User contributions [en]2015-03-03T19:18:21ZUser contributionsMediaWiki 1.19.23http://wiki.openmoko.org/wiki/Neo_1973_and_WindowsNeo 1973 and Windows2009-01-22T00:41:55Z<p>Brian H Wilson: /* Further references */</p>
<hr />
<div>''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.)''<br />
<br />
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.<br />
<br />
Please note that this is not really supported, and that the Openmoko developers themselves only use Linux for testing.<br />
<br />
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.<br />
<br />
== Connecting to the phone ==<br />
<br />
=== Bluetooth connection ===<br />
<br />
How to connect to Windows XP via Bluetooth is described here: [[Manually_using_Bluetooth#Bluetooth_networking_with_a_Windows_XP_system]]<br />
<br />
=== USB Ethernet emulation ===<br />
<br />
{{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 )}}<br />
<br />
{{note|For Windows XP USB RNDIS networking ''finally works'' as of Kernel 2.6.22.5-moko11 using the procedure described below.}}<br />
<br />
{{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.}}<br />
<br />
# 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]<br />
# 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.<br />
# Assuming the new drivers are downloaded and accessible as above, Windows should detect the Neo1973 and prompt you for a driver for a &quot;RNDIS/Ethernet Gadget&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.<br />
# Windows may complain of &quot;reduced network connectivity&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.<br />
# 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.<br />
<br />
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.<br />
List all available interfaces to get the adapter name to use:<br />
<br />
$ '''netsh interface ip show config'''<br />
''...lots of stuff here not shown, at the bottom I see my USB interface...''<br />
Configuration for interface &quot;Local Area Connection 11&quot;<br />
DHCP enabled: Yes<br />
InterfaceMetric: 0<br />
DNS servers configured through DHCP: None<br />
WINS servers configured through DHCP: None<br />
Register with which suffix: Primary only<br />
<br />
Now that you know the name of the ethernet adapter, use the command to configure it.<br />
<br />
$ '''netsh interface ip set address name=&quot;Local Area Connection 11&quot; static 192.168.0.200 255.255.255.0'''<br />
Ok.<br />
<br />
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.<br />
<br />
$ '''ping 192.168.0.202'''<br />
<br />
Pinging 192.168.0.202 with 32 bytes of data:<br />
<br />
Reply from 192.168.0.202: bytes=32 time=3ms TTL=64<br />
etc... good news!<br />
<br />
'''Getting a Blue Screen of Death (BSOD) in windows XP?''' Some extra drivers are automatically installed with new devices (e.g. &quot;SecureRemoteMiniPort&quot;). Try disabling them in the device manager while the Neo is not connected. You need to select &quot;Show hidden devices&quot; in the view menu to see them. Then reconnect the Neo.<br />
<br />
== Connection to the Internet ==<br />
<br />
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.<br />
<br />
==== Option 1, using Windows ICS ====<br />
<br />
An easy way to do this is to use Windows Internet Connection Sharing.<br />
<br />
To do this, you need to create a network bridge which contains the usb connection to the Neo.<br />
<br />
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.<br />
<br />
Then you manually set the IP address of the bridge to 192.168.0.200<br />
<br />
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.<br />
<br />
'''New''' When you have LAN with network address 192.168.0.0 you have to do some hacking.<br />
1. Edit /etc/network/interfaces and set for usb0<br />
'' address 192.168.2.202<br />
netmask 255.255.255.0<br />
network 192.168.2.0<br />
gateway 192.168.2.1<br />
''<br />
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.<br />
<br />
'''Example: Setup for wifi only internet connection (windows xp and Neo FreeRunner)'''<br />
# Once the Network Connections window shows both &quot;Wireless Network Connection Status:Connected&quot; and &quot;openmoko Status:Connected&quot; Right click on Wireless Network Connection and goto Properties. Select Advanced tab, and turn on Internet Connection sharing. Choose the openmoko network.<br />
# 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<br />
# Windows will change the ip address of openmoko network to 192.168.0.1 and the Network Connections window will show &quot;Wireless Internet Connection Status: connected,shared&quot; <br />
# Right click on openmoko network and goto Properties. Change the ip address of openmoko network to 192.168.0.200<br />
# Login to openmoko using Putty (ssh client for windows) 192.168.0.202<br />
<br />
=== Option 1.5, using a Network Bridge ===<br />
<br />
Just bridge the USB and Ethernet networks together (Win XP).<br />
<br />
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).<br />
<br />
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)<br />
<br />
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. <br />
<br />
=== Option 2, using AnalogX ===<br />
<br />
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).<br />
<br />
* 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.<br />
* Run AnalogX. The default configuration should be ok: open mode, all protocols on. <br />
* Connect your phone using the USB cable as normal.<br />
* Configure opkg to use the proxy by editing /etc/opkg.conf. There's 2 lines to uncomment and change.<br />
** option http_proxy http://192.168.0.200:6588<br />
** option ftp_proxy http://192.168.0.200:21<br />
* opkg should now work via the proxy.<br />
<br />
Other apps like [[Minimo]] can also be configured to use a proxy. Use the HTTP proxy URL as above.<br />
<br />
=== Option 3, using IP Forwarding and extra routing ===<br />
<br />
An alternative way is to do it manually:<br />
<br />
In the Windows registry, go to:<br />
Hkey_Local_Machine\System\CurrentControlSet\Services\Tcpip\Parameters<br />
and set <br />
REG_DWORD: &quot;IPEnableRouter&quot; to &quot;1&quot;<br />
Be aware that IP Forwarding can be a security risk.<br />
<br />
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.<br />
<br />
=== Option 4, using HTTP proxy at work with Putty SSH tunneling ===<br />
<br />
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-&gt;SSH-&gt;Tunnels you can add tunnel to your proxy server. For example, if proxy address is &quot;10.0.0.1:8080&quot;:<br />
Source port: 8080<br />
Destination: 10.0.0.1 <br />
Radio button: &quot;Remote&quot;<br />
Then you will only need to set http_proxy address at your 1973/Freerunner:<br />
<br />
# export http_proxy=http://localhost:8080<br />
<br />
And have Internet.<br />
<br />
== Further references ==<br />
<br />
* http://www.microsoft.com/whdc/device/network/NDIS/rndis.mspx<br />
* http://maemo.org/maemowiki/USBnetworkingWinXP<br />
* http://docwiki.gumstix.org/Setting_up_USBnet<br />
* http://handhelds.org/moin/moin.cgi/WindowsXpUsbNetworkHowTo<br />
* [http://www.petri.co.il/configure_tcp_ip_from_cmd.htm Configuring TCP/IP settings from command line]<br />
<br />
[[Category:Networking]]<br />
[[Category:Host OSes]]</div>Brian H Wilsonhttp://wiki.openmoko.org/wiki/Neo_1973_and_WindowsNeo 1973 and Windows2009-01-22T00:40:09Z<p>Brian H Wilson: </p>
<hr />
<div>''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.)''<br />
<br />
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.<br />
<br />
Please note that this is not really supported, and that the Openmoko developers themselves only use Linux for testing.<br />
<br />
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.<br />
<br />
== Connecting to the phone ==<br />
<br />
=== Bluetooth connection ===<br />
<br />
How to connect to Windows XP via Bluetooth is described here: [[Manually_using_Bluetooth#Bluetooth_networking_with_a_Windows_XP_system]]<br />
<br />
=== USB Ethernet emulation ===<br />
<br />
{{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 )}}<br />
<br />
{{note|For Windows XP USB RNDIS networking ''finally works'' as of Kernel 2.6.22.5-moko11 using the procedure described below.}}<br />
<br />
{{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.}}<br />
<br />
# 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]<br />
# 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.<br />
# Assuming the new drivers are downloaded and accessible as above, Windows should detect the Neo1973 and prompt you for a driver for a &quot;RNDIS/Ethernet Gadget&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.<br />
# Windows may complain of &quot;reduced network connectivity&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.<br />
# 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.<br />
<br />
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.<br />
List all available interfaces to get the adapter name to use:<br />
<br />
$ '''netsh interface ip show config'''<br />
''...lots of stuff here not shown, at the bottom I see my USB interface...''<br />
Configuration for interface &quot;Local Area Connection 11&quot;<br />
DHCP enabled: Yes<br />
InterfaceMetric: 0<br />
DNS servers configured through DHCP: None<br />
WINS servers configured through DHCP: None<br />
Register with which suffix: Primary only<br />
<br />
Now that you know the name of the ethernet adapter, use the command to configure it.<br />
<br />
$ '''netsh interface ip set address name=&quot;Local Area Connection 11&quot; static 192.168.0.200 255.255.255.0'''<br />
Ok.<br />
<br />
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.<br />
<br />
$ '''ping 192.168.0.202'''<br />
<br />
Pinging 192.168.0.202 with 32 bytes of data:<br />
<br />
Reply from 192.168.0.202: bytes=32 time=3ms TTL=64<br />
etc... good news!<br />
<br />
'''Getting a Blue Screen of Death (BSOD) in windows XP?''' Some extra drivers are automatically installed with new devices (e.g. &quot;SecureRemoteMiniPort&quot;). Try disabling them in the device manager while the Neo is not connected. You need to select &quot;Show hidden devices&quot; in the view menu to see them. Then reconnect the Neo.<br />
<br />
== Connection to the Internet ==<br />
<br />
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.<br />
<br />
==== Option 1, using Windows ICS ====<br />
<br />
An easy way to do this is to use Windows Internet Connection Sharing.<br />
<br />
To do this, you need to create a network bridge which contains the usb connection to the Neo.<br />
<br />
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.<br />
<br />
Then you manually set the IP address of the bridge to 192.168.0.200<br />
<br />
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.<br />
<br />
'''New''' When you have LAN with network address 192.168.0.0 you have to do some hacking.<br />
1. Edit /etc/network/interfaces and set for usb0<br />
'' address 192.168.2.202<br />
netmask 255.255.255.0<br />
network 192.168.2.0<br />
gateway 192.168.2.1<br />
''<br />
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.<br />
<br />
'''Example: Setup for wifi only internet connection (windows xp and Neo FreeRunner)'''<br />
# Once the Network Connections window shows both &quot;Wireless Network Connection Status:Connected&quot; and &quot;openmoko Status:Connected&quot; Right click on Wireless Network Connection and goto Properties. Select Advanced tab, and turn on Internet Connection sharing. Choose the openmoko network.<br />
# 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<br />
# Windows will change the ip address of openmoko network to 192.168.0.1 and the Network Connections window will show &quot;Wireless Internet Connection Status: connected,shared&quot; <br />
# Right click on openmoko network and goto Properties. Change the ip address of openmoko network to 192.168.0.200<br />
# Login to openmoko using Putty (ssh client for windows) 192.168.0.202<br />
<br />
=== Option 1.5, using a Network Bridge ===<br />
<br />
Just bridge the USB and Ethernet networks together (Win XP).<br />
<br />
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).<br />
<br />
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)<br />
<br />
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. <br />
<br />
=== Option 2, using AnalogX ===<br />
<br />
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).<br />
<br />
* 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.<br />
* Run AnalogX. The default configuration should be ok: open mode, all protocols on. <br />
* Connect your phone using the USB cable as normal.<br />
* Configure opkg to use the proxy by editing /etc/opkg.conf. There's 2 lines to uncomment and change.<br />
** option http_proxy http://192.168.0.200:6588<br />
** option ftp_proxy http://192.168.0.200:21<br />
* opkg should now work via the proxy.<br />
<br />
Other apps like [[Minimo]] can also be configured to use a proxy. Use the HTTP proxy URL as above.<br />
<br />
=== Option 3, using IP Forwarding and extra routing ===<br />
<br />
An alternative way is to do it manually:<br />
<br />
In the Windows registry, go to:<br />
Hkey_Local_Machine\System\CurrentControlSet\Services\Tcpip\Parameters<br />
and set <br />
REG_DWORD: &quot;IPEnableRouter&quot; to &quot;1&quot;<br />
Be aware that IP Forwarding can be a security risk.<br />
<br />
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.<br />
<br />
=== Option 4, using HTTP proxy at work with Putty SSH tunneling ===<br />
<br />
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-&gt;SSH-&gt;Tunnels you can add tunnel to your proxy server. For example, if proxy address is &quot;10.0.0.1:8080&quot;:<br />
Source port: 8080<br />
Destination: 10.0.0.1 <br />
Radio button: &quot;Remote&quot;<br />
Then you will only need to set http_proxy address at your 1973/Freerunner:<br />
<br />
# export http_proxy=http://localhost:8080<br />
<br />
And have Internet.<br />
<br />
== Further references ==<br />
<br />
* http://www.microsoft.com/whdc/device/network/NDIS/rndis.mspx<br />
* http://maemo.org/maemowiki/USBnetworkingWinXP<br />
* http://docwiki.gumstix.org/Setting_up_USBnet<br />
* http://handhelds.org/moin/moin.cgi/WindowsXpUsbNetworkHowTo<br />
<br />
[[Category:Networking]]<br />
[[Category:Host OSes]]</div>Brian H Wilsonhttp://wiki.openmoko.org/wiki/BrickedBricked2008-09-21T04:36:25Z<p>Brian H Wilson: /* What is/is not a 'bricked' Neo? */</p>
<hr />
<div>== What is/is not a 'bricked' Neo? ==<br />
<br />
&quot;Bricked&quot;, by analogy with &quot;as useful as a brick&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 &quot;un-brick&quot; a phone requires use of a [[Debug_Board]].<br />
<br />
Note that being &quot;bricked&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 &quot;really-dead-battery&quot;; recovery from this is described on the [[Neo FreeRunner Hardware Issues#Can't boot with discharged or missing battery|Neo FreeRunner Hardware Issues]].<br />
<br />
== Notes on a 'bricked' Neo ==<br />
<br />
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.<br />
<br />
== The Problem defined ==<br />
<br />
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<br />
<br />
usb 3-1: new full speed USB device using uhci_hcd and address 21<br />
usb 3-1: device not accepting address 21, error -110<br />
<br />
(the address number will change).<br />
<br />
So the problem was that although the device could now boot there was no way to flash it with dfu.<br />
<br />
=== The Solution ===<br />
<br />
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.<br />
<br />
==== Attempt 1 ====<br />
<br />
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.<br />
<br />
On the Neo<br />
<br />
dd if=/dev/mtdblock1 of=mtdblock1.bin<br />
<br />
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]<br />
<br />
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<br />
<br />
dd if=new_mtdblock1 of=/dev/mtdblock1<br />
<br />
again once this was done a 'reboot' was performed.<br />
<br />
==== Result 1 ====<br />
<br />
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.<br />
<br />
Powered off the Neo, powered on with AUX+POWER go give a reduced boot menu. <br />
<br />
Boot<br />
Factory reset<br />
<br />
<br />
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.<br />
<br />
<br />
'''[[User:CesarB|Cesar Barros]] points out that'''<br />
<br />
''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''<br />
<br />
which makes perfect sense.<br />
<br />
==== Attempt 2 ====<br />
<br />
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.'''<br />
<br />
==== Result 2 ====<br />
<br />
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. <br />
<br />
The final result was a perfectly fine Neo with a splash screen, working boot menu and dfu capabilities.<br />
<br />
== Discoveries ==<br />
<br />
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.<br />
<br />
<br />
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.<br />
<br />
<br />
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.<br />
<br />
== Useful information ==<br />
<br />
On your Neo:<br />
<br />
cat /proc/mtd<br />
dev: size erasesize name<br />
mtd0: 00040000 00004000 &quot;u-boot&quot;<br />
mtd1: 00004000 00004000 &quot;u-boot_env&quot;<br />
mtd2: 00200000 00004000 &quot;kernel&quot;<br />
mtd3: 000a0000 00004000 &quot;splash&quot;<br />
mtd4: 03d1c000 00004000 &quot;rootfs<br />
<br />
[[Category:Hardware]]</div>Brian H Wilsonhttp://wiki.openmoko.org/wiki/Neo_FreeRunner_BatteryNeo FreeRunner Battery2008-09-02T17:57:18Z<p>Brian H Wilson: /* What to do if your battery has become completely discharged */</p>
<hr />
<div>{{Neo FreeRunner Menu}}<br />
=== GTA02 1200 mAh Smart Battery ===<br />
<br />
*Using SANYO 1200mAh cell<br />
*Battery Technical information: [http://people.openmoko.org/tony_tu/GTA02/hardware/GTA02/CT-GTA02.pdf Detailed Battery Information]<br />
<br />
* 1200mAh Smart Battery with Coulomb-counter and protection circuit<br />
* 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.<br />
<br />
For more information, see the GTA01 battery info at [[Neo1973 Battery]]<br />
<br />
=== Notes about expected battery life ===<br />
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.<br />
<br />
== Make sure your battery never discharges completely. ==<br />
<br />
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.<br />
<br />
=== What to do if your battery has become completely discharged ===<br />
<br />
Should the battery become completely discharged, your options are: <br />
* Try booting with Wallwart USB-power supply (hold AUX button while inserting USB-plug)<br />
* Recharge the dead battery with an external stand-alone charger (compatible with the Nokia BL-5C battery) <br />
* 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. <br />
* Boot the FreeRunner with a 4.5VDC external power source (steady hand and great care involved), plug USB power, then insert the empty battery.<br />
* Charge the battery directly, [http://wiki.openmoko.org/wiki/Charging_battery_directly see here], how I did that. (Not recommended)<br />
<br />
The first option is probably the easiest and most sensible.<br />
<br />
== Compatible Replacement Batteries ==<br />
<br />
Other known FreeRunner-compatible batteries include the BL-series (BL-4X, BL-5X) from Nokia, and their third-party equivalents.<br />
These may not work to revive a device and may not report charge information.<br />
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.<br />
<br />
{| border=&quot;1&quot; cellpadding=&quot;4&quot; cellspacing=&quot;0&quot;<br />
!Battery Model<br />
!Capacity (mAh)<br />
!Charge info reported<br />
!Notes<br />
|-<br />
|NOKIA BL-4<br />
|<br />
|no<br />
|<br />
|-<br />
|NOKIA BL-4C<br />
|750<br />
|<br />
|<br />
|-<br />
|NOKIA BL-5B<br />
|760/890<br />
|<br />
|<br />
|-<br />
|NOKIA BL-5C<br />
|950<br />
|no<br />
|<br />
|-<br />
|NOKIA BL-6C<br />
|1070<br />
|no<br />
|<br />
|}<br />
<br />
== USB charger ==<br />
<br />
For information about USB battery chargers that can be used with the Neo FreeRunner see<br />
{{main|USB charger}}<br />
<br />
[[Category:Battery]]<br />
[[Category:Neo FreeRunner Hardware]]</div>Brian H Wilsonhttp://wiki.openmoko.org/wiki/Neo_FreeRunner_BatteryNeo FreeRunner Battery2008-09-02T17:55:40Z<p>Brian H Wilson: /* What to do if your battery has become completely discharged */</p>
<hr />
<div>{{Neo FreeRunner Menu}}<br />
=== GTA02 1200 mAh Smart Battery ===<br />
<br />
*Using SANYO 1200mAh cell<br />
*Battery Technical information: [http://people.openmoko.org/tony_tu/GTA02/hardware/GTA02/CT-GTA02.pdf Detailed Battery Information]<br />
<br />
* 1200mAh Smart Battery with Coulomb-counter and protection circuit<br />
* 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.<br />
<br />
For more information, see the GTA01 battery info at [[Neo1973 Battery]]<br />
<br />
=== Notes about expected battery life ===<br />
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.<br />
<br />
== Make sure your battery never discharges completely. ==<br />
<br />
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.<br />
<br />
=== What to do if your battery has become completely discharged ===<br />
<br />
Should the battery become completely discharged, your options are: <br />
* Try booting with Wallwart USB-power supply (hold AUX button while inserting USB-plug)<br />
* Recharge the dead battery with an external stand-alone charger (compatible with the Nokia BL-5C battery) <br />
* 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. <br />
* Boot the FreeRunner with a 4.5VDC external power source (steady hand and great care involved), plug USB power, then insert the empty battery.<br />
* Charge the battery directly, [http://wiki.openmoko.org/wiki/Charging_battery_directly see here], how I did that.<br />
<br />
The first option is probably the easiest and most sensible.<br />
<br />
== Compatible Replacement Batteries ==<br />
<br />
Other known FreeRunner-compatible batteries include the BL-series (BL-4X, BL-5X) from Nokia, and their third-party equivalents.<br />
These may not work to revive a device and may not report charge information.<br />
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.<br />
<br />
{| border=&quot;1&quot; cellpadding=&quot;4&quot; cellspacing=&quot;0&quot;<br />
!Battery Model<br />
!Capacity (mAh)<br />
!Charge info reported<br />
!Notes<br />
|-<br />
|NOKIA BL-4<br />
|<br />
|no<br />
|<br />
|-<br />
|NOKIA BL-4C<br />
|750<br />
|<br />
|<br />
|-<br />
|NOKIA BL-5B<br />
|760/890<br />
|<br />
|<br />
|-<br />
|NOKIA BL-5C<br />
|950<br />
|no<br />
|<br />
|-<br />
|NOKIA BL-6C<br />
|1070<br />
|no<br />
|<br />
|}<br />
<br />
== USB charger ==<br />
<br />
For information about USB battery chargers that can be used with the Neo FreeRunner see<br />
{{main|USB charger}}<br />
<br />
[[Category:Battery]]<br />
[[Category:Neo FreeRunner Hardware]]</div>Brian H Wilsonhttp://wiki.openmoko.org/wiki/Neo_FreeRunner_BatteryNeo FreeRunner Battery2008-09-02T17:52:04Z<p>Brian H Wilson: /* Compatible Replacement Batteries */</p>
<hr />
<div>{{Neo FreeRunner Menu}}<br />
=== GTA02 1200 mAh Smart Battery ===<br />
<br />
*Using SANYO 1200mAh cell<br />
*Battery Technical information: [http://people.openmoko.org/tony_tu/GTA02/hardware/GTA02/CT-GTA02.pdf Detailed Battery Information]<br />
<br />
* 1200mAh Smart Battery with Coulomb-counter and protection circuit<br />
* 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.<br />
<br />
For more information, see the GTA01 battery info at [[Neo1973 Battery]]<br />
<br />
=== Notes about expected battery life ===<br />
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.<br />
<br />
== Make sure your battery never discharges completely. ==<br />
<br />
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.<br />
<br />
=== What to do if your battery has become completely discharged ===<br />
<br />
Should the battery become completely discharged, your options are: <br />
* Try booting with Wallwart USB-power supply (hold AUX button while inserting USB-plug)<br />
* Use external stand-alone charger (compatible with the Nokia BL-5C battery) <br />
* Boot the FreeRunner with an alternative battery, or with a spare GTA01 or GTA02 battery, plug USB power, then switch to the empty battery. <br />
* Boot the FreeRunner with a 4.5VDC external power source (steady hand and great care involved), plug USB power, then insert the empty battery.<br />
* Charge the battery directly, [http://wiki.openmoko.org/wiki/Charging_battery_directly see here], how I did that.<br />
<br />
== Compatible Replacement Batteries ==<br />
<br />
Other known FreeRunner-compatible batteries include the BL-series (BL-4X, BL-5X) from Nokia, and their third-party equivalents.<br />
These may not work to revive a device and may not report charge information.<br />
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.<br />
<br />
{| border=&quot;1&quot; cellpadding=&quot;4&quot; cellspacing=&quot;0&quot;<br />
!Battery Model<br />
!Capacity (mAh)<br />
!Charge info reported<br />
!Notes<br />
|-<br />
|NOKIA BL-4<br />
|<br />
|no<br />
|<br />
|-<br />
|NOKIA BL-4C<br />
|750<br />
|<br />
|<br />
|-<br />
|NOKIA BL-5B<br />
|760/890<br />
|<br />
|<br />
|-<br />
|NOKIA BL-5C<br />
|950<br />
|no<br />
|<br />
|-<br />
|NOKIA BL-6C<br />
|1070<br />
|no<br />
|<br />
|}<br />
<br />
== USB charger ==<br />
<br />
For information about USB battery chargers that can be used with the Neo FreeRunner see<br />
{{main|USB charger}}<br />
<br />
[[Category:Battery]]<br />
[[Category:Neo FreeRunner Hardware]]</div>Brian H Wilsonhttp://wiki.openmoko.org/wiki/Neo_FreeRunner_BatteryNeo FreeRunner Battery2008-09-02T17:43:05Z<p>Brian H Wilson: /* Notes about expected battery life */</p>
<hr />
<div>{{Neo FreeRunner Menu}}<br />
=== GTA02 1200 mAh Smart Battery ===<br />
<br />
*Using SANYO 1200mAh cell<br />
*Battery Technical information: [http://people.openmoko.org/tony_tu/GTA02/hardware/GTA02/CT-GTA02.pdf Detailed Battery Information]<br />
<br />
* 1200mAh Smart Battery with Coulomb-counter and protection circuit<br />
* 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.<br />
<br />
For more information, see the GTA01 battery info at [[Neo1973 Battery]]<br />
<br />
=== Notes about expected battery life ===<br />
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.<br />
<br />
== Make sure your battery never discharges completely. ==<br />
<br />
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.<br />
<br />
=== What to do if your battery has become completely discharged ===<br />
<br />
Should the battery become completely discharged, your options are: <br />
* Try booting with Wallwart USB-power supply (hold AUX button while inserting USB-plug)<br />
* Use external stand-alone charger (compatible with the Nokia BL-5C battery) <br />
* Boot the FreeRunner with an alternative battery, or with a spare GTA01 or GTA02 battery, plug USB power, then switch to the empty battery. <br />
* Boot the FreeRunner with a 4.5VDC external power source (steady hand and great care involved), plug USB power, then insert the empty battery.<br />
* Charge the battery directly, [http://wiki.openmoko.org/wiki/Charging_battery_directly see here], how I did that.<br />
<br />
=== Compatible Replacement Batteries ===<br />
<br />
Other known FreeRunner-compatible batteries include the BL-series (BL-4X, BL-5X) from Nokia, and their third-party equivalents.<br />
These may not work to revive a device and may not report charge information.<br />
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.<br />
<br />
{| border=&quot;1&quot; cellpadding=&quot;4&quot; cellspacing=&quot;0&quot;<br />
!Battery Model<br />
!Capacity (mAh)<br />
!Charge info reported<br />
!Notes<br />
|-<br />
|NOKIA BL-4<br />
|<br />
|no<br />
|<br />
|-<br />
|NOKIA BL-4C<br />
|750<br />
|<br />
|<br />
|-<br />
|NOKIA BL-5B<br />
|760/890<br />
|<br />
|<br />
|-<br />
|NOKIA BL-5C<br />
|950<br />
|no<br />
|<br />
|-<br />
|NOKIA BL-6C<br />
|1070<br />
|no<br />
|<br />
|}<br />
<br />
== USB charger ==<br />
<br />
For information about USB battery chargers that can be used with the Neo FreeRunner see<br />
{{main|USB charger}}<br />
<br />
[[Category:Battery]]<br />
[[Category:Neo FreeRunner Hardware]]</div>Brian H Wilsonhttp://wiki.openmoko.org/wiki/Host-based_development_with_Xoo_and_XephyrHost-based development with Xoo and Xephyr2008-09-02T15:29:17Z<p>Brian H Wilson: </p>
<hr />
<div>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.<br />
''Does anyone know where to find this VMWare image??''<br />
<br />
==Host-based development==<br />
<br />
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.<br />
<br />
==Xoo and Xephyr==<br />
[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. <br />
<br />
Note that Xoo is not required to simulate Openmoko hardware - it just improves the presentation.<br />
<br />
==Prerequisites==<br />
<br />
===Part I (precompiled software)===<br />
<br />
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:<br />
<br />
* gtk-doc-tools<br />
* libstartup-notification0-dev<br />
* libapm-dev<br />
* libgpgme11-dev<br />
* libgtk2.0-dev<br />
* libebook1.2-dev<br />
* libecal1.2-dev<br />
* libnotify-dev<br />
* libpulse-dev<br />
* libcurl4-openssl-dev (or libcurl4-gnutls-dev)<br />
* matchbox-window-manager<br />
* matchbox-keyboard<br />
* pulseaudio<br />
* xephyr ( package is called xserver-xephyr on ubuntu and debian )<br />
* xoo<br />
<br />
<br />
Ubuntu-Specific Packages<br />
* gnome-common (does this belong above?)<br />
* ubuntu-mobile-dev (this depends on many other development packages; some are necessary, others optional)<br />
<br />
<br />
Other Useful Packages<br />
* libasound2-dev (needed to compile openmoko-dialer2 ([[User:Tomjoad]]))<br />
<br />
<br />
Gentoo users run just<br />
# emerge &lt;package&gt;<br />
<br />
''note'': To get the Xephyr package installed Gentoo users have to rebuild the x11-base/xorg-server package with the &quot;kdrive&quot; use flag enabled ([http://gentoo-wiki.com/Scratchbox#Xephyr_support link])<br />
<br />
<br />
Debian/Ubuntu<br />
$ sudo apt-get install &lt;package&gt;<br />
For Fedora, you can use<br />
# yum install &lt;package&gt;<br />
For Mandriva, you may try<br />
# urpmi &lt;package&gt;<br />
<br />
for any other find a way how to do it in your distro.<br />
<br />
===Part II (building from source)===<br />
<br />
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.<br />
<br />
Most likely you will need to compile the following packages for your distribution:<br />
<br />
* matchbox-panel-2<br />
* libjana<br />
* libipkg<br />
<br />
To compile and install matchbox-panel-2:<br />
<br />
mkdir -f /local/pkg/ohand<br />
cd /local/pkg/ohand<br />
svn co http://svn.o-hand.com/repos/matchbox/trunk matchbox<br />
cd matchbox/matchbox-panel-2<br />
./autogen.sh<br />
make install<br />
<br />
To compile and install libjana:<br />
<br />
mkdir -f /local/pkg/ohand<br />
cd /local/pkg/ohand<br />
svn co http://svn.o-hand.com/repos/jana/trunk jana<br />
cd jana<br />
./autogen.sh<br />
make install<br />
<br />
To compile and install libipkg:<br />
<br />
mkdir -f /local/pkg/handhelds.org<br />
cd /local/pkg/handhelds.org<br />
wget http://downloads.openmoko.org/sources/ipkg-0.99.163.tar.gz<br />
tar xzf ipkg-0.99.163.tar.gz<br />
cd ipkg-0.99.163<br />
./configure<br />
make install<br />
<br />
==Building the Openmoko core==<br />
<br />
First we download the Openmoko subversion repository:<br />
<br />
mkdir -f /local/pkg/openmoko<br />
cd /local/pkg/openmoko<br />
svn co http://svn.openmoko.org/trunk/src src<br />
<br />
Then you compile the software contained there, e.g. you will definitely want to compile at least:<br />
<br />
In directory src/target/:<br />
* [http://svnweb.openmoko.org/trunk/src/target/gsm/ gsmd]<br />
* [http://svnweb.openmoko.org/trunk/src/target/opkg/ opkg]<br />
<br />
In directory src/target/OM-2007.2/artwork:<br />
* [http://svnweb.openmoko.org/trunk/src/target/OM-2007.2/artwork/icons/ icons]<br />
<br />
In directory src/target/OM-2007.2/libraries/:<br />
* [http://svnweb.openmoko.org/trunk/src/target/OM-2007.2/libraries/libmokoui2/ libmokoui2]<br />
* [http://svnweb.openmoko.org/trunk/src/target/OM-2007.2/libraries/libmokopanelui2/ libmokopanelui2]<br />
* [http://svnweb.openmoko.org/trunk/src/target/OM-2007.2/libraries/libmokojournal2/ libmokojournal2]<br />
* [http://svnweb.openmoko.org/trunk/src/target/OM-2007.2/libraries/libmokogsmd2/ libmokogsmd2]<br />
<br />
In directory src/target/OM-2007.2/daemons/:<br />
* [http://svnweb.openmoko.org/trunk/src/target/OM-2007.2/daemons/neod/ neod]<br />
<br />
In directory src/target/OM-2007.2/panel-plugins/:<br />
* [http://svnweb.openmoko.org/trunk/src/target/OM-2007.2/panel-plugins/openmoko-panel-gsm/ openmoko-panel-gsm]<br />
* [http://svnweb.openmoko.org/trunk/src/target/OM-2007.2/panel-plugins/openmoko-panel-usb/ openmoko-panel-usb]<br />
* [http://svnweb.openmoko.org/trunk/src/target/OM-2007.2/panel-plugins/openmoko-panel-battery/ openmoko-panel-battery]<br />
* [http://svnweb.openmoko.org/trunk/src/target/OM-2007.2/panel-plugins/openmoko-panel-gps/ openmoko-panel-gps]<br />
* [http://svnweb.openmoko.org/trunk/src/target/OM-2007.2/panel-plugins/openmoko-panel-bt/ openmoko-panel-bt]<br />
<br />
In directory src/target/OM-2007.2/applications:<br />
* [http://svnweb.openmoko.org/trunk/src/target/OM-2007.2/applications/openmoko-today2/ openmoko-today2]<br />
* [http://svnweb.openmoko.org/trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ openmoko-dialer2]<br />
* [http://svnweb.openmoko.org/trunk/src/target/OM-2007.2/applications/openmoko-calculator2/ openmoko-calculator2]<br />
* [http://svnweb.openmoko.org/trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/ openmoko-appmanager2]<br />
<br />
Each of these packages can be compiled with the well-known-triple of:<br />
<br />
./configure (or ./autogen.sh, if it's the first time)<br />
make<br />
make install<br />
<br />
==Data files==<br />
<br />
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:<br />
<br />
cd /usr/local/share/matchbox<br />
ln -s /local/pkg/openmoko/src/target/OM-2007.2/misc/openmoko-today2-folders vfolders<br />
<br />
cd /usr/share/themes<br />
ln -s /local/pkg/openmoko/src/target/OM-2007.2/artwork/themes/openmoko-standard-2<br />
<br />
==Starting the nested Openmoko==<br />
<br />
We have prepared a script for you that starts Xoo and all the necessary X clients in one run. The script is online at <br />
* [http://svnweb.openmoko.org/trunk/src/host/xoo/om-launch om-launch]<br />
<br />
==Creating a new application==<br />
<br />
{{todo|...}}<br />
<br />
==Using a Neo1973 as external GSM modem==<br />
<br />
{{todo|...}}<br />
<br />
==Using an external GPS device==<br />
<br />
{{todo|...}}<br />
<br />
{{Languages|Host-based development with Xoo and Xephyr}}<br />
[[Category:Technical]]<br />
[[Category:Documentation]]<br />
[[Category:Emulation]]</div>Brian H Wilsonhttp://wiki.openmoko.org/wiki/Neo_FreeRunner_BatteryNeo FreeRunner Battery2008-08-28T15:09:57Z<p>Brian H Wilson: /* Compatible Replacement Batteries */ Corrected BL-6C mah</p>
<hr />
<div>{{Neo FreeRunner Menu}}<br />
=== GTA02 1200 mAh Smart Battery ===<br />
<br />
*Using SANYO 1200mAh cell<br />
*Battery Technical information: [http://people.openmoko.org/tony_tu/GTA02/hardware/GTA02/CT-GTA02.pdf Detailed Battery Information]<br />
<br />
* 1200mAh Smart Battery with Coulomb-counter and protection circuit<br />
* 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.<br />
<br />
For more information, see the GTA01 battery info at [[Neo1973 Battery]]<br />
<br />
=== Notes about expected battery life ===<br />
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.<br />
<br />
<br />
Make sure that the battery never discharges completely. This is an issue because <br />
the internal charging circuitry can not be turned on until the FreeRunner has <br />
booted, and booting through USB power alone does not work.<br />
(If you have the newest kernel images, you should be safe due to a software fix.)<br />
<br />
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.&lt;br&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&lt;br&gt;&lt;br&gt;<br />
Should the battery become completely discharged, your options are: <br />
* Try booting with Wallwart USB-powersupply (maybe hold AUX during inserting USB-plug)<br />
* Use external stand-alone charger (compatible with the Nokia BL-5C battery) <br />
* Boot the FreeRunner with an alternative battery, or with a spare GTA01 or GTA02 battery, plug USB power, then switch to the empty battery. <br />
* Boot the FreeRunner with a 4.5VDC external power source (steady hand and great care involved), plug USB power, then insert the empty battery.<br />
* Charge the battery directly, [http://wiki.openmoko.org/wiki/Charging_battery_directly see here], how I did that.<br />
<br />
=== Compatible Replacement Batteries ===<br />
<br />
Other known FreeRunner-compatible batteries include the BL-series (BL-4X, BL-5X) from Nokia, and their third-party equivalents.<br />
These may not work to revive a device and may not report charge information.<br />
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.<br />
<br />
{| border=&quot;1&quot; cellpadding=&quot;4&quot; cellspacing=&quot;0&quot;<br />
!Battery Model<br />
!Capacity (mAh)<br />
!Charge info reported<br />
!Notes<br />
|-<br />
|NOKIA BL-4<br />
|<br />
|no<br />
|<br />
|-<br />
|NOKIA BL-4C<br />
|750<br />
|<br />
|<br />
|-<br />
|NOKIA BL-5B<br />
|760/890<br />
|<br />
|<br />
|-<br />
|NOKIA BL-5C<br />
|950<br />
|no<br />
|<br />
|-<br />
|NOKIA BL-6C<br />
|1070<br />
|no<br />
|<br />
|}<br />
<br />
== USB charger ==<br />
<br />
For information about USB battery chargers that can be used with the Neo FreeRunner see<br />
{{main|USB charger}}<br />
<br />
[[Category:Battery]]<br />
[[Category:Neo FreeRunner Hardware]]</div>Brian H Wilsonhttp://wiki.openmoko.org/wiki/Neo_FreeRunner_BatteryNeo FreeRunner Battery2008-08-28T15:06:15Z<p>Brian H Wilson: /* USB charger */</p>
<hr />
<div>{{Neo FreeRunner Menu}}<br />
=== GTA02 1200 mAh Smart Battery ===<br />
<br />
*Using SANYO 1200mAh cell<br />
*Battery Technical information: [http://people.openmoko.org/tony_tu/GTA02/hardware/GTA02/CT-GTA02.pdf Detailed Battery Information]<br />
<br />
* 1200mAh Smart Battery with Coulomb-counter and protection circuit<br />
* 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.<br />
<br />
For more information, see the GTA01 battery info at [[Neo1973 Battery]]<br />
<br />
=== Notes about expected battery life ===<br />
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.<br />
<br />
<br />
Make sure that the battery never discharges completely. This is an issue because <br />
the internal charging circuitry can not be turned on until the FreeRunner has <br />
booted, and booting through USB power alone does not work.<br />
(If you have the newest kernel images, you should be safe due to a software fix.)<br />
Should the battery become completely discharged, your options are: <br />
* Use external stand-alone charger (compatible with the Nokia BL-5C battery) <br />
* Boot the FreeRunner with an alternative battery, or with a spare GTA01 or GTA02 battery, plug USB power, then switch to the empty battery. <br />
* Boot the FreeRunner with a 4.5VDC external power source (steady hand and great care involved), plug USB power, then insert the empty battery.<br />
* Charge the battery directly, [http://wiki.openmoko.org/wiki/Charging_battery_directly see here], how I did that.<br />
<br />
=== Compatible Replacement Batteries ===<br />
<br />
Other known FreeRunner-compatible batteries include the BL-series (BL-4X, BL-5X) from Nokia, and their third-party equivalents.<br />
These may not work to revive a device and may not report charge information.<br />
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.<br />
<br />
{| border=&quot;1&quot; cellpadding=&quot;4&quot; cellspacing=&quot;0&quot;<br />
!Battery Model<br />
!Capacity (mAh)<br />
!Charge info reported<br />
!Notes<br />
|-<br />
|NOKIA BL-4<br />
|<br />
|no<br />
|<br />
|-<br />
|NOKIA BL-4C<br />
|750<br />
|<br />
|<br />
|-<br />
|NOKIA BL-5B<br />
|760/890<br />
|<br />
|<br />
|-<br />
|NOKIA BL-5C<br />
|950<br />
|no<br />
|<br />
|-<br />
|NOKIA BL-6C<br />
|1200<br />
|no<br />
|<br />
|}<br />
<br />
== USB charger ==<br />
<br />
For information about USB battery chargers that can be used with the Neo FreeRunner see<br />
{{main|USB charger}}<br />
<br />
[[Category:Battery]]<br />
[[Category:Neo FreeRunner Hardware]]</div>Brian H Wilsonhttp://wiki.openmoko.org/wiki/Neo_FreeRunner_BatteryNeo FreeRunner Battery2008-08-28T14:52:00Z<p>Brian H Wilson: /* USB charger */ Added category battery</p>
<hr />
<div>{{Neo FreeRunner Menu}}<br />
=== GTA02 1200 mAh Smart Battery ===<br />
<br />
*Using SANYO 1200mAh cell<br />
*Battery Technical information: [http://people.openmoko.org/tony_tu/GTA02/hardware/GTA02/CT-GTA02.pdf Detailed Battery Information]<br />
<br />
* 1200mAh Smart Battery with Coulomb-counter and protection circuit<br />
* 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.<br />
<br />
For more information, see the GTA01 battery info at [[Neo1973 Battery]]<br />
<br />
=== Notes about expected battery life ===<br />
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.<br />
<br />
<br />
Make sure that the battery never discharges completely. This is an issue because <br />
the internal charging circuitry can not be turned on until the FreeRunner has <br />
booted, and booting through USB power alone does not work.<br />
(If you have the newest kernel images, you should be safe due to a software fix.)<br />
Should the battery become completely discharged, your options are: <br />
* Use external stand-alone charger (compatible with the Nokia BL-5C battery) <br />
* Boot the FreeRunner with an alternative battery, or with a spare GTA01 or GTA02 battery, plug USB power, then switch to the empty battery. <br />
* Boot the FreeRunner with a 4.5VDC external power source (steady hand and great care involved), plug USB power, then insert the empty battery.<br />
* Charge the battery directly, [http://wiki.openmoko.org/wiki/Charging_battery_directly see here], how I did that.<br />
<br />
=== Compatible Replacement Batteries ===<br />
<br />
Other known FreeRunner-compatible batteries include the BL-series (BL-4X, BL-5X) from Nokia, and their third-party equivalents.<br />
These may not work to revive a device and may not report charge information.<br />
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.<br />
<br />
{| border=&quot;1&quot; cellpadding=&quot;4&quot; cellspacing=&quot;0&quot;<br />
!Battery Model<br />
!Capacity (mAh)<br />
!Charge info reported<br />
!Notes<br />
|-<br />
|NOKIA BL-4<br />
|<br />
|no<br />
|<br />
|-<br />
|NOKIA BL-4C<br />
|750<br />
|<br />
|<br />
|-<br />
|NOKIA BL-5B<br />
|760/890<br />
|<br />
|<br />
|-<br />
|NOKIA BL-5C<br />
|950<br />
|no<br />
|<br />
|-<br />
|NOKIA BL-6C<br />
|1200<br />
|no<br />
|<br />
|}<br />
<br />
== USB charger ==<br />
{{main|USB charger}}<br />
<br />
[[Category:Battery]]<br />
[[Category:Neo FreeRunner Hardware]]</div>Brian H Wilsonhttp://wiki.openmoko.org/wiki/GPS_Data_LoggerGPS Data Logger2008-08-25T05:26:08Z<p>Brian H Wilson: /* More features */</p>
<hr />
<div>This page was created to address the use cases mentioned in [[GTA02 GPS]], including<br />
<br />
* I want to log GPS data for later analysis.<br />
* I want to collect GPS data for scientific field work (forestry, biology, etc)<br />
<br />
The page was started on 17 August 2008 mostly as a thought exercise.<br />
Please jump in and add to it.<br />
<br />
== Overview ==<br />
<br />
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 &quot;doing everything well&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.<br />
<br />
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.<br />
<br />
Initially the main functions could be broken out these components.<br />
<br />
# A '''GPS multiplexer''' that talks to the GPS receiver and feeds data to many applications.<br />
# A '''GPS Controller''' to that can talk to the mulitplexer (and hence the GPS receiver) to display status and adjust settings.<br />
# A '''Data Logger''' that can run all the time and record GPS data.<br />
# 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.<br />
<br />
'''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.<br />
<br />
== Main components ==<br />
<br />
=== GPS multiplexer ===<br />
<br />
Look at gpsd and gypsy and either use one of them or use them for inspiration. <br />
See the Gypsy author's take on GPSd here: http://folks.o-hand.com/iain/gypsy/why-not-gpsd.html<br />
<br />
So far Gypsy looks pretty good to me.<br />
<br />
Maybe the control program should be separated out from the multiplexer.<br />
<br />
Partial list of requirements for the multiplexer<br />
* Control internal GPS receiver<br />
* Control external GPS connected via serial port (USB or bluetooth)<br />
* Feed data from the selected GPS receiver to multiple applications.<br />
* Handle a RTCM stream to allow realtime DGPS postprocessing.<br />
* Supply all attributes to applications, including such things as bearing, PDOP and satellites in use. (Not just time and position).<br />
<br />
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.<br />
<br />
==== External GPS ====<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Support for postprocessing? ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== GPS controller ===<br />
<br />
''I think OM gps test program (what's it called) does much of this.''<br />
<br />
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.<br />
<br />
=== Data Logger ===<br />
<br />
The basic concept of the logger is to create a bread crumb trail as you move about. <br />
It has its own preference settings to determine if points are plotted based on change in position or on a time basis or both. <br />
<br />
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.<br />
<br />
==== Speedometer, Pedomater -- Usage of logger by itself ====<br />
<br />
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. <br />
<br />
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?<br />
<br />
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.<br />
<br />
''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)<br />
<br />
=== Field Collection Tool ===<br />
<br />
'''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.<br />
<br />
'''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.<br />
<br />
'''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.<br />
<br />
==== Other related tools ====<br />
<br />
Other specialized field collection tools could be used for <br />
<br />
* Asset management, example: urban forestry, agriculture, public works<br />
* Map making, for example to collect data for the Open Street Map project<br />
* Geocaching<br />
* ??? Add yours here ???<br />
<br />
== Data format and exchange ==<br />
<br />
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. <br />
<br />
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. &quot;GPS Office&quot;<br />
<br />
=== Native u-blox format ===<br />
<br />
One suggestion is to simply store and process the data in the u-blox binary format.<br />
This might be a starting point but leaves out the possibility of the software interoperating<br />
with other receivers or even running on the Neo 1973.<br />
<br />
=== RINEX ===<br />
<br />
Would RINEX be an appropriate general format for internal storage? No.<br />
It's an exchange format but it's intended to include data required to perform post-processing.<br />
It stores direct satellite observations, not things needed for navigation like calculated position.<br />
<br />
This guy wrote a program that takes u-blox Antaris 4 data and writes it as RINEX data.<br />
http://home.comcast.net/~dmilbert/softs/ant2rin.htm<br />
<br />
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.<br />
<br />
== More features ==<br />
<br />
=== Audio clips ===<br />
<br />
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.<br />
<br />
=== Laser rangefinder ===<br />
<br />
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).<br />
<br />
== External links ==<br />
<br />
GPSd http://gpsd.berlios.de/<br />
<br />
GPX http://www.topografix.com/gpx.asp http://en.wikipedia.org/wiki/GPX_(data_transfer)<br />
<br />
gypsy http://folks.o-hand.com/iain/gypsy/ GPS data multiplexer<br />
<br />
RINEX specs ftp://ftp.unibe.ch/aiub/rinex/<br />
<br />
u-blox Antaris product page http://www.u-blox.com/products/a4products.html<br />
<br />
=== Commercial software ===<br />
<br />
ESRI ArcPad http://www.tdsway.com/products/solo_field<br />
<br />
TDS Solo Field http://www.tdsway.com/products/solo_field<br />
<br />
Trimble Terrasync http://www.trimble.com/terrasync.shtml<br />
<br />
== People working on this project ==<br />
<br />
[[User:Brian H Wilson]] is blabbing a lot here and wishing he had more time to work on this.<br />
<br />
[[Category: GPS]]</div>Brian H Wilsonhttp://wiki.openmoko.org/wiki/GPS_Data_LoggerGPS Data Logger2008-08-24T15:49:55Z<p>Brian H Wilson: /* External links */</p>
<hr />
<div>This page was created to address the use cases mentioned in [[GTA02 GPS]], including<br />
<br />
* I want to log GPS data for later analysis.<br />
* I want to collect GPS data for scientific field work (forestry, biology, etc)<br />
<br />
The page was started on 17 August 2008 mostly as a thought exercise.<br />
Please jump in and add to it.<br />
<br />
== Overview ==<br />
<br />
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 &quot;doing everything well&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.<br />
<br />
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.<br />
<br />
Initially the main functions could be broken out these components.<br />
<br />
# A '''GPS multiplexer''' that talks to the GPS receiver and feeds data to many applications.<br />
# A '''GPS Controller''' to that can talk to the mulitplexer (and hence the GPS receiver) to display status and adjust settings.<br />
# A '''Data Logger''' that can run all the time and record GPS data.<br />
# 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.<br />
<br />
'''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.<br />
<br />
== Main components ==<br />
<br />
=== GPS multiplexer ===<br />
<br />
Look at gpsd and gypsy and either use one of them or use them for inspiration. <br />
See the Gypsy author's take on GPSd here: http://folks.o-hand.com/iain/gypsy/why-not-gpsd.html<br />
<br />
So far Gypsy looks pretty good to me.<br />
<br />
Maybe the control program should be separated out from the multiplexer.<br />
<br />
Partial list of requirements for the multiplexer<br />
* Control internal GPS receiver<br />
* Control external GPS connected via serial port (USB or bluetooth)<br />
* Feed data from the selected GPS receiver to multiple applications.<br />
* Handle a RTCM stream to allow realtime DGPS postprocessing.<br />
* Supply all attributes to applications, including such things as bearing, PDOP and satellites in use. (Not just time and position).<br />
<br />
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.<br />
<br />
==== External GPS ====<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Support for postprocessing? ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== GPS controller ===<br />
<br />
''I think OM gps test program (what's it called) does much of this.''<br />
<br />
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.<br />
<br />
=== Data Logger ===<br />
<br />
The basic concept of the logger is to create a bread crumb trail as you move about. <br />
It has its own preference settings to determine if points are plotted based on change in position or on a time basis or both. <br />
<br />
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.<br />
<br />
==== Speedometer, Pedomater -- Usage of logger by itself ====<br />
<br />
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. <br />
<br />
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?<br />
<br />
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.<br />
<br />
''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)<br />
<br />
=== Field Collection Tool ===<br />
<br />
'''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.<br />
<br />
'''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.<br />
<br />
'''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.<br />
<br />
==== Other related tools ====<br />
<br />
Other specialized field collection tools could be used for <br />
<br />
* Asset management, example: urban forestry, agriculture, public works<br />
* Map making, for example to collect data for the Open Street Map project<br />
* Geocaching<br />
* ??? Add yours here ???<br />
<br />
== Data format and exchange ==<br />
<br />
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. <br />
<br />
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. &quot;GPS Office&quot;<br />
<br />
=== Native u-blox format ===<br />
<br />
One suggestion is to simply store and process the data in the u-blox binary format.<br />
This might be a starting point but leaves out the possibility of the software interoperating<br />
with other receivers or even running on the Neo 1973.<br />
<br />
=== RINEX ===<br />
<br />
Would RINEX be an appropriate general format for internal storage? No.<br />
It's an exchange format but it's intended to include data required to perform post-processing.<br />
It stores direct satellite observations, not things needed for navigation like calculated position.<br />
<br />
This guy wrote a program that takes u-blox Antaris 4 data and writes it as RINEX data.<br />
http://home.comcast.net/~dmilbert/softs/ant2rin.htm<br />
<br />
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.<br />
<br />
== More features ==<br />
<br />
All I can think of at the moment is rangefinders. I am sure there are others.<br />
<br />
=== Laser rangefinder ===<br />
<br />
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).<br />
<br />
== External links ==<br />
<br />
GPSd http://gpsd.berlios.de/<br />
<br />
GPX http://www.topografix.com/gpx.asp http://en.wikipedia.org/wiki/GPX_(data_transfer)<br />
<br />
gypsy http://folks.o-hand.com/iain/gypsy/ GPS data multiplexer<br />
<br />
RINEX specs ftp://ftp.unibe.ch/aiub/rinex/<br />
<br />
u-blox Antaris product page http://www.u-blox.com/products/a4products.html<br />
<br />
=== Commercial software ===<br />
<br />
ESRI ArcPad http://www.tdsway.com/products/solo_field<br />
<br />
TDS Solo Field http://www.tdsway.com/products/solo_field<br />
<br />
Trimble Terrasync http://www.trimble.com/terrasync.shtml<br />
<br />
== People working on this project ==<br />
<br />
[[User:Brian H Wilson]] is blabbing a lot here and wishing he had more time to work on this.<br />
<br />
[[Category: GPS]]</div>Brian H Wilsonhttp://wiki.openmoko.org/wiki/GPS_Data_LoggerGPS Data Logger2008-08-24T15:48:58Z<p>Brian H Wilson: /* Data format and exchange */</p>
<hr />
<div>This page was created to address the use cases mentioned in [[GTA02 GPS]], including<br />
<br />
* I want to log GPS data for later analysis.<br />
* I want to collect GPS data for scientific field work (forestry, biology, etc)<br />
<br />
The page was started on 17 August 2008 mostly as a thought exercise.<br />
Please jump in and add to it.<br />
<br />
== Overview ==<br />
<br />
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 &quot;doing everything well&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.<br />
<br />
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.<br />
<br />
Initially the main functions could be broken out these components.<br />
<br />
# A '''GPS multiplexer''' that talks to the GPS receiver and feeds data to many applications.<br />
# A '''GPS Controller''' to that can talk to the mulitplexer (and hence the GPS receiver) to display status and adjust settings.<br />
# A '''Data Logger''' that can run all the time and record GPS data.<br />
# 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.<br />
<br />
'''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.<br />
<br />
== Main components ==<br />
<br />
=== GPS multiplexer ===<br />
<br />
Look at gpsd and gypsy and either use one of them or use them for inspiration. <br />
See the Gypsy author's take on GPSd here: http://folks.o-hand.com/iain/gypsy/why-not-gpsd.html<br />
<br />
So far Gypsy looks pretty good to me.<br />
<br />
Maybe the control program should be separated out from the multiplexer.<br />
<br />
Partial list of requirements for the multiplexer<br />
* Control internal GPS receiver<br />
* Control external GPS connected via serial port (USB or bluetooth)<br />
* Feed data from the selected GPS receiver to multiple applications.<br />
* Handle a RTCM stream to allow realtime DGPS postprocessing.<br />
* Supply all attributes to applications, including such things as bearing, PDOP and satellites in use. (Not just time and position).<br />
<br />
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.<br />
<br />
==== External GPS ====<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Support for postprocessing? ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== GPS controller ===<br />
<br />
''I think OM gps test program (what's it called) does much of this.''<br />
<br />
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.<br />
<br />
=== Data Logger ===<br />
<br />
The basic concept of the logger is to create a bread crumb trail as you move about. <br />
It has its own preference settings to determine if points are plotted based on change in position or on a time basis or both. <br />
<br />
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.<br />
<br />
==== Speedometer, Pedomater -- Usage of logger by itself ====<br />
<br />
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. <br />
<br />
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?<br />
<br />
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.<br />
<br />
''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)<br />
<br />
=== Field Collection Tool ===<br />
<br />
'''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.<br />
<br />
'''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.<br />
<br />
'''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.<br />
<br />
==== Other related tools ====<br />
<br />
Other specialized field collection tools could be used for <br />
<br />
* Asset management, example: urban forestry, agriculture, public works<br />
* Map making, for example to collect data for the Open Street Map project<br />
* Geocaching<br />
* ??? Add yours here ???<br />
<br />
== Data format and exchange ==<br />
<br />
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. <br />
<br />
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. &quot;GPS Office&quot;<br />
<br />
=== Native u-blox format ===<br />
<br />
One suggestion is to simply store and process the data in the u-blox binary format.<br />
This might be a starting point but leaves out the possibility of the software interoperating<br />
with other receivers or even running on the Neo 1973.<br />
<br />
=== RINEX ===<br />
<br />
Would RINEX be an appropriate general format for internal storage? No.<br />
It's an exchange format but it's intended to include data required to perform post-processing.<br />
It stores direct satellite observations, not things needed for navigation like calculated position.<br />
<br />
This guy wrote a program that takes u-blox Antaris 4 data and writes it as RINEX data.<br />
http://home.comcast.net/~dmilbert/softs/ant2rin.htm<br />
<br />
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.<br />
<br />
== More features ==<br />
<br />
All I can think of at the moment is rangefinders. I am sure there are others.<br />
<br />
=== Laser rangefinder ===<br />
<br />
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).<br />
<br />
== External links ==<br />
<br />
GPSd http://gpsd.berlios.de/<br />
<br />
GPX http://www.topografix.com/gpx.asp http://en.wikipedia.org/wiki/GPX_(data_transfer)<br />
<br />
gypsy http://folks.o-hand.com/iain/gypsy/ GPS data multiplexer<br />
<br />
RINEX specs ftp://ftp.unibe.ch/aiub/rinex/<br />
<br />
=== Commercial software ===<br />
<br />
ESRI ArcPad http://www.tdsway.com/products/solo_field<br />
<br />
TDS Solo Field http://www.tdsway.com/products/solo_field<br />
<br />
Trimble Terrasync http://www.trimble.com/terrasync.shtml<br />
<br />
== People working on this project ==<br />
<br />
[[User:Brian H Wilson]] is blabbing a lot here and wishing he had more time to work on this.<br />
<br />
[[Category: GPS]]</div>Brian H Wilsonhttp://wiki.openmoko.org/wiki/GPS_Data_LoggerGPS Data Logger2008-08-24T15:46:25Z<p>Brian H Wilson: /* RINEX */</p>
<hr />
<div>This page was created to address the use cases mentioned in [[GTA02 GPS]], including<br />
<br />
* I want to log GPS data for later analysis.<br />
* I want to collect GPS data for scientific field work (forestry, biology, etc)<br />
<br />
The page was started on 17 August 2008 mostly as a thought exercise.<br />
Please jump in and add to it.<br />
<br />
== Overview ==<br />
<br />
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 &quot;doing everything well&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.<br />
<br />
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.<br />
<br />
Initially the main functions could be broken out these components.<br />
<br />
# A '''GPS multiplexer''' that talks to the GPS receiver and feeds data to many applications.<br />
# A '''GPS Controller''' to that can talk to the mulitplexer (and hence the GPS receiver) to display status and adjust settings.<br />
# A '''Data Logger''' that can run all the time and record GPS data.<br />
# 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.<br />
<br />
'''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.<br />
<br />
== Main components ==<br />
<br />
=== GPS multiplexer ===<br />
<br />
Look at gpsd and gypsy and either use one of them or use them for inspiration. <br />
See the Gypsy author's take on GPSd here: http://folks.o-hand.com/iain/gypsy/why-not-gpsd.html<br />
<br />
So far Gypsy looks pretty good to me.<br />
<br />
Maybe the control program should be separated out from the multiplexer.<br />
<br />
Partial list of requirements for the multiplexer<br />
* Control internal GPS receiver<br />
* Control external GPS connected via serial port (USB or bluetooth)<br />
* Feed data from the selected GPS receiver to multiple applications.<br />
* Handle a RTCM stream to allow realtime DGPS postprocessing.<br />
* Supply all attributes to applications, including such things as bearing, PDOP and satellites in use. (Not just time and position).<br />
<br />
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.<br />
<br />
==== External GPS ====<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Support for postprocessing? ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== GPS controller ===<br />
<br />
''I think OM gps test program (what's it called) does much of this.''<br />
<br />
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.<br />
<br />
=== Data Logger ===<br />
<br />
The basic concept of the logger is to create a bread crumb trail as you move about. <br />
It has its own preference settings to determine if points are plotted based on change in position or on a time basis or both. <br />
<br />
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.<br />
<br />
==== Speedometer, Pedomater -- Usage of logger by itself ====<br />
<br />
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. <br />
<br />
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?<br />
<br />
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.<br />
<br />
''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)<br />
<br />
=== Field Collection Tool ===<br />
<br />
'''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.<br />
<br />
'''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.<br />
<br />
'''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.<br />
<br />
==== Other related tools ====<br />
<br />
Other specialized field collection tools could be used for <br />
<br />
* Asset management, example: urban forestry, agriculture, public works<br />
* Map making, for example to collect data for the Open Street Map project<br />
* Geocaching<br />
* ??? Add yours here ???<br />
<br />
== Data format and exchange ==<br />
<br />
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. <br />
<br />
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. &quot;GPS Office&quot;<br />
<br />
=== RINEX ===<br />
<br />
Would RINEX be an appropriate general format for internal storage? No.<br />
It's an exchange format but it's intended to include data required to perform post-processing.<br />
It stores direct satellite observations, not things needed for navigation like calculated position.<br />
<br />
This guy wrote a program that takes u-blox Antaris 4 data and writes it as RINEX data.<br />
http://home.comcast.net/~dmilbert/softs/ant2rin.htm<br />
<br />
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.<br />
<br />
== More features ==<br />
<br />
All I can think of at the moment is rangefinders. I am sure there are others.<br />
<br />
=== Laser rangefinder ===<br />
<br />
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).<br />
<br />
== External links ==<br />
<br />
GPSd http://gpsd.berlios.de/<br />
<br />
GPX http://www.topografix.com/gpx.asp http://en.wikipedia.org/wiki/GPX_(data_transfer)<br />
<br />
gypsy http://folks.o-hand.com/iain/gypsy/ GPS data multiplexer<br />
<br />
RINEX specs ftp://ftp.unibe.ch/aiub/rinex/<br />
<br />
=== Commercial software ===<br />
<br />
ESRI ArcPad http://www.tdsway.com/products/solo_field<br />
<br />
TDS Solo Field http://www.tdsway.com/products/solo_field<br />
<br />
Trimble Terrasync http://www.trimble.com/terrasync.shtml<br />
<br />
== People working on this project ==<br />
<br />
[[User:Brian H Wilson]] is blabbing a lot here and wishing he had more time to work on this.<br />
<br />
[[Category: GPS]]</div>Brian H Wilsonhttp://wiki.openmoko.org/wiki/GPS_Data_LoggerGPS Data Logger2008-08-24T15:38:47Z<p>Brian H Wilson: /* Support for postprocessing? */ spelling fix</p>
<hr />
<div>This page was created to address the use cases mentioned in [[GTA02 GPS]], including<br />
<br />
* I want to log GPS data for later analysis.<br />
* I want to collect GPS data for scientific field work (forestry, biology, etc)<br />
<br />
The page was started on 17 August 2008 mostly as a thought exercise.<br />
Please jump in and add to it.<br />
<br />
== Overview ==<br />
<br />
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 &quot;doing everything well&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.<br />
<br />
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.<br />
<br />
Initially the main functions could be broken out these components.<br />
<br />
# A '''GPS multiplexer''' that talks to the GPS receiver and feeds data to many applications.<br />
# A '''GPS Controller''' to that can talk to the mulitplexer (and hence the GPS receiver) to display status and adjust settings.<br />
# A '''Data Logger''' that can run all the time and record GPS data.<br />
# 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.<br />
<br />
'''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.<br />
<br />
== Main components ==<br />
<br />
=== GPS multiplexer ===<br />
<br />
Look at gpsd and gypsy and either use one of them or use them for inspiration. <br />
See the Gypsy author's take on GPSd here: http://folks.o-hand.com/iain/gypsy/why-not-gpsd.html<br />
<br />
So far Gypsy looks pretty good to me.<br />
<br />
Maybe the control program should be separated out from the multiplexer.<br />
<br />
Partial list of requirements for the multiplexer<br />
* Control internal GPS receiver<br />
* Control external GPS connected via serial port (USB or bluetooth)<br />
* Feed data from the selected GPS receiver to multiple applications.<br />
* Handle a RTCM stream to allow realtime DGPS postprocessing.<br />
* Supply all attributes to applications, including such things as bearing, PDOP and satellites in use. (Not just time and position).<br />
<br />
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.<br />
<br />
==== External GPS ====<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Support for postprocessing? ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== GPS controller ===<br />
<br />
''I think OM gps test program (what's it called) does much of this.''<br />
<br />
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.<br />
<br />
=== Data Logger ===<br />
<br />
The basic concept of the logger is to create a bread crumb trail as you move about. <br />
It has its own preference settings to determine if points are plotted based on change in position or on a time basis or both. <br />
<br />
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.<br />
<br />
==== Speedometer, Pedomater -- Usage of logger by itself ====<br />
<br />
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. <br />
<br />
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?<br />
<br />
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.<br />
<br />
''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)<br />
<br />
=== Field Collection Tool ===<br />
<br />
'''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.<br />
<br />
'''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.<br />
<br />
'''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.<br />
<br />
==== Other related tools ====<br />
<br />
Other specialized field collection tools could be used for <br />
<br />
* Asset management, example: urban forestry, agriculture, public works<br />
* Map making, for example to collect data for the Open Street Map project<br />
* Geocaching<br />
* ??? Add yours here ???<br />
<br />
== Data format and exchange ==<br />
<br />
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. <br />
<br />
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. &quot;GPS Office&quot;<br />
<br />
=== RINEX ===<br />
<br />
Would RINEX be an appropriate general format for internal storage? No.<br />
It's an exchange format but it's intended to include data required to perform post-processing.<br />
It stores direct satellite observations, not things needed for navigation like calculated position.<br />
<br />
This guy wrote a program that takes Ublox Antares 4 data and writes it as RINEX data.<br />
http://home.comcast.net/~dmilbert/softs/ant2rin.htm<br />
<br />
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.<br />
<br />
== More features ==<br />
<br />
All I can think of at the moment is rangefinders. I am sure there are others.<br />
<br />
=== Laser rangefinder ===<br />
<br />
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).<br />
<br />
== External links ==<br />
<br />
GPSd http://gpsd.berlios.de/<br />
<br />
GPX http://www.topografix.com/gpx.asp http://en.wikipedia.org/wiki/GPX_(data_transfer)<br />
<br />
gypsy http://folks.o-hand.com/iain/gypsy/ GPS data multiplexer<br />
<br />
RINEX specs ftp://ftp.unibe.ch/aiub/rinex/<br />
<br />
=== Commercial software ===<br />
<br />
ESRI ArcPad http://www.tdsway.com/products/solo_field<br />
<br />
TDS Solo Field http://www.tdsway.com/products/solo_field<br />
<br />
Trimble Terrasync http://www.trimble.com/terrasync.shtml<br />
<br />
== People working on this project ==<br />
<br />
[[User:Brian H Wilson]] is blabbing a lot here and wishing he had more time to work on this.<br />
<br />
[[Category: GPS]]</div>Brian H Wilsonhttp://wiki.openmoko.org/wiki/Talk:Flashing_the_Neo_FreeRunnerTalk:Flashing the Neo FreeRunner2008-08-23T15:16:03Z<p>Brian H Wilson: Talk:Flashing the Neo FreeRunner moved to Talk:Flashing the Neo Freerunner: Standardized the name.</p>
<hr />
<div>There is another page like this [[Flashing Openmoko]] They should be merged [[User:Thewtex|thewtex]] 05:44, 21 July 2008 (UTC)<br />
<br />
That page is now about flashing the Neo 1973 [[User:Brian H Wilson|Brian H Wilson]] 04:12, 12 August 2008 (UTC)<br />
<br />
So, where are the u-boot images? --[[User:Gero|Gero]] 21:35, 27 July 2008 (UTC)<br />
<br />
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)<br />
<br />
== Erasing rootfs ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
At least in my experience, it won't shut down when an image is being transferred.</div>Brian H Wilsonhttp://wiki.openmoko.org/wiki/Flashing_the_Neo_FreeRunnerFlashing the Neo FreeRunner2008-08-23T15:16:03Z<p>Brian H Wilson: Flashing the Neo FreeRunner moved to Flashing the Neo Freerunner: Standardized the name.</p>
<hr />
<div>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 &quot;through&quot; USB.<br />
<br />
== Overview ==<br />
All the components of the software in the FreeRunner are bundled together into binary images.<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
* '''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).<br />
* '''kernel''': the central component in the Linux operating system.<br />
* '''root filesystem''': contains all the files that make up the commands and applications that you can run.<br />
<br />
'''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.'''<br />
<br />
== Alternative : running from microSD card ==<br />
<br />
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).<br />
<br />
== Collect the things you need ==<br />
<br />
=== Download the DFU-util program ===<br />
<br />
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]].<br />
<br />
<br />
'''MacOS X:''' [[MacOS_X#Graphical_Flashing_with_Openmoko_Flasher]]<br />
<br />
'''Linux:''' http://buildhost.openmoko.org/releases/Freerunner/dfu-util<br />
<br />
Make sure it is executable by setting the permissions with this command: chmod a+x dfu-util<br />
<br />
'''Note:''' dfu-util seems to consistently fail with a &quot;-62&quot; error on 64-bit Linux. If you have access to a 32-bit machine, use it instead!<br />
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]<br />
<br />
'''Windows:''' http://projects.openmoko.org/frs/?group_id=166&amp;release_id=162 <br />
<br />
See additional driver installation instructions for Windows at [[Dfu-util-windows]]<br />
<br />
=== Download the image files that you will need ===<br />
<br />
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.<br />
<br />
Please read [[Distributions]] for choosing the distribution which fits your needs, and then see [[Download]] for downloading.<br />
<br />
== Boot the FreeRunner from NOR Flash ==<br />
<br />
[[Image:menu15.jpg|thumb|Booting from NOR Flash]]<br />
<br />
# Read the other sections of this page first, because you will have 30 seconds to enter the flashing commands, come back here when ready.<br />
# Do not connect the USB cable from the PC to your Neo FreeRunner yet (disconnect it).<br />
# Boot your Neo Freerunner into the NOR uBoot menu for flashing.<br />
## Press and hold AUX button<br />
## Press the Power button until the boot menu comes up<br />
## This menu is labelled '''*** BOOT MENU (NOR) ***'''<br />
## See also [[Booting the Neo FreeRunner]]<br />
# 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.<br />
# The FreeRunner only stays at the NOR boot prompt for about 30 seconds and then shuts off unless you do something.<br />
# Connect your Neo to the GNU/Linux or Windows host via a USB cable. <br />
# Now you can enter the dfu-util commands on your PC as described below.<br />
# 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.<br />
<br />
&lt;!-- The following, upto dfu-util -l is taken from the thread &quot;Re: Freerunner (GTK2007.2) has suddenly become unbootable&quot; on the Support list. --&gt;<br />
<br />
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.<br />
<br />
After connecting the FreeRunner to your host via USB cable, you can test whether dfu-util &quot;sees&quot; the FreeRunner by executing:<br />
<br />
dfu-util -l<br />
If you get error messages from the dfu-util command then try again. Often it works on the second try.<br />
<br />
== Do a backup ==<br />
<br />
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]].<br />
<br />
== Using dfu-util ==<br />
<br />
dfu-util can be used to read flash memory, write memory, and get information from the device.<br />
<br />
This is the general command format to write an image file to a (predefined) &quot;partition name&quot; (referred to as ''altsetting'' in dfu-util help/manual) :<br />
<br />
dfu-util -a ''altsetting'' -R -D ''file_name''<br />
<br />
where:&lt;br&gt;<br />
-a ''altsetting'' : Specify the altsetting of the DFU interface by name or by number&lt;br&gt;<br />
-R : Issue USB Reset signalling once we're finished&lt;br&gt;<br />
-D ''file_name'' : Write firmware from ''file_name'' into device<br />
<br />
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 &quot;./&quot; like this '''./dfu-util'''.<br />
On some systems you need to be root before this will work and on Ubuntu you must preface the command with &quot;sudo&quot; or you will get the following error: &quot;Cannot claim interface: could not claim interface 2: Operation not permitted&quot;<br />
<br />
On Windows, you need to open a command window and run from a command line. Use Start-Run Program and type &quot;cmd&quot; to open a Window.<br />
<br />
More detailed manual for gfu-util is available here : [[Dfu-util]]<br />
<br />
== Flashing the Kernel ==<br />
<br />
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.<br />
<br />
The command format is <br />
<br />
dfu-util -a kernel -R -D ''/path/to/uImage''<br />
<br />
When flashing succeeds the following will be shown:<br />
<br />
status(0) = No error condition is present<br />
Done!<br />
<br />
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.<br />
<br />
== Flashing the Root Filesystem ==<br />
<br />
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.<br />
<br />
The command format is<br />
<br />
dfu-util -a rootfs -R -D ''rootfs_filename.jffs2''<br />
<br />
where ''rootfs_filename.jffs2'' is the name of the file containing the root filesystem.<br />
<br />
When flashing succeeds the following will be shown:<br />
<br />
status(0) = No error condition is present<br />
Done!<br />
<br />
== Flashing the boot loader to the NAND==<br />
<br />
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.<br />
<br />
The command format is <br />
<br />
dfu-util -a u-boot -R -D ''uboot.bin''<br />
<br />
where ''uboot.bin'' is the name of the boot loader binary image file.<br />
<br />
''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.<br />
<br />
&lt;!-- Taken from posts by Mikael Berthe &lt;mikael.berthe@lilotux.net&gt; and Torfinn Ingolfsen &lt;tingox@gmail.com&gt; to Support list, subject: Re: Upgrading u-boot needed ? --&gt;<br />
(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:<br />
root@om-gta02:~# grep Bootloader /dev/mtdblock1<br />
Neo1973 Bootloader U-Boot 1.3.2+gitr18+64eb10cab8055084ae25ea4e73b66dd03cc1a0cb<br />
<br />
You can grep for the same string in /dev/mtdblock0 to retrieve the '''NOR''' u-boot version:<br />
root@om-gta02:~# grep Bootloader /dev/mtdblock0<br />
Neo1973 Bootloader U-Boot 1.3.2-moko12<br />
<br />
&lt;!-- ENDS ... subject: Re: Upgrading u-boot needed ? --&gt;<br />
<br />
== Reboot the FreeRunner from NAND ==<br />
<br />
You should now be able to boot into the new images.<br />
<br />
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'')<br />
<br />
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).<br />
<br />
[[Category:Flashing Openmoko| ]]</div>Brian H Wilsonhttp://wiki.openmoko.org/wiki/U-BootU-Boot2008-08-23T15:15:20Z<p>Brian H Wilson: /* Related pages */</p>
<hr />
<div>{{Languages|Bootloader}}<br />
<br />
{{Bootloader}}<br />
[[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]]<br />
<br />
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]]. <br />
<br />
There are various [[bootloader versions]] available.<br />
<br />
== Booting into U-boot ==<br />
<br />
* Make sure that your phone has had the battery and USB cable removed for at least 30 seconds.<br />
* Hold in the AUX button on power-up to access the boot menu.<br />
* Connect the Neo (ie not Debug Board) to a Linux host with the USB cable.<br />
* Set the console to USB.<br />
* Connect to /dev/ttyACM0 with a terminal program on the Linux host (you might need to chown uucp.uucp /dev/ttyACM0 )<br />
* 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.<br />
* You're now at the bootloader prompt.<br />
* Set the bootdelay uboot environment variable to -1 if you want it to always halt at the bootloader on power-up.<br />
<br />
== General ==<br />
<br />
All versions of the OM smartphone use the [http://u-boot.sourceforge.net/ u-boot] bootloader.<br />
<br />
More information on u-boot can be found at <br />
* http://www.denx.de/wiki/DULG<br />
* http://www.gumstix.org/tikiwiki/tiki-index.php?page=U-Boot<br />
* http://linuxdevices.com/articles/AT5085702347.html<br />
<br />
Additions to the vanilla u-boot already implemented include: <br />
* Support for boot from NAND flash using [[S3C2410 Steppingstone]]<br />
* Support for S3C2410 NAND flash<br />
* Support for downloading programs via S3C2410 USB Device Controller<br />
* Support to display bootup logo / status on S3C2410 Framebuffer<br />
<br />
However, u-boot still doesn't support many of the features that GTA01 needs, such as<br />
* Support for reading kernel/initrd from SD/Transflash<br />
<br />
[[User:HaraldWelte|HaraldWelte]] is working on those issues, and in fact most of them have already been implemented.<br />
<br />
== Bootloader source code ==<br />
<br />
The current bootloader source can be found at http://git.openmoko.org/?p=u-boot.git;a=shortlog;h=stable . <br />
<br />
To get u-boot by subversion:<br />
<br />
svn co https://svn.openmoko.org/ openmoko/u-boot<br />
<br />
To build u-boot:<br />
* Clone the git tree and check out the stable branch<br />
* Set the CROSS_COMPILE environment variable to specify the prefix to your toolchain binaries<br />
* Run &quot;make gta02v5_config&quot; (or gta01bv4_config, or whatever hardware revision you have)<br />
* Run &quot;make u-boot.udfu&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)<br />
<br />
== Bootloader binary ==<br />
<br />
The latest bootloader binary builds can be found under http://buildhost.openmoko.org/daily/ in the subdirectory [device]/200808/[date]/.<br />
<br />
All versions of the GTA02 (Neo Freerunner) that have been sold to the public are version 5 hardware so look for a file with &quot;gta02&quot; and &quot;v5&quot; in the name, for example<br />
uboot-gta02v5-latest.bin<br />
<br />
The file should be written to the NAND flash address 0x00000000 (size 0x30000) (the first [[partition]]).<br />
<br />
== Bootloader development ==<br />
<br />
=== QT2410 ===<br />
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.<br />
<br />
To do so, you need to edit the u-boot/include/configs/qt2410.h file, and change the &quot;if 0&quot; in Line 32 into a &quot;if 1&quot;, then recompile with &quot;make&quot;.<br />
<br />
The resulting &quot;u-boot.bin&quot; is _NOT SUITABLE_ for NAND flash, but only for direct execution from within ram, e.g. by using the [[s3c2410_boot_usb]] program.<br />
<br />
=== GTA01 ===<br />
<br />
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.<br />
<br />
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<br />
<br />
=== GTA02 ===<br />
<br />
The first block holds a little 4KByte RAM buffer that is auto-filled<br />
from NAND by CPU hardware, called &quot;steppingstone&quot; when we boot from<br />
NAND, or the NOR is mapped in there.<br />
<br />
nCS0: 00000000 07FFFFFF 4K steppingstone or NOR (Aux held down) &lt;br&gt;<br />
nCS1: 08000000 0FFFFFFF Glamo &lt;br&gt;<br />
nCS2: 10000000 17FFFFFF nothing mapped &lt;br&gt;<br />
nCS3: 18000000 1FFFFFFF NOR &lt;br&gt;<br />
nCS4: 20000000 17FFFFFF nothing mapped &lt;br&gt;<br />
nCS5: 28000000 2FFFFFFF nothing mapped &lt;br&gt;<br />
nCS6: 30000000 37FFFFFF on-MCP SDRAM 128MB &lt;br&gt;<br />
nCS7: 38000000 3FFFFFFF external SDRAM 128MB &lt;br&gt;<br />
<br />
==== Using JTAG to boot from RAM ====<br />
<br />
So how can we boot from RAM? We use JTAG / OpenOCD to<br />
<br />
* Reset and halt the cpu at PC=0<br />
&lt;pre&gt;<br />
&gt; reset halt<br />
target halted in ARM state due to debug request, current mode: Supervisor<br />
cpsr: 0x400000d3 pc: 0x00000000<br />
MMU: disabled, D-Cache: disabled, I-Cache: disabled<br />
&lt;/pre&gt;<br />
<br />
* Download a small piece of code for low-level SDRAM timing initialization (overwrite 4k SRAM of steppingstone)<br />
&lt;pre&gt;<br />
&gt; load_binary /space/misc/gta01/u-boot.git/board/gta01/lowlevel_foo.bin 0 <br />
downloaded 332 byte in 0s 21899us<br />
&lt;/pre&gt;<br />
<br />
* Assert a break point at address 0x33f80000 (which indicates that the low-level code has finished)<br />
&lt;pre&gt;<br />
&gt; bp 0x33f80000 4 hw<br />
breakpoint added at address 0x33f80000<br />
&lt;/pre&gt;<br />
<br />
* Run the code up to the break point<br />
&lt;pre&gt;<br />
&gt; resume<br />
Target 0 resumed<br />
&gt; Target 0 halted<br />
target halted in ARM state due to breakpoint, current mode: Supervisor<br />
cpsr: 0x600000d3 pc: 0x33f80000<br />
MMU: disabled, D-Cache: disabled, I-Cache: enabled<br />
&lt;/pre&gt;<br />
<br />
* Download the u-boot RAM image to 0x33f80000<br />
&lt;pre&gt;<br />
&gt; load_binary /space/misc/gta01/u-boot.git/u-boot.bin 0x33f80000<br />
downloaded 135692 byte in 6s 567264us<br />
&lt;/pre&gt;<br />
<br />
* Resume processing<br />
&lt;pre&gt;<br />
&gt; resume<br />
Target 0 resumed<br />
&lt;/pre&gt;<br />
<br />
At this point, the display backlight gets bright and we see the following familiar prompt on the serial console:<br />
&lt;pre&gt;<br />
U-Boot 1.1.6 (Jan 13 2007 - 23:44:23)<br />
<br />
DRAM: 128 MB<br />
NAND: 64 MiB<br />
*** Warning - bad CRC or NAND, using default environment<br />
<br />
In: serial<br />
Out: serial<br />
Err: serial<br />
Hit any key to stop autoboot: 0 <br />
GTA01Bv2 # <br />
&lt;/pre&gt;<br />
<br />
== Creating bootable images ==<br />
<br />
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:<br />
<br />
&lt;pre&gt;<br />
objcopy -O binary -R .note -R .comment -S vmlinux linux.bin<br />
gzip -9 linux.bin<br />
u-boot/tools/mkimage -A arm -O linux -T kernel -C gzip -a 30008000 -e 30008000 -n &quot;Kernel Image QT2410&quot; -d linux.bin.gz uImage<br />
&lt;/pre&gt;<br />
<br />
== Boot menu ==<br />
[[Image:Neo1973 uboot menu.jpg|thumb|400px|u-boot boot menu on Neo1973]]<br />
<br />
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]].<br />
<br />
=== Accessing the boot menu ===<br />
<br />
You can access the boot menu by pressing and holding the [[Neo1973 AUX Button]] together with the power button while switching the phone on.<br />
<br />
=== Using the boot menu ===<br />
<br />
By pressing the [[Neo1973 AUX Button]] you can cycle through the menu items. Use the ''POWER'' button to select one item. <br />
<br />
== Bootloader prompt ==<br />
<br />
=== Accessing the bootloader prompt ===<br />
The bootloader prompt is available either on the serial console (via [[Debug Board]]), or as virtual USB Serial device (USB CDC_ACM).<br />
Whether the serial port or usb is used depends on the u-boot environment variables '''stdin''', '''stdout''' and '''stderr'''.<br />
<br />
Whether or not you use usbtty, the first couple of messages will always be displayed on the serial console.<br />
<br />
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.<br />
<br />
==== Using usbtty from Linux ====<br />
<br />
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 -&gt; USB support -&gt; USB Modem (CDC ACM) support). (Instructions for MacOS users are [[MacOS_X#USB_Serial|here]])<br />
<br />
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 &quot;apt-get install cu&quot; if it is not yet installed)<br />
cu -l /dev/ttyACM0<br />
<br />
You might need to <br />
chown uucp.uucp /dev/ttyACM0<br />
<br />
to get the necessary rights (even as root).<br />
<br />
A nice alternative for cu is Werner Almesberger's [[NeoCon|neocon]].<br />
<br />
First, you should try to check whether the USB device shows up in 'lsusb' while you're running in u-boot mode:<br />
<br />
# lsusb -d 1457:5119<br />
Bus 005 Device 079: ID 1457:5119 <br />
<br />
Second, let's see some more details about the available endpoints and configurations:<br />
<br />
&lt;pre&gt;<br />
# lsusb -v -d 1457:5119<br />
Bus 005 Device 079: ID 1457:5119 <br />
Device Descriptor:<br />
bLength 18<br />
bDescriptorType 1<br />
bcdUSB 1.10<br />
bDeviceClass 2 Communications<br />
bDeviceSubClass 0 <br />
bDeviceProtocol 0 <br />
bMaxPacketSize0 16<br />
idVendor 0x1457 <br />
idProduct 0x5119 <br />
bcdDevice 0.00<br />
iManufacturer 1 Openmoko, Inc<br />
iProduct 2 Neo1973 Bootloader U-Boot 1.2.0-g6c7cac8c-dirty-moko3<br />
iSerial 3 0000000<br />
bNumConfigurations 1<br />
Configuration Descriptor:<br />
bLength 9<br />
bDescriptorType 2<br />
wTotalLength 85<br />
bNumInterfaces 3<br />
bConfigurationValue 1<br />
iConfiguration 4 TTY via USB<br />
bmAttributes 0xc0<br />
Self Powered<br />
MaxPower 0mA<br />
Interface Descriptor:<br />
bLength 9<br />
bDescriptorType 4<br />
bInterfaceNumber 0<br />
bAlternateSetting 0<br />
bNumEndpoints 1<br />
bInterfaceClass 2 Communications<br />
bInterfaceSubClass 2 Abstract (modem)<br />
bInterfaceProtocol 1 AT-commands (v.25ter)<br />
iInterface 6 Control Interface<br />
CDC Header:<br />
bcdCDC 0.6e<br />
CDC Call Management:<br />
bmCapabilities 0x00<br />
bDataInterface 1<br />
CDC ACM:<br />
bmCapabilities 0x00<br />
CDC Union:<br />
bMasterInterface 0<br />
bSlaveInterface 1 <br />
Endpoint Descriptor:<br />
bLength 7<br />
bDescriptorType 5<br />
bEndpointAddress 0x81 EP 1 IN<br />
bmAttributes 3<br />
Transfer Type Interrupt<br />
Synch Type None<br />
Usage Type Data<br />
wMaxPacketSize 0x0010 1x 16 bytes<br />
bInterval 255<br />
Interface Descriptor:<br />
bLength 9<br />
bDescriptorType 4<br />
bInterfaceNumber 1<br />
bAlternateSetting 0<br />
bNumEndpoints 2<br />
bInterfaceClass 10 CDC Data<br />
bInterfaceSubClass 0 Unused<br />
bInterfaceProtocol 0 <br />
iInterface 5 Bulk Data Interface<br />
Endpoint Descriptor:<br />
bLength 7<br />
bDescriptorType 5<br />
bEndpointAddress 0x02 EP 2 OUT<br />
bmAttributes 2<br />
Transfer Type Bulk<br />
Synch Type None<br />
Usage Type Data<br />
wMaxPacketSize 0x0010 1x 16 bytes<br />
bInterval 255<br />
Endpoint Descriptor:<br />
bLength 7<br />
bDescriptorType 5<br />
bEndpointAddress 0x83 EP 3 IN<br />
bmAttributes 2<br />
Transfer Type Bulk<br />
Synch Type None<br />
Usage Type Data<br />
wMaxPacketSize 0x0010 1x 16 bytes<br />
bInterval 255<br />
Interface Descriptor:<br />
bLength 9<br />
bDescriptorType 4<br />
bInterfaceNumber 2<br />
bAlternateSetting 0<br />
bNumEndpoints 0<br />
bInterfaceClass 254 Application Specific Interface<br />
bInterfaceSubClass 1 Device Firmware Update<br />
bInterfaceProtocol 1 <br />
iInterface 7 USB Device Firmware Upgrade<br />
Device Status: 0x0001<br />
Self Powered<br />
&lt;/pre&gt;<br />
<br />
Next, you can access it using your favourite terminal program.<br />
<br />
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]]:<br />
&lt;pre&gt;<br />
GTA01Bv2 # setenv stderr usbtty<br />
GTA01Bv2 # setenv stdout usbtty<br />
GTA01Bv2 # setenv stdin usbtty<br />
&lt;/pre&gt;<br />
<br />
==== Typical u-boot prompt ====<br />
<br />
&lt;pre&gt;<br />
U-Boot 1.2.0-moko1 (Feb 16 2007 - 00:36:13)<br />
<br />
DRAM: 128 MB<br />
NAND: 64 MiB<br />
Found Environment offset in OOB..<br />
Video: 640x480x8 31kHz 59Hz<br />
USB: S3C2410 USB Deviced<br />
In: serial<br />
Out: serial<br />
Err: serial<br />
Hit any key to stop autoboot: 0 <br />
GTA01Bv3 #<br />
&lt;/pre&gt;<br />
<br />
=== Commands on the bootloader prompt ===<br />
<br />
:''See [[bootloader commands]].''<br />
<br />
=== What if I borked my bootloader environment and don't get a prompt anymore? ===<br />
Found a solution here:<br />
[[http://markmail.org/message/gqypwiohdet6x4am?q=almesberger+partition&amp;page=1&amp;refer=xbamkzwwsaobv7wa]]<br />
<br />
It works the following way:<br />
* Get the devirginator:<br />
svn co http://svn.openmoko.org/trunk/src/host/devirginator<br />
cd devirginator<br />
* Read the u-boot environment from the device:<br />
dfu-util -a u-boot_env -R -U env.in<br />
* Create a file that contains everything you want to change in your u-boot environment or get it by issuing the following command:<br />
wget http://svn.openmoko.org/trunk/src/host/devirginator/environment.in<br />
* 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.<br />
./envedit.pl -i env.in -f environment.in -o env.out -D GTA02<br />
* On my box the partition layout didn't seem to match the idea of envedit.pl, so it issued 2 warnings:<br />
warning: environment is 262144 bytes, expected 16384<br />
CRC error: expected 0xc33e35fc, got 0x93097bfb<br />
* 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:<br />
./envedit.pl -s 262144 -i env.in -D GTA02 -f environment.in -o env.out<br />
* 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:<br />
dfu-util -a u-boot_env -R -D env.out<br />
<br />
== Device Firmware Upgrade ==<br />
<br />
Our version of u-boot also implements [[USB DFU]]. This can be useful to<br />
load files and kernel for quick testing.<br />
<br />
To find out whether your version of u-boot supports this, use the output of<br />
$ lsusb -v -d 1457:5119<br />
while the phone is in u-boot mode.<br />
<br />
If it supports DFU, you should see the following snippet towards the end of the output:<br />
&lt;pre&gt;<br />
Interface Descriptor:<br />
bLength 9<br />
bDescriptorType 4<br />
bInterfaceNumber 2<br />
bAlternateSetting 0<br />
bNumEndpoints 0<br />
bInterfaceClass 254 Application Specific Interface<br />
bInterfaceSubClass 1 Device Firmware Update<br />
bInterfaceProtocol 1 <br />
iInterface 0 <br />
&lt;/pre&gt;<br />
<br />
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]].<br />
<br />
=== Booting files over DFU ===<br />
<br />
To load a file at memory address 0x32000000:<br />
&lt;pre&gt;<br />
dfu-util -a 0 -D fileToLoad -R<br />
&lt;/pre&gt;<br />
<br />
After that, send 'bootm 0x32000000' to u-boot or 'bootelf 0x32000000' if<br />
its an elf file.<br />
<br />
Simple python script that can boot an ELF image - avoiding a ACM bug that breaks on large packets.<br />
<br />
&lt;pre&gt;<br />
#!/usr/bin/python<br />
import sys<br />
import os<br />
import time<br />
<br />
cmd1 = &quot;neo backlight off\n&quot;<br />
cmd2 = &quot;bootelf 0x32000000\n&quot;<br />
<br />
def output(tty, str):<br />
for x in str:<br />
tty.write(x)<br />
tty.flush()<br />
<br />
if len(sys.argv) == 2:<br />
print &quot;Loading %s...&quot; % sys.argv[1]<br />
<br />
loadfile = &quot;dfu-util -a 0 -D %s -R&quot; % sys.argv[1]<br />
<br />
os.system(loadfile)<br />
<br />
time.sleep(3)<br />
<br />
tty = open(&quot;/dev/ttyACM0&quot;, &quot;a&quot;)<br />
<br />
output(tty, cmd1)<br />
output(tty, cmd2)<br />
<br />
tty.close()<br />
else:<br />
print &quot;Usage: %s elffile&quot; % sys.argv[0]<br />
print &quot;&quot;<br />
sys.exit(2)<br />
&lt;/pre&gt;<br />
<br />
== Troubleshooting ==<br />
<br />
=== USB connectivity problems ===<br />
<br />
I once got errors like this (in dmesg or /var/log/messages) on the host side while connecting the neo in u-boot:<br />
<br />
usb 2-1: device descriptor read/64, error -110<br />
usb usb2: Controller not stopped yet!<br />
<br />
or<br />
<br />
hub 4-0:1.0: port 1 disabled by hub (EMI?), re-enabling...<br />
usb 4-1: USB disconnect, address 2<br />
<br />
A possible solution is given below. Please note that if you have a usb keyboard or mouse then the command might cause trouble. <br />
<br />
rmmod uhci_hcd ; modprobe uhci_hcd<br />
<br />
Another option is to plug the FR into a different USB port on the host, preferably one on the Motherboard not the hub.<br />
<br />
Disconnecting the Neo's USB while powering up may prevent this problem in the future.<br />
<br />
== Related pages ==<br />
<br />
See [[Flashing the Neo 1973]] and [[Flashing the Neo Freerunner]] for instructions on using dfu-util to install a new bootloader in your phone.<br />
<br />
[[Category:System Developers]]<br />
[[Category:Flashing Openmoko]]</div>Brian H Wilsonhttp://wiki.openmoko.org/wiki/U-BootU-Boot2008-08-23T15:14:32Z<p>Brian H Wilson: /* USB connectivity problems */</p>
<hr />
<div>{{Languages|Bootloader}}<br />
<br />
{{Bootloader}}<br />
[[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]]<br />
<br />
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]]. <br />
<br />
There are various [[bootloader versions]] available.<br />
<br />
== Booting into U-boot ==<br />
<br />
* Make sure that your phone has had the battery and USB cable removed for at least 30 seconds.<br />
* Hold in the AUX button on power-up to access the boot menu.<br />
* Connect the Neo (ie not Debug Board) to a Linux host with the USB cable.<br />
* Set the console to USB.<br />
* Connect to /dev/ttyACM0 with a terminal program on the Linux host (you might need to chown uucp.uucp /dev/ttyACM0 )<br />
* 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.<br />
* You're now at the bootloader prompt.<br />
* Set the bootdelay uboot environment variable to -1 if you want it to always halt at the bootloader on power-up.<br />
<br />
== General ==<br />
<br />
All versions of the OM smartphone use the [http://u-boot.sourceforge.net/ u-boot] bootloader.<br />
<br />
More information on u-boot can be found at <br />
* http://www.denx.de/wiki/DULG<br />
* http://www.gumstix.org/tikiwiki/tiki-index.php?page=U-Boot<br />
* http://linuxdevices.com/articles/AT5085702347.html<br />
<br />
Additions to the vanilla u-boot already implemented include: <br />
* Support for boot from NAND flash using [[S3C2410 Steppingstone]]<br />
* Support for S3C2410 NAND flash<br />
* Support for downloading programs via S3C2410 USB Device Controller<br />
* Support to display bootup logo / status on S3C2410 Framebuffer<br />
<br />
However, u-boot still doesn't support many of the features that GTA01 needs, such as<br />
* Support for reading kernel/initrd from SD/Transflash<br />
<br />
[[User:HaraldWelte|HaraldWelte]] is working on those issues, and in fact most of them have already been implemented.<br />
<br />
== Bootloader source code ==<br />
<br />
The current bootloader source can be found at http://git.openmoko.org/?p=u-boot.git;a=shortlog;h=stable . <br />
<br />
To get u-boot by subversion:<br />
<br />
svn co https://svn.openmoko.org/ openmoko/u-boot<br />
<br />
To build u-boot:<br />
* Clone the git tree and check out the stable branch<br />
* Set the CROSS_COMPILE environment variable to specify the prefix to your toolchain binaries<br />
* Run &quot;make gta02v5_config&quot; (or gta01bv4_config, or whatever hardware revision you have)<br />
* Run &quot;make u-boot.udfu&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)<br />
<br />
== Bootloader binary ==<br />
<br />
The latest bootloader binary builds can be found under http://buildhost.openmoko.org/daily/ in the subdirectory [device]/200808/[date]/.<br />
<br />
All versions of the GTA02 (Neo Freerunner) that have been sold to the public are version 5 hardware so look for a file with &quot;gta02&quot; and &quot;v5&quot; in the name, for example<br />
uboot-gta02v5-latest.bin<br />
<br />
The file should be written to the NAND flash address 0x00000000 (size 0x30000) (the first [[partition]]).<br />
<br />
== Bootloader development ==<br />
<br />
=== QT2410 ===<br />
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.<br />
<br />
To do so, you need to edit the u-boot/include/configs/qt2410.h file, and change the &quot;if 0&quot; in Line 32 into a &quot;if 1&quot;, then recompile with &quot;make&quot;.<br />
<br />
The resulting &quot;u-boot.bin&quot; is _NOT SUITABLE_ for NAND flash, but only for direct execution from within ram, e.g. by using the [[s3c2410_boot_usb]] program.<br />
<br />
=== GTA01 ===<br />
<br />
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.<br />
<br />
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<br />
<br />
=== GTA02 ===<br />
<br />
The first block holds a little 4KByte RAM buffer that is auto-filled<br />
from NAND by CPU hardware, called &quot;steppingstone&quot; when we boot from<br />
NAND, or the NOR is mapped in there.<br />
<br />
nCS0: 00000000 07FFFFFF 4K steppingstone or NOR (Aux held down) &lt;br&gt;<br />
nCS1: 08000000 0FFFFFFF Glamo &lt;br&gt;<br />
nCS2: 10000000 17FFFFFF nothing mapped &lt;br&gt;<br />
nCS3: 18000000 1FFFFFFF NOR &lt;br&gt;<br />
nCS4: 20000000 17FFFFFF nothing mapped &lt;br&gt;<br />
nCS5: 28000000 2FFFFFFF nothing mapped &lt;br&gt;<br />
nCS6: 30000000 37FFFFFF on-MCP SDRAM 128MB &lt;br&gt;<br />
nCS7: 38000000 3FFFFFFF external SDRAM 128MB &lt;br&gt;<br />
<br />
==== Using JTAG to boot from RAM ====<br />
<br />
So how can we boot from RAM? We use JTAG / OpenOCD to<br />
<br />
* Reset and halt the cpu at PC=0<br />
&lt;pre&gt;<br />
&gt; reset halt<br />
target halted in ARM state due to debug request, current mode: Supervisor<br />
cpsr: 0x400000d3 pc: 0x00000000<br />
MMU: disabled, D-Cache: disabled, I-Cache: disabled<br />
&lt;/pre&gt;<br />
<br />
* Download a small piece of code for low-level SDRAM timing initialization (overwrite 4k SRAM of steppingstone)<br />
&lt;pre&gt;<br />
&gt; load_binary /space/misc/gta01/u-boot.git/board/gta01/lowlevel_foo.bin 0 <br />
downloaded 332 byte in 0s 21899us<br />
&lt;/pre&gt;<br />
<br />
* Assert a break point at address 0x33f80000 (which indicates that the low-level code has finished)<br />
&lt;pre&gt;<br />
&gt; bp 0x33f80000 4 hw<br />
breakpoint added at address 0x33f80000<br />
&lt;/pre&gt;<br />
<br />
* Run the code up to the break point<br />
&lt;pre&gt;<br />
&gt; resume<br />
Target 0 resumed<br />
&gt; Target 0 halted<br />
target halted in ARM state due to breakpoint, current mode: Supervisor<br />
cpsr: 0x600000d3 pc: 0x33f80000<br />
MMU: disabled, D-Cache: disabled, I-Cache: enabled<br />
&lt;/pre&gt;<br />
<br />
* Download the u-boot RAM image to 0x33f80000<br />
&lt;pre&gt;<br />
&gt; load_binary /space/misc/gta01/u-boot.git/u-boot.bin 0x33f80000<br />
downloaded 135692 byte in 6s 567264us<br />
&lt;/pre&gt;<br />
<br />
* Resume processing<br />
&lt;pre&gt;<br />
&gt; resume<br />
Target 0 resumed<br />
&lt;/pre&gt;<br />
<br />
At this point, the display backlight gets bright and we see the following familiar prompt on the serial console:<br />
&lt;pre&gt;<br />
U-Boot 1.1.6 (Jan 13 2007 - 23:44:23)<br />
<br />
DRAM: 128 MB<br />
NAND: 64 MiB<br />
*** Warning - bad CRC or NAND, using default environment<br />
<br />
In: serial<br />
Out: serial<br />
Err: serial<br />
Hit any key to stop autoboot: 0 <br />
GTA01Bv2 # <br />
&lt;/pre&gt;<br />
<br />
== Creating bootable images ==<br />
<br />
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:<br />
<br />
&lt;pre&gt;<br />
objcopy -O binary -R .note -R .comment -S vmlinux linux.bin<br />
gzip -9 linux.bin<br />
u-boot/tools/mkimage -A arm -O linux -T kernel -C gzip -a 30008000 -e 30008000 -n &quot;Kernel Image QT2410&quot; -d linux.bin.gz uImage<br />
&lt;/pre&gt;<br />
<br />
== Boot menu ==<br />
[[Image:Neo1973 uboot menu.jpg|thumb|400px|u-boot boot menu on Neo1973]]<br />
<br />
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]].<br />
<br />
=== Accessing the boot menu ===<br />
<br />
You can access the boot menu by pressing and holding the [[Neo1973 AUX Button]] together with the power button while switching the phone on.<br />
<br />
=== Using the boot menu ===<br />
<br />
By pressing the [[Neo1973 AUX Button]] you can cycle through the menu items. Use the ''POWER'' button to select one item. <br />
<br />
== Bootloader prompt ==<br />
<br />
=== Accessing the bootloader prompt ===<br />
The bootloader prompt is available either on the serial console (via [[Debug Board]]), or as virtual USB Serial device (USB CDC_ACM).<br />
Whether the serial port or usb is used depends on the u-boot environment variables '''stdin''', '''stdout''' and '''stderr'''.<br />
<br />
Whether or not you use usbtty, the first couple of messages will always be displayed on the serial console.<br />
<br />
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.<br />
<br />
==== Using usbtty from Linux ====<br />
<br />
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 -&gt; USB support -&gt; USB Modem (CDC ACM) support). (Instructions for MacOS users are [[MacOS_X#USB_Serial|here]])<br />
<br />
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 &quot;apt-get install cu&quot; if it is not yet installed)<br />
cu -l /dev/ttyACM0<br />
<br />
You might need to <br />
chown uucp.uucp /dev/ttyACM0<br />
<br />
to get the necessary rights (even as root).<br />
<br />
A nice alternative for cu is Werner Almesberger's [[NeoCon|neocon]].<br />
<br />
First, you should try to check whether the USB device shows up in 'lsusb' while you're running in u-boot mode:<br />
<br />
# lsusb -d 1457:5119<br />
Bus 005 Device 079: ID 1457:5119 <br />
<br />
Second, let's see some more details about the available endpoints and configurations:<br />
<br />
&lt;pre&gt;<br />
# lsusb -v -d 1457:5119<br />
Bus 005 Device 079: ID 1457:5119 <br />
Device Descriptor:<br />
bLength 18<br />
bDescriptorType 1<br />
bcdUSB 1.10<br />
bDeviceClass 2 Communications<br />
bDeviceSubClass 0 <br />
bDeviceProtocol 0 <br />
bMaxPacketSize0 16<br />
idVendor 0x1457 <br />
idProduct 0x5119 <br />
bcdDevice 0.00<br />
iManufacturer 1 Openmoko, Inc<br />
iProduct 2 Neo1973 Bootloader U-Boot 1.2.0-g6c7cac8c-dirty-moko3<br />
iSerial 3 0000000<br />
bNumConfigurations 1<br />
Configuration Descriptor:<br />
bLength 9<br />
bDescriptorType 2<br />
wTotalLength 85<br />
bNumInterfaces 3<br />
bConfigurationValue 1<br />
iConfiguration 4 TTY via USB<br />
bmAttributes 0xc0<br />
Self Powered<br />
MaxPower 0mA<br />
Interface Descriptor:<br />
bLength 9<br />
bDescriptorType 4<br />
bInterfaceNumber 0<br />
bAlternateSetting 0<br />
bNumEndpoints 1<br />
bInterfaceClass 2 Communications<br />
bInterfaceSubClass 2 Abstract (modem)<br />
bInterfaceProtocol 1 AT-commands (v.25ter)<br />
iInterface 6 Control Interface<br />
CDC Header:<br />
bcdCDC 0.6e<br />
CDC Call Management:<br />
bmCapabilities 0x00<br />
bDataInterface 1<br />
CDC ACM:<br />
bmCapabilities 0x00<br />
CDC Union:<br />
bMasterInterface 0<br />
bSlaveInterface 1 <br />
Endpoint Descriptor:<br />
bLength 7<br />
bDescriptorType 5<br />
bEndpointAddress 0x81 EP 1 IN<br />
bmAttributes 3<br />
Transfer Type Interrupt<br />
Synch Type None<br />
Usage Type Data<br />
wMaxPacketSize 0x0010 1x 16 bytes<br />
bInterval 255<br />
Interface Descriptor:<br />
bLength 9<br />
bDescriptorType 4<br />
bInterfaceNumber 1<br />
bAlternateSetting 0<br />
bNumEndpoints 2<br />
bInterfaceClass 10 CDC Data<br />
bInterfaceSubClass 0 Unused<br />
bInterfaceProtocol 0 <br />
iInterface 5 Bulk Data Interface<br />
Endpoint Descriptor:<br />
bLength 7<br />
bDescriptorType 5<br />
bEndpointAddress 0x02 EP 2 OUT<br />
bmAttributes 2<br />
Transfer Type Bulk<br />
Synch Type None<br />
Usage Type Data<br />
wMaxPacketSize 0x0010 1x 16 bytes<br />
bInterval 255<br />
Endpoint Descriptor:<br />
bLength 7<br />
bDescriptorType 5<br />
bEndpointAddress 0x83 EP 3 IN<br />
bmAttributes 2<br />
Transfer Type Bulk<br />
Synch Type None<br />
Usage Type Data<br />
wMaxPacketSize 0x0010 1x 16 bytes<br />
bInterval 255<br />
Interface Descriptor:<br />
bLength 9<br />
bDescriptorType 4<br />
bInterfaceNumber 2<br />
bAlternateSetting 0<br />
bNumEndpoints 0<br />
bInterfaceClass 254 Application Specific Interface<br />
bInterfaceSubClass 1 Device Firmware Update<br />
bInterfaceProtocol 1 <br />
iInterface 7 USB Device Firmware Upgrade<br />
Device Status: 0x0001<br />
Self Powered<br />
&lt;/pre&gt;<br />
<br />
Next, you can access it using your favourite terminal program.<br />
<br />
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]]:<br />
&lt;pre&gt;<br />
GTA01Bv2 # setenv stderr usbtty<br />
GTA01Bv2 # setenv stdout usbtty<br />
GTA01Bv2 # setenv stdin usbtty<br />
&lt;/pre&gt;<br />
<br />
==== Typical u-boot prompt ====<br />
<br />
&lt;pre&gt;<br />
U-Boot 1.2.0-moko1 (Feb 16 2007 - 00:36:13)<br />
<br />
DRAM: 128 MB<br />
NAND: 64 MiB<br />
Found Environment offset in OOB..<br />
Video: 640x480x8 31kHz 59Hz<br />
USB: S3C2410 USB Deviced<br />
In: serial<br />
Out: serial<br />
Err: serial<br />
Hit any key to stop autoboot: 0 <br />
GTA01Bv3 #<br />
&lt;/pre&gt;<br />
<br />
=== Commands on the bootloader prompt ===<br />
<br />
:''See [[bootloader commands]].''<br />
<br />
=== What if I borked my bootloader environment and don't get a prompt anymore? ===<br />
Found a solution here:<br />
[[http://markmail.org/message/gqypwiohdet6x4am?q=almesberger+partition&amp;page=1&amp;refer=xbamkzwwsaobv7wa]]<br />
<br />
It works the following way:<br />
* Get the devirginator:<br />
svn co http://svn.openmoko.org/trunk/src/host/devirginator<br />
cd devirginator<br />
* Read the u-boot environment from the device:<br />
dfu-util -a u-boot_env -R -U env.in<br />
* Create a file that contains everything you want to change in your u-boot environment or get it by issuing the following command:<br />
wget http://svn.openmoko.org/trunk/src/host/devirginator/environment.in<br />
* 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.<br />
./envedit.pl -i env.in -f environment.in -o env.out -D GTA02<br />
* On my box the partition layout didn't seem to match the idea of envedit.pl, so it issued 2 warnings:<br />
warning: environment is 262144 bytes, expected 16384<br />
CRC error: expected 0xc33e35fc, got 0x93097bfb<br />
* 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:<br />
./envedit.pl -s 262144 -i env.in -D GTA02 -f environment.in -o env.out<br />
* 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:<br />
dfu-util -a u-boot_env -R -D env.out<br />
<br />
== Device Firmware Upgrade ==<br />
<br />
Our version of u-boot also implements [[USB DFU]]. This can be useful to<br />
load files and kernel for quick testing.<br />
<br />
To find out whether your version of u-boot supports this, use the output of<br />
$ lsusb -v -d 1457:5119<br />
while the phone is in u-boot mode.<br />
<br />
If it supports DFU, you should see the following snippet towards the end of the output:<br />
&lt;pre&gt;<br />
Interface Descriptor:<br />
bLength 9<br />
bDescriptorType 4<br />
bInterfaceNumber 2<br />
bAlternateSetting 0<br />
bNumEndpoints 0<br />
bInterfaceClass 254 Application Specific Interface<br />
bInterfaceSubClass 1 Device Firmware Update<br />
bInterfaceProtocol 1 <br />
iInterface 0 <br />
&lt;/pre&gt;<br />
<br />
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]].<br />
<br />
=== Booting files over DFU ===<br />
<br />
To load a file at memory address 0x32000000:<br />
&lt;pre&gt;<br />
dfu-util -a 0 -D fileToLoad -R<br />
&lt;/pre&gt;<br />
<br />
After that, send 'bootm 0x32000000' to u-boot or 'bootelf 0x32000000' if<br />
its an elf file.<br />
<br />
Simple python script that can boot an ELF image - avoiding a ACM bug that breaks on large packets.<br />
<br />
&lt;pre&gt;<br />
#!/usr/bin/python<br />
import sys<br />
import os<br />
import time<br />
<br />
cmd1 = &quot;neo backlight off\n&quot;<br />
cmd2 = &quot;bootelf 0x32000000\n&quot;<br />
<br />
def output(tty, str):<br />
for x in str:<br />
tty.write(x)<br />
tty.flush()<br />
<br />
if len(sys.argv) == 2:<br />
print &quot;Loading %s...&quot; % sys.argv[1]<br />
<br />
loadfile = &quot;dfu-util -a 0 -D %s -R&quot; % sys.argv[1]<br />
<br />
os.system(loadfile)<br />
<br />
time.sleep(3)<br />
<br />
tty = open(&quot;/dev/ttyACM0&quot;, &quot;a&quot;)<br />
<br />
output(tty, cmd1)<br />
output(tty, cmd2)<br />
<br />
tty.close()<br />
else:<br />
print &quot;Usage: %s elffile&quot; % sys.argv[0]<br />
print &quot;&quot;<br />
sys.exit(2)<br />
&lt;/pre&gt;<br />
<br />
== Troubleshooting ==<br />
<br />
=== USB connectivity problems ===<br />
<br />
I once got errors like this (in dmesg or /var/log/messages) on the host side while connecting the neo in u-boot:<br />
<br />
usb 2-1: device descriptor read/64, error -110<br />
usb usb2: Controller not stopped yet!<br />
<br />
or<br />
<br />
hub 4-0:1.0: port 1 disabled by hub (EMI?), re-enabling...<br />
usb 4-1: USB disconnect, address 2<br />
<br />
A possible solution is given below. Please note that if you have a usb keyboard or mouse then the command might cause trouble. <br />
<br />
rmmod uhci_hcd ; modprobe uhci_hcd<br />
<br />
Another option is to plug the FR into a different USB port on the host, preferably one on the Motherboard not the hub.<br />
<br />
Disconnecting the Neo's USB while powering up may prevent this problem in the future.<br />
<br />
== Related pages ==<br />
<br />
See [[Flashing Neo 1973]] and [[Flashing Freerunner]] for instructions on using dfu-util to install a new bootloader in your phone.<br />
<br />
<br />
<br />
[[Category:System Developers]]<br />
[[Category:Flashing Openmoko]]</div>Brian H Wilsonhttp://wiki.openmoko.org/wiki/GTA02_revisionsGTA02 revisions2008-08-22T19:44:14Z<p>Brian H Wilson: </p>
<hr />
<div>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.<br />
<br />
All Neo Freerunners that have been released to the public at this time are [[#GTA02v5|revision 5]]. (August 2008)<br />
<br />
== GTA02 specification ==<br />
<br />
The GTA02 will be a [[GTA01]] but with a major revision of everything. These components were added:<br />
* Wifi: Atheros 802.11 b/g<br />
* CPU: Samsung S3C2442 B54 SoC @ 400Mhz<br />
* SMedia Glamo3362 Graphics Accelerator<br />
* 2x ST 3D Accelerometers<br />
* 256MB Flash<br />
* 128MB SDRAM<br />
* 2MB NOR Flash<br />
* 1200mAh Battery<br />
* 2 LEDs illuminating the two buttons. <br />
* GPS: u-blox/Atmel ATR0635<br />
* Bluetooth<br />
* GSM/GPRS: 850/1800/1900 Mhz or 900/1800/1900 Mhz<br />
* USB Host function with power<br />
And it lost:<br />
* One speaker, becoming mono. <br />
<br />
== Estimated time line ==<br />
{{Todo|It should be nice if their are some dates next to the milestones}}<br />
* GTA02v3 design finalized - DONE<br />
* GTA02v3 power supply flaw found, GTA02v4 needed - DONE<br />
* GTA02v4 design finalized - DONE<br />
* GTA02v4 small number produced for Openmoko internal developer evaluation - DONE<br />
* GTA02v4 thorough evaluation by Openmoko internal developers - In progress<br />
* GTA02v4 flaw found, GTA02v5 needed - On hold while further development on drivers is done to ensure no further hardware bugs. - In progress<br />
* GTA02v5 design finalized - DONE<br />
* GTA02v5 small number produced for Openmoko internal developer evaluation - Done (around 20)<br />
* GTA02v5 thorough evaluation by Openmoko internal developers - Done<br />
* GTA02v5 produced in moderate volume - Done<br />
* GTA02v5 goes on sale to community via web store - Done <br />
<br />
== GTA02v1 ==<br />
First generation of prototypes that was given to internal Openmoko software developers. Total 30 pcs fabricated.<br />
<br />
*It is working just fine, but still based on 2440, with external NAND/SDRAM and no NOR flash<br />
*Using the PCF50633 05 N3 due to 04 N3 not available, re-work power for basic schematics verification<br />
*Using GTA01 SIM socket<br />
*Add external debug port<br />
*Still using Global locate A-GPS<br />
* ATAG_REVISION: 0310<br />
<br />
== GTA02v2 ==<br />
Second generation of prototypes, Total 50 pcs run at Taipei SMT factory MOUNT<br />
<br />
*Ideal is have 256 MB NAND on Samsung package, Due to chip availability Start using S3C2442 B43<br />
*Using correct PMU PCF50633 04 N3<br />
*Change new SIM socket<br />
*Change to u-blox A-GPS<br />
*Change LCM power from 3.3v to 1.8v<br />
*USB power switch layout/pin assignment mistake, could not verify USB host supply 5v function<br />
*GPS function verified ok with good sensitivity<br />
* ATAG_REVISION: 0320<br />
<br />
== GTA02v3 ==<br />
Production verification version, 2007/10/11 28 pcs fabricate at FIC SuZhou<br />
<br />
*Still using S3C2442 B43 for hardware verification<br />
*Using control pilot run to verify S3C2442 B54 chips&lt;br&gt;<br />
* ATAG_REVISION: 0330<br />
<br />
== GTA02v4 ==<br />
Mass production release candidate version 1<br />
<br />
2 weeks after v3 gerber out, release the v4 gerber, and 2007/10/20 20 pcs fabricate at FIC SuZhou <br />
<br />
*Change LCM power from 1.8v to 3.3v for display stability issue<br />
*fabricate another 200 pcs for yield rate/production verification<br />
*fabricate 50 pcs with S3C2442 B43 (128 MB NAND) for quality comparsion<br />
*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<br />
*Battery Coulomb design not working on A4<br />
* ATAG_REVISION: 0340<br />
<br />
== GTA02v5 ==<br />
Mass production candidate version 2/Mass production version<br />
<br />
* First batch fabricate 2008/1/14 at FIC SuZhou<br />
* 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]]<br />
* Coulomb counter issue fixed<br />
* USB host power switch fixed<br />
* Need add capacitor for PMU Vbat input for stability issue, this could be done by direct SMT or hand rework<br />
* Need rework (still using SMT in production) add capacitor for PMU Vbat input for PMU stability issue.<br />
* Need manual rework GSM IR UART path a 100k pull down for better GSM deep sleep<br />
* ATAG_REVISION: 0350<br />
<br />
===GTA02 mass Production version change list===<br />
*PMU's LED power error: PMU potential damage issue<br />
*NOR FLASH enable WP: User can write data into NOR FLASH.<br />
*CE CS/RS fine tune: Audio's background noise too high<br />
*I2C pull high resistor: The resistor is too high and signal is distorted <br />
*GSM leakage current: TX_MODEM has a pull high resistor on IO_3V3<br />
*Power consumption: Disable keep active function<br />
*SDIO clock and esd protect resistor<br />
*Refer to Datasheet: R1526 to 33K<br />
*GSM modem on pin: The R1018 is too small and has some leakage current<br />
*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.<br />
<br />
== GTA02v6 ==<br />
Mass production candidate version 3/Mass production version&lt;br&gt;<br />
<br />
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&lt;br&gt;<br />
<br />
*First 100 pcs start from 2008 mid April, and factory make component placement mistake on GSM, second 100 pcs PCB arrive time TBD. <br />
*Add capacitor space for Vbat, reduce the SMT effort<br />
*Add GSM IR resistor for better GSM deep sleep<br />
*Reserve 3 GPIO for hardware version control<br />
*Fixed LEDs power usage (from about 150mW of v5 to about 25mW)<br />
* ATAG_REVISION: 0360<br />
<br />
=== GTA02 A5 to A6 changes ===<br />
*Power Glitch on VB_SYS: Add capacitor on layout, Mass production A5 also apply this change.<br />
*G-sensor separate these interrupt pins: At A5, each accelerometer INT1/INT2 connected to same line, at A6 only INT1 was connected.<br />
*GSM_modem power source Reduce power's ripple when the phone is talking<br />
*Keep active Disable keep active function, just fine tune<br />
*GPIO for version control <br />
*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.<br />
*LED driving transistor apply on mass production A5.<br />
*LCM's VDDIO We can totally power off LCM's power, save about extra 1mA.</div>Brian H Wilsonhttp://wiki.openmoko.org/wiki/GTA02_revisionsGTA02 revisions2008-08-22T19:43:29Z<p>Brian H Wilson: Added statement that v5 is current revision</p>
<hr />
<div>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.<br />
<br />
All Neo Freerunners that have been released to the public at this time are [[#GTA02V5|revision 5]]. (August 2008)<br />
<br />
== GTA02 specification ==<br />
<br />
The GTA02 will be a [[GTA01]] but with a major revision of everything. These components were added:<br />
* Wifi: Atheros 802.11 b/g<br />
* CPU: Samsung S3C2442 B54 SoC @ 400Mhz<br />
* SMedia Glamo3362 Graphics Accelerator<br />
* 2x ST 3D Accelerometers<br />
* 256MB Flash<br />
* 128MB SDRAM<br />
* 2MB NOR Flash<br />
* 1200mAh Battery<br />
* 2 LEDs illuminating the two buttons. <br />
* GPS: u-blox/Atmel ATR0635<br />
* Bluetooth<br />
* GSM/GPRS: 850/1800/1900 Mhz or 900/1800/1900 Mhz<br />
* USB Host function with power<br />
And it lost:<br />
* One speaker, becoming mono. <br />
<br />
== Estimated time line ==<br />
{{Todo|It should be nice if their are some dates next to the milestones}}<br />
* GTA02v3 design finalized - DONE<br />
* GTA02v3 power supply flaw found, GTA02v4 needed - DONE<br />
* GTA02v4 design finalized - DONE<br />
* GTA02v4 small number produced for Openmoko internal developer evaluation - DONE<br />
* GTA02v4 thorough evaluation by Openmoko internal developers - In progress<br />
* GTA02v4 flaw found, GTA02v5 needed - On hold while further development on drivers is done to ensure no further hardware bugs. - In progress<br />
* GTA02v5 design finalized - DONE<br />
* GTA02v5 small number produced for Openmoko internal developer evaluation - Done (around 20)<br />
* GTA02v5 thorough evaluation by Openmoko internal developers - Done<br />
* GTA02v5 produced in moderate volume - Done<br />
* GTA02v5 goes on sale to community via web store - Done <br />
<br />
== GTA02v1 ==<br />
First generation of prototypes that was given to internal Openmoko software developers. Total 30 pcs fabricated.<br />
<br />
*It is working just fine, but still based on 2440, with external NAND/SDRAM and no NOR flash<br />
*Using the PCF50633 05 N3 due to 04 N3 not available, re-work power for basic schematics verification<br />
*Using GTA01 SIM socket<br />
*Add external debug port<br />
*Still using Global locate A-GPS<br />
* ATAG_REVISION: 0310<br />
<br />
== GTA02v2 ==<br />
Second generation of prototypes, Total 50 pcs run at Taipei SMT factory MOUNT<br />
<br />
*Ideal is have 256 MB NAND on Samsung package, Due to chip availability Start using S3C2442 B43<br />
*Using correct PMU PCF50633 04 N3<br />
*Change new SIM socket<br />
*Change to u-blox A-GPS<br />
*Change LCM power from 3.3v to 1.8v<br />
*USB power switch layout/pin assignment mistake, could not verify USB host supply 5v function<br />
*GPS function verified ok with good sensitivity<br />
* ATAG_REVISION: 0320<br />
<br />
== GTA02v3 ==<br />
Production verification version, 2007/10/11 28 pcs fabricate at FIC SuZhou<br />
<br />
*Still using S3C2442 B43 for hardware verification<br />
*Using control pilot run to verify S3C2442 B54 chips&lt;br&gt;<br />
* ATAG_REVISION: 0330<br />
<br />
== GTA02v4 ==<br />
Mass production release candidate version 1<br />
<br />
2 weeks after v3 gerber out, release the v4 gerber, and 2007/10/20 20 pcs fabricate at FIC SuZhou <br />
<br />
*Change LCM power from 1.8v to 3.3v for display stability issue<br />
*fabricate another 200 pcs for yield rate/production verification<br />
*fabricate 50 pcs with S3C2442 B43 (128 MB NAND) for quality comparsion<br />
*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<br />
*Battery Coulomb design not working on A4<br />
* ATAG_REVISION: 0340<br />
<br />
== GTA02v5 ==<br />
Mass production candidate version 2/Mass production version<br />
<br />
* First batch fabricate 2008/1/14 at FIC SuZhou<br />
* 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]]<br />
* Coulomb counter issue fixed<br />
* USB host power switch fixed<br />
* Need add capacitor for PMU Vbat input for stability issue, this could be done by direct SMT or hand rework<br />
* Need rework (still using SMT in production) add capacitor for PMU Vbat input for PMU stability issue.<br />
* Need manual rework GSM IR UART path a 100k pull down for better GSM deep sleep<br />
* ATAG_REVISION: 0350<br />
<br />
===GTA02 mass Production version change list===<br />
*PMU's LED power error: PMU potential damage issue<br />
*NOR FLASH enable WP: User can write data into NOR FLASH.<br />
*CE CS/RS fine tune: Audio's background noise too high<br />
*I2C pull high resistor: The resistor is too high and signal is distorted <br />
*GSM leakage current: TX_MODEM has a pull high resistor on IO_3V3<br />
*Power consumption: Disable keep active function<br />
*SDIO clock and esd protect resistor<br />
*Refer to Datasheet: R1526 to 33K<br />
*GSM modem on pin: The R1018 is too small and has some leakage current<br />
*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.<br />
<br />
== GTA02v6 ==<br />
Mass production candidate version 3/Mass production version&lt;br&gt;<br />
<br />
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&lt;br&gt;<br />
<br />
*First 100 pcs start from 2008 mid April, and factory make component placement mistake on GSM, second 100 pcs PCB arrive time TBD. <br />
*Add capacitor space for Vbat, reduce the SMT effort<br />
*Add GSM IR resistor for better GSM deep sleep<br />
*Reserve 3 GPIO for hardware version control<br />
*Fixed LEDs power usage (from about 150mW of v5 to about 25mW)<br />
* ATAG_REVISION: 0360<br />
<br />
=== GTA02 A5 to A6 changes ===<br />
*Power Glitch on VB_SYS: Add capacitor on layout, Mass production A5 also apply this change.<br />
*G-sensor separate these interrupt pins: At A5, each accelerometer INT1/INT2 connected to same line, at A6 only INT1 was connected.<br />
*GSM_modem power source Reduce power's ripple when the phone is talking<br />
*Keep active Disable keep active function, just fine tune<br />
*GPIO for version control <br />
*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.<br />
*LED driving transistor apply on mass production A5.<br />
*LCM's VDDIO We can totally power off LCM's power, save about extra 1mA.</div>Brian H Wilsonhttp://wiki.openmoko.org/wiki/U-BootU-Boot2008-08-22T19:36:33Z<p>Brian H Wilson: </p>
<hr />
<div>{{Languages|Bootloader}}<br />
<br />
{{Bootloader}}<br />
[[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]]<br />
<br />
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]]. <br />
<br />
There are various [[bootloader versions]] available.<br />
<br />
== Booting into U-boot ==<br />
<br />
* Make sure that your phone has had the battery and USB cable removed for at least 30 seconds.<br />
* Hold in the AUX button on power-up to access the boot menu.<br />
* Connect the Neo (ie not Debug Board) to a Linux host with the USB cable.<br />
* Set the console to USB.<br />
* Connect to /dev/ttyACM0 with a terminal program on the Linux host (you might need to chown uucp.uucp /dev/ttyACM0 )<br />
* 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.<br />
* You're now at the bootloader prompt.<br />
* Set the bootdelay uboot environment variable to -1 if you want it to always halt at the bootloader on power-up.<br />
<br />
== General ==<br />
<br />
All versions of the OM smartphone use the [http://u-boot.sourceforge.net/ u-boot] bootloader.<br />
<br />
More information on u-boot can be found at <br />
* http://www.denx.de/wiki/DULG<br />
* http://www.gumstix.org/tikiwiki/tiki-index.php?page=U-Boot<br />
* http://linuxdevices.com/articles/AT5085702347.html<br />
<br />
Additions to the vanilla u-boot already implemented include: <br />
* Support for boot from NAND flash using [[S3C2410 Steppingstone]]<br />
* Support for S3C2410 NAND flash<br />
* Support for downloading programs via S3C2410 USB Device Controller<br />
* Support to display bootup logo / status on S3C2410 Framebuffer<br />
<br />
However, u-boot still doesn't support many of the features that GTA01 needs, such as<br />
* Support for reading kernel/initrd from SD/Transflash<br />
<br />
[[User:HaraldWelte|HaraldWelte]] is working on those issues, and in fact most of them have already been implemented.<br />
<br />
== Bootloader source code ==<br />
<br />
The current bootloader source can be found at http://git.openmoko.org/?p=u-boot.git;a=shortlog;h=stable . <br />
<br />
To get u-boot by subversion:<br />
<br />
svn co https://svn.openmoko.org/ openmoko/u-boot<br />
<br />
To build u-boot:<br />
* Clone the git tree and check out the stable branch<br />
* Set the CROSS_COMPILE environment variable to specify the prefix to your toolchain binaries<br />
* Run &quot;make gta02v5_config&quot; (or gta01bv4_config, or whatever hardware revision you have)<br />
* Run &quot;make u-boot.udfu&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)<br />
<br />
== Bootloader binary ==<br />
<br />
The latest bootloader binary builds can be found under http://buildhost.openmoko.org/daily/ in the subdirectory [device]/200808/[date]/.<br />
<br />
All versions of the GTA02 (Neo Freerunner) that have been sold to the public are version 5 hardware so look for a file with &quot;gta02&quot; and &quot;v5&quot; in the name, for example<br />
uboot-gta02v5-latest.bin<br />
<br />
The file should be written to the NAND flash address 0x00000000 (size 0x30000) (the first [[partition]]).<br />
<br />
== Bootloader development ==<br />
<br />
=== QT2410 ===<br />
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.<br />
<br />
To do so, you need to edit the u-boot/include/configs/qt2410.h file, and change the &quot;if 0&quot; in Line 32 into a &quot;if 1&quot;, then recompile with &quot;make&quot;.<br />
<br />
The resulting &quot;u-boot.bin&quot; is _NOT SUITABLE_ for NAND flash, but only for direct execution from within ram, e.g. by using the [[s3c2410_boot_usb]] program.<br />
<br />
=== GTA01 ===<br />
<br />
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.<br />
<br />
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<br />
<br />
=== GTA02 ===<br />
<br />
The first block holds a little 4KByte RAM buffer that is auto-filled<br />
from NAND by CPU hardware, called &quot;steppingstone&quot; when we boot from<br />
NAND, or the NOR is mapped in there.<br />
<br />
nCS0: 00000000 07FFFFFF 4K steppingstone or NOR (Aux held down) &lt;br&gt;<br />
nCS1: 08000000 0FFFFFFF Glamo &lt;br&gt;<br />
nCS2: 10000000 17FFFFFF nothing mapped &lt;br&gt;<br />
nCS3: 18000000 1FFFFFFF NOR &lt;br&gt;<br />
nCS4: 20000000 17FFFFFF nothing mapped &lt;br&gt;<br />
nCS5: 28000000 2FFFFFFF nothing mapped &lt;br&gt;<br />
nCS6: 30000000 37FFFFFF on-MCP SDRAM 128MB &lt;br&gt;<br />
nCS7: 38000000 3FFFFFFF external SDRAM 128MB &lt;br&gt;<br />
<br />
==== Using JTAG to boot from RAM ====<br />
<br />
So how can we boot from RAM? We use JTAG / OpenOCD to<br />
<br />
* Reset and halt the cpu at PC=0<br />
&lt;pre&gt;<br />
&gt; reset halt<br />
target halted in ARM state due to debug request, current mode: Supervisor<br />
cpsr: 0x400000d3 pc: 0x00000000<br />
MMU: disabled, D-Cache: disabled, I-Cache: disabled<br />
&lt;/pre&gt;<br />
<br />
* Download a small piece of code for low-level SDRAM timing initialization (overwrite 4k SRAM of steppingstone)<br />
&lt;pre&gt;<br />
&gt; load_binary /space/misc/gta01/u-boot.git/board/gta01/lowlevel_foo.bin 0 <br />
downloaded 332 byte in 0s 21899us<br />
&lt;/pre&gt;<br />
<br />
* Assert a break point at address 0x33f80000 (which indicates that the low-level code has finished)<br />
&lt;pre&gt;<br />
&gt; bp 0x33f80000 4 hw<br />
breakpoint added at address 0x33f80000<br />
&lt;/pre&gt;<br />
<br />
* Run the code up to the break point<br />
&lt;pre&gt;<br />
&gt; resume<br />
Target 0 resumed<br />
&gt; Target 0 halted<br />
target halted in ARM state due to breakpoint, current mode: Supervisor<br />
cpsr: 0x600000d3 pc: 0x33f80000<br />
MMU: disabled, D-Cache: disabled, I-Cache: enabled<br />
&lt;/pre&gt;<br />
<br />
* Download the u-boot RAM image to 0x33f80000<br />
&lt;pre&gt;<br />
&gt; load_binary /space/misc/gta01/u-boot.git/u-boot.bin 0x33f80000<br />
downloaded 135692 byte in 6s 567264us<br />
&lt;/pre&gt;<br />
<br />
* Resume processing<br />
&lt;pre&gt;<br />
&gt; resume<br />
Target 0 resumed<br />
&lt;/pre&gt;<br />
<br />
At this point, the display backlight gets bright and we see the following familiar prompt on the serial console:<br />
&lt;pre&gt;<br />
U-Boot 1.1.6 (Jan 13 2007 - 23:44:23)<br />
<br />
DRAM: 128 MB<br />
NAND: 64 MiB<br />
*** Warning - bad CRC or NAND, using default environment<br />
<br />
In: serial<br />
Out: serial<br />
Err: serial<br />
Hit any key to stop autoboot: 0 <br />
GTA01Bv2 # <br />
&lt;/pre&gt;<br />
<br />
== Creating bootable images ==<br />
<br />
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:<br />
<br />
&lt;pre&gt;<br />
objcopy -O binary -R .note -R .comment -S vmlinux linux.bin<br />
gzip -9 linux.bin<br />
u-boot/tools/mkimage -A arm -O linux -T kernel -C gzip -a 30008000 -e 30008000 -n &quot;Kernel Image QT2410&quot; -d linux.bin.gz uImage<br />
&lt;/pre&gt;<br />
<br />
== Boot menu ==<br />
[[Image:Neo1973 uboot menu.jpg|thumb|400px|u-boot boot menu on Neo1973]]<br />
<br />
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]].<br />
<br />
=== Accessing the boot menu ===<br />
<br />
You can access the boot menu by pressing and holding the [[Neo1973 AUX Button]] together with the power button while switching the phone on.<br />
<br />
=== Using the boot menu ===<br />
<br />
By pressing the [[Neo1973 AUX Button]] you can cycle through the menu items. Use the ''POWER'' button to select one item. <br />
<br />
== Bootloader prompt ==<br />
<br />
=== Accessing the bootloader prompt ===<br />
The bootloader prompt is available either on the serial console (via [[Debug Board]]), or as virtual USB Serial device (USB CDC_ACM).<br />
Whether the serial port or usb is used depends on the u-boot environment variables '''stdin''', '''stdout''' and '''stderr'''.<br />
<br />
Whether or not you use usbtty, the first couple of messages will always be displayed on the serial console.<br />
<br />
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.<br />
<br />
==== Using usbtty from Linux ====<br />
<br />
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 -&gt; USB support -&gt; USB Modem (CDC ACM) support). (Instructions for MacOS users are [[MacOS_X#USB_Serial|here]])<br />
<br />
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 &quot;apt-get install cu&quot; if it is not yet installed)<br />
cu -l /dev/ttyACM0<br />
<br />
You might need to <br />
chown uucp.uucp /dev/ttyACM0<br />
<br />
to get the necessary rights (even as root).<br />
<br />
A nice alternative for cu is Werner Almesberger's [[NeoCon|neocon]].<br />
<br />
First, you should try to check whether the USB device shows up in 'lsusb' while you're running in u-boot mode:<br />
<br />
# lsusb -d 1457:5119<br />
Bus 005 Device 079: ID 1457:5119 <br />
<br />
Second, let's see some more details about the available endpoints and configurations:<br />
<br />
&lt;pre&gt;<br />
# lsusb -v -d 1457:5119<br />
Bus 005 Device 079: ID 1457:5119 <br />
Device Descriptor:<br />
bLength 18<br />
bDescriptorType 1<br />
bcdUSB 1.10<br />
bDeviceClass 2 Communications<br />
bDeviceSubClass 0 <br />
bDeviceProtocol 0 <br />
bMaxPacketSize0 16<br />
idVendor 0x1457 <br />
idProduct 0x5119 <br />
bcdDevice 0.00<br />
iManufacturer 1 OpenMoko, Inc<br />
iProduct 2 Neo1973 Bootloader U-Boot 1.2.0-g6c7cac8c-dirty-moko3<br />
iSerial 3 0000000<br />
bNumConfigurations 1<br />
Configuration Descriptor:<br />
bLength 9<br />
bDescriptorType 2<br />
wTotalLength 85<br />
bNumInterfaces 3<br />
bConfigurationValue 1<br />
iConfiguration 4 TTY via USB<br />
bmAttributes 0xc0<br />
Self Powered<br />
MaxPower 0mA<br />
Interface Descriptor:<br />
bLength 9<br />
bDescriptorType 4<br />
bInterfaceNumber 0<br />
bAlternateSetting 0<br />
bNumEndpoints 1<br />
bInterfaceClass 2 Communications<br />
bInterfaceSubClass 2 Abstract (modem)<br />
bInterfaceProtocol 1 AT-commands (v.25ter)<br />
iInterface 6 Control Interface<br />
CDC Header:<br />
bcdCDC 0.6e<br />
CDC Call Management:<br />
bmCapabilities 0x00<br />
bDataInterface 1<br />
CDC ACM:<br />
bmCapabilities 0x00<br />
CDC Union:<br />
bMasterInterface 0<br />
bSlaveInterface 1 <br />
Endpoint Descriptor:<br />
bLength 7<br />
bDescriptorType 5<br />
bEndpointAddress 0x81 EP 1 IN<br />
bmAttributes 3<br />
Transfer Type Interrupt<br />
Synch Type None<br />
Usage Type Data<br />
wMaxPacketSize 0x0010 1x 16 bytes<br />
bInterval 255<br />
Interface Descriptor:<br />
bLength 9<br />
bDescriptorType 4<br />
bInterfaceNumber 1<br />
bAlternateSetting 0<br />
bNumEndpoints 2<br />
bInterfaceClass 10 CDC Data<br />
bInterfaceSubClass 0 Unused<br />
bInterfaceProtocol 0 <br />
iInterface 5 Bulk Data Interface<br />
Endpoint Descriptor:<br />
bLength 7<br />
bDescriptorType 5<br />
bEndpointAddress 0x02 EP 2 OUT<br />
bmAttributes 2<br />
Transfer Type Bulk<br />
Synch Type None<br />
Usage Type Data<br />
wMaxPacketSize 0x0010 1x 16 bytes<br />
bInterval 255<br />
Endpoint Descriptor:<br />
bLength 7<br />
bDescriptorType 5<br />
bEndpointAddress 0x83 EP 3 IN<br />
bmAttributes 2<br />
Transfer Type Bulk<br />
Synch Type None<br />
Usage Type Data<br />
wMaxPacketSize 0x0010 1x 16 bytes<br />
bInterval 255<br />
Interface Descriptor:<br />
bLength 9<br />
bDescriptorType 4<br />
bInterfaceNumber 2<br />
bAlternateSetting 0<br />
bNumEndpoints 0<br />
bInterfaceClass 254 Application Specific Interface<br />
bInterfaceSubClass 1 Device Firmware Update<br />
bInterfaceProtocol 1 <br />
iInterface 7 USB Device Firmware Upgrade<br />
Device Status: 0x0001<br />
Self Powered<br />
&lt;/pre&gt;<br />
<br />
Next, you can access it using your favourite terminal program.<br />
<br />
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]]:<br />
&lt;pre&gt;<br />
GTA01Bv2 # setenv stderr usbtty<br />
GTA01Bv2 # setenv stdout usbtty<br />
GTA01Bv2 # setenv stdin usbtty<br />
&lt;/pre&gt;<br />
<br />
==== Typical u-boot prompt ====<br />
<br />
&lt;pre&gt;<br />
U-Boot 1.2.0-moko1 (Feb 16 2007 - 00:36:13)<br />
<br />
DRAM: 128 MB<br />
NAND: 64 MiB<br />
Found Environment offset in OOB..<br />
Video: 640x480x8 31kHz 59Hz<br />
USB: S3C2410 USB Deviced<br />
In: serial<br />
Out: serial<br />
Err: serial<br />
Hit any key to stop autoboot: 0 <br />
GTA01Bv3 #<br />
&lt;/pre&gt;<br />
<br />
=== Commands on the bootloader prompt ===<br />
<br />
:''See [[bootloader commands]].''<br />
<br />
=== What if I borked my bootloader environment and don't get a prompt anymore? ===<br />
Found a solution here:<br />
[[http://markmail.org/message/gqypwiohdet6x4am?q=almesberger+partition&amp;page=1&amp;refer=xbamkzwwsaobv7wa]]<br />
<br />
It works the following way:<br />
* Get the devirginator:<br />
svn co http://svn.openmoko.org/trunk/src/host/devirginator<br />
cd devirginator<br />
* Read the u-boot environment from the device:<br />
dfu-util -a u-boot_env -R -U env.in<br />
* Create a file that contains everything you want to change in your u-boot environment or get it by issuing the following command:<br />
wget http://svn.openmoko.org/trunk/src/host/devirginator/environment.in<br />
* 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.<br />
./envedit.pl -i env.in -f environment.in -o env.out -D GTA02<br />
* On my box the partition layout didn't seem to match the idea of envedit.pl, so it issued 2 warnings:<br />
warning: environment is 262144 bytes, expected 16384<br />
CRC error: expected 0xc33e35fc, got 0x93097bfb<br />
* 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:<br />
./envedit.pl -s 262144 -i env.in -D GTA02 -f environment.in -o env.out<br />
* 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:<br />
dfu-util -a u-boot_env -R -D env.out<br />
<br />
== Device Firmware Upgrade ==<br />
<br />
Our version of u-boot also implements [[USB DFU]]. This can be useful to<br />
load files and kernel for quick testing.<br />
<br />
To find out whether your version of u-boot supports this, use the output of<br />
$ lsusb -v -d 1457:5119<br />
while the phone is in u-boot mode.<br />
<br />
If it supports DFU, you should see the following snippet towards the end of the output:<br />
&lt;pre&gt;<br />
Interface Descriptor:<br />
bLength 9<br />
bDescriptorType 4<br />
bInterfaceNumber 2<br />
bAlternateSetting 0<br />
bNumEndpoints 0<br />
bInterfaceClass 254 Application Specific Interface<br />
bInterfaceSubClass 1 Device Firmware Update<br />
bInterfaceProtocol 1 <br />
iInterface 0 <br />
&lt;/pre&gt;<br />
<br />
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]].<br />
<br />
=== Booting files over DFU ===<br />
<br />
To load a file at memory address 0x32000000:<br />
&lt;pre&gt;<br />
dfu-util -a 0 -D fileToLoad -R<br />
&lt;/pre&gt;<br />
<br />
After that, send 'bootm 0x32000000' to u-boot or 'bootelf 0x32000000' if<br />
its an elf file.<br />
<br />
Simple python script that can boot an ELF image - avoiding a ACM bug that breaks on large packets.<br />
<br />
&lt;pre&gt;<br />
#!/usr/bin/python<br />
import sys<br />
import os<br />
import time<br />
<br />
cmd1 = &quot;neo backlight off\n&quot;<br />
cmd2 = &quot;bootelf 0x32000000\n&quot;<br />
<br />
def output(tty, str):<br />
for x in str:<br />
tty.write(x)<br />
tty.flush()<br />
<br />
if len(sys.argv) == 2:<br />
print &quot;Loading %s...&quot; % sys.argv[1]<br />
<br />
loadfile = &quot;dfu-util -a 0 -D %s -R&quot; % sys.argv[1]<br />
<br />
os.system(loadfile)<br />
<br />
time.sleep(3)<br />
<br />
tty = open(&quot;/dev/ttyACM0&quot;, &quot;a&quot;)<br />
<br />
output(tty, cmd1)<br />
output(tty, cmd2)<br />
<br />
tty.close()<br />
else:<br />
print &quot;Usage: %s elffile&quot; % sys.argv[0]<br />
print &quot;&quot;<br />
sys.exit(2)<br />
&lt;/pre&gt;<br />
<br />
== Troubleshooting ==<br />
<br />
=== USB connectivity problems ===<br />
<br />
I once got errors like this (in dmesg or /var/log/messages) on the host side while connecting the neo in u-boot:<br />
<br />
usb 2-1: device descriptor read/64, error -110<br />
usb usb2: Controller not stopped yet!<br />
<br />
or<br />
<br />
hub 4-0:1.0: port 1 disabled by hub (EMI?), re-enabling...<br />
usb 4-1: USB disconnect, address 2<br />
<br />
A possible solution is given below. Please note that if you have a usb keyboard or mouse then the command might cause trouble. <br />
<br />
rmmod uhci_hcd ; modprobe uhci_hcd<br />
<br />
Another option is to plug the FR into a different USB port on the host, preferably one on the Motherboard not the hub.<br />
<br />
Disconnecting the Neo's USB while powering up may prevent this problem in the future.<br />
<br />
See [[Flashing Openmoko]]<br />
<br />
<br />
[[Category:System Developers]]<br />
[[Category:Flashing Openmoko]]</div>Brian H Wilsonhttp://wiki.openmoko.org/wiki/U-BootU-Boot2008-08-22T19:12:25Z<p>Brian H Wilson: </p>
<hr />
<div>{{Languages|Bootloader}}<br />
<br />
{{Bootloader}}<br />
[[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]]<br />
<br />
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]]. <br />
<br />
There are various [[bootloader versions]] available.<br />
<br />
== Booting into U-boot ==<br />
<br />
* Make sure that your phone has had the battery and USB cable removed for at least 30 seconds.<br />
* Hold in the AUX button on power-up to access the boot menu.<br />
* Connect the Neo (ie not Debug Board) to a Linux host with the USB cable.<br />
* Set the console to USB.<br />
* Connect to /dev/ttyACM0 with a terminal program on the Linux host (you might need to chown uucp.uucp /dev/ttyACM0 )<br />
* 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.<br />
* You're now at the bootloader prompt.<br />
* Set the bootdelay uboot environment variable to -1 if you want it to always halt at the bootloader on power-up.<br />
<br />
== General ==<br />
<br />
All versions of the OM smartphone use the [http://u-boot.sourceforge.net/ u-boot] bootloader.<br />
<br />
More information on u-boot can be found at <br />
* http://www.denx.de/wiki/DULG<br />
* http://www.gumstix.org/tikiwiki/tiki-index.php?page=U-Boot<br />
* http://linuxdevices.com/articles/AT5085702347.html<br />
<br />
Additions to the vanilla u-boot already implemented include: <br />
* Support for boot from NAND flash using [[S3C2410 Steppingstone]]<br />
* Support for S3C2410 NAND flash<br />
* Support for downloading programs via S3C2410 USB Device Controller<br />
* Support to display bootup logo / status on S3C2410 Framebuffer<br />
<br />
However, u-boot still doesn't support many of the features that GTA01 needs, such as<br />
* Support for reading kernel/initrd from SD/Transflash<br />
<br />
[[User:HaraldWelte|HaraldWelte]] is working on those issues, and in fact most of them have already been implemented.<br />
<br />
== Bootloader source code ==<br />
<br />
The current bootloader source can be found at http://git.openmoko.org/?p=u-boot.git;a=shortlog;h=stable . <br />
<br />
To get u-boot by subversion:<br />
<br />
svn co https://svn.openmoko.org/ openmoko/u-boot<br />
<br />
To build u-boot:<br />
* Clone the git tree and check out the stable branch<br />
* Set the CROSS_COMPILE environment variable to specify the prefix to your toolchain binaries<br />
* Run &quot;make gta02v5_config&quot; (or gta01bv4_config, or whatever hardware revision you have)<br />
* Run &quot;make u-boot.udfu&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)<br />
<br />
== Bootloader binary ==<br />
<br />
The latest bootloader binary builds can be found under http://buildhost.openmoko.org/daily/ in the subdirectory [device]/200808/[date]/.<br />
<br />
All versions of the GTA02 (Neo Freerunner) that have been sold to the public are version 5 hardware so look for a file with &quot;gta02&quot; and &quot;v5&quot; in the name, for example<br />
uboot-gta02v5-latest.bin<br />
<br />
The file should be written to the NAND flash address 0x00000000 (size 0x30000) (the first [[partition]]).<br />
<br />
== Bootloader development ==<br />
<br />
=== QT2410 ===<br />
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.<br />
<br />
To do so, you need to edit the u-boot/include/configs/qt2410.h file, and change the &quot;if 0&quot; in Line 32 into a &quot;if 1&quot;, then recompile with &quot;make&quot;.<br />
<br />
The resulting &quot;u-boot.bin&quot; is _NOT SUITABLE_ for NAND flash, but only for direct execution from within ram, e.g. by using the [[s3c2410_boot_usb]] program.<br />
<br />
=== GTA01 ===<br />
<br />
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.<br />
<br />
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<br />
<br />
=== GTA02 ===<br />
<br />
The first block holds a little 4KByte RAM buffer that is auto-filled<br />
from NAND by CPU hardware, called &quot;steppingstone&quot; when we boot from<br />
NAND, or the NOR is mapped in there.<br />
<br />
nCS0: 00000000 07FFFFFF 4K steppingstone or NOR (Aux held down) &lt;br&gt;<br />
nCS1: 08000000 0FFFFFFF Glamo &lt;br&gt;<br />
nCS2: 10000000 17FFFFFF nothing mapped &lt;br&gt;<br />
nCS3: 18000000 1FFFFFFF NOR &lt;br&gt;<br />
nCS4: 20000000 17FFFFFF nothing mapped &lt;br&gt;<br />
nCS5: 28000000 2FFFFFFF nothing mapped &lt;br&gt;<br />
nCS6: 30000000 37FFFFFF on-MCP SDRAM 128MB &lt;br&gt;<br />
nCS7: 38000000 3FFFFFFF external SDRAM 128MB &lt;br&gt;<br />
<br />
==== Using JTAG to boot from RAM ====<br />
<br />
So how can we boot from RAM? We use JTAG / OpenOCD to<br />
<br />
* Reset and halt the cpu at PC=0<br />
&lt;pre&gt;<br />
&gt; reset halt<br />
target halted in ARM state due to debug request, current mode: Supervisor<br />
cpsr: 0x400000d3 pc: 0x00000000<br />
MMU: disabled, D-Cache: disabled, I-Cache: disabled<br />
&lt;/pre&gt;<br />
<br />
* Download a small piece of code for low-level SDRAM timing initialization (overwrite 4k SRAM of steppingstone)<br />
&lt;pre&gt;<br />
&gt; load_binary /space/misc/gta01/u-boot.git/board/gta01/lowlevel_foo.bin 0 <br />
downloaded 332 byte in 0s 21899us<br />
&lt;/pre&gt;<br />
<br />
* Assert a break point at address 0x33f80000 (which indicates that the low-level code has finished)<br />
&lt;pre&gt;<br />
&gt; bp 0x33f80000 4 hw<br />
breakpoint added at address 0x33f80000<br />
&lt;/pre&gt;<br />
<br />
* Run the code up to the break point<br />
&lt;pre&gt;<br />
&gt; resume<br />
Target 0 resumed<br />
&gt; Target 0 halted<br />
target halted in ARM state due to breakpoint, current mode: Supervisor<br />
cpsr: 0x600000d3 pc: 0x33f80000<br />
MMU: disabled, D-Cache: disabled, I-Cache: enabled<br />
&lt;/pre&gt;<br />
<br />
* Download the u-boot RAM image to 0x33f80000<br />
&lt;pre&gt;<br />
&gt; load_binary /space/misc/gta01/u-boot.git/u-boot.bin 0x33f80000<br />
downloaded 135692 byte in 6s 567264us<br />
&lt;/pre&gt;<br />
<br />
* Resume processing<br />
&lt;pre&gt;<br />
&gt; resume<br />
Target 0 resumed<br />
&lt;/pre&gt;<br />
<br />
At this point, the display backlight gets bright and we see the following familiar prompt on the serial console:<br />
&lt;pre&gt;<br />
U-Boot 1.1.6 (Jan 13 2007 - 23:44:23)<br />
<br />
DRAM: 128 MB<br />
NAND: 64 MiB<br />
*** Warning - bad CRC or NAND, using default environment<br />
<br />
In: serial<br />
Out: serial<br />
Err: serial<br />
Hit any key to stop autoboot: 0 <br />
GTA01Bv2 # <br />
&lt;/pre&gt;<br />
<br />
== Creating bootable images ==<br />
<br />
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:<br />
<br />
&lt;pre&gt;<br />
objcopy -O binary -R .note -R .comment -S vmlinux linux.bin<br />
gzip -9 linux.bin<br />
u-boot/tools/mkimage -A arm -O linux -T kernel -C gzip -a 30008000 -e 30008000 -n &quot;Kernel Image QT2410&quot; -d linux.bin.gz uImage<br />
&lt;/pre&gt;<br />
<br />
== Boot menu ==<br />
[[Image:Neo1973 uboot menu.jpg|thumb|400px|u-boot boot menu on Neo1973]]<br />
<br />
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]].<br />
<br />
=== Accessing the boot menu ===<br />
<br />
You can access the boot menu by pressing and holding the [[Neo1973 AUX Button]] together with the power button while switching the phone on.<br />
<br />
=== Using the boot menu ===<br />
<br />
By pressing the [[Neo1973 AUX Button]] you can cycle through the menu items. Use the ''POWER'' button to select one item. <br />
<br />
== Bootloader prompt ==<br />
<br />
=== Accessing the bootloader prompt ===<br />
The bootloader prompt is available either on the serial console (via [[Debug Board]]), or as virtual USB Serial device (USB CDC_ACM).<br />
Whether the serial port or usb is used depends on the u-boot environment variables '''stdin''', '''stdout''' and '''stderr'''.<br />
<br />
Whether or not you use usbtty, the first couple of messages will always be displayed on the serial console.<br />
<br />
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.<br />
<br />
==== Using usbtty from Linux ====<br />
<br />
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 -&gt; USB support -&gt; USB Modem (CDC ACM) support). (Instructions for MacOS users are [[MacOS_X#USB_Serial|here]])<br />
<br />
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 &quot;apt-get install cu&quot; if it is not yet installed)<br />
cu -l /dev/ttyACM0<br />
<br />
You might need to <br />
chown uucp.uucp /dev/ttyACM0<br />
<br />
to get the necessary rights (even as root).<br />
<br />
A nice alternative for cu is Werner Almesberger's [[NeoCon|neocon]].<br />
<br />
First, you should try to check whether the USB device shows up in 'lsusb' while you're running in u-boot mode:<br />
<br />
# lsusb -d 1457:5119<br />
Bus 005 Device 079: ID 1457:5119 <br />
<br />
Second, let's see some more details about the available endpoints and configurations:<br />
<br />
&lt;pre&gt;<br />
# lsusb -v -d 1457:5119<br />
Bus 005 Device 079: ID 1457:5119 <br />
Device Descriptor:<br />
bLength 18<br />
bDescriptorType 1<br />
bcdUSB 1.10<br />
bDeviceClass 2 Communications<br />
bDeviceSubClass 0 <br />
bDeviceProtocol 0 <br />
bMaxPacketSize0 16<br />
idVendor 0x1457 <br />
idProduct 0x5119 <br />
bcdDevice 0.00<br />
iManufacturer 1 OpenMoko, Inc<br />
iProduct 2 Neo1973 Bootloader U-Boot 1.2.0-g6c7cac8c-dirty-moko3<br />
iSerial 3 0000000<br />
bNumConfigurations 1<br />
Configuration Descriptor:<br />
bLength 9<br />
bDescriptorType 2<br />
wTotalLength 85<br />
bNumInterfaces 3<br />
bConfigurationValue 1<br />
iConfiguration 4 TTY via USB<br />
bmAttributes 0xc0<br />
Self Powered<br />
MaxPower 0mA<br />
Interface Descriptor:<br />
bLength 9<br />
bDescriptorType 4<br />
bInterfaceNumber 0<br />
bAlternateSetting 0<br />
bNumEndpoints 1<br />
bInterfaceClass 2 Communications<br />
bInterfaceSubClass 2 Abstract (modem)<br />
bInterfaceProtocol 1 AT-commands (v.25ter)<br />
iInterface 6 Control Interface<br />
CDC Header:<br />
bcdCDC 0.6e<br />
CDC Call Management:<br />
bmCapabilities 0x00<br />
bDataInterface 1<br />
CDC ACM:<br />
bmCapabilities 0x00<br />
CDC Union:<br />
bMasterInterface 0<br />
bSlaveInterface 1 <br />
Endpoint Descriptor:<br />
bLength 7<br />
bDescriptorType 5<br />
bEndpointAddress 0x81 EP 1 IN<br />
bmAttributes 3<br />
Transfer Type Interrupt<br />
Synch Type None<br />
Usage Type Data<br />
wMaxPacketSize 0x0010 1x 16 bytes<br />
bInterval 255<br />
Interface Descriptor:<br />
bLength 9<br />
bDescriptorType 4<br />
bInterfaceNumber 1<br />
bAlternateSetting 0<br />
bNumEndpoints 2<br />
bInterfaceClass 10 CDC Data<br />
bInterfaceSubClass 0 Unused<br />
bInterfaceProtocol 0 <br />
iInterface 5 Bulk Data Interface<br />
Endpoint Descriptor:<br />
bLength 7<br />
bDescriptorType 5<br />
bEndpointAddress 0x02 EP 2 OUT<br />
bmAttributes 2<br />
Transfer Type Bulk<br />
Synch Type None<br />
Usage Type Data<br />
wMaxPacketSize 0x0010 1x 16 bytes<br />
bInterval 255<br />
Endpoint Descriptor:<br />
bLength 7<br />
bDescriptorType 5<br />
bEndpointAddress 0x83 EP 3 IN<br />
bmAttributes 2<br />
Transfer Type Bulk<br />
Synch Type None<br />
Usage Type Data<br />
wMaxPacketSize 0x0010 1x 16 bytes<br />
bInterval 255<br />
Interface Descriptor:<br />
bLength 9<br />
bDescriptorType 4<br />
bInterfaceNumber 2<br />
bAlternateSetting 0<br />
bNumEndpoints 0<br />
bInterfaceClass 254 Application Specific Interface<br />
bInterfaceSubClass 1 Device Firmware Update<br />
bInterfaceProtocol 1 <br />
iInterface 7 USB Device Firmware Upgrade<br />
Device Status: 0x0001<br />
Self Powered<br />
&lt;/pre&gt;<br />
<br />
Next, you can access it using your favourite terminal program.<br />
<br />
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]]:<br />
&lt;pre&gt;<br />
GTA01Bv2 # setenv stderr usbtty<br />
GTA01Bv2 # setenv stdout usbtty<br />
GTA01Bv2 # setenv stdin usbtty<br />
&lt;/pre&gt;<br />
<br />
==== Typical u-boot prompt ====<br />
<br />
&lt;pre&gt;<br />
U-Boot 1.2.0-moko1 (Feb 16 2007 - 00:36:13)<br />
<br />
DRAM: 128 MB<br />
NAND: 64 MiB<br />
Found Environment offset in OOB..<br />
Video: 640x480x8 31kHz 59Hz<br />
USB: S3C2410 USB Deviced<br />
In: serial<br />
Out: serial<br />
Err: serial<br />
Hit any key to stop autoboot: 0 <br />
GTA01Bv3 #<br />
&lt;/pre&gt;<br />
<br />
=== Commands on the bootloader prompt ===<br />
<br />
:''See [[bootloader commands]].''<br />
<br />
=== What if I borked my bootloader environment and don't get a prompt anymore? ===<br />
Found a solution here:<br />
[[http://markmail.org/message/gqypwiohdet6x4am?q=almesberger+partition&amp;page=1&amp;refer=xbamkzwwsaobv7wa]]<br />
<br />
It works the following way:<br />
* Get the devirginator:<br />
svn co http://svn.openmoko.org/trunk/src/host/devirginator<br />
cd devirginator<br />
* Read the u-boot environment from the device:<br />
dfu-util -a u-boot_env -R -U env.in<br />
* Create a file that contains everything you want to change in your u-boot environment or get it by issuing the following command:<br />
wget http://svn.openmoko.org/trunk/src/host/devirginator/environment.in<br />
* 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.<br />
./envedit.pl -i env.in -f environment.in -o env.out -D GTA02<br />
* On my box the partition layout didn't seem to match the idea of envedit.pl, so it issued 2 warnings:<br />
warning: environment is 262144 bytes, expected 16384<br />
CRC error: expected 0xc33e35fc, got 0x93097bfb<br />
* 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:<br />
./envedit.pl -s 262144 -i env.in -D GTA02 -f environment.in -o env.out<br />
* 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:<br />
dfu-util -a u-boot_env -R -D env.out<br />
<br />
== Device Firmware Upgrade ==<br />
<br />
Our version of u-boot also implements [[USB DFU]]. This can be useful to<br />
load files and kernel for quick testing.<br />
<br />
To find out whether your version of u-boot supports this, use the output of<br />
$ lsusb -v -d 1457:5119<br />
while the phone is in u-boot mode.<br />
<br />
If it supports DFU, you should see the following snippet towards the end of the output:<br />
&lt;pre&gt;<br />
Interface Descriptor:<br />
bLength 9<br />
bDescriptorType 4<br />
bInterfaceNumber 2<br />
bAlternateSetting 0<br />
bNumEndpoints 0<br />
bInterfaceClass 254 Application Specific Interface<br />
bInterfaceSubClass 1 Device Firmware Update<br />
bInterfaceProtocol 1 <br />
iInterface 0 <br />
&lt;/pre&gt;<br />
<br />
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]].<br />
<br />
=== Booting files over DFU ===<br />
<br />
To load a file at memory address 0x32000000:<br />
&lt;pre&gt;<br />
dfu-util -a 0 -D fileToLoad -R<br />
&lt;/pre&gt;<br />
<br />
After that, send 'bootm 0x32000000' to u-boot or 'bootelf 0x32000000' if<br />
its an elf file.<br />
<br />
Simple python script that can boot an ELF image - avoiding a ACM bug that breaks on large packets.<br />
<br />
&lt;pre&gt;<br />
#!/usr/bin/python<br />
import sys<br />
import os<br />
import time<br />
<br />
cmd1 = &quot;neo backlight off\n&quot;<br />
cmd2 = &quot;bootelf 0x32000000\n&quot;<br />
<br />
def output(tty, str):<br />
for x in str:<br />
tty.write(x)<br />
tty.flush()<br />
<br />
if len(sys.argv) == 2:<br />
print &quot;Loading %s...&quot; % sys.argv[1]<br />
<br />
loadfile = &quot;dfu-util -a 0 -D %s -R&quot; % sys.argv[1]<br />
<br />
os.system(loadfile)<br />
<br />
time.sleep(3)<br />
<br />
tty = open(&quot;/dev/ttyACM0&quot;, &quot;a&quot;)<br />
<br />
output(tty, cmd1)<br />
output(tty, cmd2)<br />
<br />
tty.close()<br />
else:<br />
print &quot;Usage: %s elffile&quot; % sys.argv[0]<br />
print &quot;&quot;<br />
sys.exit(2)<br />
&lt;/pre&gt;<br />
<br />
== Troubleshooting ==<br />
<br />
=== USB connectivity problems ===<br />
<br />
I once got errors like this (in dmesg or /var/log/messages) on the host side while connecting the neo in u-boot:<br />
<br />
usb 2-1: device descriptor read/64, error -110<br />
usb usb2: Controller not stopped yet!<br />
<br />
or<br />
<br />
hub 4-0:1.0: port 1 disabled by hub (EMI?), re-enabling...<br />
usb 4-1: USB disconnect, address 2<br />
<br />
A possible solution is given below. Please note that if you have a usb keyboard or mouse then the command might cause trouble. <br />
<br />
rmmod uhci_hcd ; modprobe uhci_hcd<br />
<br />
Another option is to plug the FR into a different USB port on the host, preferably one on the Motherboard not the hub.<br />
<br />
Disconnecting the Neo's USB while powering up may prevent this problem in the future.<br />
<br />
See [[Flashing Openmoko]]<br />
<br />
<br />
[[Category:System Developers]]<br />
[[Category:Flashing Openmoko]]</div>Brian H Wilsonhttp://wiki.openmoko.org/wiki/U-BootU-Boot2008-08-22T16:56:26Z<p>Brian H Wilson: /* General */</p>
<hr />
<div>{{Languages|Bootloader}}<br />
<br />
<br />
<br />
{{Bootloader}}<br />
[[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]]<br />
<br />
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]]. <br />
<br />
There are various [[bootloader versions]] available.<br />
<br />
== Phase0 Quick Start ==<br />
* Make sure that your phone has had the battery and USB cable removed for at least 30 seconds.<br />
* Connect the Neo (ie not Debug Board) to a Linux host with the USB cable.<br />
* Hold in the AUX button on power-up to access the boot menu.<br />
* Set the console to USB.<br />
* Connect to /dev/ttyACM0 with a terminal program on the Linux host (you might need to chown uucp.uucp /dev/ttyACM0 )<br />
* 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.<br />
* You're now at the bootloader prompt.<br />
* Set the bootdelay uboot environment variable to -1 if you want it to always halt at the bootloader on power-up.<br />
<br />
== General ==<br />
<br />
All versions of the OM smartphone use the [http://u-boot.sourceforge.net/ u-boot] bootloader.<br />
<br />
More information on u-boot can be found at <br />
* http://www.denx.de/wiki/DULG<br />
* http://www.gumstix.org/tikiwiki/tiki-index.php?page=U-Boot<br />
* http://linuxdevices.com/articles/AT5085702347.html<br />
<br />
Additions to the vanilla u-boot already implemented include: <br />
* Support for boot from NAND flash using [[S3C2410 Steppingstone]]<br />
* Support for S3C2410 NAND flash<br />
* Support for downloading programs via S3C2410 USB Device Controller<br />
* Support to display bootup logo / status on S3C2410 Framebuffer<br />
<br />
However, u-boot still doesn't support many of the features that GTA01 needs, such as<br />
* Support for reading kernel/initrd from SD/Transflash<br />
<br />
[[User:HaraldWelte|HaraldWelte]] is working on those issues, and in fact most of them have already been implemented.<br />
<br />
== Bootloader source code ==<br />
<br />
The current bootloader source can be found at http://git.openmoko.org/?p=u-boot.git;a=shortlog;h=stable . <br />
<br />
To get u-boot by subversion:<br />
<br />
svn co https://svn.openmoko.org/ openmoko/u-boot<br />
<br />
To build u-boot:<br />
* Clone the git tree and check out the stable branch<br />
* Set the CROSS_COMPILE environment variable to specify the prefix to your toolchain binaries<br />
* Run &quot;make gta02v5_config&quot; (or gta01bv4_config, or whatever hardware revision you have)<br />
* Run &quot;make u-boot.udfu&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)<br />
<br />
== Bootloader binary ==<br />
<br />
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]]).<br />
<br />
== Bootloader development ==<br />
<br />
=== QT2410 ===<br />
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.<br />
<br />
To do so, you need to edit the u-boot/include/configs/qt2410.h file, and change the &quot;if 0&quot; in Line 32 into a &quot;if 1&quot;, then recompile with &quot;make&quot;.<br />
<br />
The resulting &quot;u-boot.bin&quot; is _NOT SUITABLE_ for NAND flash, but only for direct execution from within ram, e.g. by using the [[s3c2410_boot_usb]] program.<br />
<br />
=== GTA01 ===<br />
<br />
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.<br />
<br />
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<br />
<br />
=== GTA02 ===<br />
<br />
The first block holds a little 4KByte RAM buffer that is auto-filled<br />
from NAND by CPU hardware, called &quot;steppingstone&quot; when we boot from<br />
NAND, or the NOR is mapped in there.<br />
<br />
nCS0: 00000000 07FFFFFF 4K steppingstone or NOR (Aux held down) &lt;br&gt;<br />
nCS1: 08000000 0FFFFFFF Glamo &lt;br&gt;<br />
nCS2: 10000000 17FFFFFF nothing mapped &lt;br&gt;<br />
nCS3: 18000000 1FFFFFFF NOR &lt;br&gt;<br />
nCS4: 20000000 17FFFFFF nothing mapped &lt;br&gt;<br />
nCS5: 28000000 2FFFFFFF nothing mapped &lt;br&gt;<br />
nCS6: 30000000 37FFFFFF on-MCP SDRAM 128MB &lt;br&gt;<br />
nCS7: 38000000 3FFFFFFF external SDRAM 128MB &lt;br&gt;<br />
<br />
==== Using JTAG to boot from RAM ====<br />
<br />
So how can we boot from RAM? We use JTAG / OpenOCD to<br />
<br />
* Reset and halt the cpu at PC=0<br />
&lt;pre&gt;<br />
&gt; reset halt<br />
target halted in ARM state due to debug request, current mode: Supervisor<br />
cpsr: 0x400000d3 pc: 0x00000000<br />
MMU: disabled, D-Cache: disabled, I-Cache: disabled<br />
&lt;/pre&gt;<br />
<br />
* Download a small piece of code for low-level SDRAM timing initialization (overwrite 4k SRAM of steppingstone)<br />
&lt;pre&gt;<br />
&gt; load_binary /space/misc/gta01/u-boot.git/board/gta01/lowlevel_foo.bin 0 <br />
downloaded 332 byte in 0s 21899us<br />
&lt;/pre&gt;<br />
<br />
* Assert a break point at address 0x33f80000 (which indicates that the low-level code has finished)<br />
&lt;pre&gt;<br />
&gt; bp 0x33f80000 4 hw<br />
breakpoint added at address 0x33f80000<br />
&lt;/pre&gt;<br />
<br />
* Run the code up to the break point<br />
&lt;pre&gt;<br />
&gt; resume<br />
Target 0 resumed<br />
&gt; Target 0 halted<br />
target halted in ARM state due to breakpoint, current mode: Supervisor<br />
cpsr: 0x600000d3 pc: 0x33f80000<br />
MMU: disabled, D-Cache: disabled, I-Cache: enabled<br />
&lt;/pre&gt;<br />
<br />
* Download the u-boot RAM image to 0x33f80000<br />
&lt;pre&gt;<br />
&gt; load_binary /space/misc/gta01/u-boot.git/u-boot.bin 0x33f80000<br />
downloaded 135692 byte in 6s 567264us<br />
&lt;/pre&gt;<br />
<br />
* Resume processing<br />
&lt;pre&gt;<br />
&gt; resume<br />
Target 0 resumed<br />
&lt;/pre&gt;<br />
<br />
At this point, the display backlight gets bright and we see the following familiar prompt on the serial console:<br />
&lt;pre&gt;<br />
U-Boot 1.1.6 (Jan 13 2007 - 23:44:23)<br />
<br />
DRAM: 128 MB<br />
NAND: 64 MiB<br />
*** Warning - bad CRC or NAND, using default environment<br />
<br />
In: serial<br />
Out: serial<br />
Err: serial<br />
Hit any key to stop autoboot: 0 <br />
GTA01Bv2 # <br />
&lt;/pre&gt;<br />
<br />
== Creating bootable images ==<br />
<br />
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:<br />
<br />
&lt;pre&gt;<br />
objcopy -O binary -R .note -R .comment -S vmlinux linux.bin<br />
gzip -9 linux.bin<br />
u-boot/tools/mkimage -A arm -O linux -T kernel -C gzip -a 30008000 -e 30008000 -n &quot;Kernel Image QT2410&quot; -d linux.bin.gz uImage<br />
&lt;/pre&gt;<br />
<br />
== Boot menu ==<br />
[[Image:Neo1973 uboot menu.jpg|thumb|400px|u-boot boot menu on Neo1973]]<br />
<br />
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]].<br />
<br />
=== Accessing the boot menu ===<br />
<br />
You can access the boot menu by pressing and holding the [[Neo1973 AUX Button]] together with the power button while switching the phone on.<br />
<br />
=== Using the boot menu ===<br />
<br />
By pressing the [[Neo1973 AUX Button]] you can cycle through the menu items. Use the ''POWER'' button to select one item. <br />
<br />
== Bootloader prompt ==<br />
<br />
=== Accessing the bootloader prompt ===<br />
The bootloader prompt is available either on the serial console (via [[Debug Board]]), or as virtual USB Serial device (USB CDC_ACM).<br />
Whether the serial port or usb is used depends on the u-boot environment variables '''stdin''', '''stdout''' and '''stderr'''.<br />
<br />
Whether or not you use usbtty, the first couple of messages will always be displayed on the serial console.<br />
<br />
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.<br />
<br />
==== Using usbtty from Linux ====<br />
<br />
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 -&gt; USB support -&gt; USB Modem (CDC ACM) support). (Instructions for MacOS users are [[MacOS_X#USB_Serial|here]])<br />
<br />
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 &quot;apt-get install cu&quot; if it is not yet installed)<br />
cu -l /dev/ttyACM0<br />
<br />
You might need to <br />
chown uucp.uucp /dev/ttyACM0<br />
<br />
to get the necessary rights (even as root).<br />
<br />
A nice alternative for cu is Werner Almesberger's [[NeoCon|neocon]].<br />
<br />
First, you should try to check whether the USB device shows up in 'lsusb' while you're running in u-boot mode:<br />
<br />
# lsusb -d 1457:5119<br />
Bus 005 Device 079: ID 1457:5119 <br />
<br />
Second, let's see some more details about the available endpoints and configurations:<br />
<br />
&lt;pre&gt;<br />
# lsusb -v -d 1457:5119<br />
Bus 005 Device 079: ID 1457:5119 <br />
Device Descriptor:<br />
bLength 18<br />
bDescriptorType 1<br />
bcdUSB 1.10<br />
bDeviceClass 2 Communications<br />
bDeviceSubClass 0 <br />
bDeviceProtocol 0 <br />
bMaxPacketSize0 16<br />
idVendor 0x1457 <br />
idProduct 0x5119 <br />
bcdDevice 0.00<br />
iManufacturer 1 OpenMoko, Inc<br />
iProduct 2 Neo1973 Bootloader U-Boot 1.2.0-g6c7cac8c-dirty-moko3<br />
iSerial 3 0000000<br />
bNumConfigurations 1<br />
Configuration Descriptor:<br />
bLength 9<br />
bDescriptorType 2<br />
wTotalLength 85<br />
bNumInterfaces 3<br />
bConfigurationValue 1<br />
iConfiguration 4 TTY via USB<br />
bmAttributes 0xc0<br />
Self Powered<br />
MaxPower 0mA<br />
Interface Descriptor:<br />
bLength 9<br />
bDescriptorType 4<br />
bInterfaceNumber 0<br />
bAlternateSetting 0<br />
bNumEndpoints 1<br />
bInterfaceClass 2 Communications<br />
bInterfaceSubClass 2 Abstract (modem)<br />
bInterfaceProtocol 1 AT-commands (v.25ter)<br />
iInterface 6 Control Interface<br />
CDC Header:<br />
bcdCDC 0.6e<br />
CDC Call Management:<br />
bmCapabilities 0x00<br />
bDataInterface 1<br />
CDC ACM:<br />
bmCapabilities 0x00<br />
CDC Union:<br />
bMasterInterface 0<br />
bSlaveInterface 1 <br />
Endpoint Descriptor:<br />
bLength 7<br />
bDescriptorType 5<br />
bEndpointAddress 0x81 EP 1 IN<br />
bmAttributes 3<br />
Transfer Type Interrupt<br />
Synch Type None<br />
Usage Type Data<br />
wMaxPacketSize 0x0010 1x 16 bytes<br />
bInterval 255<br />
Interface Descriptor:<br />
bLength 9<br />
bDescriptorType 4<br />
bInterfaceNumber 1<br />
bAlternateSetting 0<br />
bNumEndpoints 2<br />
bInterfaceClass 10 CDC Data<br />
bInterfaceSubClass 0 Unused<br />
bInterfaceProtocol 0 <br />
iInterface 5 Bulk Data Interface<br />
Endpoint Descriptor:<br />
bLength 7<br />
bDescriptorType 5<br />
bEndpointAddress 0x02 EP 2 OUT<br />
bmAttributes 2<br />
Transfer Type Bulk<br />
Synch Type None<br />
Usage Type Data<br />
wMaxPacketSize 0x0010 1x 16 bytes<br />
bInterval 255<br />
Endpoint Descriptor:<br />
bLength 7<br />
bDescriptorType 5<br />
bEndpointAddress 0x83 EP 3 IN<br />
bmAttributes 2<br />
Transfer Type Bulk<br />
Synch Type None<br />
Usage Type Data<br />
wMaxPacketSize 0x0010 1x 16 bytes<br />
bInterval 255<br />
Interface Descriptor:<br />
bLength 9<br />
bDescriptorType 4<br />
bInterfaceNumber 2<br />
bAlternateSetting 0<br />
bNumEndpoints 0<br />
bInterfaceClass 254 Application Specific Interface<br />
bInterfaceSubClass 1 Device Firmware Update<br />
bInterfaceProtocol 1 <br />
iInterface 7 USB Device Firmware Upgrade<br />
Device Status: 0x0001<br />
Self Powered<br />
&lt;/pre&gt;<br />
<br />
Next, you can access it using your favourite terminal program.<br />
<br />
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]]:<br />
&lt;pre&gt;<br />
GTA01Bv2 # setenv stderr usbtty<br />
GTA01Bv2 # setenv stdout usbtty<br />
GTA01Bv2 # setenv stdin usbtty<br />
&lt;/pre&gt;<br />
<br />
==== Typical u-boot prompt ====<br />
<br />
&lt;pre&gt;<br />
U-Boot 1.2.0-moko1 (Feb 16 2007 - 00:36:13)<br />
<br />
DRAM: 128 MB<br />
NAND: 64 MiB<br />
Found Environment offset in OOB..<br />
Video: 640x480x8 31kHz 59Hz<br />
USB: S3C2410 USB Deviced<br />
In: serial<br />
Out: serial<br />
Err: serial<br />
Hit any key to stop autoboot: 0 <br />
GTA01Bv3 #<br />
&lt;/pre&gt;<br />
<br />
=== Commands on the bootloader prompt ===<br />
<br />
:''See [[bootloader commands]].''<br />
<br />
=== What if I borked my bootloader environment and don't get a prompt anymore? ===<br />
Found a solution here:<br />
[[http://markmail.org/message/gqypwiohdet6x4am?q=almesberger+partition&amp;page=1&amp;refer=xbamkzwwsaobv7wa]]<br />
<br />
It works the following way:<br />
* Get the devirginator:<br />
svn co http://svn.openmoko.org/trunk/src/host/devirginator<br />
cd devirginator<br />
* Read the u-boot environment from the device:<br />
dfu-util -a u-boot_env -R -U env.in<br />
* Create a file that contains everything you want to change in your u-boot environment or get it by issuing the following command:<br />
wget http://svn.openmoko.org/trunk/src/host/devirginator/environment.in<br />
* 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.<br />
./envedit.pl -i env.in -f environment.in -o env.out -D GTA02<br />
* On my box the partition layout didn't seem to match the idea of envedit.pl, so it issued 2 warnings:<br />
warning: environment is 262144 bytes, expected 16384<br />
CRC error: expected 0xc33e35fc, got 0x93097bfb<br />
* 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:<br />
./envedit.pl -s 262144 -i env.in -D GTA02 -f environment.in -o env.out<br />
* 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:<br />
dfu-util -a u-boot_env -R -D env.out<br />
<br />
== Device Firmware Upgrade ==<br />
<br />
Our version of u-boot also implements [[USB DFU]]. This can be useful to<br />
load files and kernel for quick testing.<br />
<br />
To find out whether your version of u-boot supports this, use the output of<br />
$ lsusb -v -d 1457:5119<br />
while the phone is in u-boot mode.<br />
<br />
If it supports DFU, you should see the following snippet towards the end of the output:<br />
&lt;pre&gt;<br />
Interface Descriptor:<br />
bLength 9<br />
bDescriptorType 4<br />
bInterfaceNumber 2<br />
bAlternateSetting 0<br />
bNumEndpoints 0<br />
bInterfaceClass 254 Application Specific Interface<br />
bInterfaceSubClass 1 Device Firmware Update<br />
bInterfaceProtocol 1 <br />
iInterface 0 <br />
&lt;/pre&gt;<br />
<br />
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]].<br />
<br />
=== Booting files over DFU ===<br />
<br />
To load a file at memory address 0x32000000:<br />
&lt;pre&gt;<br />
dfu-util -a 0 -D fileToLoad -R<br />
&lt;/pre&gt;<br />
<br />
After that, send 'bootm 0x32000000' to u-boot or 'bootelf 0x32000000' if<br />
its an elf file.<br />
<br />
Simple python script that can boot an ELF image - avoiding a ACM bug that breaks on large packets.<br />
<br />
&lt;pre&gt;<br />
#!/usr/bin/python<br />
import sys<br />
import os<br />
import time<br />
<br />
cmd1 = &quot;neo backlight off\n&quot;<br />
cmd2 = &quot;bootelf 0x32000000\n&quot;<br />
<br />
def output(tty, str):<br />
for x in str:<br />
tty.write(x)<br />
tty.flush()<br />
<br />
if len(sys.argv) == 2:<br />
print &quot;Loading %s...&quot; % sys.argv[1]<br />
<br />
loadfile = &quot;dfu-util -a 0 -D %s -R&quot; % sys.argv[1]<br />
<br />
os.system(loadfile)<br />
<br />
time.sleep(3)<br />
<br />
tty = open(&quot;/dev/ttyACM0&quot;, &quot;a&quot;)<br />
<br />
output(tty, cmd1)<br />
output(tty, cmd2)<br />
<br />
tty.close()<br />
else:<br />
print &quot;Usage: %s elffile&quot; % sys.argv[0]<br />
print &quot;&quot;<br />
sys.exit(2)<br />
&lt;/pre&gt;<br />
<br />
== Troubleshooting ==<br />
<br />
=== USB connectivity problems ===<br />
<br />
I once got errors like this (in dmesg or /var/log/messages) on the host side while connecting the neo in u-boot:<br />
<br />
usb 2-1: device descriptor read/64, error -110<br />
usb usb2: Controller not stopped yet!<br />
<br />
or<br />
<br />
hub 4-0:1.0: port 1 disabled by hub (EMI?), re-enabling...<br />
usb 4-1: USB disconnect, address 2<br />
<br />
A possible solution is given below. Please note that if you have a usb keyboard or mouse then the command might cause trouble. <br />
<br />
rmmod uhci_hcd ; modprobe uhci_hcd<br />
<br />
Another option is to plug the FR into a different USB port on the host, preferably one on the Motherboard not the hub.<br />
<br />
Disconnecting the Neo's USB while powering up may prevent this problem in the future.<br />
<br />
See [[Flashing Openmoko]]<br />
<br />
<br />
[[Category:System Developers]]<br />
[[Category:Flashing Openmoko]]</div>Brian H Wilsonhttp://wiki.openmoko.org/wiki/GPS_Data_LoggerGPS Data Logger2008-08-19T21:23:09Z<p>Brian H Wilson: /* GPS multiplexer */</p>
<hr />
<div>This page was created to address the use cases mentioned in [[GTA02 GPS]], including<br />
<br />
* I want to log GPS data for later analysis.<br />
* I want to collect GPS data for scientific field work (forestry, biology, etc)<br />
<br />
The page was started on 17 August 2008 mostly as a thought exercise.<br />
Please jump in and add to it.<br />
<br />
== Overview ==<br />
<br />
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 &quot;doing everything well&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.<br />
<br />
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.<br />
<br />
Initially the main functions could be broken out these components.<br />
<br />
# A '''GPS multiplexer''' that talks to the GPS receiver and feeds data to many applications.<br />
# A '''GPS Controller''' to that can talk to the mulitplexer (and hence the GPS receiver) to display status and adjust settings.<br />
# A '''Data Logger''' that can run all the time and record GPS data.<br />
# 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.<br />
<br />
'''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.<br />
<br />
== Main components ==<br />
<br />
=== GPS multiplexer ===<br />
<br />
Look at gpsd and gypsy and either use one of them or use them for inspiration. <br />
See the Gypsy author's take on GPSd here: http://folks.o-hand.com/iain/gypsy/why-not-gpsd.html<br />
<br />
So far Gypsy looks pretty good to me.<br />
<br />
Maybe the control program should be separated out from the multiplexer.<br />
<br />
Partial list of requirements for the multiplexer<br />
* Control internal GPS receiver<br />
* Control external GPS connected via serial port (USB or bluetooth)<br />
* Feed data from the selected GPS receiver to multiple applications.<br />
* Handle a RTCM stream to allow realtime DGPS postprocessing.<br />
* Supply all attributes to applications, including such things as bearing, PDOP and satellites in use. (Not just time and position).<br />
<br />
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.<br />
<br />
==== External GPS ====<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Support for postprocessing? ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== GPS controller ===<br />
<br />
''I think OM gps test program (what's it called) does much of this.''<br />
<br />
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.<br />
<br />
=== Data Logger ===<br />
<br />
The basic concept of the logger is to create a bread crumb trail as you move about. <br />
It has its own preference settings to determine if points are plotted based on change in position or on a time basis or both. <br />
<br />
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.<br />
<br />
==== Speedometer, Pedomater -- Usage of logger by itself ====<br />
<br />
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. <br />
<br />
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?<br />
<br />
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.<br />
<br />
''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)<br />
<br />
=== Field Collection Tool ===<br />
<br />
'''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.<br />
<br />
'''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.<br />
<br />
'''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.<br />
<br />
==== Other related tools ====<br />
<br />
Other specialized field collection tools could be used for <br />
<br />
* Asset management, example: urban forestry, agriculture, public works<br />
* Map making, for example to collect data for the Open Street Map project<br />
* Geocaching<br />
* ??? Add yours here ???<br />
<br />
== Data format and exchange ==<br />
<br />
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. <br />
<br />
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. &quot;GPS Office&quot;<br />
<br />
=== RINEX ===<br />
<br />
Would RINEX be an appropriate general format for internal storage? No.<br />
It's an exchange format but it's intended to include data required to perform post-processing.<br />
It stores direct satellite observations, not things needed for navigation like calculated position.<br />
<br />
This guy wrote a program that takes Ublox Antares 4 data and writes it as RINEX data.<br />
http://home.comcast.net/~dmilbert/softs/ant2rin.htm<br />
<br />
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.<br />
<br />
== More features ==<br />
<br />
All I can think of at the moment is rangefinders. I am sure there are others.<br />
<br />
=== Laser rangefinder ===<br />
<br />
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).<br />
<br />
== External links ==<br />
<br />
GPSd http://gpsd.berlios.de/<br />
<br />
GPX http://www.topografix.com/gpx.asp http://en.wikipedia.org/wiki/GPX_(data_transfer)<br />
<br />
gypsy http://folks.o-hand.com/iain/gypsy/ GPS data multiplexer<br />
<br />
RINEX specs ftp://ftp.unibe.ch/aiub/rinex/<br />
<br />
=== Commercial software ===<br />
<br />
ESRI ArcPad http://www.tdsway.com/products/solo_field<br />
<br />
TDS Solo Field http://www.tdsway.com/products/solo_field<br />
<br />
Trimble Terrasync http://www.trimble.com/terrasync.shtml<br />
<br />
== People working on this project ==<br />
<br />
[[User:Brian H Wilson]] is blabbing a lot here and wishing he had more time to work on this.<br />
<br />
[[Category: GPS]]</div>Brian H Wilsonhttp://wiki.openmoko.org/wiki/GPS_Data_LoggerGPS Data Logger2008-08-19T21:08:37Z<p>Brian H Wilson: /* External links */</p>
<hr />
<div>This page was created to address the use cases mentioned in [[GTA02 GPS]], including<br />
<br />
* I want to log GPS data for later analysis.<br />
* I want to collect GPS data for scientific field work (forestry, biology, etc)<br />
<br />
The page was started on 17 August 2008 mostly as a thought exercise.<br />
Please jump in and add to it.<br />
<br />
== Overview ==<br />
<br />
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 &quot;doing everything well&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.<br />
<br />
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.<br />
<br />
Initially the main functions could be broken out these components.<br />
<br />
# A '''GPS multiplexer''' that talks to the GPS receiver and feeds data to many applications.<br />
# A '''GPS Controller''' to that can talk to the mulitplexer (and hence the GPS receiver) to display status and adjust settings.<br />
# A '''Data Logger''' that can run all the time and record GPS data.<br />
# 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.<br />
<br />
'''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.<br />
<br />
== Main components ==<br />
<br />
=== GPS multiplexer ===<br />
<br />
Look at gpsd and gypsy (and the related religious wars) and either use one of them or use them for inspiration. <br />
<br />
Partial list of requirements for the multiplexer<br />
* Control internal GPS receiver<br />
* Control external GPS connected via serial port (USB or bluetooth)<br />
* Feed data from the selected GPS receiver to multiple applications.<br />
* Handle a RTCM stream to allow realtime DGPS postprocessing.<br />
* Supply all attributes to applications, including such things as bearing, PDOP and satellites in use. (Not just time and position).<br />
<br />
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.<br />
<br />
==== External GPS ====<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Support for postprocessing? ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== GPS controller ===<br />
<br />
''I think OM gps test program (what's it called) does much of this.''<br />
<br />
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.<br />
<br />
=== Data Logger ===<br />
<br />
The basic concept of the logger is to create a bread crumb trail as you move about. <br />
It has its own preference settings to determine if points are plotted based on change in position or on a time basis or both. <br />
<br />
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.<br />
<br />
==== Speedometer, Pedomater -- Usage of logger by itself ====<br />
<br />
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. <br />
<br />
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?<br />
<br />
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.<br />
<br />
''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)<br />
<br />
=== Field Collection Tool ===<br />
<br />
'''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.<br />
<br />
'''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.<br />
<br />
'''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.<br />
<br />
==== Other related tools ====<br />
<br />
Other specialized field collection tools could be used for <br />
<br />
* Asset management, example: urban forestry, agriculture, public works<br />
* Map making, for example to collect data for the Open Street Map project<br />
* Geocaching<br />
* ??? Add yours here ???<br />
<br />
== Data format and exchange ==<br />
<br />
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. <br />
<br />
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. &quot;GPS Office&quot;<br />
<br />
=== RINEX ===<br />
<br />
Would RINEX be an appropriate general format for internal storage? No.<br />
It's an exchange format but it's intended to include data required to perform post-processing.<br />
It stores direct satellite observations, not things needed for navigation like calculated position.<br />
<br />
This guy wrote a program that takes Ublox Antares 4 data and writes it as RINEX data.<br />
http://home.comcast.net/~dmilbert/softs/ant2rin.htm<br />
<br />
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.<br />
<br />
== More features ==<br />
<br />
All I can think of at the moment is rangefinders. I am sure there are others.<br />
<br />
=== Laser rangefinder ===<br />
<br />
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).<br />
<br />
== External links ==<br />
<br />
GPSd http://gpsd.berlios.de/<br />
<br />
GPX http://www.topografix.com/gpx.asp http://en.wikipedia.org/wiki/GPX_(data_transfer)<br />
<br />
gypsy http://folks.o-hand.com/iain/gypsy/ GPS data multiplexer<br />
<br />
RINEX specs ftp://ftp.unibe.ch/aiub/rinex/<br />
<br />
=== Commercial software ===<br />
<br />
ESRI ArcPad http://www.tdsway.com/products/solo_field<br />
<br />
TDS Solo Field http://www.tdsway.com/products/solo_field<br />
<br />
Trimble Terrasync http://www.trimble.com/terrasync.shtml<br />
<br />
== People working on this project ==<br />
<br />
[[User:Brian H Wilson]] is blabbing a lot here and wishing he had more time to work on this.<br />
<br />
[[Category: GPS]]</div>Brian H Wilsonhttp://wiki.openmoko.org/wiki/GPS_Data_LoggerGPS Data Logger2008-08-19T21:07:13Z<p>Brian H Wilson: /* External links */</p>
<hr />
<div>This page was created to address the use cases mentioned in [[GTA02 GPS]], including<br />
<br />
* I want to log GPS data for later analysis.<br />
* I want to collect GPS data for scientific field work (forestry, biology, etc)<br />
<br />
The page was started on 17 August 2008 mostly as a thought exercise.<br />
Please jump in and add to it.<br />
<br />
== Overview ==<br />
<br />
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 &quot;doing everything well&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.<br />
<br />
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.<br />
<br />
Initially the main functions could be broken out these components.<br />
<br />
# A '''GPS multiplexer''' that talks to the GPS receiver and feeds data to many applications.<br />
# A '''GPS Controller''' to that can talk to the mulitplexer (and hence the GPS receiver) to display status and adjust settings.<br />
# A '''Data Logger''' that can run all the time and record GPS data.<br />
# 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.<br />
<br />
'''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.<br />
<br />
== Main components ==<br />
<br />
=== GPS multiplexer ===<br />
<br />
Look at gpsd and gypsy (and the related religious wars) and either use one of them or use them for inspiration. <br />
<br />
Partial list of requirements for the multiplexer<br />
* Control internal GPS receiver<br />
* Control external GPS connected via serial port (USB or bluetooth)<br />
* Feed data from the selected GPS receiver to multiple applications.<br />
* Handle a RTCM stream to allow realtime DGPS postprocessing.<br />
* Supply all attributes to applications, including such things as bearing, PDOP and satellites in use. (Not just time and position).<br />
<br />
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.<br />
<br />
==== External GPS ====<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Support for postprocessing? ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== GPS controller ===<br />
<br />
''I think OM gps test program (what's it called) does much of this.''<br />
<br />
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.<br />
<br />
=== Data Logger ===<br />
<br />
The basic concept of the logger is to create a bread crumb trail as you move about. <br />
It has its own preference settings to determine if points are plotted based on change in position or on a time basis or both. <br />
<br />
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.<br />
<br />
==== Speedometer, Pedomater -- Usage of logger by itself ====<br />
<br />
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. <br />
<br />
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?<br />
<br />
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.<br />
<br />
''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)<br />
<br />
=== Field Collection Tool ===<br />
<br />
'''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.<br />
<br />
'''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.<br />
<br />
'''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.<br />
<br />
==== Other related tools ====<br />
<br />
Other specialized field collection tools could be used for <br />
<br />
* Asset management, example: urban forestry, agriculture, public works<br />
* Map making, for example to collect data for the Open Street Map project<br />
* Geocaching<br />
* ??? Add yours here ???<br />
<br />
== Data format and exchange ==<br />
<br />
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. <br />
<br />
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. &quot;GPS Office&quot;<br />
<br />
=== RINEX ===<br />
<br />
Would RINEX be an appropriate general format for internal storage? No.<br />
It's an exchange format but it's intended to include data required to perform post-processing.<br />
It stores direct satellite observations, not things needed for navigation like calculated position.<br />
<br />
This guy wrote a program that takes Ublox Antares 4 data and writes it as RINEX data.<br />
http://home.comcast.net/~dmilbert/softs/ant2rin.htm<br />
<br />
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.<br />
<br />
== More features ==<br />
<br />
All I can think of at the moment is rangefinders. I am sure there are others.<br />
<br />
=== Laser rangefinder ===<br />
<br />
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).<br />
<br />
== External links ==<br />
<br />
GPSd http://gpsd.berlios.de/<br />
<br />
GPX http://www.topografix.com/gpx.asp http://en.wikipedia.org/wiki/GPX_(data_transfer)<br />
<br />
RINEX specs ftp://ftp.unibe.ch/aiub/rinex/<br />
<br />
=== Commercial software ===<br />
<br />
ESRI ArcPad http://www.tdsway.com/products/solo_field<br />
<br />
TDS Solo Field http://www.tdsway.com/products/solo_field<br />
<br />
Trimble Terrasync http://www.trimble.com/terrasync.shtml<br />
<br />
== People working on this project ==<br />
<br />
[[User:Brian H Wilson]] is blabbing a lot here and wishing he had more time to work on this.<br />
<br />
[[Category: GPS]]</div>Brian H Wilsonhttp://wiki.openmoko.org/wiki/GPS_Data_LoggerGPS Data Logger2008-08-19T18:04:43Z<p>Brian H Wilson: /* RINEX */</p>
<hr />
<div>This page was created to address the use cases mentioned in [[GTA02 GPS]], including<br />
<br />
* I want to log GPS data for later analysis.<br />
* I want to collect GPS data for scientific field work (forestry, biology, etc)<br />
<br />
The page was started on 17 August 2008 mostly as a thought exercise.<br />
Please jump in and add to it.<br />
<br />
== Overview ==<br />
<br />
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 &quot;doing everything well&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.<br />
<br />
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.<br />
<br />
Initially the main functions could be broken out these components.<br />
<br />
# A '''GPS multiplexer''' that talks to the GPS receiver and feeds data to many applications.<br />
# A '''GPS Controller''' to that can talk to the mulitplexer (and hence the GPS receiver) to display status and adjust settings.<br />
# A '''Data Logger''' that can run all the time and record GPS data.<br />
# 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.<br />
<br />
'''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.<br />
<br />
== Main components ==<br />
<br />
=== GPS multiplexer ===<br />
<br />
Look at gpsd and gypsy (and the related religious wars) and either use one of them or use them for inspiration. <br />
<br />
Partial list of requirements for the multiplexer<br />
* Control internal GPS receiver<br />
* Control external GPS connected via serial port (USB or bluetooth)<br />
* Feed data from the selected GPS receiver to multiple applications.<br />
* Handle a RTCM stream to allow realtime DGPS postprocessing.<br />
* Supply all attributes to applications, including such things as bearing, PDOP and satellites in use. (Not just time and position).<br />
<br />
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.<br />
<br />
==== External GPS ====<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Support for postprocessing? ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== GPS controller ===<br />
<br />
''I think OM gps test program (what's it called) does much of this.''<br />
<br />
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.<br />
<br />
=== Data Logger ===<br />
<br />
The basic concept of the logger is to create a bread crumb trail as you move about. <br />
It has its own preference settings to determine if points are plotted based on change in position or on a time basis or both. <br />
<br />
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.<br />
<br />
==== Speedometer, Pedomater -- Usage of logger by itself ====<br />
<br />
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. <br />
<br />
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?<br />
<br />
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.<br />
<br />
''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)<br />
<br />
=== Field Collection Tool ===<br />
<br />
'''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.<br />
<br />
'''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.<br />
<br />
'''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.<br />
<br />
==== Other related tools ====<br />
<br />
Other specialized field collection tools could be used for <br />
<br />
* Asset management, example: urban forestry, agriculture, public works<br />
* Map making, for example to collect data for the Open Street Map project<br />
* Geocaching<br />
* ??? Add yours here ???<br />
<br />
== Data format and exchange ==<br />
<br />
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. <br />
<br />
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. &quot;GPS Office&quot;<br />
<br />
=== RINEX ===<br />
<br />
Would RINEX be an appropriate general format for internal storage? No.<br />
It's an exchange format but it's intended to include data required to perform post-processing.<br />
It stores direct satellite observations, not things needed for navigation like calculated position.<br />
<br />
This guy wrote a program that takes Ublox Antares 4 data and writes it as RINEX data.<br />
http://home.comcast.net/~dmilbert/softs/ant2rin.htm<br />
<br />
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.<br />
<br />
== More features ==<br />
<br />
All I can think of at the moment is rangefinders. I am sure there are others.<br />
<br />
=== Laser rangefinder ===<br />
<br />
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).<br />
<br />
== External links ==<br />
<br />
ESRI ArcPad http://www.tdsway.com/products/solo_field<br />
<br />
GPSd http://gpsd.berlios.de/<br />
<br />
GPX http://www.topografix.com/gpx.asp http://en.wikipedia.org/wiki/GPX_(data_transfer)<br />
<br />
RINEX specs ftp://ftp.unibe.ch/aiub/rinex/<br />
<br />
TDS Solo Field http://www.tdsway.com/products/solo_field<br />
<br />
Trimble Terrasync http://www.trimble.com/terrasync.shtml<br />
<br />
== People working on this project ==<br />
<br />
[[User:Brian H Wilson]] is blabbing a lot here and wishing he had more time to work on this.<br />
<br />
[[Category: GPS]]</div>Brian H Wilsonhttp://wiki.openmoko.org/wiki/GPS_Data_LoggerGPS Data Logger2008-08-19T04:11:37Z<p>Brian H Wilson: /* External links */</p>
<hr />
<div>This page was created to address the use cases mentioned in [[GTA02 GPS]], including<br />
<br />
* I want to log GPS data for later analysis.<br />
* I want to collect GPS data for scientific field work (forestry, biology, etc)<br />
<br />
The page was started on 17 August 2008 mostly as a thought exercise.<br />
Please jump in and add to it.<br />
<br />
== Overview ==<br />
<br />
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 &quot;doing everything well&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.<br />
<br />
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.<br />
<br />
Initially the main functions could be broken out these components.<br />
<br />
# A '''GPS multiplexer''' that talks to the GPS receiver and feeds data to many applications.<br />
# A '''GPS Controller''' to that can talk to the mulitplexer (and hence the GPS receiver) to display status and adjust settings.<br />
# A '''Data Logger''' that can run all the time and record GPS data.<br />
# 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.<br />
<br />
'''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.<br />
<br />
== Main components ==<br />
<br />
=== GPS multiplexer ===<br />
<br />
Look at gpsd and gypsy (and the related religious wars) and either use one of them or use them for inspiration. <br />
<br />
Partial list of requirements for the multiplexer<br />
* Control internal GPS receiver<br />
* Control external GPS connected via serial port (USB or bluetooth)<br />
* Feed data from the selected GPS receiver to multiple applications.<br />
* Handle a RTCM stream to allow realtime DGPS postprocessing.<br />
* Supply all attributes to applications, including such things as bearing, PDOP and satellites in use. (Not just time and position).<br />
<br />
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.<br />
<br />
==== External GPS ====<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Support for postprocessing? ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== GPS controller ===<br />
<br />
''I think OM gps test program (what's it called) does much of this.''<br />
<br />
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.<br />
<br />
=== Data Logger ===<br />
<br />
The basic concept of the logger is to create a bread crumb trail as you move about. <br />
It has its own preference settings to determine if points are plotted based on change in position or on a time basis or both. <br />
<br />
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.<br />
<br />
==== Speedometer, Pedomater -- Usage of logger by itself ====<br />
<br />
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. <br />
<br />
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?<br />
<br />
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.<br />
<br />
''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)<br />
<br />
=== Field Collection Tool ===<br />
<br />
'''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.<br />
<br />
'''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.<br />
<br />
'''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.<br />
<br />
==== Other related tools ====<br />
<br />
Other specialized field collection tools could be used for <br />
<br />
* Asset management, example: urban forestry, agriculture, public works<br />
* Map making, for example to collect data for the Open Street Map project<br />
* Geocaching<br />
* ??? Add yours here ???<br />
<br />
== Data format and exchange ==<br />
<br />
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. <br />
<br />
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. &quot;GPS Office&quot;<br />
<br />
=== RINEX ===<br />
<br />
Would RINEX be an appropriate general format for internal storage? No.<br />
It's an exchange format but it's intended to include data required to perform post-processing.<br />
It stores direct satellite observations, not things needed for navigation like calculated position.<br />
<br />
This guy wrote a program that takes Ublox Antares 4 data and writes it as RINEX data.<br />
http://home.comcast.net/~dmilbert/softs/ant2rin.htm<br />
<br />
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.<br />
<br />
== External links ==<br />
<br />
ESRI ArcPad http://www.tdsway.com/products/solo_field<br />
<br />
GPSd http://gpsd.berlios.de/<br />
<br />
GPX http://www.topografix.com/gpx.asp http://en.wikipedia.org/wiki/GPX_(data_transfer)<br />
<br />
RINEX specs ftp://ftp.unibe.ch/aiub/rinex/<br />
<br />
TDS Solo Field http://www.tdsway.com/products/solo_field<br />
<br />
Trimble Terrasync http://www.trimble.com/terrasync.shtml<br />
<br />
== People working on this project ==<br />
<br />
[[User:Brian H Wilson]] is blabbing a lot here and wishing he had more time to work on this.<br />
<br />
[[Category: GPS]]</div>Brian H Wilsonhttp://wiki.openmoko.org/wiki/GPS_Data_LoggerGPS Data Logger2008-08-19T04:06:31Z<p>Brian H Wilson: /* People working on this project */</p>
<hr />
<div>This page was created to address the use cases mentioned in [[GTA02 GPS]], including<br />
<br />
* I want to log GPS data for later analysis.<br />
* I want to collect GPS data for scientific field work (forestry, biology, etc)<br />
<br />
The page was started on 17 August 2008 mostly as a thought exercise.<br />
Please jump in and add to it.<br />
<br />
== Overview ==<br />
<br />
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 &quot;doing everything well&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.<br />
<br />
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.<br />
<br />
Initially the main functions could be broken out these components.<br />
<br />
# A '''GPS multiplexer''' that talks to the GPS receiver and feeds data to many applications.<br />
# A '''GPS Controller''' to that can talk to the mulitplexer (and hence the GPS receiver) to display status and adjust settings.<br />
# A '''Data Logger''' that can run all the time and record GPS data.<br />
# 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.<br />
<br />
'''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.<br />
<br />
== Main components ==<br />
<br />
=== GPS multiplexer ===<br />
<br />
Look at gpsd and gypsy (and the related religious wars) and either use one of them or use them for inspiration. <br />
<br />
Partial list of requirements for the multiplexer<br />
* Control internal GPS receiver<br />
* Control external GPS connected via serial port (USB or bluetooth)<br />
* Feed data from the selected GPS receiver to multiple applications.<br />
* Handle a RTCM stream to allow realtime DGPS postprocessing.<br />
* Supply all attributes to applications, including such things as bearing, PDOP and satellites in use. (Not just time and position).<br />
<br />
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.<br />
<br />
==== External GPS ====<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Support for postprocessing? ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== GPS controller ===<br />
<br />
''I think OM gps test program (what's it called) does much of this.''<br />
<br />
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.<br />
<br />
=== Data Logger ===<br />
<br />
The basic concept of the logger is to create a bread crumb trail as you move about. <br />
It has its own preference settings to determine if points are plotted based on change in position or on a time basis or both. <br />
<br />
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.<br />
<br />
==== Speedometer, Pedomater -- Usage of logger by itself ====<br />
<br />
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. <br />
<br />
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?<br />
<br />
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.<br />
<br />
''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)<br />
<br />
=== Field Collection Tool ===<br />
<br />
'''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.<br />
<br />
'''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.<br />
<br />
'''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.<br />
<br />
==== Other related tools ====<br />
<br />
Other specialized field collection tools could be used for <br />
<br />
* Asset management, example: urban forestry, agriculture, public works<br />
* Map making, for example to collect data for the Open Street Map project<br />
* Geocaching<br />
* ??? Add yours here ???<br />
<br />
== Data format and exchange ==<br />
<br />
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. <br />
<br />
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. &quot;GPS Office&quot;<br />
<br />
=== RINEX ===<br />
<br />
Would RINEX be an appropriate general format for internal storage? No.<br />
It's an exchange format but it's intended to include data required to perform post-processing.<br />
It stores direct satellite observations, not things needed for navigation like calculated position.<br />
<br />
This guy wrote a program that takes Ublox Antares 4 data and writes it as RINEX data.<br />
http://home.comcast.net/~dmilbert/softs/ant2rin.htm<br />
<br />
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.<br />
<br />
== External links ==<br />
<br />
GPSd http://gpsd.berlios.de/<br />
<br />
GPX http://www.topografix.com/gpx.asp http://en.wikipedia.org/wiki/GPX_(data_transfer)<br />
<br />
RINEX specs ftp://ftp.unibe.ch/aiub/rinex/<br />
<br />
== People working on this project ==<br />
<br />
[[User:Brian H Wilson]] is blabbing a lot here and wishing he had more time to work on this.<br />
<br />
[[Category: GPS]]</div>Brian H Wilsonhttp://wiki.openmoko.org/wiki/GPS_Data_LoggerGPS Data Logger2008-08-19T04:06:06Z<p>Brian H Wilson: /* RINEX */</p>
<hr />
<div>This page was created to address the use cases mentioned in [[GTA02 GPS]], including<br />
<br />
* I want to log GPS data for later analysis.<br />
* I want to collect GPS data for scientific field work (forestry, biology, etc)<br />
<br />
The page was started on 17 August 2008 mostly as a thought exercise.<br />
Please jump in and add to it.<br />
<br />
== Overview ==<br />
<br />
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 &quot;doing everything well&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.<br />
<br />
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.<br />
<br />
Initially the main functions could be broken out these components.<br />
<br />
# A '''GPS multiplexer''' that talks to the GPS receiver and feeds data to many applications.<br />
# A '''GPS Controller''' to that can talk to the mulitplexer (and hence the GPS receiver) to display status and adjust settings.<br />
# A '''Data Logger''' that can run all the time and record GPS data.<br />
# 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.<br />
<br />
'''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.<br />
<br />
== Main components ==<br />
<br />
=== GPS multiplexer ===<br />
<br />
Look at gpsd and gypsy (and the related religious wars) and either use one of them or use them for inspiration. <br />
<br />
Partial list of requirements for the multiplexer<br />
* Control internal GPS receiver<br />
* Control external GPS connected via serial port (USB or bluetooth)<br />
* Feed data from the selected GPS receiver to multiple applications.<br />
* Handle a RTCM stream to allow realtime DGPS postprocessing.<br />
* Supply all attributes to applications, including such things as bearing, PDOP and satellites in use. (Not just time and position).<br />
<br />
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.<br />
<br />
==== External GPS ====<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Support for postprocessing? ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== GPS controller ===<br />
<br />
''I think OM gps test program (what's it called) does much of this.''<br />
<br />
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.<br />
<br />
=== Data Logger ===<br />
<br />
The basic concept of the logger is to create a bread crumb trail as you move about. <br />
It has its own preference settings to determine if points are plotted based on change in position or on a time basis or both. <br />
<br />
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.<br />
<br />
==== Speedometer, Pedomater -- Usage of logger by itself ====<br />
<br />
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. <br />
<br />
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?<br />
<br />
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.<br />
<br />
''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)<br />
<br />
=== Field Collection Tool ===<br />
<br />
'''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.<br />
<br />
'''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.<br />
<br />
'''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.<br />
<br />
==== Other related tools ====<br />
<br />
Other specialized field collection tools could be used for <br />
<br />
* Asset management, example: urban forestry, agriculture, public works<br />
* Map making, for example to collect data for the Open Street Map project<br />
* Geocaching<br />
* ??? Add yours here ???<br />
<br />
== Data format and exchange ==<br />
<br />
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. <br />
<br />
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. &quot;GPS Office&quot;<br />
<br />
=== RINEX ===<br />
<br />
Would RINEX be an appropriate general format for internal storage? No.<br />
It's an exchange format but it's intended to include data required to perform post-processing.<br />
It stores direct satellite observations, not things needed for navigation like calculated position.<br />
<br />
This guy wrote a program that takes Ublox Antares 4 data and writes it as RINEX data.<br />
http://home.comcast.net/~dmilbert/softs/ant2rin.htm<br />
<br />
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.<br />
<br />
== External links ==<br />
<br />
GPSd http://gpsd.berlios.de/<br />
<br />
GPX http://www.topografix.com/gpx.asp http://en.wikipedia.org/wiki/GPX_(data_transfer)<br />
<br />
RINEX specs ftp://ftp.unibe.ch/aiub/rinex/<br />
<br />
== People working on this project ==<br />
<br />
[[User:Brian H Wilson]] blabbing a lot and wishing he had more time to work on this.<br />
<br />
[[Category: GPS]]</div>Brian H Wilsonhttp://wiki.openmoko.org/wiki/GPS_Data_LoggerGPS Data Logger2008-08-19T00:06:36Z<p>Brian H Wilson: /* RINEX */</p>
<hr />
<div>This page was created to address the use cases mentioned in [[GTA02 GPS]], including<br />
<br />
* I want to log GPS data for later analysis.<br />
* I want to collect GPS data for scientific field work (forestry, biology, etc)<br />
<br />
The page was started on 17 August 2008 mostly as a thought exercise.<br />
Please jump in and add to it.<br />
<br />
== Overview ==<br />
<br />
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 &quot;doing everything well&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.<br />
<br />
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.<br />
<br />
Initially the main functions could be broken out these components.<br />
<br />
# A '''GPS multiplexer''' that talks to the GPS receiver and feeds data to many applications.<br />
# A '''GPS Controller''' to that can talk to the mulitplexer (and hence the GPS receiver) to display status and adjust settings.<br />
# A '''Data Logger''' that can run all the time and record GPS data.<br />
# 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.<br />
<br />
'''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.<br />
<br />
== Main components ==<br />
<br />
=== GPS multiplexer ===<br />
<br />
Look at gpsd and gypsy (and the related religious wars) and either use one of them or use them for inspiration. <br />
<br />
Partial list of requirements for the multiplexer<br />
* Control internal GPS receiver<br />
* Control external GPS connected via serial port (USB or bluetooth)<br />
* Feed data from the selected GPS receiver to multiple applications.<br />
* Handle a RTCM stream to allow realtime DGPS postprocessing.<br />
* Supply all attributes to applications, including such things as bearing, PDOP and satellites in use. (Not just time and position).<br />
<br />
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.<br />
<br />
==== External GPS ====<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Support for postprocessing? ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== GPS controller ===<br />
<br />
''I think OM gps test program (what's it called) does much of this.''<br />
<br />
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.<br />
<br />
=== Data Logger ===<br />
<br />
The basic concept of the logger is to create a bread crumb trail as you move about. <br />
It has its own preference settings to determine if points are plotted based on change in position or on a time basis or both. <br />
<br />
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.<br />
<br />
==== Speedometer, Pedomater -- Usage of logger by itself ====<br />
<br />
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. <br />
<br />
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?<br />
<br />
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.<br />
<br />
''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)<br />
<br />
=== Field Collection Tool ===<br />
<br />
'''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.<br />
<br />
'''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.<br />
<br />
'''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.<br />
<br />
==== Other related tools ====<br />
<br />
Other specialized field collection tools could be used for <br />
<br />
* Asset management, example: urban forestry, agriculture, public works<br />
* Map making, for example to collect data for the Open Street Map project<br />
* Geocaching<br />
* ??? Add yours here ???<br />
<br />
== Data format and exchange ==<br />
<br />
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. <br />
<br />
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. &quot;GPS Office&quot;<br />
<br />
=== RINEX ===<br />
<br />
Would RINEX be an appropriate general format for internal storage? No.<br />
It's an exchange format but it's intended to include data required to perform post-processing.<br />
It stores direct satellite observations, not things needed for navigation like calculated position.<br />
<br />
Specs are here: ftp://ftp.unibe.ch/aiub/rinex/<br />
<br />
This guy wrote a program that takes Ublox Antares 4 data and writes it as RINEX data.<br />
http://home.comcast.net/~dmilbert/softs/ant2rin.htm<br />
<br />
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.<br />
<br />
== People working on this project ==<br />
<br />
[[User:Brian H Wilson]] blabbing a lot and wishing he had more time to work on this.<br />
<br />
[[Category: GPS]]</div>Brian H Wilsonhttp://wiki.openmoko.org/wiki/GPS_Data_LoggerGPS Data Logger2008-08-18T22:42:03Z<p>Brian H Wilson: /* GPS multiplexer */</p>
<hr />
<div>This page was created to address the use cases mentioned in [[GTA02 GPS]], including<br />
<br />
* I want to log GPS data for later analysis.<br />
* I want to collect GPS data for scientific field work (forestry, biology, etc)<br />
<br />
The page was started on 17 August 2008 mostly as a thought exercise.<br />
Please jump in and add to it.<br />
<br />
== Overview ==<br />
<br />
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 &quot;doing everything well&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.<br />
<br />
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.<br />
<br />
Initially the main functions could be broken out these components.<br />
<br />
# A '''GPS multiplexer''' that talks to the GPS receiver and feeds data to many applications.<br />
# A '''GPS Controller''' to that can talk to the mulitplexer (and hence the GPS receiver) to display status and adjust settings.<br />
# A '''Data Logger''' that can run all the time and record GPS data.<br />
# 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.<br />
<br />
'''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.<br />
<br />
== Main components ==<br />
<br />
=== GPS multiplexer ===<br />
<br />
Look at gpsd and gypsy (and the related religious wars) and either use one of them or use them for inspiration. <br />
<br />
Partial list of requirements for the multiplexer<br />
* Control internal GPS receiver<br />
* Control external GPS connected via serial port (USB or bluetooth)<br />
* Feed data from the selected GPS receiver to multiple applications.<br />
* Handle a RTCM stream to allow realtime DGPS postprocessing.<br />
* Supply all attributes to applications, including such things as bearing, PDOP and satellites in use. (Not just time and position).<br />
<br />
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.<br />
<br />
==== External GPS ====<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Support for postprocessing? ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== GPS controller ===<br />
<br />
''I think OM gps test program (what's it called) does much of this.''<br />
<br />
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.<br />
<br />
=== Data Logger ===<br />
<br />
The basic concept of the logger is to create a bread crumb trail as you move about. <br />
It has its own preference settings to determine if points are plotted based on change in position or on a time basis or both. <br />
<br />
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.<br />
<br />
==== Speedometer, Pedomater -- Usage of logger by itself ====<br />
<br />
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. <br />
<br />
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?<br />
<br />
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.<br />
<br />
''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)<br />
<br />
=== Field Collection Tool ===<br />
<br />
'''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.<br />
<br />
'''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.<br />
<br />
'''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.<br />
<br />
==== Other related tools ====<br />
<br />
Other specialized field collection tools could be used for <br />
<br />
* Asset management, example: urban forestry, agriculture, public works<br />
* Map making, for example to collect data for the Open Street Map project<br />
* Geocaching<br />
* ??? Add yours here ???<br />
<br />
== Data format and exchange ==<br />
<br />
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. <br />
<br />
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. &quot;GPS Office&quot;<br />
<br />
=== RINEX ===<br />
<br />
Would RINEX be an appropriate general format for internal storage?<br />
It's an exchange format but it's intended to include data required to perform post-processing.<br />
It might be overkill for applications that don't require post-processing. <br />
<br />
Specs are here: ftp://ftp.unibe.ch/aiub/rinex/<br />
<br />
This guy wrote a program that takes Ublox Antares 4 data and writes it as RINEX data.<br />
http://home.comcast.net/~dmilbert/softs/ant2rin.htm<br />
<br />
== People working on this project ==<br />
<br />
[[User:Brian H Wilson]] blabbing a lot and wishing he had more time to work on this.<br />
<br />
[[Category: GPS]]</div>Brian H Wilsonhttp://wiki.openmoko.org/wiki/GPS_Data_LoggerGPS Data Logger2008-08-18T22:37:55Z<p>Brian H Wilson: /* Data Logger */</p>
<hr />
<div>This page was created to address the use cases mentioned in [[GTA02 GPS]], including<br />
<br />
* I want to log GPS data for later analysis.<br />
* I want to collect GPS data for scientific field work (forestry, biology, etc)<br />
<br />
The page was started on 17 August 2008 mostly as a thought exercise.<br />
Please jump in and add to it.<br />
<br />
== Overview ==<br />
<br />
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 &quot;doing everything well&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.<br />
<br />
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.<br />
<br />
Initially the main functions could be broken out these components.<br />
<br />
# A '''GPS multiplexer''' that talks to the GPS receiver and feeds data to many applications.<br />
# A '''GPS Controller''' to that can talk to the mulitplexer (and hence the GPS receiver) to display status and adjust settings.<br />
# A '''Data Logger''' that can run all the time and record GPS data.<br />
# 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.<br />
<br />
'''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.<br />
<br />
== Main components ==<br />
<br />
=== GPS multiplexer ===<br />
<br />
Look at gpsd and gypsy (and the related religious wars) and either use one of them or use them for inspiration. <br />
<br />
Partial list of requirements for the multiplexer<br />
* Control internal GPS receiver<br />
* Control external GPS connected via serial port (USB or bluetooth)<br />
* Feed data from the selected GPS receiver to multiple applications.<br />
* Handle a RTCM stream to allow realtime DGPS postprocessing.<br />
* Supply all attributes to applications, including such things as PDOP and satellites in use. (Not just time and position)<br />
<br />
==== External GPS ====<br />
<br />
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.<br />
<br />
=== Support for postprocessing? ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== GPS controller ===<br />
<br />
''I think OM gps test program (what's it called) does much of this.''<br />
<br />
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.<br />
<br />
=== Data Logger ===<br />
<br />
The basic concept of the logger is to create a bread crumb trail as you move about. <br />
It has its own preference settings to determine if points are plotted based on change in position or on a time basis or both. <br />
<br />
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.<br />
<br />
==== Speedometer, Pedomater -- Usage of logger by itself ====<br />
<br />
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. <br />
<br />
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?<br />
<br />
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.<br />
<br />
''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)<br />
<br />
=== Field Collection Tool ===<br />
<br />
'''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.<br />
<br />
'''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.<br />
<br />
'''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.<br />
<br />
==== Other related tools ====<br />
<br />
Other specialized field collection tools could be used for <br />
<br />
* Asset management, example: urban forestry, agriculture, public works<br />
* Map making, for example to collect data for the Open Street Map project<br />
* Geocaching<br />
* ??? Add yours here ???<br />
<br />
== Data format and exchange ==<br />
<br />
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. <br />
<br />
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. &quot;GPS Office&quot;<br />
<br />
=== RINEX ===<br />
<br />
Would RINEX be an appropriate general format for internal storage?<br />
It's an exchange format but it's intended to include data required to perform post-processing.<br />
It might be overkill for applications that don't require post-processing. <br />
<br />
Specs are here: ftp://ftp.unibe.ch/aiub/rinex/<br />
<br />
This guy wrote a program that takes Ublox Antares 4 data and writes it as RINEX data.<br />
http://home.comcast.net/~dmilbert/softs/ant2rin.htm<br />
<br />
== People working on this project ==<br />
<br />
[[User:Brian H Wilson]] blabbing a lot and wishing he had more time to work on this.<br />
<br />
[[Category: GPS]]</div>Brian H Wilsonhttp://wiki.openmoko.org/wiki/GPS_Data_LoggerGPS Data Logger2008-08-18T22:34:34Z<p>Brian H Wilson: /* RINEX */</p>
<hr />
<div>This page was created to address the use cases mentioned in [[GTA02 GPS]], including<br />
<br />
* I want to log GPS data for later analysis.<br />
* I want to collect GPS data for scientific field work (forestry, biology, etc)<br />
<br />
The page was started on 17 August 2008 mostly as a thought exercise.<br />
Please jump in and add to it.<br />
<br />
== Overview ==<br />
<br />
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 &quot;doing everything well&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.<br />
<br />
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.<br />
<br />
Initially the main functions could be broken out these components.<br />
<br />
# A '''GPS multiplexer''' that talks to the GPS receiver and feeds data to many applications.<br />
# A '''GPS Controller''' to that can talk to the mulitplexer (and hence the GPS receiver) to display status and adjust settings.<br />
# A '''Data Logger''' that can run all the time and record GPS data.<br />
# 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.<br />
<br />
'''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.<br />
<br />
== Main components ==<br />
<br />
=== GPS multiplexer ===<br />
<br />
Look at gpsd and gypsy (and the related religious wars) and either use one of them or use them for inspiration. <br />
<br />
Partial list of requirements for the multiplexer<br />
* Control internal GPS receiver<br />
* Control external GPS connected via serial port (USB or bluetooth)<br />
* Feed data from the selected GPS receiver to multiple applications.<br />
* Handle a RTCM stream to allow realtime DGPS postprocessing.<br />
* Supply all attributes to applications, including such things as PDOP and satellites in use. (Not just time and position)<br />
<br />
==== External GPS ====<br />
<br />
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.<br />
<br />
=== Support for postprocessing? ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== GPS controller ===<br />
<br />
''I think OM gps test program (what's it called) does much of this.''<br />
<br />
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.<br />
<br />
=== Data Logger ===<br />
<br />
The basic concept of the logger is to create a bread crumb trail as you move about. <br />
It has its own preference settings to determine if points are plotted based on change in position or on a time basis or both. <br />
<br />
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.<br />
<br />
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. <br />
<br />
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?<br />
<br />
''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)<br />
<br />
=== Field Collection Tool ===<br />
<br />
'''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.<br />
<br />
'''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.<br />
<br />
'''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.<br />
<br />
==== Other related tools ====<br />
<br />
Other specialized field collection tools could be used for <br />
<br />
* Asset management, example: urban forestry, agriculture, public works<br />
* Map making, for example to collect data for the Open Street Map project<br />
* Geocaching<br />
* ??? Add yours here ???<br />
<br />
== Data format and exchange ==<br />
<br />
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. <br />
<br />
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. &quot;GPS Office&quot;<br />
<br />
=== RINEX ===<br />
<br />
Would RINEX be an appropriate general format for internal storage?<br />
It's an exchange format but it's intended to include data required to perform post-processing.<br />
It might be overkill for applications that don't require post-processing. <br />
<br />
Specs are here: ftp://ftp.unibe.ch/aiub/rinex/<br />
<br />
This guy wrote a program that takes Ublox Antares 4 data and writes it as RINEX data.<br />
http://home.comcast.net/~dmilbert/softs/ant2rin.htm<br />
<br />
== People working on this project ==<br />
<br />
[[User:Brian H Wilson]] blabbing a lot and wishing he had more time to work on this.<br />
<br />
[[Category: GPS]]</div>Brian H Wilsonhttp://wiki.openmoko.org/wiki/GPS_Data_LoggerGPS Data Logger2008-08-18T22:32:43Z<p>Brian H Wilson: /* Data format and exchange */</p>
<hr />
<div>This page was created to address the use cases mentioned in [[GTA02 GPS]], including<br />
<br />
* I want to log GPS data for later analysis.<br />
* I want to collect GPS data for scientific field work (forestry, biology, etc)<br />
<br />
The page was started on 17 August 2008 mostly as a thought exercise.<br />
Please jump in and add to it.<br />
<br />
== Overview ==<br />
<br />
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 &quot;doing everything well&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.<br />
<br />
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.<br />
<br />
Initially the main functions could be broken out these components.<br />
<br />
# A '''GPS multiplexer''' that talks to the GPS receiver and feeds data to many applications.<br />
# A '''GPS Controller''' to that can talk to the mulitplexer (and hence the GPS receiver) to display status and adjust settings.<br />
# A '''Data Logger''' that can run all the time and record GPS data.<br />
# 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.<br />
<br />
'''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.<br />
<br />
== Main components ==<br />
<br />
=== GPS multiplexer ===<br />
<br />
Look at gpsd and gypsy (and the related religious wars) and either use one of them or use them for inspiration. <br />
<br />
Partial list of requirements for the multiplexer<br />
* Control internal GPS receiver<br />
* Control external GPS connected via serial port (USB or bluetooth)<br />
* Feed data from the selected GPS receiver to multiple applications.<br />
* Handle a RTCM stream to allow realtime DGPS postprocessing.<br />
* Supply all attributes to applications, including such things as PDOP and satellites in use. (Not just time and position)<br />
<br />
==== External GPS ====<br />
<br />
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.<br />
<br />
=== Support for postprocessing? ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== GPS controller ===<br />
<br />
''I think OM gps test program (what's it called) does much of this.''<br />
<br />
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.<br />
<br />
=== Data Logger ===<br />
<br />
The basic concept of the logger is to create a bread crumb trail as you move about. <br />
It has its own preference settings to determine if points are plotted based on change in position or on a time basis or both. <br />
<br />
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.<br />
<br />
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. <br />
<br />
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?<br />
<br />
''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)<br />
<br />
=== Field Collection Tool ===<br />
<br />
'''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.<br />
<br />
'''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.<br />
<br />
'''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.<br />
<br />
==== Other related tools ====<br />
<br />
Other specialized field collection tools could be used for <br />
<br />
* Asset management, example: urban forestry, agriculture, public works<br />
* Map making, for example to collect data for the Open Street Map project<br />
* Geocaching<br />
* ??? Add yours here ???<br />
<br />
== Data format and exchange ==<br />
<br />
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. <br />
<br />
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. &quot;GPS Office&quot;<br />
<br />
=== RINEX ===<br />
<br />
Would RINEX be an appropriate format for internal storage?<br />
It's an exchange format.<br />
<br />
Specs are here: ftp://ftp.unibe.ch/aiub/rinex/<br />
<br />
This guy wrote a program that takes Ublox Antares 4 data and writes it as RINEX data.<br />
http://home.comcast.net/~dmilbert/softs/ant2rin.htm<br />
<br />
== People working on this project ==<br />
<br />
[[User:Brian H Wilson]] blabbing a lot and wishing he had more time to work on this.<br />
<br />
[[Category: GPS]]</div>Brian H Wilsonhttp://wiki.openmoko.org/wiki/GPS_Data_LoggerGPS Data Logger2008-08-18T19:51:02Z<p>Brian H Wilson: /* Field Collection Tool */</p>
<hr />
<div>This page was created to address the use cases mentioned in [[GTA02 GPS]], including<br />
<br />
* I want to log GPS data for later analysis.<br />
* I want to collect GPS data for scientific field work (forestry, biology, etc)<br />
<br />
The page was started on 17 August 2008 mostly as a thought exercise.<br />
Please jump in and add to it.<br />
<br />
== Overview ==<br />
<br />
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 &quot;doing everything well&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.<br />
<br />
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.<br />
<br />
Initially the main functions could be broken out these components.<br />
<br />
# A '''GPS multiplexer''' that talks to the GPS receiver and feeds data to many applications.<br />
# A '''GPS Controller''' to that can talk to the mulitplexer (and hence the GPS receiver) to display status and adjust settings.<br />
# A '''Data Logger''' that can run all the time and record GPS data.<br />
# 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.<br />
<br />
'''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.<br />
<br />
== Main components ==<br />
<br />
=== GPS multiplexer ===<br />
<br />
Look at gpsd and gypsy (and the related religious wars) and either use one of them or use them for inspiration. <br />
<br />
Partial list of requirements for the multiplexer<br />
* Control internal GPS receiver<br />
* Control external GPS connected via serial port (USB or bluetooth)<br />
* Feed data from the selected GPS receiver to multiple applications.<br />
* Handle a RTCM stream to allow realtime DGPS postprocessing.<br />
* Supply all attributes to applications, including such things as PDOP and satellites in use. (Not just time and position)<br />
<br />
==== External GPS ====<br />
<br />
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.<br />
<br />
=== Support for postprocessing? ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== GPS controller ===<br />
<br />
''I think OM gps test program (what's it called) does much of this.''<br />
<br />
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.<br />
<br />
=== Data Logger ===<br />
<br />
The basic concept of the logger is to create a bread crumb trail as you move about. <br />
It has its own preference settings to determine if points are plotted based on change in position or on a time basis or both. <br />
<br />
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.<br />
<br />
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. <br />
<br />
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?<br />
<br />
''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)<br />
<br />
=== Field Collection Tool ===<br />
<br />
'''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.<br />
<br />
'''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.<br />
<br />
'''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.<br />
<br />
==== Other related tools ====<br />
<br />
Other specialized field collection tools could be used for <br />
<br />
* Asset management, example: urban forestry, agriculture, public works<br />
* Map making, for example to collect data for the Open Street Map project<br />
* Geocaching<br />
* ??? Add yours here ???<br />
<br />
== Data format and exchange ==<br />
<br />
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. <br />
<br />
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. &quot;GPS Office&quot;<br />
<br />
== People working on this project ==<br />
<br />
[[User:Brian H Wilson]] blabbing a lot and wishing he had more time to work on this.<br />
<br />
[[Category: GPS]]</div>Brian H Wilsonhttp://wiki.openmoko.org/wiki/GPS_Data_LoggerGPS Data Logger2008-08-18T19:46:21Z<p>Brian H Wilson: /* Data format and exchange */</p>
<hr />
<div>This page was created to address the use cases mentioned in [[GTA02 GPS]], including<br />
<br />
* I want to log GPS data for later analysis.<br />
* I want to collect GPS data for scientific field work (forestry, biology, etc)<br />
<br />
The page was started on 17 August 2008 mostly as a thought exercise.<br />
Please jump in and add to it.<br />
<br />
== Overview ==<br />
<br />
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 &quot;doing everything well&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.<br />
<br />
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.<br />
<br />
Initially the main functions could be broken out these components.<br />
<br />
# A '''GPS multiplexer''' that talks to the GPS receiver and feeds data to many applications.<br />
# A '''GPS Controller''' to that can talk to the mulitplexer (and hence the GPS receiver) to display status and adjust settings.<br />
# A '''Data Logger''' that can run all the time and record GPS data.<br />
# 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.<br />
<br />
'''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.<br />
<br />
== Main components ==<br />
<br />
=== GPS multiplexer ===<br />
<br />
Look at gpsd and gypsy (and the related religious wars) and either use one of them or use them for inspiration. <br />
<br />
Partial list of requirements for the multiplexer<br />
* Control internal GPS receiver<br />
* Control external GPS connected via serial port (USB or bluetooth)<br />
* Feed data from the selected GPS receiver to multiple applications.<br />
* Handle a RTCM stream to allow realtime DGPS postprocessing.<br />
* Supply all attributes to applications, including such things as PDOP and satellites in use. (Not just time and position)<br />
<br />
==== External GPS ====<br />
<br />
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.<br />
<br />
=== Support for postprocessing? ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== GPS controller ===<br />
<br />
''I think OM gps test program (what's it called) does much of this.''<br />
<br />
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.<br />
<br />
=== Data Logger ===<br />
<br />
The basic concept of the logger is to create a bread crumb trail as you move about. <br />
It has its own preference settings to determine if points are plotted based on change in position or on a time basis or both. <br />
<br />
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.<br />
<br />
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. <br />
<br />
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?<br />
<br />
''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)<br />
<br />
=== Field Collection Tool ===<br />
<br />
'''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.<br />
<br />
'''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.<br />
<br />
'''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.<br />
<br />
== Data format and exchange ==<br />
<br />
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. <br />
<br />
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. &quot;GPS Office&quot;<br />
<br />
== People working on this project ==<br />
<br />
[[User:Brian H Wilson]] blabbing a lot and wishing he had more time to work on this.<br />
<br />
[[Category: GPS]]</div>Brian H Wilsonhttp://wiki.openmoko.org/wiki/GPS_Data_LoggerGPS Data Logger2008-08-18T19:45:21Z<p>Brian H Wilson: /* Overview */</p>
<hr />
<div>This page was created to address the use cases mentioned in [[GTA02 GPS]], including<br />
<br />
* I want to log GPS data for later analysis.<br />
* I want to collect GPS data for scientific field work (forestry, biology, etc)<br />
<br />
The page was started on 17 August 2008 mostly as a thought exercise.<br />
Please jump in and add to it.<br />
<br />
== Overview ==<br />
<br />
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 &quot;doing everything well&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.<br />
<br />
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.<br />
<br />
Initially the main functions could be broken out these components.<br />
<br />
# A '''GPS multiplexer''' that talks to the GPS receiver and feeds data to many applications.<br />
# A '''GPS Controller''' to that can talk to the mulitplexer (and hence the GPS receiver) to display status and adjust settings.<br />
# A '''Data Logger''' that can run all the time and record GPS data.<br />
# 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.<br />
<br />
'''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.<br />
<br />
== Main components ==<br />
<br />
=== GPS multiplexer ===<br />
<br />
Look at gpsd and gypsy (and the related religious wars) and either use one of them or use them for inspiration. <br />
<br />
Partial list of requirements for the multiplexer<br />
* Control internal GPS receiver<br />
* Control external GPS connected via serial port (USB or bluetooth)<br />
* Feed data from the selected GPS receiver to multiple applications.<br />
* Handle a RTCM stream to allow realtime DGPS postprocessing.<br />
* Supply all attributes to applications, including such things as PDOP and satellites in use. (Not just time and position)<br />
<br />
==== External GPS ====<br />
<br />
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.<br />
<br />
=== Support for postprocessing? ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== GPS controller ===<br />
<br />
''I think OM gps test program (what's it called) does much of this.''<br />
<br />
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.<br />
<br />
=== Data Logger ===<br />
<br />
The basic concept of the logger is to create a bread crumb trail as you move about. <br />
It has its own preference settings to determine if points are plotted based on change in position or on a time basis or both. <br />
<br />
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.<br />
<br />
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. <br />
<br />
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?<br />
<br />
''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)<br />
<br />
=== Field Collection Tool ===<br />
<br />
'''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.<br />
<br />
'''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.<br />
<br />
'''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.<br />
<br />
== Data format and exchange ==<br />
<br />
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. <br />
<br />
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. &quot;GPS Office&quot;<br />
<br />
[[Category: GPS]]</div>Brian H Wilsonhttp://wiki.openmoko.org/wiki/GPS_Data_LoggerGPS Data Logger2008-08-18T19:43:44Z<p>Brian H Wilson: /* Field Collection Tool */</p>
<hr />
<div>This page was created to address the use cases mentioned in [[GTA02 GPS]], including<br />
<br />
* I want to log GPS data for later analysis.<br />
* I want to collect GPS data for scientific field work (forestry, biology, etc)<br />
<br />
The page was started on 17 August 2008 mostly as a thought exercise.<br />
Please jump in and add to it.<br />
<br />
== Overview ==<br />
<br />
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 &quot;doing everything well&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.<br />
<br />
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.<br />
<br />
Initially the main functions could be broken out these components.<br />
<br />
# A '''GPS multiplexer''' that talks to the GPS receiver and feeds data to many applications.<br />
# A '''GPS Controller''' to that can talk to the mulitplexer (and hence the GPS receiver) to display status and adjust settings.<br />
# A '''Data Logger''' that can run all the time and record GPS data.<br />
# 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.<br />
<br />
== Main components ==<br />
<br />
=== GPS multiplexer ===<br />
<br />
Look at gpsd and gypsy (and the related religious wars) and either use one of them or use them for inspiration. <br />
<br />
Partial list of requirements for the multiplexer<br />
* Control internal GPS receiver<br />
* Control external GPS connected via serial port (USB or bluetooth)<br />
* Feed data from the selected GPS receiver to multiple applications.<br />
* Handle a RTCM stream to allow realtime DGPS postprocessing.<br />
* Supply all attributes to applications, including such things as PDOP and satellites in use. (Not just time and position)<br />
<br />
==== External GPS ====<br />
<br />
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.<br />
<br />
=== Support for postprocessing? ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== GPS controller ===<br />
<br />
''I think OM gps test program (what's it called) does much of this.''<br />
<br />
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.<br />
<br />
=== Data Logger ===<br />
<br />
The basic concept of the logger is to create a bread crumb trail as you move about. <br />
It has its own preference settings to determine if points are plotted based on change in position or on a time basis or both. <br />
<br />
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.<br />
<br />
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. <br />
<br />
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?<br />
<br />
''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)<br />
<br />
=== Field Collection Tool ===<br />
<br />
'''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.<br />
<br />
'''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.<br />
<br />
'''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.<br />
<br />
== Data format and exchange ==<br />
<br />
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. <br />
<br />
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. &quot;GPS Office&quot;<br />
<br />
[[Category: GPS]]</div>Brian H Wilsonhttp://wiki.openmoko.org/wiki/GPS_Data_LoggerGPS Data Logger2008-08-18T19:38:47Z<p>Brian H Wilson: /* Data Logger */</p>
<hr />
<div>This page was created to address the use cases mentioned in [[GTA02 GPS]], including<br />
<br />
* I want to log GPS data for later analysis.<br />
* I want to collect GPS data for scientific field work (forestry, biology, etc)<br />
<br />
The page was started on 17 August 2008 mostly as a thought exercise.<br />
Please jump in and add to it.<br />
<br />
== Overview ==<br />
<br />
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 &quot;doing everything well&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.<br />
<br />
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.<br />
<br />
Initially the main functions could be broken out these components.<br />
<br />
# A '''GPS multiplexer''' that talks to the GPS receiver and feeds data to many applications.<br />
# A '''GPS Controller''' to that can talk to the mulitplexer (and hence the GPS receiver) to display status and adjust settings.<br />
# A '''Data Logger''' that can run all the time and record GPS data.<br />
# 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.<br />
<br />
== Main components ==<br />
<br />
=== GPS multiplexer ===<br />
<br />
Look at gpsd and gypsy (and the related religious wars) and either use one of them or use them for inspiration. <br />
<br />
Partial list of requirements for the multiplexer<br />
* Control internal GPS receiver<br />
* Control external GPS connected via serial port (USB or bluetooth)<br />
* Feed data from the selected GPS receiver to multiple applications.<br />
* Handle a RTCM stream to allow realtime DGPS postprocessing.<br />
* Supply all attributes to applications, including such things as PDOP and satellites in use. (Not just time and position)<br />
<br />
==== External GPS ====<br />
<br />
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.<br />
<br />
=== Support for postprocessing? ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== GPS controller ===<br />
<br />
''I think OM gps test program (what's it called) does much of this.''<br />
<br />
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.<br />
<br />
=== Data Logger ===<br />
<br />
The basic concept of the logger is to create a bread crumb trail as you move about. <br />
It has its own preference settings to determine if points are plotted based on change in position or on a time basis or both. <br />
<br />
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.<br />
<br />
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. <br />
<br />
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?<br />
<br />
''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)<br />
<br />
=== Field Collection Tool ===<br />
<br />
'''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.<br />
<br />
'''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.<br />
<br />
'''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.<br />
<br />
<br />
[[Category: GPS]]</div>Brian H Wilsonhttp://wiki.openmoko.org/wiki/GPS_Data_LoggerGPS Data Logger2008-08-18T19:36:23Z<p>Brian H Wilson: /* Overview */</p>
<hr />
<div>This page was created to address the use cases mentioned in [[GTA02 GPS]], including<br />
<br />
* I want to log GPS data for later analysis.<br />
* I want to collect GPS data for scientific field work (forestry, biology, etc)<br />
<br />
The page was started on 17 August 2008 mostly as a thought exercise.<br />
Please jump in and add to it.<br />
<br />
== Overview ==<br />
<br />
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 &quot;doing everything well&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.<br />
<br />
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.<br />
<br />
Initially the main functions could be broken out these components.<br />
<br />
# A '''GPS multiplexer''' that talks to the GPS receiver and feeds data to many applications.<br />
# A '''GPS Controller''' to that can talk to the mulitplexer (and hence the GPS receiver) to display status and adjust settings.<br />
# A '''Data Logger''' that can run all the time and record GPS data.<br />
# 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.<br />
<br />
== Main components ==<br />
<br />
=== GPS multiplexer ===<br />
<br />
Look at gpsd and gypsy (and the related religious wars) and either use one of them or use them for inspiration. <br />
<br />
Partial list of requirements for the multiplexer<br />
* Control internal GPS receiver<br />
* Control external GPS connected via serial port (USB or bluetooth)<br />
* Feed data from the selected GPS receiver to multiple applications.<br />
* Handle a RTCM stream to allow realtime DGPS postprocessing.<br />
* Supply all attributes to applications, including such things as PDOP and satellites in use. (Not just time and position)<br />
<br />
==== External GPS ====<br />
<br />
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.<br />
<br />
=== Support for postprocessing? ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== GPS controller ===<br />
<br />
''I think OM gps test program (what's it called) does much of this.''<br />
<br />
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.<br />
<br />
=== Data Logger ===<br />
<br />
The basic concept of the logger is to create a bread crumb trail as you move about. <br />
It has its own preference settings to determine if points are plotted based on change in position or on a time basis or both. <br />
<br />
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.<br />
<br />
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. <br />
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)<br />
<br />
=== Field Collection Tool ===<br />
<br />
'''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.<br />
<br />
'''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.<br />
<br />
'''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.<br />
<br />
<br />
[[Category: GPS]]</div>Brian H Wilsonhttp://wiki.openmoko.org/wiki/GPS_Data_LoggerGPS Data Logger2008-08-18T19:34:53Z<p>Brian H Wilson: </p>
<hr />
<div>This page was created to address the use cases mentioned in [[GTA02 GPS]], including<br />
<br />
* I want to log GPS data for later analysis.<br />
* I want to collect GPS data for scientific field work (forestry, biology, etc)<br />
<br />
The page was started on 17 August 2008 mostly as a thought exercise.<br />
Please jump in and add to it.<br />
<br />
== Overview ==<br />
<br />
The typical commercial approach is to create one big application that does everything well. Unfortunately everyone has a different idea of what &quot;doing everything well&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.<br />
<br />
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.<br />
<br />
Initially the main functions could be broken out these components.<br />
<br />
# A '''GPS multiplexer''' that talks to the GPS receiver and feeds data to many applications.<br />
# A '''GPS Controller''' to that can talk to the mulitplexer (and hence the GPS receiver) to display status and adjust settings.<br />
# A '''Data Logger''' that can run all the time and record GPS data.<br />
# 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.<br />
<br />
== Main components ==<br />
<br />
=== GPS multiplexer ===<br />
<br />
Look at gpsd and gypsy (and the related religious wars) and either use one of them or use them for inspiration. <br />
<br />
Partial list of requirements for the multiplexer<br />
* Control internal GPS receiver<br />
* Control external GPS connected via serial port (USB or bluetooth)<br />
* Feed data from the selected GPS receiver to multiple applications.<br />
* Handle a RTCM stream to allow realtime DGPS postprocessing.<br />
* Supply all attributes to applications, including such things as PDOP and satellites in use. (Not just time and position)<br />
<br />
==== External GPS ====<br />
<br />
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.<br />
<br />
=== Support for postprocessing? ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== GPS controller ===<br />
<br />
''I think OM gps test program (what's it called) does much of this.''<br />
<br />
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.<br />
<br />
=== Data Logger ===<br />
<br />
The basic concept of the logger is to create a bread crumb trail as you move about. <br />
It has its own preference settings to determine if points are plotted based on change in position or on a time basis or both. <br />
<br />
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.<br />
<br />
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. <br />
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)<br />
<br />
=== Field Collection Tool ===<br />
<br />
'''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.<br />
<br />
'''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.<br />
<br />
'''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.<br />
<br />
<br />
[[Category: GPS]]</div>Brian H Wilsonhttp://wiki.openmoko.org/wiki/GPS_Data_LoggerGPS Data Logger2008-08-18T18:39:07Z<p>Brian H Wilson: New page: This page addresses the use cases mentioned in GTA02 GPS, including Category: GPS</p>
<hr />
<div>This page addresses the use cases mentioned in [[GTA02 GPS]], including<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
[[Category: GPS]]</div>Brian H Wilsonhttp://wiki.openmoko.org/wiki/GPS_applicationsGPS applications2008-08-18T18:37:34Z<p>Brian H Wilson: /* Use cases */ Removed link to email that was not really relevant. Added link to new data logger page.</p>
<hr />
<div>== Possible GPS applications ==<br />
<br />
As people develop more sophisticated GPS applications, please note them here.<br />
<br />
=== Use cases ===<br />
<br />
* I want to look at maps. <br />
* I want to be able to prepare data and load my own maps.<br />
* I want to load map data in a WKB (well known binary) format such as shapefiles.<br />
* I want to go somewhere; please tell me how to get there. Routing.<br />
* I want to help with the [[Openstreetmap]] project by collecting data.<br />
* I want to use [[Openstreetmap]] data in a map viewer.<br />
* I want to use the smartphone GPS to go [[Geocaching]]<br />
* I want the GPS to update profile settings based on my location. Example, mute the phone ringer when I am at work.<br />
* I want to log GPS data for later analysis. [[GPS Data Logger]]<br />
* I want to collect GPS data for scientific field work (forestry, biology, etc)<br />
<br />
=== Applications software ===<br />
<br />
'''Please note if a program works or if it's vapourware.'''<br />
<br />
* Cairo-based mapping (I wonder what this is?)<br />
* [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.<br />
:* [http://wiki.openstreetmap.org/index.php/Rana Ran&amp;aacute;] is the new version of pyroute<br />
* [http://wiki.openstreetmap.org/index.php/Gosmore Gosmore] is a routing and viewer of OSM XML data such as the planet.osm.<br />
* [[GPS Sight]], a popular Openmoko project under LGPL.<br />
* [[GPS-Trail]] a simple trail logger.<br />
* [[GPS_Navigation#roadmap|roadmap]] mapping system using freely available maps (US census TIGER, DGLib, shapefiles).<br />
* [[Navit]] a car navigation system with routing engine.<br />
* [http://svn.projects.openmoko.org/svnroot/openmoko-agpsui Openmoko AGPS UI project].* [[Orrery]], an unpopular Openmoko project for displaying the night sky.<br />
* [[qpegps]] qtopia (arm PDA) based map viewer with gps features<br />
* [[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.<br />
[http://projects.openmoko.org/projects/openvario/ here].<br />
* [http://www.tangogps.org TangoGPS] mapping program. Downloads maps on demand and caches them, very efficient. '''Works very well.'''</div>Brian H Wilsonhttp://wiki.openmoko.org/wiki/Manually_using_GPSManually using GPS2008-08-15T20:34:33Z<p>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</p>
<hr />
<div>#REDIRECT [[GPS on the Neo 1973]]</div>Brian H Wilsonhttp://wiki.openmoko.org/wiki/GPS_on_the_Neo_1973GPS on the Neo 19732008-08-15T20:34:33Z<p>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</p>
<hr />
<div>The Neo1973 device contains an integrated GPS. The particular device<br />
is marketed as an AGPS, and there is some [[Hardware:AGPS |<br />
discussion]] available as to what significance that &quot;A&quot; might have.<br />
<br />
All purchased phones do not include the GPS binary driver. [http://lists.openmoko.org/pipermail/community/2007-July/008466.html] <br />
But finally, as described in [[November_29%2C_2007_Community_Update]], the binary driver is available to the community now.<br />
<br />
There is an ongoing effort to write a Free Software<br />
program that could be used instead of this binary-only program. See<br />
[[Hammerhead/Protocol]] for details and the latest status.<br />
<br />
== Quick test (driver output to console) on Neo1973 Phase 1 ==<br />
''Main article: [[Getting GPS console output with gllin]]''<br />
<br />
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:<br />
cat /tmp/nmeaNP<br />
<br />
This way it is possible to see the first results very easily.<br />
<br />
== The &quot;GPS Sight&quot; program with graphic interface ==<br />
''Main article: [[GPS Sight]]''<br />
<br />
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). <br />
<br />
== The old program in /home/root/DM2/gps ==<br />
''Main article - [[Phase 1 GPS driver]]''<br />
<br />
In the very early shipment to 50 Phase 1 developers, a binary-only program for talking to the the GPS was accidentally included <br />
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.<br />
<br />
== Bluetooth GPS ==<br />
<br />
He also [http://pavelmachek.livejournal.com/39659.html succeeded]<br />
at getting the Neo1973 to act like a bluetooth GPS with the following<br />
script: (Note that this script has bad problems if you run it more than once. You can get a &quot;time traveling GPS&quot; effect, with the GPS showing you your past position).<br />
<br />
#!/bin/sh<br />
killall rfcomm tail<br />
mknod /dev/rfcomm0 c 216 0<br />
echo 1 &gt; /sys/devices/platform/s3c2410-i2c/i2c-0/0-0008/gta01-pm-bt.0/power_on<br />
sleep 1<br />
hciconfig hci0 up name linuxgps<br />
sleep 1<br />
sdpd<br />
sleep 1<br />
sdptool add SP<br />
(<br />
while true; do<br />
rfcomm listen /dev/rfcomm0 1<br />
sleep 1<br />
done<br />
) &amp;<br />
(<br />
while true; do<br />
tail -f /tmp/gps.nmea &gt; /dev/rfcomm0<br />
echo 1 &gt; /sys/class/leds/gta01\:vibrator/brightness<br />
sleep 1<br />
echo 0 &gt; /sys/class/leds/gta01\:vibrator/brightness<br />
done<br />
) &amp;<br />
<br />
== Using UDP ==<br />
<br />
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).<br />
<br />
i switch off writing to /tmp/nmeaNP and logging to log/... with<br />
<br />
-np<br />
-nmea<br />
<br />
the help says that -nmea is the default, fact is that gllin logs nmea sentences into ./log/&lt;date&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):<br />
<br />
#!/usr/bin/python<br />
import sys<br />
import socket<br />
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)<br />
s.bind(('127.0.0.1', 6000))<br />
while True:<br />
line = s.recv(1024)<br />
sys.stdout.write(line)<br />
sys.stdout.flush()<br />
<br />
the program just prints those to stdout but other methods are possible (i feed them into a NMEA parser).<br />
<br />
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 &gt; gps.gz` is a useless idea anyway because the files in log/ (current directory) contains the NMEA data already.<br />
<br />
== NMEA ==<br />
The ouput from the binary driver seems to follow the NMEA standard. <br />
<br />
Some information about it is available at [http://gpsinformation.org/dale/nmea.htm gpsinformation.org] and on [http://en.wikipedia.org/wiki/NMEA Wikipedia].<br />
<br />
<br />
[[Category:GPS]]</div>Brian H Wilsonhttp://wiki.openmoko.org/wiki/Getting_GPS_console_output_with_gllinGetting GPS console output with gllin2008-08-15T20:31:48Z<p>Brian H Wilson: Added intro comment</p>
<hr />
<div>[[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.<br />
<br />
== How to see gllin output ==<br />
<br />
This page describes the &quot;quick start&quot; procedure allowing to see the first output and actually use the GPS device in the command line mode, using the [[gllin]] driver.<br />
<br />
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.<br />
<br />
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:<br />
cat /tmp/nmeaNP<br />
Type cat ''after'' you start the gllin, not before. The output from the GPS driver looks like<br />
$GPRMC,235946.99,V,,,,,,,120180,,,N*78<br />
$GPGSA,A,1,,,,,,,,,,,,,11.2,5.0,10.0*36<br />
$GPGGA,235946.99,,,,,00,00,5.0,,M,0.0001999,M,0.0020199,*57<br />
(and so on). <br />
<br />
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. <br />
<br />
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.<br />
<br />
== GPRMC message ==<br />
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<br />
<br />
GPRMC,064459.00,A,4723.078551,N,00831.004788,E,000.0,000.0,080108,,,A*50<br />
<br />
Where:<br />
*'''064459.00''' Fix taken at 6:44:59.00 UTC (early morning)<br />
*'''A''' '''A''' for the normal (active) message or '''V''' for the void message. Void messages are described below.<br />
*'''4723.078551,N''' Latitude 47 degrees 23.078551 minutes North.<br />
*'''00831.004788,E''' Longitude 8 degrees 31.004788 minutes East<br />
*'''000.0''' Ground speed in knots (we are just standing in place). Multiply by 1.852 to get kilometers per hour.<br />
*'''000.0''' Track angle in degrees<br />
*'''080108''' Date - 8th of January 2008 (year goes last, 240307 is 24th of March 2007)<br />
*'''(empty)''' Would be magnetic variation<br />
*'''&lt;nowiki&gt;*&lt;/nowiki&gt;50''' The checksum, begins with *<br />
<br />
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<br />
<br />
GPRMC,114031.52,V,,,,,,,120108,,,N*76<br />
<br />
In this case it is necessary to go to the more open place. It may take several minutes before device reports the correct location.<br />
<br />
== GPGGA message ==<br />
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 <br />
<br />
GPGGA,064458.00,4723.078480,N,00831.004426,E,1,06,1.0,464.0,M,0.271000,M,0.0100505,*42 <br />
<br />
Here<br />
*'''064458.00''' Current time is 06:44:54 UTC (the test was done early morning)<br />
*'''4723.078480,N''' Latitude 47 degrees 23.078480 seconds North<br />
*'''00831.004426''' Longitude 8 deg 31.004426 seconds East<br />
*'''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<br />
*'''06''' Number of satellites being tracked (six are seen)<br />
*'''1.0''' Horizontal dilution of position<br />
*'''464.0,M''' Altitude (in meters) above mean sea level. <br />
*'''0.271000, M''' Height of geoid (mean sea level) above WGS84 ellipsoid<br />
*'''0.0100505''' time in seconds since last DGPS update<br />
* Following the spec, next should go the DGPS station ID number but seems missing.<br />
* '''&lt;nowiki&gt;*&lt;/nowiki&gt;42''' the checksum, always begins with *<br />
<br />
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:<br />
<br />
GPGGA,120213.58,,,,,00,00,1.0,,M,0.0001999,M,0.0020599,*56<br />
<br />
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.<br />
<br />
== Using grep ==<br />
The trivial way to concentrate on one type of the GPS messages is to use grep which is installed in the phone:<br />
cat /tmp/nmeaNP | grep GPRMC<br />
<br />
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.<br />
<br />
== Using awk ==<br />
The awk tool provides some more elegant parsing capabilities. For example, find your current location with<br />
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<br />
<br />
[[Category:GPS]]<br />
[[Category:Application Developer]]</div>Brian H Wilsonhttp://wiki.openmoko.org/wiki/Hammerhead/ProtocolHammerhead/Protocol2008-08-15T20:28:18Z<p>Brian H Wilson: Added intro</p>
<hr />
<div>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) <br />
<br />
== Repository ==<br />
<br />
We have set up a SCM repository for experimental code and documentation at http://projects.linuxtogo.org/projects/sphyrna.<br />
<br />
[[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 <br />
<br />
[http://openmoko.togaware.com/survivor/SatScan.html]<br />
<br />
== Background resources ==<br />
<br />
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.<br />
<br />
A file giving doppler information on the above longtrace NMEA is on [http://www.mauve.plus.com/gps].<br />
<br />
[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.<br />
<br />
http://home.earthlink.net/~cwkelley/ has sources for open-source GPS receiver, and <br />
http://home.earthlink.net/~cwkelley/documentation.htm is its documentation.<br />
<br />
https://okeefesrv.geomatics.ucalgary.ca/essentials/index.html provides a library of useful GPS-related algorithms under a 3-clause BSD license. <br />
<br />
GP2021 is &quot;dumb&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 &quot;dumb&quot; receivers by doing code phase search in hardware, directly.<br />
<br />
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;idno=2439].<br />
Other interesting papers. [http://gauss.gge.unb.ca/papers.pdf/iongpsgnss2003.beran.pdf] [http://topo.epfl.ch/documents/EuroSDR/beran05.pdf] <br />
<br />
=== Packet format &amp; comm protocol ===<br />
<br />
See sphyrna project for up-to-date decoding info.<br />
<br />
[[Category:GPS]]</div>Brian H Wilsonhttp://wiki.openmoko.org/wiki/Neo_1973_hardwareNeo 1973 hardware2008-08-15T20:26:07Z<p>Brian H Wilson: /* AGPS */ Fixed link</p>
<hr />
<div>{{Box}}<br />
<br />
[[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.<br />
<br />
'''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]].'''<br />
<br />
[[Image:Gta01b v3 top.jpg|thumb|400px|display (top) side]]<br />
[[Image:Gta01b v3 bottom.jpg|thumb|400px|component (back) side]]<br />
<br />
==User experiences of Phase 0 hardware==<br />
[[Wishlist:Neo1973_P0_Review]]<br />
<br />
==User reports of robustness==<br />
User experiences - drops onto concrete - ... [[Neo1973 Robustness]]<br />
<br />
== Physical Dimensions ==<br />
* 120.7 x 62 x 18.5 mm (4.75 x 2.44 x 0.728 inch)<br />
* 184 +/- 5 g (6.5 ounces)<br />
* 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.<br />
* 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]<br />
<br />
== Main components ==<br />
=== Processor ===<br />
The main Processor (CPU) of the Neo1973 is a Samsung S3C2410AL-26 (Capable of running up to 266 MHz)<br />
<br />
* Product Homepage: [http://www.samsung.com/global/business/semiconductor/productInfo.do?fmly_id=229&amp;partnum=S3C2410 S3C2410.htm]<br />
* User Manual: [http://www.samsung.com/global/business/semiconductor/productRightMenuDown.do?doc_file=26537 2410UserManual.pdf]<br />
* Core: ARM920T<br />
* Instruction Set: ARMv4<br />
* BSDL File: [http://www.samsung.com/global/business/semiconductor/productRightMenuDown.do?doc_file=26554 S3C2410_BGA_BSDLJTAGFILE.bsd]<br />
* GPIO Assignments: https://svn.openmoko.org/trunk/doc/hardware/GTA01Bv4/gpio.txt<br />
<br />
=== Flash ===<br />
64MB Samsung NAND flash (K9F1208U0B) attached to S3C2410 NAND controller.<br />
<br />
* Product Homepage: [http://www.samsung.com/global/business/semiconductor/productInfo.do?fmly_id=158&amp;partnum=K9F1208U0B]<br />
* Data Sheet: [http://www.samsung.com/global/system/business/semiconductor/product/2007/6/11/NANDFlash/SLC_SmallBlock/512Mbit/K9F1208U0B/ds_k9f1208x0b_rev03.pdf]<br />
* Connected to: S3C2410 NAND controller<br />
<br />
This is the only flash memory in the device. The S3C2410 boots directly from nand, using the [[S3C2410 Steppingstone]].<br />
<br />
We only use free software, no proprietary flash file systems. For a full description of how it is used, see [[NAND bad blocks]]<br />
<br />
=== RAM ===<br />
128MB SDRAM (2x Samsung K4M511633C) attached to S3C2410 SDRAM controller<br />
* Product Homepage: [http://www.samsung.com/global/business/semiconductor/productInfo.do?fmly_id=136&amp;partnum=K4M511633C]<br />
* Data Sheet: [http://www.samsung.com/global/system/business/semiconductor/product/2007/6/11/MobileSDRAM/MobileSDRSDRAM/512Mbit/K4M511633C/ds_k4m511633c.pdf]<br />
* Connected to: S3C2410 <br />
<br />
=== GSM/GPRS ===<br />
The [[GSM]] (including GPRS) modem is Texas Instruments Calypso based.<br />
<br />
* Connected to: S3C2410 UART1 (full-uart, RxD, TxD, CTS, RTS), /dev/ttySAC0 in userspace<br />
* PM Driver: https://svn.openmoko.org/trunk/src/target/kernel/patches/gta01-power_control.patch<br />
* Accessible GSM/GPRS antenna jack (if battery cover is removed)<br />
<br />
==== CALYPSO digital baseband ====<br />
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.<br />
<br />
==== TWL3014 analog baseband ====<br />
Product Homepage: [http://focus.ti.com/general/docs/wtbu/wtbuproductcontent.tsp?templateId=6123&amp;navigationId=12295&amp;contentId=4703 TWL3014]<br />
<br />
==== TRF6151 RF Transceiver ====<br />
Product Homepage: [http://focus.ti.com/general/docs/wtbu/wtbuproductcontent.tsp?templateId=6123&amp;navigationId=12296&amp;contentId=4701 TRF6151] &lt;br&gt;<br />
GPRS Class12/CS4 &lt;br&gt;<br />
<br />
=== [[Hardware:AGPS|AGPS]] ===<br />
Hammerhead PMB 2520 AGPS from Global Locate.<br />
<br />
* Product Homepage: [http://www.globalocate.com/SEMICONDUCTORS/SEMI_HAMMER_Frameset.htm Hammerhead]<br />
* Connected to: S3C2410 UART2 (full-uart, RxD, TxD, CTS, RTS) /dev/ttySAC1 in userspace<br />
* Driver: Implemented as a binary with NMEA output suitable for the gpsd daemon ([[gpsd]])<br />
* PM Driver: https://svn.openmoko.org/trunk/src/target/kernel/patches/gta01-power_control.patch<br />
* Externally-accessible GPS antenna connector of type MMCX<br />
<br />
A binary (closed source) driver is available - see [[gllin]]. <br />
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.<br />
<br />
=== microSD-Card ===<br />
The Neo1973 has one microSD aka Transflash slot.<br />
It supports SDHC. MicroSD slot is [[Disassembling_Neo1973#Opening_back_cover|under battery]].<br />
* Connected to: S3C2410 MMC/SD controller<br />
* Mounted to: /media/card<br />
* Driver: https://svn.openmoko.org/trunk/src/target/kernel/patches/s3c_mci.patch<br />
* [[Supported microSD cards]]<br />
* 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)]<br />
<br />
=== LCD Module (LCM) ===<br />
This is a 2.8&quot; diagonal (1.7&quot; x 2.27&quot; - 43mm x 58mm) 480x640 toppoly (tpo) TD028TTEC1 module (283 DPI), using a Toshiba JBT6K74 TFT LCD Driver Chipset.<br />
* Homepage: [http://www.tpo.biz/ENG/business-eng/Activer-Matrix-VGA.htm Activer-Matrix-VGA.htm]<br />
* Driver: https://svn.openmoko.org/trunk/src/target/kernel/patches/gta01-jbt6k74.patch<br />
* Backlight Driver: https://svn.openmoko.org/trunk/src/target/kernel/patches/gta01-backlight.patch<br />
* Connected to: S3C2410 Display Controller and S3C2410 SPI Interface channel 1<br />
* Backlight controllable via /sys/class/backlight/gta01-bl<br />
<br />
==== Touch Screen ====<br />
* Connected to: S3C2410 TS controller<br />
* Driver: https://svn.openmoko.org/trunk/src/target/kernel/patches/s3c2410_touchscreen.patch<br />
<br />
==== Stylus ====<br />
<br />
Seemingly identical to [http://cgi.ebay.com/4in1-PDA-Stylus-LED-Light-Torch-Laser-Pointer-Pen-h7_W0QQitemZ280089656134QQihZ018QQcategoryZ48677QQrdZ1QQcmdZViewItem this one on ebay]<br />
<br />
=== Bluetooth ===<br />
Delta DFBM-CS320 Class2 Module, using CSR BlueCore4 (V2.0+EDR).<br />
<br />
* Data Sheet: [http://www.delta.com.tw/product/cp/vco/BT/download/pdf/CS/2.DFBM-CS320.pdf 2.DFBM-CS320.pdf]<br />
* 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]<br />
* Driver: Stock Linux Kernel BlueZ<br />
* Connected to: S3C2410 USB Host controller (OHCI)<br />
* PM Driver: https://svn.openmoko.org/trunk/src/target/kernel/patches/gta01-power_control.patch<br />
<br />
=== Vibrator ===<br />
* Driver: https://svn.openmoko.org/trunk/src/target/kernel/patches/gta01-vibrator.patch<br />
* Connected to: S3C2410 GPIO<br />
* Controllable via /sys/class/leds/gta01:vibrator<br />
<br />
=== USB Host ===<br />
The USB Host controller is inside the S3C2410<br />
* Driver: Stock Linux kernel ohci_hcd<br />
<br />
=== USB Device ===<br />
The USB Device controller is inside the S3C2410 <br />
* Driver: https://svn.openmoko.org/trunk/src/target/kernel/patches/s3c2410_udc.patch<br />
* Please see [[USB Product IDs]] on information about which Vendor/Product IDs we use<br />
* 1200mAh lithium battery charges when connected to powered host.<br />
* Mini-B connector [http://www.cypressindustries.com/enlarge.asp?Img=products/images/ccmusbb-32005-601.gif this one].<br />
* This can be used as a USB host: [[Neo1973_USB_host]]<br />
<br />
=== I2C Devices ===<br />
The I2C is a simple communication standard intended to move small amounts of data a few inches between chips.<br />
Please see [[I2C | Neo I2C Devices]] for more information &amp; a list of devices &amp; the addresses currently in use &amp; documented for the Neo1973.<br />
<br />
=== Audio ===<br />
See also: [[Neo1973 Audio Subsystem]]<br />
<br />
==== Wolfson Codec ====<br />
<br />
''Main article: [[WM8753]]''<br />
<br />
There's a [[WM8753]] Wolfson Microelectronics ''codec'' (This is not a &quot;smart&quot; codec that can interpret MP3/... it is a simple dumb &quot;sound card&quot;.<br />
<br />
==== Stereo Amplifier ====<br />
There's a National Semiconductor [[LM4857]] Stereo Amplifier at the analog audio output of the WM8753<br />
<br />
* Product Homepage: [http://www.national.com/pf/LM/LM4857.html LM4857.html]<br />
* Data Sheet: [http://www.national.com/ds.cgi/LM/LM4857.pdf LM4857.pdf]<br />
* Connects to: S3C2410 I2C (Control)<br />
<br />
==== Analog wired Headset ====<br />
There's a four-ring 2.5mm stereo jack which provides connectivity to old-fashioned wired headsets.<br />
<br />
The headsets used by Motorola smartphones (A780,A1200, ...) and the V-360 have a compatible configuration.<br />
<br />
Pinout: [http://lists.openmoko.org/pipermail/community/2008-March/013791.html]<br />
<br />
&lt;pre&gt;&lt;nowiki&gt;<br />
base = ground <br />
speaker left (internal impedance 33R) to ground. (+jackinsert detection)<br />
speaker right (internal impedance 33R) to ground.<br />
tip = mic electret condenser type, to ground. <br />
bias (power for mic) 2K2 from +3.3v(wolfson codec) <br />
(+HoldButton shortcircuit to ground)<br />
&lt;/nowiki&gt;&lt;/pre&gt;<br />
<br />
==== Bluetooth Headset ====<br />
This one is wired via PCM bus from the CSR Bluetooth chip to the Wolfson codec.<br />
<br />
=== Power Management ===<br />
A Philips PCF50606 is used for [[Neo1973_Power_Management|power management]].<br />
<br />
* Data Sheet: [http://www.nxp.com/acrobat/literature/9397/75009763.pdf PCF50606/605]<br />
* User Manual: [http://www.rockbox.org/twiki/pub/Main/DataSheets/pcf50606.pdf pcf50606.pdf]<br />
* Connected to: S3C2410 via I2C, client address is 0x08. <br />
* Driver Source: https://svn.openmoko.org/trunk/src/target/kernel/patches/gta01-pcf50606.patch<br />
<br />
=== Battery ===<br />
The [[Neo1973 Battery]] is compatible with a Nokia BL5C battery.<br />
According to [http://lists.openmoko.org/pipermail/community/2007-February/003758.html this] post on the mailinglist.<br />
[http://wiki.openmoko.org/index.php?title=Image:Neo1973-with-BL5C-battery.png Photo] of the battery inside the Neo1973.<br />
<br />
=== Buttons ===<br />
The Neo1973 features two buttons:<br />
# [[Neo1973 Power Button|The Power Button]]<br />
# [[Neo1973 AUX Button|The &quot;Aux&quot; button]]<br />
<br />
=== Alternate cases ===<br />
A number of alternate case designs have been suggested and requested.<br />
<br />
[[Neo1973 case schematics]]<br />
<br />
[[Alternate Neo1973 case designs]]<br />
<br />
== History ==<br />
=== GTA01 ===<br />
This is the most simple, non-bluetooth version of the prototype.<br />
<br />
==== GTA01v3 ====<br />
First generation of prototypes that was given to internal OpenMoko software developers.<br />
<br />
Unfortunately not useful at all due to non-working touchscreen.<br />
<br />
* ATAG_REVISION: 0x0000130<br />
<br />
==== GTA01v4 ====<br />
Second generation of prototypes that was given to [[User:HaraldWelte|Harald]] +[[User:Mickey|Mickey]].<br />
<br />
Unfortunately still not useful due to half-working touchscreen.<br />
<br />
* ATAG_REVISION: 0x00000140<br />
<br />
=== GTA01B ===<br />
This is the bluetooth-enabled fork of GTA01<br />
<br />
==== GTA01Bv2 ====<br />
This is the first produced version of the bluetooth-enabled version.<br />
<br />
* ATAG_REVISION: 0x00000220<br />
<br />
==== GTA01Bv3 ====<br />
This is the second produced version of the bluetooth-enabled version. It contains mainly GPS-related fixes.<br />
<br />
* ATAG_REVISION: 0x00000230<br />
<br />
This is the version that is shipped in [[Neo1973#Phase_0_.28GTA01Bv3.29|Phase 0]].<br />
<br />
===== GTA01Bv3 Errata =====<br />
====== PMU unable to resume from suspend ======<br />
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''':<br />
* PMU RTC Alarm<br />
* Power button press<br />
* Charger events (charger insertion/removal/error)<br />
* Low battery<br />
<br />
====== Stand-by time extremely low ======<br />
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.<br />
<br />
====== GSM doesn't resume phone from suspend ======<br />
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.<br />
<br />
This is a serious issue, but can be fixed with a GSM Modem Firmware update.<br />
<br />
====== GSM Sidetone too loud ======<br />
The local feedback sidetone (see [http://en.wikipedia.org/wiki/Sidetone]) is too loud. This will be addressed in a GSM firmware update<br />
<br />
====== Bad block ======<br />
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.<br />
<br />
==== GTA01Bv4 ====<br />
This is the version that is being shipped in [[Neo1973#Phase_1_.28GTA01Bv4.29|Phase 1]]<br />
<br />
===== Looks =====<br />
This is what the GTA01Bv4 PCB looks like without the shielding cans, which will be fitted later.<br />
[[Image:Gta01b_v4_front.jpg|thumb|400px|Component side]]<br />
[[Image:Gta01b_v4_back.jpg|thumb|400px|Display side]]<br />
<br />
===== Errata =====<br />
<br />
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]].<br />
<br />
===== Changes from GTA01Bv3 =====<br />
# Fix all Errata items from GTA01Bv3<br />
# 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)<br />
# Fix a number of production related details and minor hardware details that are not user-visible<br />
<br />
===GTA02===<br />
The [[GTA02#.22Phase_2.22_.28GTA02.2C_.22Mass_Market.22.29|GTA02]] is now called the Neo FreeRunner and shipped within the &quot;Mass Market launch&quot; (see [http://wiki.openmoko.org/wiki/Neo1973#.22Phase_2.22_.28GTA02.2C_.22Mass_Market.22.29|timeline]).<br />
It is a new main release with [[Neo1973:_GTA01Bv4_versus_GTA02_comparison|features added]]<br />
<br />
===Debug Connector===<br />
This is the connector used to connect the [[Debug Board]] and possibly other hardware.<br />
<br />
Connections are:<br />
* 39 - GND<br />
* 38 - STDI<br />
* 37 - _RESET<br />
* 36 - STMS<br />
* 35 - STCK<br />
* 34 - STDO<br />
* 33 - GSM_EN<br />
* 29 - _STRST<br />
* 19 - X_I2C_SCL (H-TP4703)<br />
* 18 - X_I2C_SDA (H-TP4704)<br />
* 17 - SPI_CLK0<br />
* 16 - SPI_MOSI0<br />
* 15 - SPI-MISO0 <br />
* 14 - SS0<br />
* 13 - EINT3 (H-TP4705)<br />
* 3 - MODEM_TXD (H-TP4701)<br />
* 2 - MODEM_RXD (H-TP4702)<br />
<br />
Information from [http://people.openmoko.org/roh/Debugport_GTA01bv4.png].<br />
<br />
===Test points===<br />
<br />
* GSM RTS - H-TP1531<br />
* GSM CTS - H-TP1530<br />
* GSM Modem on - R10818 - ungrounded end<br />
* GSM_EN - R1501 (not present) - ungrounded end<br />
<br />
== Distinguishing hardware revisions ==<br />
=== Inside the [[Bootloader]] ===<br />
Every hardware revision has its own u-boot image type. Thus, the bootloader has the revision hard-coded.<br />
The hardware revision is passed on to the kernel via the ATAG mechanism (ATAG_REVISION)<br />
<br />
=== Inside the [[Kernel]] ===<br />
The kernel receives the ATAG_REVISION during bootup, and saves its contents in the &quot;system_rev&quot; global variable.<br />
<br />
=== From Userspace ===<br />
The kernel exports the system_rev variable in /proc/cpuinfo as &quot;Revision :&quot; line.<br />
<br />
??? So does GTA01Bv4 equal the cat /proc/cpuinfo output of<br />
Hardware : GTA01<br />
Revision : 0240<br />
<br />
== Approval ==<br />
*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.<br />
<br />
*[http://www.fcc.gov/ FCC]<br />
<br />
===GTA01 FCC test report===<br />
<br />
[http://people.openmoko.org/tony_tu/GTA01/certificate/FCC/ FCC test report]<br />
<br />
===GTA01 CE test report===<br />
<br />
[http://people.openmoko.org/tony_tu/GTA01/certificate/CE/ CE test report]<br />
<br />
===GTA01 NCC test report===<br />
<br />
For Taiwan Import usage:<br />
<br />
[http://people.openmoko.org/tony_tu/GTA01/certificate/NCC/ NCC test report]<br />
<br />
[[Category:Neo1973 Hardware]]</div>Brian H Wilson