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

	<entry>
		<id>http://wiki.openmoko.org/wiki/Wiki_Maintainers</id>
		<title>Wiki Maintainers</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Wiki_Maintainers"/>
				<updated>2008-07-27T02:07:32Z</updated>
		
		<summary type="html">&lt;p&gt;Cheetah100: /* Members */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Goals ==&lt;br /&gt;
&lt;br /&gt;
* Maintain integrity and correctness of information&lt;br /&gt;
* Organize and maintain page content and layout&lt;br /&gt;
* Clean up and consolidate pages and categories&lt;br /&gt;
* Reduce clutter and confusion for users&lt;br /&gt;
* Work with OpenMoko to maintain an offline-capable version&lt;br /&gt;
&lt;br /&gt;
== Members ==&lt;br /&gt;
&lt;br /&gt;
* [[User:Nuclear_Eclipse|John Reese (Nuclear_Eclipse)]]&lt;br /&gt;
* [[User:Tingo|Torfinn Ingolfsen]]&lt;br /&gt;
* [[User:Iandouglas|Ian Douglas]]&lt;br /&gt;
* Jay Vaughan&lt;br /&gt;
* Ken Young&lt;br /&gt;
* [[User:Vvaidy|Vijay Vaidyanathan]]&lt;br /&gt;
* Ken Restivo&lt;br /&gt;
* Josh Monson (westcoastmonson)&lt;br /&gt;
* Matt Joyce&lt;br /&gt;
* [[User:MicRenda|Michele Renda]] (Italian version)&lt;br /&gt;
* [[User:stryderjzw|Justin Wong]]&lt;br /&gt;
* [[User:Kempelen|Ferenc Veres]]&lt;br /&gt;
* [[User:Cheetah100|Peter Harrison]]&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
&lt;br /&gt;
* [[Openmoko_Wiki_Editing_Guidelines]]&lt;br /&gt;
* [[Wiki_Issues]]&lt;br /&gt;
* [[Wiki_maintain_agenda]]&lt;br /&gt;
* [[Openmoko_Wiki_Official_Index_Page]]&lt;br /&gt;
* [[:Category:Candidates_for_speedy_deletion]]&lt;br /&gt;
* [[Special:Categories]]&lt;br /&gt;
* [[:Category:Categories]]&lt;br /&gt;
* [[:Category:Templates]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Community]]&lt;/div&gt;</summary>
		<author><name>Cheetah100</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Talk:Wiki_Maintainers</id>
		<title>Talk:Wiki Maintainers</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Talk:Wiki_Maintainers"/>
				<updated>2008-07-21T03:31:49Z</updated>
		
		<summary type="html">&lt;p&gt;Cheetah100: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Feedback and advice is always welcome!&lt;br /&gt;
&lt;br /&gt;
* Will volunteer to help maintain this in anyway, shape, or form. Would like to see direction come from Brenda, if not someone designated by her. I think as a group we can make a huge impact on this wiki, but in order for us to come up w/ some process, organization, and editing rules I feel that OM needs to endorse this. -westcoastmonson&lt;br /&gt;
&lt;br /&gt;
* I won't put my name down yet, but I'll probably end up involved in Wiki editing once I get my Freerunner and start wanting to find information... Consider me an interested party. [[User:Darksatanic|Darksatanic]] 21:28, 15 July 2008 (UTC)&lt;br /&gt;
&lt;br /&gt;
* I'd love to take a crack at a better Getting Started for Brand New OpenMoko Developers - from after you have unwrapped your phone to &amp;quot;Hello World&amp;quot;. The confusion over which Distro to use, and the constant references in the Wiki to the Neo 1973 sure dont help :-) - [[User:Vvaidy|Vijay]]&lt;br /&gt;
** I agree.  I think where there is commonality between various Openmoko products, pages should be shared, but the distinctions should be teased out.  If that means editing some 1973 pages, so be it. - Matt&lt;br /&gt;
&lt;br /&gt;
* biggest issue is reorganizing the pages into something that makes more sense, and keeping Brenda involved since she's in charge of the wiki as an OpenMoko employee. Secondary concern is that everyone who signs up understands wiki syntax - [[User:Iandouglas|Ian Douglas]]&lt;br /&gt;
&lt;br /&gt;
* I agree - we want to have Brenda in on this (be it as leader, advisor or both). As for understanding Wiki syntax, I'll settle for peope that are willing to learn it. [[User:Tingo|Tingo]] 05:40, 16 July 2008 (UTC)&lt;br /&gt;
&lt;br /&gt;
* I'm also not willing to be an official maintainer, but expect to contribute lots of edits.  I don't really understand why references to the Neo 1973 are confusing.  The company has two very similar devices and it's simply more efficient to discuss the same topic with respect to each in the same place.  If someone really wants to duplicate such similar content in two separate places, go for it, but that's a lot of work for little payback, when we could instead educate wiki users that there are two devices out there.  The main thing I think the maintainers should focus on initially is getting a very organized front page and better search functionality in place.  Those two things prevent people from finding what they are looking for.  The search is just abysmal and I can't even find pages I know I've edited in the past using the search.  The front page cannot link to everything, but it should try to hit the main things people are looking for and also provide a prominent link to a more comprehensive index that can be used when the front page doesn't have what you're looking for.  We might ask OpenMoko if they'd be willing to give us some website stats on the wiki so that we know which pages ARE most-visited and then could be sure to include those on the front page. - [[User:Brianwc|Brianwc]]&lt;br /&gt;
&lt;br /&gt;
*I would like to spend time helping out with maintaining the Wiki. I feel that the future of the OpenMoko project will be determined by the community around it, not by advanced technology. We need to aim for involvement with many vertical market specialists, and they will need to be comfortable with the support infrastructure. The Wiki and other community tools will be central to this effort. I look forward to contributing. [[User:Cheetah100|Cheetah100]]&lt;br /&gt;
&lt;br /&gt;
** The navigation menu has a link to the Wiki Index Page, and Brenda mails monthly stats to the community mailing list. - [[User:Nuclear_Eclipse|John Reese]]&lt;/div&gt;</summary>
		<author><name>Cheetah100</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/User:Cheetah100</id>
		<title>User:Cheetah100</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/User:Cheetah100"/>
				<updated>2008-06-28T11:06:26Z</updated>
		
		<summary type="html">&lt;p&gt;Cheetah100: New page: == Peter Harrison ==  == In Open Source: ==  Peter Harrison was the founder of the New Zealand Open Source Society, and was President of the society from 2002 to 2007. During this time he ...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Peter Harrison ==&lt;br /&gt;
&lt;br /&gt;
== In Open Source: ==&lt;br /&gt;
&lt;br /&gt;
Peter Harrison was the founder of the New Zealand Open Source Society, and was President of the society from 2002 to 2007. During this time he was involved with oppositions to Microsoft patents, and presented submissions before parliamentary committees considering copyright law. He has been a contributor to various open source projects, and wrote a book about Tomcat the open source Java web server in 2002.&lt;br /&gt;
&lt;br /&gt;
== Involvement with Openmoko ==&lt;br /&gt;
&lt;br /&gt;
Peter became interested in the Openmoko project in 2007 as it provided an excellent platform for his robotic boat project. Most of the boat was completed before he acquired the Neo itself. The software and hardware interfaces were tested before the Neo 1973 was purchased. After the Neo was obtained off eBay the required OS modifications were made to support host USB, the required packages installed to run python, and scripts written to enable GPS and GPRS.&lt;br /&gt;
&lt;br /&gt;
== Openmoko Contributions ==&lt;br /&gt;
&lt;br /&gt;
Peter has contributed some documentation modifications on the OpenMoko Wiki around configuring GPRS.&lt;/div&gt;</summary>
		<author><name>Cheetah100</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Openmoko_Local_Groups:_Auckland</id>
		<title>Openmoko Local Groups: Auckland</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Openmoko_Local_Groups:_Auckland"/>
				<updated>2008-06-28T10:44:35Z</updated>
		
		<summary type="html">&lt;p&gt;Cheetah100: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{|border=1&lt;br /&gt;
!Name&lt;br /&gt;
!Skills&lt;br /&gt;
!Level of Interest&lt;br /&gt;
!Location&lt;br /&gt;
!Other&lt;br /&gt;
!Has Device&lt;br /&gt;
|-&lt;br /&gt;
|[[User:Myfanwy|Myfanwy]]&lt;br /&gt;
|Hardware engineering, design and manufacture&lt;br /&gt;
|User, possibly developer later&lt;br /&gt;
|Auckland city&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|[[User:BlueLightning|BlueLightning]]&lt;br /&gt;
|Software development&lt;br /&gt;
|Developer (nothing contributed yet)&lt;br /&gt;
|North Shore&lt;br /&gt;
|&lt;br /&gt;
|[[Image: Moko.jpg|center]]&lt;br /&gt;
|-&lt;br /&gt;
|[[User:Cheetah100|Cheetah100]]&lt;br /&gt;
|Software development, Robotics&lt;br /&gt;
|Would like to contribute&lt;br /&gt;
|North Shore&lt;br /&gt;
|&lt;br /&gt;
|[[Image: Moko.jpg|center]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Community]]&lt;br /&gt;
[[Category: OpenMoko Local Groups| ]]&lt;/div&gt;</summary>
		<author><name>Cheetah100</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Toolchain</id>
		<title>Toolchain</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Toolchain"/>
				<updated>2008-03-22T22:17:54Z</updated>
		
		<summary type="html">&lt;p&gt;Cheetah100: /* Prerequisites */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
A toolchain is a set of tools that allows you to compile code. For OpenMoko, we have to differentiate between the following use-cases:&lt;br /&gt;
&lt;br /&gt;
== Developing a single application ==&lt;br /&gt;
&lt;br /&gt;
For this, you should use a prebuilt toolchain from the OpenMoko project. Here you can find a recipe to get started with this toolchain leading you through a series of steps to compile a project and run it on your target device. You might have heard about [[OpenEmbedded]], however as an application programmer, you should '''not''' be using [[OpenEmbedded]].&lt;br /&gt;
&lt;br /&gt;
== System Integration and customizing a distribution ==&lt;br /&gt;
&lt;br /&gt;
For this task, you should use [[OpenEmbedded]] which builds its own cross compiler during the bootstrapping/build process. System Integration and customizing a distribution is out of scope of this page.&lt;br /&gt;
&lt;br /&gt;
=Basic toolchain usage=&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
&lt;br /&gt;
You should be reasonably familiar with Linux and its command line tools, have an x86-compatible computer with at least 1G of free disk space. You should have experience with compiling programs from source using your local compiler. The remainder of this document will also assume you have write access in your home directory (~) and &amp;lt;tt&amp;gt;/usr/local/&amp;lt;/tt&amp;gt; (becoming root if needed). If any of this is not the case, please call your local administrator for help.&lt;br /&gt;
&lt;br /&gt;
Last but not least you should have a working setup that allows you to compile native software packages using the autotools build system (the triade of '''./configure, make, make install''').&lt;br /&gt;
&lt;br /&gt;
A (partial) list of required packages -- please append as necessary:&lt;br /&gt;
&lt;br /&gt;
* For most Linux version you might only need to install the packages&lt;br /&gt;
** autoconf, automake&lt;br /&gt;
** binutils, gcc, gcc-c++&lt;br /&gt;
** libtool&lt;br /&gt;
** ccache&lt;br /&gt;
** intltool&lt;br /&gt;
&lt;br /&gt;
* For ubuntu (7.10) the following is required:&lt;br /&gt;
 sudo apt-get install gcc g++ autoconf automake binutils libtool libglib2.0-dev ccache libxrender-dev intltool&lt;br /&gt;
&lt;br /&gt;
==Downloading and installing==&lt;br /&gt;
&lt;br /&gt;
The prebuilt toolchain can be downloaded from [[http://downloads.openmoko.org/toolchains downloads.openmoko.org]]:&lt;br /&gt;
&lt;br /&gt;
* Creating a destination directory can be anywhere, but for example:&lt;br /&gt;
&lt;br /&gt;
  mkdir ~/sources&lt;br /&gt;
  cd ~/sources&lt;br /&gt;
&lt;br /&gt;
* Depending on your CPU type (x86_64 or i686) download the proper package:&lt;br /&gt;
&lt;br /&gt;
  wget http://downloads.openmoko.org/toolchains/openmoko-x86_64-arm-linux-gnueabi-toolchain.tar.bz2&lt;br /&gt;
 or&lt;br /&gt;
  wget http://downloads.openmoko.org/toolchains/openmoko-i686-arm-linux-gnueabi-toolchain.tar.bz2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next, you want to extract it on your filesystem. This toolchain is ''not'' relocatable, it needs to be installed into &amp;lt;tt&amp;gt;/usr/local/openmoko/&amp;lt;/tt&amp;gt;.&lt;br /&gt;
Now you have the following options:&lt;br /&gt;
&lt;br /&gt;
* Extract it directly as root, so use command &amp;quot;su&amp;quot; first (or prefix the tar command with &amp;quot;sudo&amp;quot; when you are using Debian/Ubuntu):&lt;br /&gt;
&lt;br /&gt;
   cd /&lt;br /&gt;
   tar -xjvf ~/sources/openmoko-XYZ-arm-linux-gnueabi-toolchain.tar.bz2&lt;br /&gt;
&lt;br /&gt;
* On Debian-based systems, you can use alien(+fakeroot) to create an easy-to-uninstall package from this .tar.bz2 (install with dpkg -i &amp;lt;package.deb&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
   bunzip2 openmoko-x86_64-arm-linux-gnueabi-toolchain.tar.bz2&lt;br /&gt;
   gzip openmoko-x86_64-arm-linux-gnueabi-toolchain.tar&lt;br /&gt;
   fakeroot alien -d openmoko-x86_64-arm-linux-gnueabi-toolchain.tar.gz&lt;br /&gt;
&lt;br /&gt;
* The prebuilt toolchain is for x86_64 or i686. If you wanted, you could build it on your own with OE:&lt;br /&gt;
&lt;br /&gt;
   bitbake meta-toolchain-openmoko&lt;br /&gt;
&lt;br /&gt;
Finally, everytime you want to use this toolchain, you need to alter some environment variables, so that your tools will be found. The toolchain provides a script to do that, so the only thing you need to do is to source it.&lt;br /&gt;
Note that if you are not using a &amp;quot;sh&amp;quot; or &amp;quot;bash&amp;quot; shell (check with &amp;quot;echo $SHELL&amp;quot;) that you need&lt;br /&gt;
to start &amp;quot;sh&amp;quot; or &amp;quot;bash&amp;quot; first.&lt;br /&gt;
&lt;br /&gt;
 . /usr/local/openmoko/arm/setup-env&lt;br /&gt;
&lt;br /&gt;
==Building a sample project==&lt;br /&gt;
&lt;br /&gt;
In a chosen destination directory (in this example ~/):&lt;br /&gt;
&lt;br /&gt;
* copy the downloaded sample application source:&lt;br /&gt;
&lt;br /&gt;
 cp -r /usr/local/openmoko/source/openmoko-sample2 ~/&lt;br /&gt;
&lt;br /&gt;
* Remember to set the proper environment variables (again with &amp;quot;sh&amp;quot; or &amp;quot;bash&amp;quot;) for openmoko:&lt;br /&gt;
&lt;br /&gt;
 . /usr/local/openmoko/arm/setup-env&lt;br /&gt;
&lt;br /&gt;
* You need to create a build configuration for this application. This also checks if all needed libraries, tools, etc.. is available on your system. If this fails see the notes about the needed packages in the section &amp;quot;Prerequisites&amp;quot; mentioned earlier.&lt;br /&gt;
&lt;br /&gt;
 om-conf openmoko-sample2&lt;br /&gt;
&lt;br /&gt;
* Optionally now you can modify the source code in openmoko-sample2/src&lt;br /&gt;
&lt;br /&gt;
* To build the application from the source code you only need to use &amp;quot;make&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
 cd openmoko-sample2&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
If you want to install this project on host for staging usage later, a shared library, for example, you can do the following to install it into a given configured prefix.&lt;br /&gt;
&lt;br /&gt;
 om-conf --prefix=/usr/local/openmoko openmoko-sample2&lt;br /&gt;
 cd openmoko-sample2&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
==How to modify the sample project==&lt;br /&gt;
&lt;br /&gt;
In order to build your own project by using openmoko-sample2 files, some changes are needed:&lt;br /&gt;
&lt;br /&gt;
* copy the downloaded sample application source&lt;br /&gt;
&lt;br /&gt;
 cp -r /usr/local/openmoko/source/openmoko-sample2 ~/&lt;br /&gt;
 &lt;br /&gt;
* rename the folder with the name of your project (in this example your-project-name) and delete old sample files &lt;br /&gt;
&lt;br /&gt;
 mv openmoko-sample2 your-project-name&lt;br /&gt;
 cd your-project-name&lt;br /&gt;
 cd src&lt;br /&gt;
 rm *.c&lt;br /&gt;
&lt;br /&gt;
* copy your sources (in this example your-sources) into src/&lt;br /&gt;
&lt;br /&gt;
 cp your-sources .&lt;br /&gt;
 cd ..&lt;br /&gt;
&lt;br /&gt;
* now in the main folder modify autogen.sh by updating the following lines&lt;br /&gt;
&lt;br /&gt;
 PKG_NAME=&amp;quot;your-project-name&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* modify configure.ac by updating the following lines ('main.c' should be the main file in your project)&lt;br /&gt;
&lt;br /&gt;
 AC_INIT(your-project-main, 0.0.1, http://www.openmoko.org/)    &lt;br /&gt;
 AC_CONFIG_SRCDIR(src/main.c)&lt;br /&gt;
&lt;br /&gt;
* go into data/ folder and rename these files with the name of your project&lt;br /&gt;
&lt;br /&gt;
 cd data&lt;br /&gt;
 mv openmoko-sample.png your-project-name.png&lt;br /&gt;
 mv openmoko-sample.desktop your-project-name.desktop&lt;br /&gt;
&lt;br /&gt;
* modify Makefile.am inside data/ by updating the following lines&lt;br /&gt;
&lt;br /&gt;
 dist_desktop_DATA = your-project-name.desktop&lt;br /&gt;
 dist_appicon_DATA = your-project-name.png&lt;br /&gt;
&lt;br /&gt;
* modify Makefile.in inside data/ by updating the following lines&lt;br /&gt;
 &lt;br /&gt;
 dist_desktop_DATA = smart-search.desktop&lt;br /&gt;
 dist_appicon_DATA = smart-search.png&lt;br /&gt;
&lt;br /&gt;
* modify your-project-name.desktop by updating the following lines&lt;br /&gt;
&lt;br /&gt;
 Name=your-project-name&lt;br /&gt;
 Encoding=UTF-8&lt;br /&gt;
 Version=0.0.1&lt;br /&gt;
 Type=Application&lt;br /&gt;
 Exec=your-project-name&lt;br /&gt;
&lt;br /&gt;
* and by adding the following line&lt;br /&gt;
&lt;br /&gt;
 Icon=your-project-name&lt;br /&gt;
&lt;br /&gt;
* move into src/ folder&lt;br /&gt;
&lt;br /&gt;
 cd ..&lt;br /&gt;
 cd src&lt;br /&gt;
&lt;br /&gt;
* modify Makefile.am by updating the following lines&lt;br /&gt;
&lt;br /&gt;
 bin_PROGRAMS = your-project-name	&lt;br /&gt;
 your_project_name_SOURCES = \				&lt;br /&gt;
  		main.c &lt;br /&gt;
 your_project_name_LDADD  = @DEPENDENCIES_LIBS@&lt;br /&gt;
&lt;br /&gt;
* be sure to put instead of main.c all your .c and .h files and modify all the '-' characters with '_' in the variable names&lt;br /&gt;
&lt;br /&gt;
==Packaging your application==&lt;br /&gt;
&lt;br /&gt;
We have included a script to make an ipkg out of your application. Note that this is not needed to test your application on the Neo (for that you can just scp the resulting binary and data over), however it's very handy if you want to distribute your application to others.&lt;br /&gt;
&lt;br /&gt;
 om-make-ipkg openmoko-sample2&lt;br /&gt;
&lt;br /&gt;
Now you got openmoko-sample2_0.1_armv4t.ipk , you can `scp' it to your&lt;br /&gt;
Neo and install it:&lt;br /&gt;
&lt;br /&gt;
 scp openmoko-sample2_0.1_armv4t.ipk root@192.168.0.202:&lt;br /&gt;
 ssh root@192.168.0.202 ipkg install openmoko-sample2_0.1_armv4t.ipk&lt;br /&gt;
&lt;br /&gt;
Note that while you can redistribute the generated ipkg, be aware that this is a bare-bones ipk that contains no further information, i.e. you will lack library dependencies. See below how to fix this.&lt;br /&gt;
&lt;br /&gt;
You can also supply the version number, a description, and an author / contacts string in a control file:&lt;br /&gt;
&lt;br /&gt;
 om-make-ipkg myapp myapp_control&lt;br /&gt;
&lt;br /&gt;
A template of myapp_control:&lt;br /&gt;
&lt;br /&gt;
 Package: $appname&lt;br /&gt;
 Version: 0.1&lt;br /&gt;
 Description: package built by openmoko toolchain&lt;br /&gt;
 Section: openmoko/applications&lt;br /&gt;
 Priority: optional&lt;br /&gt;
 Maintainer: $USER&lt;br /&gt;
 Architecture: armv4t&lt;br /&gt;
 Homepage: http://www.openmoko.org/&lt;br /&gt;
 Depends: &lt;br /&gt;
 Source: ${SRC}&lt;br /&gt;
&lt;br /&gt;
==Where to go from here==&lt;br /&gt;
&lt;br /&gt;
Using the external toolchain is an easy way to build applications for your Neo. If you are familiar with this procedure, you might also want to look into&lt;br /&gt;
* Using [[Qemu]] to test your applications in an emulated environment&lt;br /&gt;
** Ubuntu users might prefer to look at [[Automatic_emulation_in_Ubuntu]]&lt;br /&gt;
* Using [[Host-based_development_with_Xoo_and_Xephyr|host-based development]] to improve your efficiency&lt;br /&gt;
* Using [[OpenEmbedded]] to customize your OpenMoko distribution image&lt;br /&gt;
&lt;br /&gt;
=Advanced topics=&lt;br /&gt;
==Using toolchain provided libraries==&lt;br /&gt;
Add the necessary libraries to the _LDADD field in src/Makefile.am, for example:&lt;br /&gt;
 openmoko_sample2_LDADD  = @DEPENDENCIES_LIBS@ -lmokogsmd2&lt;br /&gt;
&lt;br /&gt;
make sure to run om-conf again after this.&lt;br /&gt;
&lt;br /&gt;
==Installing additional libraries into the toolchain==&lt;br /&gt;
&lt;br /&gt;
Sooner or later you will want to compile an application that has dependencies which can't be fulfilled by the precompiled toolchain, e.g. some obscure libraries.&lt;br /&gt;
&lt;br /&gt;
In that case, feel free to request the inclusion of additional libraries into the next release of the OpenMoko toolchain. Until then, here is how you enhance your already installed toolchain. Say, we want to add the library called liburiparse:&lt;br /&gt;
&lt;br /&gt;
 cd ~/source&lt;br /&gt;
 wget http://downloads.sourceforge.net/uriparser/uriparser-0.6.0.tar.bz2&lt;br /&gt;
 ./configure --host=arm-angstrom-linux-gnueabi --prefix=/usr/local/openmoko/arm&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
That's it.&lt;br /&gt;
&lt;br /&gt;
==Getting your application packaged by OE==&lt;br /&gt;
&lt;br /&gt;
If you have written a cool application which you want to share with others, the best way to do that is to&lt;br /&gt;
&lt;br /&gt;
# upload your application source code to a public location&lt;br /&gt;
# submit a [[BitBake]] recipe to [[OpenEmbedded]], preferably via the [http://bugs.openembedded.org OpenEmbedded bugtracker].&lt;br /&gt;
&lt;br /&gt;
See also [[Customizing your OpenMoko distribution]].&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting==&lt;br /&gt;
&lt;br /&gt;
* Please use the [http://lists.openmoko.org/mailman/listinfo/openmoko-devel OpenMoko-Devel] mailing list.&lt;br /&gt;
&lt;br /&gt;
{{Languages|Toolchain}}&lt;br /&gt;
[[Category:Software ]]&lt;br /&gt;
[[Category:Application Developer]]&lt;br /&gt;
[[Category:Openmoko]]&lt;/div&gt;</summary>
		<author><name>Cheetah100</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Gllin</id>
		<title>Gllin</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Gllin"/>
				<updated>2008-03-21T00:55:28Z</updated>
		
		<summary type="html">&lt;p&gt;Cheetah100: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;gllin is an userpsace driver for a hammerhead [[GPS]] chip. It was distributed on phase1 openmokos.&lt;br /&gt;
&lt;br /&gt;
Thanks to a tremendous amount of hard work by many people, we have ready&lt;br /&gt;
a release of gllin, the GPS drives. Here is how you can get it:&lt;br /&gt;
&lt;br /&gt;
http://3rdparty.downloads.openmoko.org/gllin/&lt;br /&gt;
&lt;br /&gt;
Instructions, how to use the driver, are given at:&lt;br /&gt;
&lt;br /&gt;
http://lists.openmoko.org/pipermail/community/2007-November/011916.html. &lt;br /&gt;
&lt;br /&gt;
The similar instructions are described in more details at [[getting GPS console output with gllin]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Unfortunately, gllin expects paths such as /sys/bus/platform/devices/gta01-pm-gps.0/pwron ... and 2.6.24 kernel provides neo1973-pm-gps.0 instead :-(.&lt;br /&gt;
&lt;br /&gt;
-- The following steps seem to be not necessary (anymore?). -- [[User:Homyx|homyx]] Mar 08, 2008&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
root@fic-gta01:/media/card/home/root/gllin# cat gllin.real | grep /sys/bus/platform/devices/&lt;br /&gt;
/sys/bus/platform/devices/gta01-pm-gps.0/reset&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
root@fic-gta01:/sys/bus/platform/devices# ls -l gta01-pm-gps.0&lt;br /&gt;
lrwxrwxrwx    1 root     root            0 Mar  8 11:01 gta01-pm-gps.0 -&amp;gt; ../../../devices/platform/s3c2410-i2c/i2c-adapter/i2c-0/0-0008/neo1973-pm-gps.0&lt;br /&gt;
root@fic-gta01:/sys/bus/platform/devices# ls -l neo1973-pm-gps.0&lt;br /&gt;
lrwxrwxrwx    1 root     root            0 Mar  8 11:01 neo1973-pm-gps.0 -&amp;gt; ../../../devices/platform/s3c2410-i2c/i2c-adapter/i2c-0/0-0008/neo1973-pm-gps.0&lt;br /&gt;
root@fic-gta01:/sys/bus/platform/devices# uname -a&lt;br /&gt;
Linux fic-gta01 2.6.24 #1 PREEMPT Wed Mar 5 00:16:31 UTC 2008 armv4tl unknown&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fortunately, you can do evil hack:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat gllin.real | sed 's-/sys/-/s/s/-g' &amp;gt; gllin.real2&lt;br /&gt;
mkdir -p /s/s/bus/platform/devices/&lt;br /&gt;
ln -s  /sys/bus/platform/devices/neo1973-pm-gps.0/ /s/s/bus/platform/devices/gta01-pm-gps.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''&amp;lt;font color=red&amp;gt;WARNING:&amp;lt;/font&amp;gt;The first step above should not be executed on the phone itself, as BusyBox's sed will corrupt the binary file.  It worked for me when run on my host (thanks balrog-kun!)&lt;br /&gt;
''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# gllin.real2 was produced by BusyBox sed&lt;br /&gt;
lib/ld-linux.so.2 --library-path /home/root/gllin/lib:/home/root/gllin/usr/lib /home/root/gllin/gllin.real2 -low 5&lt;br /&gt;
/home/root/gllin/gllin.real2: error while loading shared libraries: /home/root/gllin/gllin.real2: ELF file version does not match current one&lt;br /&gt;
&lt;br /&gt;
# gllin.real3 was produced by GNU sed version 4.1.5&lt;br /&gt;
$ lib/ld-linux.so.2 --library-path /home/root/gllin/lib:/home/root/gllin/usr/lib /home/root/gllin/gllin.real3 -low 5&lt;br /&gt;
GPSpwr &amp;quot;1&amp;quot; &amp;gt; /s/s/bus/platform/devices/gta01-pm-gps.0/power_lp_io_3v3&lt;br /&gt;
GPSpwr &amp;quot;1&amp;quot; &amp;gt; /s/s/bus/platform/devices/gta01-pm-gps.0/power_lp_io_3v3&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
-- I didn't do the above steps; instead I just linked the old directory to the new one.  No sed black magic was required. See below. -- [[User:Wurp]] Mar 12, 2008&lt;br /&gt;
&lt;br /&gt;
-- The below link appears not to work - giving a &amp;quot;No such file or directory&amp;quot; error when trying to create any file in this directory. This is with the 20 Feb build. -- [[User:Cheetah100]] Mar 21, 2008&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd /sys/bus/platform/devices/&lt;br /&gt;
ln -s  neo1973-pm-gps.0 gta01-pm-gps.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== gllin options ==&lt;br /&gt;
&lt;br /&gt;
The /home/root/gllin/gllin file installed by the new (legitimate!) .ipk package is really just a shell script.  You can modify the options passed to gllin.real by editing that script.  Here are the options:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage:&lt;br /&gt;
&lt;br /&gt;
-help                    Help&lt;br /&gt;
-board &amp;lt;type&amp;gt;            Defines board type    Ex: '-board matchbox'&lt;br /&gt;
                         supported: matchbox, trident&lt;br /&gt;
-com &amp;lt;com port&amp;gt;          GPS com port;         Ex: '-com com6'&lt;br /&gt;
-baud &amp;lt;baud rate&amp;gt;        Set baud rate;        Ex: '-baud 115200'&lt;br /&gt;
-rft &amp;lt;RF type&amp;gt;           Set RF type;          Ex: '-rft RF_LN22OUT'&lt;br /&gt;
-freq &amp;lt;freq plan&amp;gt; | ?    set frequency plan for GPS or show the list of all available plans&lt;br /&gt;
                         Ex: '-freq FRQ_PLAN_OCXO_10000'&lt;br /&gt;
                         Ex: '-freq ?' -- Show all available plans&lt;br /&gt;
-g &amp;lt;URL&amp;gt;                 SUPL Server URL or IP address;&lt;br /&gt;
                         Ex: '-g 216.15.9.46'&lt;br /&gt;
-p &amp;lt;port&amp;gt;                SUPL Server port number;&lt;br /&gt;
                         Ex: '-p 9118'&lt;br /&gt;
-udp &amp;lt;port&amp;gt;              Local UDP port to send NMEA to.&lt;br /&gt;
                         '-udp 6000'      [default]&lt;br /&gt;
-gsm_cell &amp;lt;cell ID&amp;gt;      set GSM Cell ID information&lt;br /&gt;
                         cell ID has the following format: '&amp;lt;MCC&amp;gt;.&amp;lt;MNC&amp;gt;.&amp;lt;LAC&amp;gt;.&amp;lt;CI&amp;gt;'&lt;br /&gt;
                         Where:&lt;br /&gt;
                               MCC - Mobile Country Code&lt;br /&gt;
                               MNC - Mobile Network Code&lt;br /&gt;
                               LAC - Location Area Code&lt;br /&gt;
                               CI  - Cell Identification&lt;br /&gt;
                         Ex: '-gsm_cell 310.170.367.25732'&lt;br /&gt;
-set_assisted_off        disable SET assisted capability&lt;br /&gt;
-set_based_off           disable SET based capability&lt;br /&gt;
-msisdn &amp;lt;MSISDN&amp;gt;         set value for MSISDN (international phone number) as SET id&lt;br /&gt;
                         Ex: '-msisdn 14081234567'&lt;br /&gt;
-nai &amp;lt;nai&amp;gt;               specify Network Access Identifier as SET id&lt;br /&gt;
                         Ex: '-nai 12345@mywebsite.com'&lt;br /&gt;
-periodic &amp;lt;s&amp;gt;            make periodic request every s second (-1 to 64)&lt;br /&gt;
                         -1  single shot: perform one fix, then quit&lt;br /&gt;
                          0       native: perform fixes as fast as possible&lt;br /&gt;
                         &amp;lt;s&amp;gt;       timed: report a position every &amp;lt;s&amp;gt; seconds&lt;br /&gt;
                                          where &amp;lt;s&amp;gt; is 1 to 64&lt;br /&gt;
-recover                 recover GLLIN after signaled exit&lt;br /&gt;
-low [&amp;lt;count&amp;gt;]           low level test.  Default &amp;lt;count&amp;gt; is 1&lt;br /&gt;
-low_debug               Low level debug ON&lt;br /&gt;
+low_debug               Low level debug OFF&lt;br /&gt;
-train &amp;lt;count&amp;gt;           Send train data &amp;lt;count&amp;gt; times&lt;br /&gt;
+pty | -pty              Enable or disable NMEA output to pty &amp;quot;/tmp/nmeaPTY&amp;quot;&lt;br /&gt;
                         Default is off [-pty]&lt;br /&gt;
+np | -np                Enable or disable NMEA output to named pipe &amp;quot;/tmp/nmeaNP&amp;quot;&lt;br /&gt;
                         Default is on [-np]&lt;br /&gt;
+nmea | -nmea            Enable or disable NMEA output to log file&lt;br /&gt;
                         Default is off [-nmea]&lt;br /&gt;
+daemon | -daemon        Become a daemon (or not)&lt;br /&gt;
                         Default is -daemon&lt;br /&gt;
-a2 | -a3 | -a0          Select a GTA01 board revision.  Default is a3&lt;br /&gt;
-batch &amp;lt;st&amp;gt; &amp;lt;n&amp;gt; &amp;lt;fix&amp;gt;    perform batch test of &amp;lt;n&amp;gt; starts of type &amp;lt;st&amp;gt;&lt;br /&gt;
                         &amp;lt;st&amp;gt; is hot, warm, cold, or SNR.&lt;br /&gt;
                         Each start has &amp;lt;fix&amp;gt; fixes.&lt;br /&gt;
-i                       start GLLIN command line&lt;br /&gt;
+pnd                     optimize for PND&lt;br /&gt;
-pnd                     look for low signal strength signals&lt;br /&gt;
+sim                     using simulator so don't use almanac&lt;br /&gt;
-sim                     not using simulator&lt;br /&gt;
SNR                      manufacturing SNR test mode&lt;br /&gt;
hot                      hot start [default]&lt;br /&gt;
warm                     warm start&lt;br /&gt;
cold                     cold start&lt;br /&gt;
-v[n]                    Report GLLIN version string.&lt;br /&gt;
                         n is 1234 to report selected versions.&lt;br /&gt;
 version 1.1.7&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Using gpsd with gllin ==&lt;br /&gt;
&lt;br /&gt;
edit /etc/default/gpsd and set the GPS_DEV to /tmp/nmeaNP start gpsd before gllin.&lt;br /&gt;
&lt;br /&gt;
== Some notes: ==&lt;br /&gt;
&lt;br /&gt;
The listed defaults don't seem to be correct.  By default it DOES generate NMEA data in log files.  These log files are on your flash (/home/root/gllin/log/*) and are written to once every second.  Ridiculous!&lt;br /&gt;
&lt;br /&gt;
To stop this, add the option &amp;quot;-nmea&amp;quot; to the second of the two gllin.real commands in the startup script.&lt;br /&gt;
&lt;br /&gt;
But note further that the startup script also spawns a command to 'cat' the output of the /tmp/nmeaNP named pipe to a gzipped file in /home/root.  If you want this to stop, you can do one of two things:&lt;br /&gt;
&lt;br /&gt;
  * cat to /dev/null instead of | gzip &amp;gt;&amp;gt; file&lt;br /&gt;
&lt;br /&gt;
  * add &amp;quot;-np&amp;quot; to the second gllin.real command&lt;br /&gt;
&lt;br /&gt;
You can't just take the 'cat' command out of the script, because with the named pipe activated, gllin will QUIT if it doesn't see anybody taking the output from the pipe.  To keep it going, either open that pipe or turn it off.&lt;br /&gt;
&lt;br /&gt;
You can use this [http://obri.sygroup.ch/gllin gllin initscript] to start and stop gllin.&lt;br /&gt;
&lt;br /&gt;
Another option:&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 echo &amp;quot;Starting gllin...&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 killall cat&lt;br /&gt;
 killall gllin.real&lt;br /&gt;
 &lt;br /&gt;
 mknod /tmp/nmeaNP p&lt;br /&gt;
 cat /tmp/nmeaNP &amp;gt; /dev/null &amp;amp;&lt;br /&gt;
 cd /home/root/gllin&lt;br /&gt;
 lib/ld-linux.so.2 --library-path /home/root/gllin/lib:/home/root/gllin/usr/lib /home/root/gllin/gllin.real -low 5&lt;br /&gt;
 lib/ld-linux.so.2 --library-path /home/root/gllin/lib:/home/root/gllin/usr/lib /home/root/gllin/gllin.real -periodic 1 -nmea&lt;br /&gt;
&lt;br /&gt;
== More Initscripts ==&lt;br /&gt;
&lt;br /&gt;
The gllin package doesn't come with a very good set of initscripts, and gpsd is flexible enough to use gllin or some other source of GPS coordinates.&lt;br /&gt;
&lt;br /&gt;
For gpsd and gllin to run together well, upon boot, the following scripts have worked well for me:&lt;br /&gt;
&lt;br /&gt;
/etc/init.d/gpsd:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
#&lt;br /&gt;
# gpsd	This shell script starts and stops gpsd.&lt;br /&gt;
#&lt;br /&gt;
# chkconfig: 345 90 40&lt;br /&gt;
# description: Gpsd manages access to a serial- or USB-connected GPS&lt;br /&gt;
# processname: gpsd&lt;br /&gt;
&lt;br /&gt;
# Source function library.&lt;br /&gt;
#. /etc/rc.d/init.d/functions&lt;br /&gt;
&lt;br /&gt;
RETVAL=0&lt;br /&gt;
prog=&amp;quot;gpsd&amp;quot;&lt;br /&gt;
&lt;br /&gt;
test -f /etc/default/${prog} &amp;amp;&amp;amp; . /etc/default/${prog}&lt;br /&gt;
&lt;br /&gt;
start() {&lt;br /&gt;
	# Start daemons.&lt;br /&gt;
	echo -n &amp;quot;Starting ${prog}: &amp;quot;&lt;br /&gt;
	# We don't use the daemon function here because of a known bug&lt;br /&gt;
	# in initlog -- it spuriously returns a nonzero status when &lt;br /&gt;
	# starting daemons that fork themselves.  See&lt;br /&gt;
	# http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=130629&lt;br /&gt;
	# for discussion.  Fortunately:&lt;br /&gt;
	#&lt;br /&gt;
	# 1. gpsd startup can't fail, or at least not in the absence of&lt;br /&gt;
	# much larger resource-exhaustion problems that would be very obvious.&lt;br /&gt;
	#&lt;br /&gt;
	# 2. We don't need all the logging crud that daemon/initlog sets&lt;br /&gt;
	# up -- gpsd does its own syslog calls.&lt;br /&gt;
	#&lt;br /&gt;
	&lt;br /&gt;
	if [ -e &amp;quot;${GPS_DEV}&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
	    ${prog} -n ${GPSD_OPTS} ${GPS_DEV}&lt;br /&gt;
	    RETVAL=$?&lt;br /&gt;
	    echo &amp;quot;success&amp;quot;&lt;br /&gt;
	else&lt;br /&gt;
	    # User needs to symlink ${GPS_DEV} to the right thing&lt;br /&gt;
	    # Do it automatically if the name contains &amp;quot;NP&amp;quot;&lt;br /&gt;
	    if echo ${GPS_DEV} | grep -q NP&lt;br /&gt;
	    then&lt;br /&gt;
	        mknod ${GPS_DEV} p&lt;br /&gt;
	        ${prog} -n ${GPSD_OPTS} ${GPS_DEV}&lt;br /&gt;
	        RETVAL=$?&lt;br /&gt;
	        echo &amp;quot;success&amp;quot;&lt;br /&gt;
	    else&lt;br /&gt;
	        RETVAL=$?&lt;br /&gt;
	        echo &amp;quot;No ${GPS_DEV} GPS device, aborting gpsd startup. Check /etc/default/${prog}&amp;quot;&lt;br /&gt;
	    fi&lt;br /&gt;
	fi&lt;br /&gt;
	[ $RETVAL -eq 0 ] &amp;amp;&amp;amp; touch /var/lock/subsys/gpsd&lt;br /&gt;
	return $RETVAL&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
stop() {&lt;br /&gt;
	# Stop daemons.&lt;br /&gt;
	echo -n &amp;quot;Shutting down ${prog}: &amp;quot;&lt;br /&gt;
        killall ${prog}&lt;br /&gt;
	RETVAL=$?&lt;br /&gt;
	echo&lt;br /&gt;
	if [ $RETVAL -eq 0 ]&lt;br /&gt;
	then&lt;br /&gt;
	    test -e /var/lock/subsys/gpsd &amp;amp;&amp;amp; rm -f /var/lock/subsys/gpsd;&lt;br /&gt;
	fi&lt;br /&gt;
	return $RETVAL&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# See how we were called.&lt;br /&gt;
case &amp;quot;$1&amp;quot; in&lt;br /&gt;
  start)&lt;br /&gt;
	start&lt;br /&gt;
	;;&lt;br /&gt;
  stop)&lt;br /&gt;
	stop&lt;br /&gt;
	;;&lt;br /&gt;
  restart|reload)&lt;br /&gt;
	stop&lt;br /&gt;
	start&lt;br /&gt;
	RETVAL=$?&lt;br /&gt;
	;;&lt;br /&gt;
  condrestart)&lt;br /&gt;
	if [ -f /var/lock/subsys/gpsd ]; then&lt;br /&gt;
	    stop&lt;br /&gt;
	    start&lt;br /&gt;
	    RETVAL=$?&lt;br /&gt;
	fi&lt;br /&gt;
	;;&lt;br /&gt;
  status)&lt;br /&gt;
#	status gpsd&lt;br /&gt;
#	RETVAL=$?&lt;br /&gt;
	;;&lt;br /&gt;
  *)&lt;br /&gt;
	echo &amp;quot;Usage: $0 {start|stop|restart|condrestart|status}&amp;quot;&lt;br /&gt;
	exit 1&lt;br /&gt;
esac&lt;br /&gt;
&lt;br /&gt;
exit $RETVAL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
/etc/init.d/gllin:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
#&lt;br /&gt;
# This shell script starts and stops gllin.&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
RETVAL=0&lt;br /&gt;
prog=&amp;quot;gllin&amp;quot;&lt;br /&gt;
GLLIN_PATH=/home/root/gllin&lt;br /&gt;
&lt;br /&gt;
test -f /etc/default/${prog} &amp;amp;&amp;amp; . /etc/default/${prog}&lt;br /&gt;
&lt;br /&gt;
start() {&lt;br /&gt;
	# Make fifo if it doesn't already exist&lt;br /&gt;
	if [ ! -p /tmp/nmeaNP ]&lt;br /&gt;
	then&lt;br /&gt;
	  mknod /tmp/nmeaNP p&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	# Check for gpsd ready (max 5 seconds)&lt;br /&gt;
	echo -n &amp;quot;Waiting for gpsd . . . &amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	if [ ! &amp;quot;$(pidof gpsd)&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
	  sleep 4&lt;br /&gt;
	  if [ ! &amp;quot;$(pidof gpsd)&amp;quot; ]&lt;br /&gt;
	  then&lt;br /&gt;
	    RETVAL=1&lt;br /&gt;
	    echo &amp;quot;failure.&amp;quot;&lt;br /&gt;
	    return $RETVAL&lt;br /&gt;
	  fi&lt;br /&gt;
	fi&lt;br /&gt;
	&lt;br /&gt;
	# Start daemons.&lt;br /&gt;
	echo -n &amp;quot;starting ${prog}: &amp;quot;&lt;br /&gt;
	cd $GLLIN_PATH&lt;br /&gt;
	sleep 1&lt;br /&gt;
	if [ -e $GLLIN_PATH/${prog}.real ]&lt;br /&gt;
	then&lt;br /&gt;
	  $GLLIN_PATH/lib/ld-linux.so.2 --library-path $GLLIN_PATH/lib $GLLIN_PATH/${prog}.real -low 5 &amp;gt; /dev/null&lt;br /&gt;
	  $GLLIN_PATH/lib/ld-linux.so.2 --library-path $GLLIN_PATH/lib $GLLIN_PATH/${prog}.real -periodic 1 +daemon&lt;br /&gt;
	else&lt;br /&gt;
	  $GLLIN_PATH/lib/ld-linux.so.2 --library-path $GLLIN_PATH/lib $GLLIN_PATH/${prog} -low 5 &amp;gt; /dev/null&lt;br /&gt;
	  $GLLIN_PATH/lib/ld-linux.so.2 --library-path $GLLIN_PATH/lib $GLLIN_PATH/${prog} -periodic 1 +daemon&lt;br /&gt;
	fi&lt;br /&gt;
	echo &amp;quot;success.&amp;quot;&lt;br /&gt;
	RETVAL=$?&lt;br /&gt;
	echo&lt;br /&gt;
	return $RETVAL&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
stop() {&lt;br /&gt;
	# Stop daemons.&lt;br /&gt;
	echo -n &amp;quot;Shutting down ${prog}: &amp;quot;&lt;br /&gt;
	pkill ld-linux.so.2	&lt;br /&gt;
    	RETVAL=$?&lt;br /&gt;
	echo &amp;quot;success.&amp;quot;&lt;br /&gt;
	return $RETVAL&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# See how we were called.&lt;br /&gt;
case &amp;quot;$1&amp;quot; in&lt;br /&gt;
  start)&lt;br /&gt;
	start&lt;br /&gt;
	;;&lt;br /&gt;
  stop)&lt;br /&gt;
	stop&lt;br /&gt;
	;;&lt;br /&gt;
  restart|reload)&lt;br /&gt;
	stop&lt;br /&gt;
	start&lt;br /&gt;
	RETVAL=$?&lt;br /&gt;
	;;&lt;br /&gt;
  status)&lt;br /&gt;
#	RETVAL=$?&lt;br /&gt;
	;;&lt;br /&gt;
  *)&lt;br /&gt;
	echo &amp;quot;Usage: $0 {start|stop|restart|condrestart|status}&amp;quot;&lt;br /&gt;
	exit 1&lt;br /&gt;
esac&lt;br /&gt;
&lt;br /&gt;
exit $RETVAL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These scripts allow you (or init, if you have them numbered in rcX.d appropriately) to start gpsd *before* gllin.  This way, gpsd starts listening on /tmp/nmeaNP immediately, and gllin doesn't need to send output to /dev/null in order to stay alive.&lt;br /&gt;
&lt;br /&gt;
This version of the gpsd script will create the named pipe (if the device name includes &amp;quot;NP&amp;quot; in the filename) if it doesn't exist.&lt;/div&gt;</summary>
		<author><name>Cheetah100</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Gllin</id>
		<title>Gllin</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Gllin"/>
				<updated>2008-03-21T00:53:51Z</updated>
		
		<summary type="html">&lt;p&gt;Cheetah100: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;gllin is an userpsace driver for a hammerhead [[GPS]] chip. It was distributed on phase1 openmokos.&lt;br /&gt;
&lt;br /&gt;
Thanks to a tremendous amount of hard work by many people, we have ready&lt;br /&gt;
a release of gllin, the GPS drives. Here is how you can get it:&lt;br /&gt;
&lt;br /&gt;
http://3rdparty.downloads.openmoko.org/gllin/&lt;br /&gt;
&lt;br /&gt;
Instructions, how to use the driver, are given at:&lt;br /&gt;
&lt;br /&gt;
http://lists.openmoko.org/pipermail/community/2007-November/011916.html. &lt;br /&gt;
&lt;br /&gt;
The similar instructions are described in more details at [[getting GPS console output with gllin]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Unfortunately, gllin expects paths such as /sys/bus/platform/devices/gta01-pm-gps.0/pwron ... and 2.6.24 kernel provides neo1973-pm-gps.0 instead :-(.&lt;br /&gt;
&lt;br /&gt;
-- The following steps seem to be not necessary (anymore?). -- [[User:Homyx|homyx]] Mar 08, 2008&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
root@fic-gta01:/media/card/home/root/gllin# cat gllin.real | grep /sys/bus/platform/devices/&lt;br /&gt;
/sys/bus/platform/devices/gta01-pm-gps.0/reset&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
root@fic-gta01:/sys/bus/platform/devices# ls -l gta01-pm-gps.0&lt;br /&gt;
lrwxrwxrwx    1 root     root            0 Mar  8 11:01 gta01-pm-gps.0 -&amp;gt; ../../../devices/platform/s3c2410-i2c/i2c-adapter/i2c-0/0-0008/neo1973-pm-gps.0&lt;br /&gt;
root@fic-gta01:/sys/bus/platform/devices# ls -l neo1973-pm-gps.0&lt;br /&gt;
lrwxrwxrwx    1 root     root            0 Mar  8 11:01 neo1973-pm-gps.0 -&amp;gt; ../../../devices/platform/s3c2410-i2c/i2c-adapter/i2c-0/0-0008/neo1973-pm-gps.0&lt;br /&gt;
root@fic-gta01:/sys/bus/platform/devices# uname -a&lt;br /&gt;
Linux fic-gta01 2.6.24 #1 PREEMPT Wed Mar 5 00:16:31 UTC 2008 armv4tl unknown&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fortunately, you can do evil hack:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat gllin.real | sed 's-/sys/-/s/s/-g' &amp;gt; gllin.real2&lt;br /&gt;
mkdir -p /s/s/bus/platform/devices/&lt;br /&gt;
ln -s  /sys/bus/platform/devices/neo1973-pm-gps.0/ /s/s/bus/platform/devices/gta01-pm-gps.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''&amp;lt;font color=red&amp;gt;WARNING:&amp;lt;/font&amp;gt;The first step above should not be executed on the phone itself, as BusyBox's sed will corrupt the binary file.  It worked for me when run on my host (thanks balrog-kun!)&lt;br /&gt;
''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# gllin.real2 was produced by BusyBox sed&lt;br /&gt;
lib/ld-linux.so.2 --library-path /home/root/gllin/lib:/home/root/gllin/usr/lib /home/root/gllin/gllin.real2 -low 5&lt;br /&gt;
/home/root/gllin/gllin.real2: error while loading shared libraries: /home/root/gllin/gllin.real2: ELF file version does not match current one&lt;br /&gt;
&lt;br /&gt;
# gllin.real3 was produced by GNU sed version 4.1.5&lt;br /&gt;
$ lib/ld-linux.so.2 --library-path /home/root/gllin/lib:/home/root/gllin/usr/lib /home/root/gllin/gllin.real3 -low 5&lt;br /&gt;
GPSpwr &amp;quot;1&amp;quot; &amp;gt; /s/s/bus/platform/devices/gta01-pm-gps.0/power_lp_io_3v3&lt;br /&gt;
GPSpwr &amp;quot;1&amp;quot; &amp;gt; /s/s/bus/platform/devices/gta01-pm-gps.0/power_lp_io_3v3&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
-- I didn't do the above steps; instead I just linked the old directory to the new one.  No sed black magic was required. See below. -- [[User:Wurp]] Mar 12, 2008&lt;br /&gt;
-- The below link appears not to work - giving a &amp;quot;No such file or directory&amp;quot; error when trying to create any file in this directory. -- [[User:Cheetah100]]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd /sys/bus/platform/devices/&lt;br /&gt;
ln -s  neo1973-pm-gps.0 gta01-pm-gps.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== gllin options ==&lt;br /&gt;
&lt;br /&gt;
The /home/root/gllin/gllin file installed by the new (legitimate!) .ipk package is really just a shell script.  You can modify the options passed to gllin.real by editing that script.  Here are the options:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage:&lt;br /&gt;
&lt;br /&gt;
-help                    Help&lt;br /&gt;
-board &amp;lt;type&amp;gt;            Defines board type    Ex: '-board matchbox'&lt;br /&gt;
                         supported: matchbox, trident&lt;br /&gt;
-com &amp;lt;com port&amp;gt;          GPS com port;         Ex: '-com com6'&lt;br /&gt;
-baud &amp;lt;baud rate&amp;gt;        Set baud rate;        Ex: '-baud 115200'&lt;br /&gt;
-rft &amp;lt;RF type&amp;gt;           Set RF type;          Ex: '-rft RF_LN22OUT'&lt;br /&gt;
-freq &amp;lt;freq plan&amp;gt; | ?    set frequency plan for GPS or show the list of all available plans&lt;br /&gt;
                         Ex: '-freq FRQ_PLAN_OCXO_10000'&lt;br /&gt;
                         Ex: '-freq ?' -- Show all available plans&lt;br /&gt;
-g &amp;lt;URL&amp;gt;                 SUPL Server URL or IP address;&lt;br /&gt;
                         Ex: '-g 216.15.9.46'&lt;br /&gt;
-p &amp;lt;port&amp;gt;                SUPL Server port number;&lt;br /&gt;
                         Ex: '-p 9118'&lt;br /&gt;
-udp &amp;lt;port&amp;gt;              Local UDP port to send NMEA to.&lt;br /&gt;
                         '-udp 6000'      [default]&lt;br /&gt;
-gsm_cell &amp;lt;cell ID&amp;gt;      set GSM Cell ID information&lt;br /&gt;
                         cell ID has the following format: '&amp;lt;MCC&amp;gt;.&amp;lt;MNC&amp;gt;.&amp;lt;LAC&amp;gt;.&amp;lt;CI&amp;gt;'&lt;br /&gt;
                         Where:&lt;br /&gt;
                               MCC - Mobile Country Code&lt;br /&gt;
                               MNC - Mobile Network Code&lt;br /&gt;
                               LAC - Location Area Code&lt;br /&gt;
                               CI  - Cell Identification&lt;br /&gt;
                         Ex: '-gsm_cell 310.170.367.25732'&lt;br /&gt;
-set_assisted_off        disable SET assisted capability&lt;br /&gt;
-set_based_off           disable SET based capability&lt;br /&gt;
-msisdn &amp;lt;MSISDN&amp;gt;         set value for MSISDN (international phone number) as SET id&lt;br /&gt;
                         Ex: '-msisdn 14081234567'&lt;br /&gt;
-nai &amp;lt;nai&amp;gt;               specify Network Access Identifier as SET id&lt;br /&gt;
                         Ex: '-nai 12345@mywebsite.com'&lt;br /&gt;
-periodic &amp;lt;s&amp;gt;            make periodic request every s second (-1 to 64)&lt;br /&gt;
                         -1  single shot: perform one fix, then quit&lt;br /&gt;
                          0       native: perform fixes as fast as possible&lt;br /&gt;
                         &amp;lt;s&amp;gt;       timed: report a position every &amp;lt;s&amp;gt; seconds&lt;br /&gt;
                                          where &amp;lt;s&amp;gt; is 1 to 64&lt;br /&gt;
-recover                 recover GLLIN after signaled exit&lt;br /&gt;
-low [&amp;lt;count&amp;gt;]           low level test.  Default &amp;lt;count&amp;gt; is 1&lt;br /&gt;
-low_debug               Low level debug ON&lt;br /&gt;
+low_debug               Low level debug OFF&lt;br /&gt;
-train &amp;lt;count&amp;gt;           Send train data &amp;lt;count&amp;gt; times&lt;br /&gt;
+pty | -pty              Enable or disable NMEA output to pty &amp;quot;/tmp/nmeaPTY&amp;quot;&lt;br /&gt;
                         Default is off [-pty]&lt;br /&gt;
+np | -np                Enable or disable NMEA output to named pipe &amp;quot;/tmp/nmeaNP&amp;quot;&lt;br /&gt;
                         Default is on [-np]&lt;br /&gt;
+nmea | -nmea            Enable or disable NMEA output to log file&lt;br /&gt;
                         Default is off [-nmea]&lt;br /&gt;
+daemon | -daemon        Become a daemon (or not)&lt;br /&gt;
                         Default is -daemon&lt;br /&gt;
-a2 | -a3 | -a0          Select a GTA01 board revision.  Default is a3&lt;br /&gt;
-batch &amp;lt;st&amp;gt; &amp;lt;n&amp;gt; &amp;lt;fix&amp;gt;    perform batch test of &amp;lt;n&amp;gt; starts of type &amp;lt;st&amp;gt;&lt;br /&gt;
                         &amp;lt;st&amp;gt; is hot, warm, cold, or SNR.&lt;br /&gt;
                         Each start has &amp;lt;fix&amp;gt; fixes.&lt;br /&gt;
-i                       start GLLIN command line&lt;br /&gt;
+pnd                     optimize for PND&lt;br /&gt;
-pnd                     look for low signal strength signals&lt;br /&gt;
+sim                     using simulator so don't use almanac&lt;br /&gt;
-sim                     not using simulator&lt;br /&gt;
SNR                      manufacturing SNR test mode&lt;br /&gt;
hot                      hot start [default]&lt;br /&gt;
warm                     warm start&lt;br /&gt;
cold                     cold start&lt;br /&gt;
-v[n]                    Report GLLIN version string.&lt;br /&gt;
                         n is 1234 to report selected versions.&lt;br /&gt;
 version 1.1.7&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Using gpsd with gllin ==&lt;br /&gt;
&lt;br /&gt;
edit /etc/default/gpsd and set the GPS_DEV to /tmp/nmeaNP start gpsd before gllin.&lt;br /&gt;
&lt;br /&gt;
== Some notes: ==&lt;br /&gt;
&lt;br /&gt;
The listed defaults don't seem to be correct.  By default it DOES generate NMEA data in log files.  These log files are on your flash (/home/root/gllin/log/*) and are written to once every second.  Ridiculous!&lt;br /&gt;
&lt;br /&gt;
To stop this, add the option &amp;quot;-nmea&amp;quot; to the second of the two gllin.real commands in the startup script.&lt;br /&gt;
&lt;br /&gt;
But note further that the startup script also spawns a command to 'cat' the output of the /tmp/nmeaNP named pipe to a gzipped file in /home/root.  If you want this to stop, you can do one of two things:&lt;br /&gt;
&lt;br /&gt;
  * cat to /dev/null instead of | gzip &amp;gt;&amp;gt; file&lt;br /&gt;
&lt;br /&gt;
  * add &amp;quot;-np&amp;quot; to the second gllin.real command&lt;br /&gt;
&lt;br /&gt;
You can't just take the 'cat' command out of the script, because with the named pipe activated, gllin will QUIT if it doesn't see anybody taking the output from the pipe.  To keep it going, either open that pipe or turn it off.&lt;br /&gt;
&lt;br /&gt;
You can use this [http://obri.sygroup.ch/gllin gllin initscript] to start and stop gllin.&lt;br /&gt;
&lt;br /&gt;
Another option:&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 echo &amp;quot;Starting gllin...&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 killall cat&lt;br /&gt;
 killall gllin.real&lt;br /&gt;
 &lt;br /&gt;
 mknod /tmp/nmeaNP p&lt;br /&gt;
 cat /tmp/nmeaNP &amp;gt; /dev/null &amp;amp;&lt;br /&gt;
 cd /home/root/gllin&lt;br /&gt;
 lib/ld-linux.so.2 --library-path /home/root/gllin/lib:/home/root/gllin/usr/lib /home/root/gllin/gllin.real -low 5&lt;br /&gt;
 lib/ld-linux.so.2 --library-path /home/root/gllin/lib:/home/root/gllin/usr/lib /home/root/gllin/gllin.real -periodic 1 -nmea&lt;br /&gt;
&lt;br /&gt;
== More Initscripts ==&lt;br /&gt;
&lt;br /&gt;
The gllin package doesn't come with a very good set of initscripts, and gpsd is flexible enough to use gllin or some other source of GPS coordinates.&lt;br /&gt;
&lt;br /&gt;
For gpsd and gllin to run together well, upon boot, the following scripts have worked well for me:&lt;br /&gt;
&lt;br /&gt;
/etc/init.d/gpsd:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
#&lt;br /&gt;
# gpsd	This shell script starts and stops gpsd.&lt;br /&gt;
#&lt;br /&gt;
# chkconfig: 345 90 40&lt;br /&gt;
# description: Gpsd manages access to a serial- or USB-connected GPS&lt;br /&gt;
# processname: gpsd&lt;br /&gt;
&lt;br /&gt;
# Source function library.&lt;br /&gt;
#. /etc/rc.d/init.d/functions&lt;br /&gt;
&lt;br /&gt;
RETVAL=0&lt;br /&gt;
prog=&amp;quot;gpsd&amp;quot;&lt;br /&gt;
&lt;br /&gt;
test -f /etc/default/${prog} &amp;amp;&amp;amp; . /etc/default/${prog}&lt;br /&gt;
&lt;br /&gt;
start() {&lt;br /&gt;
	# Start daemons.&lt;br /&gt;
	echo -n &amp;quot;Starting ${prog}: &amp;quot;&lt;br /&gt;
	# We don't use the daemon function here because of a known bug&lt;br /&gt;
	# in initlog -- it spuriously returns a nonzero status when &lt;br /&gt;
	# starting daemons that fork themselves.  See&lt;br /&gt;
	# http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=130629&lt;br /&gt;
	# for discussion.  Fortunately:&lt;br /&gt;
	#&lt;br /&gt;
	# 1. gpsd startup can't fail, or at least not in the absence of&lt;br /&gt;
	# much larger resource-exhaustion problems that would be very obvious.&lt;br /&gt;
	#&lt;br /&gt;
	# 2. We don't need all the logging crud that daemon/initlog sets&lt;br /&gt;
	# up -- gpsd does its own syslog calls.&lt;br /&gt;
	#&lt;br /&gt;
	&lt;br /&gt;
	if [ -e &amp;quot;${GPS_DEV}&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
	    ${prog} -n ${GPSD_OPTS} ${GPS_DEV}&lt;br /&gt;
	    RETVAL=$?&lt;br /&gt;
	    echo &amp;quot;success&amp;quot;&lt;br /&gt;
	else&lt;br /&gt;
	    # User needs to symlink ${GPS_DEV} to the right thing&lt;br /&gt;
	    # Do it automatically if the name contains &amp;quot;NP&amp;quot;&lt;br /&gt;
	    if echo ${GPS_DEV} | grep -q NP&lt;br /&gt;
	    then&lt;br /&gt;
	        mknod ${GPS_DEV} p&lt;br /&gt;
	        ${prog} -n ${GPSD_OPTS} ${GPS_DEV}&lt;br /&gt;
	        RETVAL=$?&lt;br /&gt;
	        echo &amp;quot;success&amp;quot;&lt;br /&gt;
	    else&lt;br /&gt;
	        RETVAL=$?&lt;br /&gt;
	        echo &amp;quot;No ${GPS_DEV} GPS device, aborting gpsd startup. Check /etc/default/${prog}&amp;quot;&lt;br /&gt;
	    fi&lt;br /&gt;
	fi&lt;br /&gt;
	[ $RETVAL -eq 0 ] &amp;amp;&amp;amp; touch /var/lock/subsys/gpsd&lt;br /&gt;
	return $RETVAL&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
stop() {&lt;br /&gt;
	# Stop daemons.&lt;br /&gt;
	echo -n &amp;quot;Shutting down ${prog}: &amp;quot;&lt;br /&gt;
        killall ${prog}&lt;br /&gt;
	RETVAL=$?&lt;br /&gt;
	echo&lt;br /&gt;
	if [ $RETVAL -eq 0 ]&lt;br /&gt;
	then&lt;br /&gt;
	    test -e /var/lock/subsys/gpsd &amp;amp;&amp;amp; rm -f /var/lock/subsys/gpsd;&lt;br /&gt;
	fi&lt;br /&gt;
	return $RETVAL&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# See how we were called.&lt;br /&gt;
case &amp;quot;$1&amp;quot; in&lt;br /&gt;
  start)&lt;br /&gt;
	start&lt;br /&gt;
	;;&lt;br /&gt;
  stop)&lt;br /&gt;
	stop&lt;br /&gt;
	;;&lt;br /&gt;
  restart|reload)&lt;br /&gt;
	stop&lt;br /&gt;
	start&lt;br /&gt;
	RETVAL=$?&lt;br /&gt;
	;;&lt;br /&gt;
  condrestart)&lt;br /&gt;
	if [ -f /var/lock/subsys/gpsd ]; then&lt;br /&gt;
	    stop&lt;br /&gt;
	    start&lt;br /&gt;
	    RETVAL=$?&lt;br /&gt;
	fi&lt;br /&gt;
	;;&lt;br /&gt;
  status)&lt;br /&gt;
#	status gpsd&lt;br /&gt;
#	RETVAL=$?&lt;br /&gt;
	;;&lt;br /&gt;
  *)&lt;br /&gt;
	echo &amp;quot;Usage: $0 {start|stop|restart|condrestart|status}&amp;quot;&lt;br /&gt;
	exit 1&lt;br /&gt;
esac&lt;br /&gt;
&lt;br /&gt;
exit $RETVAL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
/etc/init.d/gllin:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
#&lt;br /&gt;
# This shell script starts and stops gllin.&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
RETVAL=0&lt;br /&gt;
prog=&amp;quot;gllin&amp;quot;&lt;br /&gt;
GLLIN_PATH=/home/root/gllin&lt;br /&gt;
&lt;br /&gt;
test -f /etc/default/${prog} &amp;amp;&amp;amp; . /etc/default/${prog}&lt;br /&gt;
&lt;br /&gt;
start() {&lt;br /&gt;
	# Make fifo if it doesn't already exist&lt;br /&gt;
	if [ ! -p /tmp/nmeaNP ]&lt;br /&gt;
	then&lt;br /&gt;
	  mknod /tmp/nmeaNP p&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	# Check for gpsd ready (max 5 seconds)&lt;br /&gt;
	echo -n &amp;quot;Waiting for gpsd . . . &amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	if [ ! &amp;quot;$(pidof gpsd)&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
	  sleep 4&lt;br /&gt;
	  if [ ! &amp;quot;$(pidof gpsd)&amp;quot; ]&lt;br /&gt;
	  then&lt;br /&gt;
	    RETVAL=1&lt;br /&gt;
	    echo &amp;quot;failure.&amp;quot;&lt;br /&gt;
	    return $RETVAL&lt;br /&gt;
	  fi&lt;br /&gt;
	fi&lt;br /&gt;
	&lt;br /&gt;
	# Start daemons.&lt;br /&gt;
	echo -n &amp;quot;starting ${prog}: &amp;quot;&lt;br /&gt;
	cd $GLLIN_PATH&lt;br /&gt;
	sleep 1&lt;br /&gt;
	if [ -e $GLLIN_PATH/${prog}.real ]&lt;br /&gt;
	then&lt;br /&gt;
	  $GLLIN_PATH/lib/ld-linux.so.2 --library-path $GLLIN_PATH/lib $GLLIN_PATH/${prog}.real -low 5 &amp;gt; /dev/null&lt;br /&gt;
	  $GLLIN_PATH/lib/ld-linux.so.2 --library-path $GLLIN_PATH/lib $GLLIN_PATH/${prog}.real -periodic 1 +daemon&lt;br /&gt;
	else&lt;br /&gt;
	  $GLLIN_PATH/lib/ld-linux.so.2 --library-path $GLLIN_PATH/lib $GLLIN_PATH/${prog} -low 5 &amp;gt; /dev/null&lt;br /&gt;
	  $GLLIN_PATH/lib/ld-linux.so.2 --library-path $GLLIN_PATH/lib $GLLIN_PATH/${prog} -periodic 1 +daemon&lt;br /&gt;
	fi&lt;br /&gt;
	echo &amp;quot;success.&amp;quot;&lt;br /&gt;
	RETVAL=$?&lt;br /&gt;
	echo&lt;br /&gt;
	return $RETVAL&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
stop() {&lt;br /&gt;
	# Stop daemons.&lt;br /&gt;
	echo -n &amp;quot;Shutting down ${prog}: &amp;quot;&lt;br /&gt;
	pkill ld-linux.so.2	&lt;br /&gt;
    	RETVAL=$?&lt;br /&gt;
	echo &amp;quot;success.&amp;quot;&lt;br /&gt;
	return $RETVAL&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# See how we were called.&lt;br /&gt;
case &amp;quot;$1&amp;quot; in&lt;br /&gt;
  start)&lt;br /&gt;
	start&lt;br /&gt;
	;;&lt;br /&gt;
  stop)&lt;br /&gt;
	stop&lt;br /&gt;
	;;&lt;br /&gt;
  restart|reload)&lt;br /&gt;
	stop&lt;br /&gt;
	start&lt;br /&gt;
	RETVAL=$?&lt;br /&gt;
	;;&lt;br /&gt;
  status)&lt;br /&gt;
#	RETVAL=$?&lt;br /&gt;
	;;&lt;br /&gt;
  *)&lt;br /&gt;
	echo &amp;quot;Usage: $0 {start|stop|restart|condrestart|status}&amp;quot;&lt;br /&gt;
	exit 1&lt;br /&gt;
esac&lt;br /&gt;
&lt;br /&gt;
exit $RETVAL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These scripts allow you (or init, if you have them numbered in rcX.d appropriately) to start gpsd *before* gllin.  This way, gpsd starts listening on /tmp/nmeaNP immediately, and gllin doesn't need to send output to /dev/null in order to stay alive.&lt;br /&gt;
&lt;br /&gt;
This version of the gpsd script will create the named pipe (if the device name includes &amp;quot;NP&amp;quot; in the filename) if it doesn't exist.&lt;/div&gt;</summary>
		<author><name>Cheetah100</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Manually_using_GPRS</id>
		<title>Manually using GPRS</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Manually_using_GPRS"/>
				<updated>2008-03-12T09:09:16Z</updated>
		
		<summary type="html">&lt;p&gt;Cheetah100: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The GPRS connection is made using the PPP protocol to a server identified by an &amp;quot;APN&amp;quot; at the network operator. &lt;br /&gt;
&lt;br /&gt;
The program that implements PPP on Linux is [[pppd]], which we need to configure and run to get a connection. When that is working, we can configure pppd to wait until it's needed before it connects, and to disconnect if the connection becomes idle. Further, we can start pppd in the background during the boot process.&lt;br /&gt;
&lt;br /&gt;
== Configuring pppd for manual connections ==&lt;br /&gt;
&lt;br /&gt;
You'll need /etc/ppp/peers/gprs:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/dev/ttySAC0 115200&lt;br /&gt;
connect /etc/ppp/gprs-connect-chat&lt;br /&gt;
crtscts &lt;br /&gt;
lock&lt;br /&gt;
hide-password&lt;br /&gt;
defaultroute&lt;br /&gt;
usepeerdns&lt;br /&gt;
disconnect /etc/ppp/gprs-disconnect-chat&lt;br /&gt;
holdoff 3&lt;br /&gt;
ipcp-accept-local&lt;br /&gt;
lcp-echo-failure 8&lt;br /&gt;
lcp-echo-interval 3&lt;br /&gt;
noauth&lt;br /&gt;
noipdefault&lt;br /&gt;
novj&lt;br /&gt;
novjccomp&lt;br /&gt;
replacedefaultroute&lt;br /&gt;
persist&lt;br /&gt;
lcp-echo-interval 3&lt;br /&gt;
lcp-echo-failure 12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This options where mentioned before with that strange comment. Mine worked fine for me without those.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# very long timeouts (unwise?)&lt;br /&gt;
lcp-echo-interval 300&lt;br /&gt;
lcp-echo-failure 40000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Depending on the APN, you may need password authentication using CHAP or PAP. You can add the following default line for &amp;quot;password-less&amp;quot; connections:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# client        server  secret                  IP addresses&lt;br /&gt;
*               *       &amp;quot;&amp;quot;                      *&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For CHAP, lines in /etc/ppp/chap-secrets are used. For PAP, the lines are in /etc/ppp/pap-secrets. The client should match the &amp;quot;user&amp;quot; option in pppd the config file (below). You can use * to mean any here, but the option user &amp;quot;&amp;quot; doesn't mean empty!&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Secrets for authentication using CHAP&lt;br /&gt;
# client        server  secret                  IP addresses&lt;br /&gt;
&amp;quot;user&amp;quot;         *       &amp;quot;password&amp;quot;                  *  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For this you need the following options in /etc/ppp/peers/gprs:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# username to use for authentication, should match &amp;quot;client&amp;quot; in /etc/ppp/{chap,pap}-secrets&lt;br /&gt;
user &amp;quot;user&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And you'll need /etc/ppp/gprs-connect-chat (needs &amp;quot;chmod +x&amp;quot;):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh -e&lt;br /&gt;
exec chat -v\&lt;br /&gt;
        ABORT BUSY\&lt;br /&gt;
        ABORT DELAYED\&lt;br /&gt;
        ABORT &amp;quot;NO ANSWER&amp;quot;\&lt;br /&gt;
        ABORT &amp;quot;NO DIALTONE&amp;quot;\&lt;br /&gt;
        ABORT VOICE\&lt;br /&gt;
        ABORT ERROR\&lt;br /&gt;
        ABORT RINGING\&lt;br /&gt;
        TIMEOUT 60\&lt;br /&gt;
        &amp;quot;&amp;quot; +++\&lt;br /&gt;
        AT ATZ\&lt;br /&gt;
        OK ATE1\&lt;br /&gt;
        OK AT+CFUN=1\&lt;br /&gt;
        OK AT+COPS\&lt;br /&gt;
        OK AT+CGDCONT=1,\&amp;quot;IP\&amp;quot;,\&amp;quot;internet\&amp;quot;\&lt;br /&gt;
        OK ATD*99#\&lt;br /&gt;
        CONNECT /n/d&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will need to adjust the APN name &amp;quot;internet&amp;quot; in at+cgdcont line and possibly the phone number in the ATD line to match what your network operator provides. See below in the table &amp;quot;Some APN names for reference&amp;quot; for the right settings for your operator.&lt;br /&gt;
&lt;br /&gt;
Also good to have is /etc/ppp/gprs-disconnect-chat (needs &amp;quot;chmod +x&amp;quot;):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh -e&lt;br /&gt;
/usr/sbin/chat -v\&lt;br /&gt;
	ABORT OK\&lt;br /&gt;
	ABORT BUSY\&lt;br /&gt;
	ABORT DELAYED\&lt;br /&gt;
	ABORT &amp;quot;NO ANSWER&amp;quot;\&lt;br /&gt;
	ABORT &amp;quot;NO CARRIER&amp;quot;\&lt;br /&gt;
	ABORT &amp;quot;NO DIALTONE&amp;quot;\&lt;br /&gt;
	ABORT VOICE\&lt;br /&gt;
	ABORT ERROR\&lt;br /&gt;
	ABORT RINGING\&lt;br /&gt;
	TIMEOUT 12\&lt;br /&gt;
	&amp;quot;&amp;quot; \\k\\k\\k\\d+++ATH\&lt;br /&gt;
	&amp;quot;NO CARRIER-AT-OK&amp;quot; &amp;quot;&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following script can be used to start the ppp connection. First it stops gsmd because gsmd may put the phone in a unknown state. It then turns on the power to the phone, modifies the ownership, and then creates a tty connection. Finally it starts [[pppd]] with the gprs settings.&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/etc/init.d/gsmd stop&lt;br /&gt;
echo &amp;quot;1&amp;quot; &amp;gt; /sys/bus/platform/devices/gta01-pm-gsm.0/power_on&lt;br /&gt;
chown uucp.uucp /dev/ttySAC0&lt;br /&gt;
stty -F /dev/ttySAC0 crtscts&lt;br /&gt;
pppd call gprs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are having problems connecting replace the last line with the below line. This will allow you to see the details of the connection on the console. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
pppd debug nodetach call gprs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The config above will establish a persistant link over gprs. The battery will run low in less than an hour. See an example for an on-demand config below.&lt;br /&gt;
&lt;br /&gt;
=== Resolve.conf issues ===&lt;br /&gt;
&lt;br /&gt;
The latest build seems to have solved the following issue, it should be automatically updated by pppd.&lt;br /&gt;
&lt;br /&gt;
If you expeience DNS issues after connecting to DNS you may need a proper /etc/resolv.conf:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ln -sf /var/run/resolv.conf /etc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If needed put your nameserver for usb-net into /var/run/resolv.conf, not in /etc.&lt;br /&gt;
&lt;br /&gt;
The image does not set a correct resolv.conf. i do so with an &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
echo  nameserver 192.168.0.201 &amp;gt; /var/run/resolv.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in the right place. because a post-up in /etc/network/interfaces is not supported i do that in /etc/network/if-up.d/08setupdns&lt;br /&gt;
&lt;br /&gt;
another problem is pppd's /etc/ppp/ip-down.d/92removedns which does not properly remove the link when shuting down ppp. my fix is this script:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
ACTUALCONF=/var/run/resolv.conf&lt;br /&gt;
PPPCONF=/var/run/ppp/resolv.conf&lt;br /&gt;
if [ -f $PPPCONF ] ; then&lt;br /&gt;
        if [ -f $ACTUALCONF ] ; then&lt;br /&gt;
                if [ ! -h $ACTUALCONF -o ! &amp;quot;`readlink $ACTUALCONF 2&amp;gt;&amp;amp;1`&amp;quot; = &amp;quot;$PPPCONF&amp;quot; ] ; then&lt;br /&gt;
                        mv $ACTUALCONF $ACTUALCONF.ppporig&lt;br /&gt;
                fi&lt;br /&gt;
        fi&lt;br /&gt;
&lt;br /&gt;
        ln -sf $PPPCONF $ACTUALCONF&lt;br /&gt;
fi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Some APN names for reference ===&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Country&lt;br /&gt;
! Carrier&lt;br /&gt;
! Plan&lt;br /&gt;
! APN/Phone&lt;br /&gt;
! user/password if required&lt;br /&gt;
! Working pppd scripts&lt;br /&gt;
|-&lt;br /&gt;
| Estonia || Elisa || Any, behind NAT || internet || ||&lt;br /&gt;
|-&lt;br /&gt;
| Estonia || EMT || Any, behind NAT || internet.emt.ee || ||&lt;br /&gt;
|-&lt;br /&gt;
| Finland || Saunalahti || Any || internet.saunalahti || ||&lt;br /&gt;
|-&lt;br /&gt;
| Finland || Sonera   || Any, behind NAT || internet || ||&lt;br /&gt;
|-&lt;br /&gt;
| Finland || Sonera   || Any, public IP  || prointernet || ||&lt;br /&gt;
|-&lt;br /&gt;
| France || SFR || 10.x.x.x? || websfr || || under tests&lt;br /&gt;
|-&lt;br /&gt;
| France || SFR || 10.x.x.x? || wapsfr&amp;lt;sup&amp;gt;[1]&amp;lt;/sup&amp;gt;|| || under tests&lt;br /&gt;
|-&lt;br /&gt;
| France || Orange || ??? || orange.fr || || under tests&lt;br /&gt;
|-&lt;br /&gt;
| Germany || E-Plus || BASE (and others?) || internet.eplus.de || eplus gprs ||&lt;br /&gt;
|-&lt;br /&gt;
| Germany || T-Mobile ||  || internet.t-mobile || ||&lt;br /&gt;
|-&lt;br /&gt;
| Germany || Vodafone || Any, behind NAT || web.vodafone.de || ||&lt;br /&gt;
|-&lt;br /&gt;
| New Zealand || Vodafone || Any || live.vodafone.com / *99***2#||  ||&lt;br /&gt;
|-&lt;br /&gt;
| Norway || Netcom || Any || internet.netcom.no || ||&lt;br /&gt;
|-&lt;br /&gt;
| Norway || Telenor || Any || telenor || ||&lt;br /&gt;
|-&lt;br /&gt;
| Switzerland || Swisscom || e.g. Natel Basic Liberty, behind NAT || gprs.swisscom.ch || ||&lt;br /&gt;
|-&lt;br /&gt;
| UK || T-Mobile|| || general.t-mobile.uk || ||&lt;br /&gt;
|-&lt;br /&gt;
| UK || Virgin || || goto.virginmobile.uk || user ||&lt;br /&gt;
|-&lt;br /&gt;
| UK || [http://www.filesaveas.com/gprs.html other providers] || || || ||&lt;br /&gt;
|-&lt;br /&gt;
| USA || Cingular (AT&amp;amp;T) || Less than full internet || wap.cingular || ||&lt;br /&gt;
|-&lt;br /&gt;
| USA || T-mobile || Anything less than full internet || wap.voicestream.com || ||&lt;br /&gt;
|- &lt;br /&gt;
| USA || T-mobile || Regular internet plan || internet2.voicestream.com || || [[T-Mobile pppd scripts]]&lt;br /&gt;
|- &lt;br /&gt;
| USA || T-mobile || &amp;quot;VPN&amp;quot; internet plan || internet3.voicestream.com || ||&lt;br /&gt;
|- &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[1] connected through a WAP proxy (slower, but the only way to access Vodafone live! and SFR portal)&lt;br /&gt;
&lt;br /&gt;
[2] Unless stated otherwise the phone number to call is &amp;quot;*99#&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Starting pppd automatically ==&lt;br /&gt;
&lt;br /&gt;
Once you have finished debugging your gprs-connect-chat and gprs options files, you may wish to automatically connect whenever needed and hang up when finished.  Make sure you understand the impact of this change to your carrier plan billing.  This is not recommended unless you have a large-use or unlimited data plan.  These scripts do NOT prompt you before connecting.&lt;br /&gt;
&lt;br /&gt;
=== On-demand connection settings ===&lt;br /&gt;
&lt;br /&gt;
Additional settings are needed if you want the actual connection to be up only while there is traffic. In the 'gprs' file above, insert the following, making sure 'nodetach' is commented out.  If 'nodetach' is on, the boot process will stop when it starts pppd. Also remove the option 'persist' mentioned above.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Wait until needed before connecting&lt;br /&gt;
demand&lt;br /&gt;
&lt;br /&gt;
# Disconnect if idle for given amount of seconds&lt;br /&gt;
idle 20&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Start on boot (method 1) ===&lt;br /&gt;
&lt;br /&gt;
Add the following definition to /etc/network/interfaces:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
auto ppp0&lt;br /&gt;
iface ppp0 inet ppp&lt;br /&gt;
        provider gprs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That should be it. Now you can use 'ifup ppp0' and 'ifdown ppp0' manually too.&lt;br /&gt;
&lt;br /&gt;
=== Start on boot (method 2) ===&lt;br /&gt;
&lt;br /&gt;
Create the following file as /etc/ppp/ppp_on_boot (needs chmod +x).  The /etc/init.d/ppp script will call it to set up the daemon.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
#&lt;br /&gt;
#   Rename this file to ppp_on_boot and pppd will be fired up as&lt;br /&gt;
#   soon as the system comes up, connecting to `provider'.&lt;br /&gt;
#&lt;br /&gt;
#   If you also make this file executable, and replace the first line&lt;br /&gt;
#   with just &amp;quot;#!/bin/sh&amp;quot;, the commands below will be executed instead.&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
# The location of the ppp daemon itself (shouldn't need to be changed)&lt;br /&gt;
PPPD=/usr/sbin/pppd&lt;br /&gt;
&lt;br /&gt;
# The default provider to connect to&lt;br /&gt;
$PPPD call gprs&lt;br /&gt;
&lt;br /&gt;
# Additional connections, which would just use settings from&lt;br /&gt;
# /etc/ppp/options.&amp;lt;tty&amp;gt;&lt;br /&gt;
#$PPPD ttyS0&lt;br /&gt;
#$PPPD ttyS1&lt;br /&gt;
#$PPPD ttyS2&lt;br /&gt;
#$PPPD ttyS3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Finally, you need to add the /etc/init.d/ppp script to the init process by creating symbolic links from the appropriate directories.  I chose the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/etc/rc0.d/K25ppp&lt;br /&gt;
/etc/rc1.d/K45ppp&lt;br /&gt;
/etc/rc2.d/S45ppp&lt;br /&gt;
/etc/rc3.d/S45ppp&lt;br /&gt;
/etc/rc4.d/S45ppp&lt;br /&gt;
/etc/rc5.d/S45ppp&lt;br /&gt;
/etc/rc6.d/K25ppp&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[pppd]]&lt;br /&gt;
* [[Manually using GSM]]&lt;br /&gt;
* [[Manually using Bluetooth]]&lt;br /&gt;
&lt;br /&gt;
{{Languages|Manually_using_GPRS}}&lt;br /&gt;
[[Category:Documentation]]&lt;br /&gt;
[[Category:Developer software]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Guides]]&lt;/div&gt;</summary>
		<author><name>Cheetah100</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Manually_using_GPRS</id>
		<title>Manually using GPRS</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Manually_using_GPRS"/>
				<updated>2008-03-12T03:35:51Z</updated>
		
		<summary type="html">&lt;p&gt;Cheetah100: /* Some APN names for reference */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;You need to have [[GSM]] parts already initialized, with modem logged in to the network, for this to work. It is best to test it by doing test call. The GPRS connection is made using the PPP protocol to a server identified by an &amp;quot;APN&amp;quot; at the network operator. &lt;br /&gt;
&lt;br /&gt;
The program that implements PPP on Linux is [[pppd]], which we need to configure and run to get a connection. When that is working, we can configure pppd to wait until it's needed before it connects, and to disconnect if the connection becomes idle. Further, we can start pppd in the background during the boot process.&lt;br /&gt;
&lt;br /&gt;
== Configuring pppd for manual connections ==&lt;br /&gt;
&lt;br /&gt;
You'll need /etc/ppp/peers/gprs:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/dev/ttySAC0 115200&lt;br /&gt;
connect /etc/ppp/gprs-connect-chat&lt;br /&gt;
crtscts &lt;br /&gt;
lock&lt;br /&gt;
hide-password&lt;br /&gt;
defaultroute&lt;br /&gt;
usepeerdns&lt;br /&gt;
disconnect /etc/ppp/gprs-disconnect-chat&lt;br /&gt;
holdoff 3&lt;br /&gt;
ipcp-accept-local&lt;br /&gt;
lcp-echo-failure 8&lt;br /&gt;
lcp-echo-interval 3&lt;br /&gt;
noauth&lt;br /&gt;
noipdefault&lt;br /&gt;
novj&lt;br /&gt;
novjccomp&lt;br /&gt;
replacedefaultroute&lt;br /&gt;
persist&lt;br /&gt;
lcp-echo-interval 3&lt;br /&gt;
lcp-echo-failure 12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This options where mentioned before with that strange comment. Mine worked fine for me without those.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# very long timeouts (unwise?)&lt;br /&gt;
lcp-echo-interval 300&lt;br /&gt;
lcp-echo-failure 40000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Depending on the APN, you may need password authentication using CHAP or PAP. You can add the following default line for &amp;quot;password-less&amp;quot; connections:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# client        server  secret                  IP addresses&lt;br /&gt;
*               *       &amp;quot;&amp;quot;                      *&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For CHAP, lines in /etc/ppp/chap-secrets are used. For PAP, the lines are in /etc/ppp/pap-secrets. The client should match the &amp;quot;user&amp;quot; option in pppd the config file (below). You can use * to mean any here, but the option user &amp;quot;&amp;quot; doesn't mean empty!&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Secrets for authentication using CHAP&lt;br /&gt;
# client        server  secret                  IP addresses&lt;br /&gt;
&amp;quot;user&amp;quot;         *       &amp;quot;password&amp;quot;                  *  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For this you need the following options in /etc/ppp/peers/gprs:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# username to use for authentication, should match &amp;quot;client&amp;quot; in /etc/ppp/{chap,pap}-secrets&lt;br /&gt;
user &amp;quot;user&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And you'll need /etc/ppp/gprs-connect-chat (needs &amp;quot;chmod +x&amp;quot;):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh -e&lt;br /&gt;
exec chat -v\&lt;br /&gt;
	ABORT BUSY\&lt;br /&gt;
	ABORT DELAYED\&lt;br /&gt;
	ABORT &amp;quot;NO ANSWER&amp;quot;\&lt;br /&gt;
	ABORT &amp;quot;NO DIALTONE&amp;quot;\&lt;br /&gt;
	ABORT VOICE\&lt;br /&gt;
	ABORT ERROR\&lt;br /&gt;
	ABORT RINGING\&lt;br /&gt;
	TIMEOUT 3\&lt;br /&gt;
	&amp;quot;&amp;quot; ATZ\&lt;br /&gt;
	OK-\\k\\k\\k\\d+++ATH-OK ATE1\&lt;br /&gt;
	OK AT+CFUN=0\&lt;br /&gt;
	OK \\dAT+CFUN=1\&lt;br /&gt;
	ERROR AT+CPIN\?\&lt;br /&gt;
	&amp;quot;+CPIN: READY-AT+CPIN=\&amp;quot;2222\&amp;quot;-OK&amp;quot; AT\&lt;br /&gt;
	TIMEOUT 60\&lt;br /&gt;
	OK AT+COPS\&lt;br /&gt;
	OK AT+CGDCONT=1,\&amp;quot;IP\&amp;quot;,\&amp;quot;internet\&amp;quot;\&lt;br /&gt;
	OK ATD*99#\&lt;br /&gt;
	CONNECT \d\c&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will need to adjust the APN name &amp;quot;internet&amp;quot; in at+cgdcont line to match what your network operator provides. See below in the table &amp;quot;Some APN names for reference&amp;quot; for the right settings for your operator.&lt;br /&gt;
&lt;br /&gt;
Also good to have is /etc/ppp/gprs-disconnect-chat (needs &amp;quot;chmod +x&amp;quot;):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh -e&lt;br /&gt;
/usr/sbin/chat -v\&lt;br /&gt;
	ABORT OK\&lt;br /&gt;
	ABORT BUSY\&lt;br /&gt;
	ABORT DELAYED\&lt;br /&gt;
	ABORT &amp;quot;NO ANSWER&amp;quot;\&lt;br /&gt;
	ABORT &amp;quot;NO CARRIER&amp;quot;\&lt;br /&gt;
	ABORT &amp;quot;NO DIALTONE&amp;quot;\&lt;br /&gt;
	ABORT VOICE\&lt;br /&gt;
	ABORT ERROR\&lt;br /&gt;
	ABORT RINGING\&lt;br /&gt;
	TIMEOUT 12\&lt;br /&gt;
	&amp;quot;&amp;quot; \\k\\k\\k\\d+++ATH\&lt;br /&gt;
	&amp;quot;NO CARRIER-AT-OK&amp;quot; &amp;quot;&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You need a proper /etc/resolv.conf:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ln -sf /var/run/resolv.conf /etc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If needed put your nameserver for usb-net into /var/run/resolv.conf, not in /etc.&lt;br /&gt;
&lt;br /&gt;
=== Required fixes ===&lt;br /&gt;
&lt;br /&gt;
The image does not set a correct resolv.conf. i do so with an &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
echo  nameserver 192.168.0.201 &amp;gt; /var/run/resolv.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in the right place. because a post-up in /etc/network/interfaces is not supported i do that in /etc/network/if-up.d/08setupdns&lt;br /&gt;
&lt;br /&gt;
another problem is pppd's /etc/ppp/ip-down.d/92removedns which does not properly remove the link when shuting down ppp. my fix is this script:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
ACTUALCONF=/var/run/resolv.conf&lt;br /&gt;
PPPCONF=/var/run/ppp/resolv.conf&lt;br /&gt;
if [ -f $PPPCONF ] ; then&lt;br /&gt;
        if [ -f $ACTUALCONF ] ; then&lt;br /&gt;
                if [ ! -h $ACTUALCONF -o ! &amp;quot;`readlink $ACTUALCONF 2&amp;gt;&amp;amp;1`&amp;quot; = &amp;quot;$PPPCONF&amp;quot; ] ; then&lt;br /&gt;
                        mv $ACTUALCONF $ACTUALCONF.ppporig&lt;br /&gt;
                fi&lt;br /&gt;
        fi&lt;br /&gt;
&lt;br /&gt;
        ln -sf $PPPCONF $ACTUALCONF&lt;br /&gt;
fi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Starting pppd ===&lt;br /&gt;
&lt;br /&gt;
Then, after initializing GSM, you should be able to initialize GPRS by `pppd call gprs`. Good luck!&lt;br /&gt;
&lt;br /&gt;
To dial in - and get verbose output on the terminal - use pppd&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
pppd debug nodetach call gprs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The config above will establish a 'persist'ant link over gprs. The battery will run low in less than an hour. See an example for an on-demand config below.&lt;br /&gt;
&lt;br /&gt;
=== Some APN names for reference ===&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Country&lt;br /&gt;
! Carrier&lt;br /&gt;
! Plan&lt;br /&gt;
! APN&lt;br /&gt;
! user/password if required&lt;br /&gt;
! Working pppd scripts&lt;br /&gt;
|-&lt;br /&gt;
| Estonia || Elisa || Any, behind NAT || internet || ||&lt;br /&gt;
|-&lt;br /&gt;
| Estonia || EMT || Any, behind NAT || internet.emt.ee || ||&lt;br /&gt;
|-&lt;br /&gt;
| Finland || Saunalahti || Any || internet.saunalahti || ||&lt;br /&gt;
|-&lt;br /&gt;
| Finland || Sonera   || Any, behind NAT || internet || ||&lt;br /&gt;
|-&lt;br /&gt;
| Finland || Sonera   || Any, public IP  || prointernet || ||&lt;br /&gt;
|-&lt;br /&gt;
| France || SFR || 10.x.x.x? || websfr || || under tests&lt;br /&gt;
|-&lt;br /&gt;
| France || SFR || 10.x.x.x? || wapsfr&amp;lt;sup&amp;gt;[1]&amp;lt;/sup&amp;gt;|| || under tests&lt;br /&gt;
|-&lt;br /&gt;
| France || Orange || ??? || orange.fr || || under tests&lt;br /&gt;
|-&lt;br /&gt;
| Germany || E-Plus || BASE (and others?) || internet.eplus.de || eplus gprs ||&lt;br /&gt;
|-&lt;br /&gt;
| Germany || T-Mobile ||  || internet.t-mobile || ||&lt;br /&gt;
|-&lt;br /&gt;
| Germany || Vodafone || Any, behind NAT || web.vodafone.de || ||&lt;br /&gt;
|-&lt;br /&gt;
| New Zealand || Vodafone || Any || live.vodafone.com ||  ||&lt;br /&gt;
|-&lt;br /&gt;
| Norway || Netcom || Any || internet.netcom.no || ||&lt;br /&gt;
|-&lt;br /&gt;
| Norway || Telenor || Any || telenor || ||&lt;br /&gt;
|-&lt;br /&gt;
| Switzerland || Swisscom || e.g. Natel Basic Liberty, behind NAT || gprs.swisscom.ch || ||&lt;br /&gt;
|-&lt;br /&gt;
| UK || T-Mobile|| || general.t-mobile.uk || ||&lt;br /&gt;
|-&lt;br /&gt;
| UK || Virgin || || goto.virginmobile.uk || user ||&lt;br /&gt;
|-&lt;br /&gt;
| UK || [http://www.filesaveas.com/gprs.html other providers] || || || ||&lt;br /&gt;
|-&lt;br /&gt;
| USA || Cingular (AT&amp;amp;T) || Less than full internet || wap.cingular || ||&lt;br /&gt;
|-&lt;br /&gt;
| USA || T-mobile || Anything less than full internet || wap.voicestream.com || ||&lt;br /&gt;
|- &lt;br /&gt;
| USA || T-mobile || Regular internet plan || internet2.voicestream.com || || [[T-Mobile pppd scripts]]&lt;br /&gt;
|- &lt;br /&gt;
| USA || T-mobile || &amp;quot;VPN&amp;quot; internet plan || internet3.voicestream.com || ||&lt;br /&gt;
|- &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[1] connected through a WAP proxy (slower, but the only way to access Vodafone live! and SFR portal)&lt;br /&gt;
&lt;br /&gt;
== Starting pppd automatically ==&lt;br /&gt;
&lt;br /&gt;
Once you have finished debugging your gprs-connect-chat and gprs options files, you may wish to automatically connect whenever needed and hang up when finished.  Make sure you understand the impact of this change to your carrier plan billing.  This is not recommended unless you have a large-use or unlimited data plan.  These scripts do NOT prompt you before connecting.&lt;br /&gt;
&lt;br /&gt;
=== On-demand connection settings ===&lt;br /&gt;
&lt;br /&gt;
Additional settings are needed if you want the actual connection to be up only while there is traffic. In the 'gprs' file above, insert the following, making sure 'nodetach' is commented out.  If 'nodetach' is on, the boot process will stop when it starts pppd. Also remove the option 'persist' mentioned above.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Wait until needed before connecting&lt;br /&gt;
demand&lt;br /&gt;
&lt;br /&gt;
# Disconnect if idle for given amount of seconds&lt;br /&gt;
idle 20&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Start on boot (method 1) ===&lt;br /&gt;
&lt;br /&gt;
Add the following definition to /etc/network/interfaces:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
auto ppp0&lt;br /&gt;
iface ppp0 inet ppp&lt;br /&gt;
        provider gprs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That should be it. Now you can use 'ifup ppp0' and 'ifdown ppp0' manually too.&lt;br /&gt;
&lt;br /&gt;
=== Start on boot (method 2) ===&lt;br /&gt;
&lt;br /&gt;
Create the following file as /etc/ppp/ppp_on_boot (needs chmod +x).  The /etc/init.d/ppp script will call it to set up the daemon.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
#&lt;br /&gt;
#   Rename this file to ppp_on_boot and pppd will be fired up as&lt;br /&gt;
#   soon as the system comes up, connecting to `provider'.&lt;br /&gt;
#&lt;br /&gt;
#   If you also make this file executable, and replace the first line&lt;br /&gt;
#   with just &amp;quot;#!/bin/sh&amp;quot;, the commands below will be executed instead.&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
# The location of the ppp daemon itself (shouldn't need to be changed)&lt;br /&gt;
PPPD=/usr/sbin/pppd&lt;br /&gt;
&lt;br /&gt;
# The default provider to connect to&lt;br /&gt;
$PPPD call gprs&lt;br /&gt;
&lt;br /&gt;
# Additional connections, which would just use settings from&lt;br /&gt;
# /etc/ppp/options.&amp;lt;tty&amp;gt;&lt;br /&gt;
#$PPPD ttyS0&lt;br /&gt;
#$PPPD ttyS1&lt;br /&gt;
#$PPPD ttyS2&lt;br /&gt;
#$PPPD ttyS3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Finally, you need to add the /etc/init.d/ppp script to the init process by creating symbolic links from the appropriate directories.  I chose the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/etc/rc0.d/K25ppp&lt;br /&gt;
/etc/rc1.d/K45ppp&lt;br /&gt;
/etc/rc2.d/S45ppp&lt;br /&gt;
/etc/rc3.d/S45ppp&lt;br /&gt;
/etc/rc4.d/S45ppp&lt;br /&gt;
/etc/rc5.d/S45ppp&lt;br /&gt;
/etc/rc6.d/K25ppp&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[pppd]]&lt;br /&gt;
* [[Manually using GSM]]&lt;br /&gt;
* [[Manually using Bluetooth]]&lt;br /&gt;
&lt;br /&gt;
{{Languages|Manually_using_GPRS}}&lt;br /&gt;
[[Category:Documentation]]&lt;br /&gt;
[[Category:Developer software]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Guides]]&lt;/div&gt;</summary>
		<author><name>Cheetah100</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Manually_using_GPRS</id>
		<title>Manually using GPRS</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Manually_using_GPRS"/>
				<updated>2008-03-12T03:34:25Z</updated>
		
		<summary type="html">&lt;p&gt;Cheetah100: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;You need to have [[GSM]] parts already initialized, with modem logged in to the network, for this to work. It is best to test it by doing test call. The GPRS connection is made using the PPP protocol to a server identified by an &amp;quot;APN&amp;quot; at the network operator. &lt;br /&gt;
&lt;br /&gt;
The program that implements PPP on Linux is [[pppd]], which we need to configure and run to get a connection. When that is working, we can configure pppd to wait until it's needed before it connects, and to disconnect if the connection becomes idle. Further, we can start pppd in the background during the boot process.&lt;br /&gt;
&lt;br /&gt;
== Configuring pppd for manual connections ==&lt;br /&gt;
&lt;br /&gt;
You'll need /etc/ppp/peers/gprs:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/dev/ttySAC0 115200&lt;br /&gt;
connect /etc/ppp/gprs-connect-chat&lt;br /&gt;
crtscts &lt;br /&gt;
lock&lt;br /&gt;
hide-password&lt;br /&gt;
defaultroute&lt;br /&gt;
usepeerdns&lt;br /&gt;
disconnect /etc/ppp/gprs-disconnect-chat&lt;br /&gt;
holdoff 3&lt;br /&gt;
ipcp-accept-local&lt;br /&gt;
lcp-echo-failure 8&lt;br /&gt;
lcp-echo-interval 3&lt;br /&gt;
noauth&lt;br /&gt;
noipdefault&lt;br /&gt;
novj&lt;br /&gt;
novjccomp&lt;br /&gt;
replacedefaultroute&lt;br /&gt;
persist&lt;br /&gt;
lcp-echo-interval 3&lt;br /&gt;
lcp-echo-failure 12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This options where mentioned before with that strange comment. Mine worked fine for me without those.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# very long timeouts (unwise?)&lt;br /&gt;
lcp-echo-interval 300&lt;br /&gt;
lcp-echo-failure 40000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Depending on the APN, you may need password authentication using CHAP or PAP. You can add the following default line for &amp;quot;password-less&amp;quot; connections:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# client        server  secret                  IP addresses&lt;br /&gt;
*               *       &amp;quot;&amp;quot;                      *&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For CHAP, lines in /etc/ppp/chap-secrets are used. For PAP, the lines are in /etc/ppp/pap-secrets. The client should match the &amp;quot;user&amp;quot; option in pppd the config file (below). You can use * to mean any here, but the option user &amp;quot;&amp;quot; doesn't mean empty!&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Secrets for authentication using CHAP&lt;br /&gt;
# client        server  secret                  IP addresses&lt;br /&gt;
&amp;quot;user&amp;quot;         *       &amp;quot;password&amp;quot;                  *  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For this you need the following options in /etc/ppp/peers/gprs:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# username to use for authentication, should match &amp;quot;client&amp;quot; in /etc/ppp/{chap,pap}-secrets&lt;br /&gt;
user &amp;quot;user&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And you'll need /etc/ppp/gprs-connect-chat (needs &amp;quot;chmod +x&amp;quot;):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh -e&lt;br /&gt;
exec chat -v\&lt;br /&gt;
	ABORT BUSY\&lt;br /&gt;
	ABORT DELAYED\&lt;br /&gt;
	ABORT &amp;quot;NO ANSWER&amp;quot;\&lt;br /&gt;
	ABORT &amp;quot;NO DIALTONE&amp;quot;\&lt;br /&gt;
	ABORT VOICE\&lt;br /&gt;
	ABORT ERROR\&lt;br /&gt;
	ABORT RINGING\&lt;br /&gt;
	TIMEOUT 3\&lt;br /&gt;
	&amp;quot;&amp;quot; ATZ\&lt;br /&gt;
	OK-\\k\\k\\k\\d+++ATH-OK ATE1\&lt;br /&gt;
	OK AT+CFUN=0\&lt;br /&gt;
	OK \\dAT+CFUN=1\&lt;br /&gt;
	ERROR AT+CPIN\?\&lt;br /&gt;
	&amp;quot;+CPIN: READY-AT+CPIN=\&amp;quot;2222\&amp;quot;-OK&amp;quot; AT\&lt;br /&gt;
	TIMEOUT 60\&lt;br /&gt;
	OK AT+COPS\&lt;br /&gt;
	OK AT+CGDCONT=1,\&amp;quot;IP\&amp;quot;,\&amp;quot;internet\&amp;quot;\&lt;br /&gt;
	OK ATD*99#\&lt;br /&gt;
	CONNECT \d\c&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will need to adjust the APN name &amp;quot;internet&amp;quot; in at+cgdcont line to match what your network operator provides. See below in the table &amp;quot;Some APN names for reference&amp;quot; for the right settings for your operator.&lt;br /&gt;
&lt;br /&gt;
Also good to have is /etc/ppp/gprs-disconnect-chat (needs &amp;quot;chmod +x&amp;quot;):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh -e&lt;br /&gt;
/usr/sbin/chat -v\&lt;br /&gt;
	ABORT OK\&lt;br /&gt;
	ABORT BUSY\&lt;br /&gt;
	ABORT DELAYED\&lt;br /&gt;
	ABORT &amp;quot;NO ANSWER&amp;quot;\&lt;br /&gt;
	ABORT &amp;quot;NO CARRIER&amp;quot;\&lt;br /&gt;
	ABORT &amp;quot;NO DIALTONE&amp;quot;\&lt;br /&gt;
	ABORT VOICE\&lt;br /&gt;
	ABORT ERROR\&lt;br /&gt;
	ABORT RINGING\&lt;br /&gt;
	TIMEOUT 12\&lt;br /&gt;
	&amp;quot;&amp;quot; \\k\\k\\k\\d+++ATH\&lt;br /&gt;
	&amp;quot;NO CARRIER-AT-OK&amp;quot; &amp;quot;&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You need a proper /etc/resolv.conf:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ln -sf /var/run/resolv.conf /etc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If needed put your nameserver for usb-net into /var/run/resolv.conf, not in /etc.&lt;br /&gt;
&lt;br /&gt;
=== Required fixes ===&lt;br /&gt;
&lt;br /&gt;
The image does not set a correct resolv.conf. i do so with an &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
echo  nameserver 192.168.0.201 &amp;gt; /var/run/resolv.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in the right place. because a post-up in /etc/network/interfaces is not supported i do that in /etc/network/if-up.d/08setupdns&lt;br /&gt;
&lt;br /&gt;
another problem is pppd's /etc/ppp/ip-down.d/92removedns which does not properly remove the link when shuting down ppp. my fix is this script:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
ACTUALCONF=/var/run/resolv.conf&lt;br /&gt;
PPPCONF=/var/run/ppp/resolv.conf&lt;br /&gt;
if [ -f $PPPCONF ] ; then&lt;br /&gt;
        if [ -f $ACTUALCONF ] ; then&lt;br /&gt;
                if [ ! -h $ACTUALCONF -o ! &amp;quot;`readlink $ACTUALCONF 2&amp;gt;&amp;amp;1`&amp;quot; = &amp;quot;$PPPCONF&amp;quot; ] ; then&lt;br /&gt;
                        mv $ACTUALCONF $ACTUALCONF.ppporig&lt;br /&gt;
                fi&lt;br /&gt;
        fi&lt;br /&gt;
&lt;br /&gt;
        ln -sf $PPPCONF $ACTUALCONF&lt;br /&gt;
fi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Starting pppd ===&lt;br /&gt;
&lt;br /&gt;
Then, after initializing GSM, you should be able to initialize GPRS by `pppd call gprs`. Good luck!&lt;br /&gt;
&lt;br /&gt;
To dial in - and get verbose output on the terminal - use pppd&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
pppd debug nodetach call gprs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The config above will establish a 'persist'ant link over gprs. The battery will run low in less than an hour. See an example for an on-demand config below.&lt;br /&gt;
&lt;br /&gt;
=== Some APN names for reference ===&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Country&lt;br /&gt;
! Carrier&lt;br /&gt;
! Plan&lt;br /&gt;
! APN&lt;br /&gt;
! user/password if required&lt;br /&gt;
! Working pppd scripts&lt;br /&gt;
|-&lt;br /&gt;
| Estonia || Elisa || Any, behind NAT || internet || ||&lt;br /&gt;
|-&lt;br /&gt;
| Estonia || EMT || Any, behind NAT || internet.emt.ee || ||&lt;br /&gt;
|-&lt;br /&gt;
| Finland || Saunalahti || Any || internet.saunalahti || ||&lt;br /&gt;
|-&lt;br /&gt;
| Finland || Sonera   || Any, behind NAT || internet || ||&lt;br /&gt;
|-&lt;br /&gt;
| Finland || Sonera   || Any, public IP  || prointernet || ||&lt;br /&gt;
|-&lt;br /&gt;
| France || SFR || 10.x.x.x? || websfr || || under tests&lt;br /&gt;
|-&lt;br /&gt;
| France || SFR || 10.x.x.x? || wapsfr&amp;lt;sup&amp;gt;[1]&amp;lt;/sup&amp;gt;|| || under tests&lt;br /&gt;
|-&lt;br /&gt;
| France || Orange || ??? || orange.fr || || under tests&lt;br /&gt;
|-&lt;br /&gt;
| Germany || E-Plus || BASE (and others?) || internet.eplus.de || eplus gprs ||&lt;br /&gt;
|-&lt;br /&gt;
| Germany || T-Mobile ||  || internet.t-mobile || ||&lt;br /&gt;
|-&lt;br /&gt;
| Germany || Vodafone || Any, behind NAT || web.vodafone.de || ||&lt;br /&gt;
|-&lt;br /&gt;
| New Zealand || Vodafone || Any || live.vodafone.com || phone number = *99***2# ||&lt;br /&gt;
|-&lt;br /&gt;
| Norway || Netcom || Any || internet.netcom.no || ||&lt;br /&gt;
|-&lt;br /&gt;
| Norway || Telenor || Any || telenor || ||&lt;br /&gt;
|-&lt;br /&gt;
| Switzerland || Swisscom || e.g. Natel Basic Liberty, behind NAT || gprs.swisscom.ch || ||&lt;br /&gt;
|-&lt;br /&gt;
| UK || T-Mobile|| || general.t-mobile.uk || ||&lt;br /&gt;
|-&lt;br /&gt;
| UK || Virgin || || goto.virginmobile.uk || user ||&lt;br /&gt;
|-&lt;br /&gt;
| UK || [http://www.filesaveas.com/gprs.html other providers] || || || ||&lt;br /&gt;
|-&lt;br /&gt;
| USA || Cingular (AT&amp;amp;T) || Less than full internet || wap.cingular || ||&lt;br /&gt;
|-&lt;br /&gt;
| USA || T-mobile || Anything less than full internet || wap.voicestream.com || ||&lt;br /&gt;
|- &lt;br /&gt;
| USA || T-mobile || Regular internet plan || internet2.voicestream.com || || [[T-Mobile pppd scripts]]&lt;br /&gt;
|- &lt;br /&gt;
| USA || T-mobile || &amp;quot;VPN&amp;quot; internet plan || internet3.voicestream.com || ||&lt;br /&gt;
|- &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[1] connected through a WAP proxy (slower, but the only way to access Vodafone live! and SFR portal)&lt;br /&gt;
&lt;br /&gt;
== Starting pppd automatically ==&lt;br /&gt;
&lt;br /&gt;
Once you have finished debugging your gprs-connect-chat and gprs options files, you may wish to automatically connect whenever needed and hang up when finished.  Make sure you understand the impact of this change to your carrier plan billing.  This is not recommended unless you have a large-use or unlimited data plan.  These scripts do NOT prompt you before connecting.&lt;br /&gt;
&lt;br /&gt;
=== On-demand connection settings ===&lt;br /&gt;
&lt;br /&gt;
Additional settings are needed if you want the actual connection to be up only while there is traffic. In the 'gprs' file above, insert the following, making sure 'nodetach' is commented out.  If 'nodetach' is on, the boot process will stop when it starts pppd. Also remove the option 'persist' mentioned above.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Wait until needed before connecting&lt;br /&gt;
demand&lt;br /&gt;
&lt;br /&gt;
# Disconnect if idle for given amount of seconds&lt;br /&gt;
idle 20&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Start on boot (method 1) ===&lt;br /&gt;
&lt;br /&gt;
Add the following definition to /etc/network/interfaces:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
auto ppp0&lt;br /&gt;
iface ppp0 inet ppp&lt;br /&gt;
        provider gprs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That should be it. Now you can use 'ifup ppp0' and 'ifdown ppp0' manually too.&lt;br /&gt;
&lt;br /&gt;
=== Start on boot (method 2) ===&lt;br /&gt;
&lt;br /&gt;
Create the following file as /etc/ppp/ppp_on_boot (needs chmod +x).  The /etc/init.d/ppp script will call it to set up the daemon.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
#&lt;br /&gt;
#   Rename this file to ppp_on_boot and pppd will be fired up as&lt;br /&gt;
#   soon as the system comes up, connecting to `provider'.&lt;br /&gt;
#&lt;br /&gt;
#   If you also make this file executable, and replace the first line&lt;br /&gt;
#   with just &amp;quot;#!/bin/sh&amp;quot;, the commands below will be executed instead.&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
# The location of the ppp daemon itself (shouldn't need to be changed)&lt;br /&gt;
PPPD=/usr/sbin/pppd&lt;br /&gt;
&lt;br /&gt;
# The default provider to connect to&lt;br /&gt;
$PPPD call gprs&lt;br /&gt;
&lt;br /&gt;
# Additional connections, which would just use settings from&lt;br /&gt;
# /etc/ppp/options.&amp;lt;tty&amp;gt;&lt;br /&gt;
#$PPPD ttyS0&lt;br /&gt;
#$PPPD ttyS1&lt;br /&gt;
#$PPPD ttyS2&lt;br /&gt;
#$PPPD ttyS3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Finally, you need to add the /etc/init.d/ppp script to the init process by creating symbolic links from the appropriate directories.  I chose the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/etc/rc0.d/K25ppp&lt;br /&gt;
/etc/rc1.d/K45ppp&lt;br /&gt;
/etc/rc2.d/S45ppp&lt;br /&gt;
/etc/rc3.d/S45ppp&lt;br /&gt;
/etc/rc4.d/S45ppp&lt;br /&gt;
/etc/rc5.d/S45ppp&lt;br /&gt;
/etc/rc6.d/K25ppp&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[pppd]]&lt;br /&gt;
* [[Manually using GSM]]&lt;br /&gt;
* [[Manually using Bluetooth]]&lt;br /&gt;
&lt;br /&gt;
{{Languages|Manually_using_GPRS}}&lt;br /&gt;
[[Category:Documentation]]&lt;br /&gt;
[[Category:Developer software]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Guides]]&lt;/div&gt;</summary>
		<author><name>Cheetah100</name></author>	</entry>

	</feed>