<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.webos-internals.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Robertjw</id>
	<title>WebOS Internals - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.webos-internals.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Robertjw"/>
	<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/wiki/Special:Contributions/Robertjw"/>
	<updated>2026-04-16T19:13:05Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.1</generator>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=MojoSDK_on_Fedora&amp;diff=12666</id>
		<title>MojoSDK on Fedora</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=MojoSDK_on_Fedora&amp;diff=12666"/>
		<updated>2011-01-11T20:14:05Z</updated>

		<summary type="html">&lt;p&gt;Robertjw: Updated links and comments for Fedora 14&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Installing the Mojo SDK on Fedora==&lt;br /&gt;
This guide describes how to install the Mojo SDK and Novacom Debian files provided by Palm on a Fedora system.  The procedure described is an extension of the post by mtk on the TreoCentral forums[http://discussion.treocentral.com/web-os-development/197540-mojo-sdk-novacom-packages-easy-install-hand-fedora.html].  It is current as of Fedora 14 and palm-sdk_1.4.5-svn307799-sdk1457-pho465.&lt;br /&gt;
&lt;br /&gt;
Commands shown in this guide use the standard notation for indicating which can be run as the normal user and which must be run as root: commands preceded by &amp;quot;#&amp;quot; are to be run as root, whereas those preceded by &amp;quot;$&amp;quot; are to be run as the normal user.&lt;br /&gt;
&lt;br /&gt;
===Install VirtualBox===&lt;br /&gt;
VirtualBox is available from [http://rpmfusion.org/ RPM Fusion].  Install VirtualBox and load the kernel modules:&lt;br /&gt;
 # yum install VirtualBox-OSE&lt;br /&gt;
 # /etc/sysconfig/modules/VirtualBox-OSE.modules&lt;br /&gt;
&lt;br /&gt;
===Install the Mojo SDK===&lt;br /&gt;
Download the Ubuntu deb package of the Mojo SDK from [http://developer.palm.com/index.php?option=com_content&amp;amp;view=article&amp;amp;id=1585 the Official PalmSDK Linux Page].  deb files are simple archives that can be extracted using ar:&lt;br /&gt;
 $ ar xv palm-sdk_1.4.5-svn307799-sdk1457-pho465_i386.deb&lt;br /&gt;
&lt;br /&gt;
Extract the contents of data.tar.gz and move them to their respective locations in your filesystem:&lt;br /&gt;
 $ tar -zxvf data.tar.gz&lt;br /&gt;
 # mv opt/PalmSDK /opt/.&lt;br /&gt;
 # mv usr/local/bin/* /usr/local/bin/.&lt;br /&gt;
 # mv usr/share/doc/palm-sdk /usr/share/doc/.&lt;br /&gt;
&lt;br /&gt;
Extract the contents of control.tar.gz and run the post-install script:&lt;br /&gt;
 $ tar -zxvf control.tar.gz&lt;br /&gt;
 # ./postinst&lt;br /&gt;
&lt;br /&gt;
Optionally clean up the extracted files:&lt;br /&gt;
 $ rm -fr debian-binary data.tar.gz control.tar.gz opt/ usr/ control md5sums postinst&lt;br /&gt;
&lt;br /&gt;
===Install Novacom===&lt;br /&gt;
The installation of the Novacom tool is almost identical to that of the Mojo SDK.  Start by downloading the Ubuntu deb package of from [http://developer.palm.com/index.php?option=com_content&amp;amp;view=article&amp;amp;id=1585 the Official PalmSDK Linux Page].&lt;br /&gt;
&lt;br /&gt;
Extract the archive:&lt;br /&gt;
 $ ar xv palm-novacom_1.0.46_i386.deb &lt;br /&gt;
&lt;br /&gt;
Extract the contents data.tar.gz and move them to their respective locations in your filesystem:&lt;br /&gt;
 $ tar -zxvf data.tar.gz&lt;br /&gt;
 # mv opt/Palm /opt/.&lt;br /&gt;
 # mv usr/local/bin/* /usr/local/bin/.&lt;br /&gt;
 # mv usr/share/doc/palm-novacom /usr/share/doc/.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' If you are using Fedora 64bit, You'll need to install the 32bit version of libusb for the Novacom driver to work.&lt;br /&gt;
 yum install libusb.i686&lt;br /&gt;
&lt;br /&gt;
Extract the contents of control.tar.gz and run the post-install script:&lt;br /&gt;
 $ tar -zxvf control.tar.gz&lt;br /&gt;
 # ./postinst&lt;br /&gt;
&lt;br /&gt;
Optionally clean up the extracted files:&lt;br /&gt;
 $ rm -fr debian-binary data.tar.gz control.tar.gz opt/ usr/ control md5sums postinst prerm postrm&lt;br /&gt;
&lt;br /&gt;
===Run the Mojo SDK===&lt;br /&gt;
The Mojo SDK should now be installed successfully.  The first launch will load it into the VirtualBox environment.  It can be launched from the command line:&lt;br /&gt;
 $ palm-emulator&lt;br /&gt;
&lt;br /&gt;
===Other Notes===&lt;br /&gt;
For development, using Eclipse and the plugins for Mojo are strongly recommended.  Installation instructions of these plugins can be found at [http://developer.palm.com/index.php?option=com_content&amp;amp;view=article&amp;amp;id=1639 the Official Palm Eclipse plugin Installation Guide]&lt;br /&gt;
&lt;br /&gt;
==Install Mojo SDK on Fedora 11 (Legacy Instructions)==&lt;br /&gt;
'''Note:''' These instructions provide an alternate method of installing the Mojo SDK on Fedora.  These are more involved and therefore might not be as easy as the previous instructions.  They are currently left here for historical reasons but may be removed in the future.&lt;br /&gt;
* Install VirtualBox RPM package available at:&lt;br /&gt;
[http://www.virtualbox.org/wiki/Linux_Downloads VirtualBox Linux Downloads]&lt;br /&gt;
&lt;br /&gt;
''NOTE: If you're running Fedora 64 bit, get the AMD64 version. ( Even if you have an Intel Processor ).&lt;br /&gt;
&lt;br /&gt;
* Install the RPM:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;rpm -ivh VirtualBox-&amp;lt;version&amp;gt;_fedora11-1.&amp;lt;platform&amp;gt;.rpm&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Download the Ubuntu deb package of the Mojo SDK from:&lt;br /&gt;
[http://developer.palm.com/index.php?option=com_content&amp;amp;view=article&amp;amp;id=1585 the Official PalmSDK Linux Page]&lt;br /&gt;
&lt;br /&gt;
* Download 'alien' package conversion tool:&lt;br /&gt;
[http://packages.debian.org/unstable/source/alien Debian Alien utility]&lt;br /&gt;
&lt;br /&gt;
''You will need RPM building packages installed for the following method:&lt;br /&gt;
* Build an RPM of alien and install it:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;rpmbuild -tb alien_&amp;lt;version&amp;gt;.tar.gz&lt;br /&gt;
rpm -ivh ~/rpmbuild/RPMS/noarch/alien-&amp;lt;version&amp;gt;.rpm&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''If rpmbuild gives an error similar to:&lt;br /&gt;
error: File /download/pre/alien_8.77.tar.gz: No such file or directory&lt;br /&gt;
&lt;br /&gt;
You'll need to extract the archive manually and edit the alien.spec file.  Inside that file, find all instances of the old version number ( in my case 8.77 ) and replace it with the version number of the file you downloaded. ( in my case, 8.78 ).  Once this is done, regenerate the tar.gz file with the following syntax:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;tar -czf alien_8.78.tar.gz alien&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Once this completes, then build and install the RPM as above.&lt;br /&gt;
&lt;br /&gt;
* Use Alien to change the .deb file into a .tgz archive (the RPM feature of alien didn't work for me):&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;alien -tc palm_mojo_sdk-Ubuntu-&amp;lt;version&amp;gt;.deb&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alien should report that the .tgz version is generated.&lt;br /&gt;
&lt;br /&gt;
* Extract the .tgz version:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;mkdir tmp&lt;br /&gt;
cd tmp&lt;br /&gt;
tar -xzf ../palm-sdk-&amp;lt;version&amp;gt;.tgz&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Copy the extracted files into place:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cp -a opt/* /opt&lt;br /&gt;
cp -a usr/* /usr&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Run the installation script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;install/doinst.sh&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The script above should add a few entries into your /etc/hosts file.&lt;br /&gt;
&lt;br /&gt;
* Download the Novacom linux drivers linked on this page:&lt;br /&gt;
[http://www.webos-internals.org/wiki/Installing_novaterm_on_ubuntu_64-bit Palm Novacom Linux Driver Wiki Page]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* This too will be a .deb.  You will convert and install it the same way you did the SDK:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;alien -tc palm-novacom_&amp;lt;version&amp;gt;_i386.deb&lt;br /&gt;
mkdir novacom&lt;br /&gt;
cd novacom&lt;br /&gt;
tar -xzf ../palm-novacom-&amp;lt;version&amp;gt;.tgz&lt;br /&gt;
cd novacom&lt;br /&gt;
cp -a opt/* /opt&lt;br /&gt;
cp -a usr/* /usr&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''NOTE: If you are using Fedora 64bit, You'll need to install the 32bit version of libusb for the novacom driver to work.&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;yum install libusb.i586&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Copy the novacomd-upstart script into place:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cp /opt/Palm/novacom/novacomd-upstart /etc/event.d/palm-novacomd&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Start the novacomd driver:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;start palm-novacomd&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* As your normal user account, launch the emulator.  The first launch will install it into VirtualBox.&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;/opt/PalmSDK/Current/bin/palm-emulator&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''For development, you should strongly consider using Eclipse and the plugins for Mojo.  Installation instructions of these plugins can be found at:&lt;br /&gt;
[http://developer.palm.com/index.php?option=com_content&amp;amp;view=article&amp;amp;id=1639 Official Palm Eclipse plugin Installation Guide]&lt;/div&gt;</summary>
		<author><name>Robertjw</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=MojoSDK_on_Fedora&amp;diff=12665</id>
		<title>MojoSDK on Fedora</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=MojoSDK_on_Fedora&amp;diff=12665"/>
		<updated>2011-01-11T19:39:55Z</updated>

		<summary type="html">&lt;p&gt;Robertjw: Updated for Fedora 14&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Installing the Mojo SDK on Fedora==&lt;br /&gt;
This guide describes how to install the Mojo SDK and Novacom Debian files provided by Palm on a Fedora system.  The procedure described is an extension of the post by mtk on the TreoCentral forums[http://discussion.treocentral.com/web-os-development/197540-mojo-sdk-novacom-packages-easy-install-hand-fedora.html].  It is current as of Fedora 12 and palm-sdk 1.3.1-svn222348-sdk100-pho314.&lt;br /&gt;
&lt;br /&gt;
Commands shown in this guide use the standard notation for indicating which can be run as the normal user and which must be run as root: commands preceded by &amp;quot;#&amp;quot; are to be run as root, whereas those preceded by &amp;quot;$&amp;quot; are to be run as the normal user.&lt;br /&gt;
&lt;br /&gt;
===Install VirtualBox===&lt;br /&gt;
VirtualBox is available from [http://rpmfusion.org/ RPM Fusion].  Install VirtualBox and load the kernel modules:&lt;br /&gt;
 # yum install VirtualBox-OSE&lt;br /&gt;
 # /etc/sysconfig/modules/VirtualBox-OSE.modules&lt;br /&gt;
&lt;br /&gt;
===Install the Mojo SDK===&lt;br /&gt;
Download the Ubuntu deb package of the Mojo SDK from [http://developer.palm.com/index.php?option=com_sdkdownload&amp;amp;view=home the Official PalmSDK Page].  deb files are simple archives that can be extracted using ar:&lt;br /&gt;
 $ ar xv palm-sdk_1.3.1-svn222348-sdk100-pho314_i386.deb&lt;br /&gt;
&lt;br /&gt;
Extract the contents of data.tar.gz and move them to their respective locations in your filesystem:&lt;br /&gt;
 $ tar -zxvf data.tar.gz&lt;br /&gt;
 # mv opt/PalmSDK /opt/.&lt;br /&gt;
 # mv usr/local/bin/* /usr/local/bin/.&lt;br /&gt;
 # mv usr/share/doc/palm-sdk /usr/share/doc/.&lt;br /&gt;
&lt;br /&gt;
Extract the contents of control.tar.gz and run the post-install script:&lt;br /&gt;
 $ tar -zxvf control.tar.gz&lt;br /&gt;
 # ./postinst&lt;br /&gt;
&lt;br /&gt;
Optionally clean up the extracted files:&lt;br /&gt;
 $ rm -fr debian-binary data.tar.gz control.tar.gz opt/ usr/ control md5sums postinst&lt;br /&gt;
&lt;br /&gt;
===Install Novacom===&lt;br /&gt;
The installation of the Novacom tool is almost identical to that of the Mojo SDK.  Start by downloading the Ubuntu deb package of from [http://developer.palm.com/index.php?option=com_sdkdownload&amp;amp;view=home the Official PalmSDK Page].  (Or get the 1.4.5.465 version from [http://cdn.downloads.palm.com/sdkdownloads/1.4.5.465/sdkBinaries/palm-novacom_1.0.56_i386.deb here]).  This procedure has been verified on Fedora 14.&lt;br /&gt;
&lt;br /&gt;
Extract the archive:&lt;br /&gt;
 $ ar xv palm-novacom_1.0.56_i386.deb &lt;br /&gt;
&lt;br /&gt;
Extract the contents data.tar.gz and move them to their respective locations in your filesystem:&lt;br /&gt;
 $ tar -zxvf data.tar.gz&lt;br /&gt;
 # mv opt/Palm /opt/.&lt;br /&gt;
 # mv usr/local/bin/* /usr/local/bin/.&lt;br /&gt;
 # mv usr/share/doc/palm-novacom /usr/share/doc/.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' If you are using Fedora 64bit, You'll need to install the 32bit version of libusb for the Novacom driver to work.&lt;br /&gt;
 yum install libusb.i686&lt;br /&gt;
&lt;br /&gt;
Extract the contents of control.tar.gz and run the post-install script:&lt;br /&gt;
 $ tar -zxvf control.tar.gz&lt;br /&gt;
 # ./postinst&lt;br /&gt;
&lt;br /&gt;
Optionally clean up the extracted files:&lt;br /&gt;
 $ rm -fr debian-binary data.tar.gz control.tar.gz opt/ usr/ control md5sums postinst prerm postrm&lt;br /&gt;
&lt;br /&gt;
===Run the Mojo SDK===&lt;br /&gt;
The Mojo SDK should now be installed successfully.  The first launch will load it into the VirtualBox environment.  It can be launched from the command line:&lt;br /&gt;
 $ palm-emulator&lt;br /&gt;
&lt;br /&gt;
===Other Notes===&lt;br /&gt;
For development, using Eclipse and the plugins for Mojo are strongly recommended.  Installation instructions of these plugins can be found at [http://developer.palm.com/index.php?option=com_content&amp;amp;view=article&amp;amp;id=1639 the Official Palm Eclipse plugin Installation Guide]&lt;br /&gt;
&lt;br /&gt;
==Install Mojo SDK on Fedora 11 (Legacy Instructions)==&lt;br /&gt;
'''Note:''' These instructions provide an alternate method of installing the Mojo SDK on Fedora.  These are more involved and therefore might not be as easy as the previous instructions.  They are currently left here for historical reasons but may be removed in the future.&lt;br /&gt;
* Install VirtualBox RPM package available at:&lt;br /&gt;
[http://www.virtualbox.org/wiki/Linux_Downloads VirtualBox Linux Downloads]&lt;br /&gt;
&lt;br /&gt;
''NOTE: If you're running Fedora 64 bit, get the AMD64 version. ( Even if you have an Intel Processor ).&lt;br /&gt;
&lt;br /&gt;
* Install the RPM:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;rpm -ivh VirtualBox-&amp;lt;version&amp;gt;_fedora11-1.&amp;lt;platform&amp;gt;.rpm&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Download the Ubuntu deb package of the Mojo SDK from:&lt;br /&gt;
[http://developer.palm.com/index.php?option=com_sdkdownload&amp;amp;view=home Official PalmSDK Page]&lt;br /&gt;
&lt;br /&gt;
* Download 'alien' package conversion tool:&lt;br /&gt;
[http://packages.debian.org/unstable/source/alien Debian Alien utility]&lt;br /&gt;
&lt;br /&gt;
''You will need RPM building packages installed for the following method:&lt;br /&gt;
* Build an RPM of alien and install it:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;rpmbuild -tb alien_&amp;lt;version&amp;gt;.tar.gz&lt;br /&gt;
rpm -ivh ~/rpmbuild/RPMS/noarch/alien-&amp;lt;version&amp;gt;.rpm&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''If rpmbuild gives an error similar to:&lt;br /&gt;
error: File /download/pre/alien_8.77.tar.gz: No such file or directory&lt;br /&gt;
&lt;br /&gt;
You'll need to extract the archive manually and edit the alien.spec file.  Inside that file, find all instances of the old version number ( in my case 8.77 ) and replace it with the version number of the file you downloaded. ( in my case, 8.78 ).  Once this is done, regenerate the tar.gz file with the following syntax:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;tar -czf alien_8.78.tar.gz alien&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Once this completes, then build and install the RPM as above.&lt;br /&gt;
&lt;br /&gt;
* Use Alien to change the .deb file into a .tgz archive (the RPM feature of alien didn't work for me):&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;alien -tc palm_mojo_sdk-Ubuntu-&amp;lt;version&amp;gt;.deb&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alien should report that the .tgz version is generated.&lt;br /&gt;
&lt;br /&gt;
* Extract the .tgz version:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;mkdir tmp&lt;br /&gt;
cd tmp&lt;br /&gt;
tar -xzf ../palm-sdk-&amp;lt;version&amp;gt;.tgz&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Copy the extracted files into place:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cp -a opt/* /opt&lt;br /&gt;
cp -a usr/* /usr&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Run the installation script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;install/doinst.sh&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The script above should add a few entries into your /etc/hosts file.&lt;br /&gt;
&lt;br /&gt;
* Download the Novacom linux drivers linked on this page:&lt;br /&gt;
[http://www.webos-internals.org/wiki/Installing_novaterm_on_ubuntu_64-bit Palm Novacom Linux Driver Wiki Page]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* This too will be a .deb.  You will convert and install it the same way you did the SDK:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;alien -tc palm-novacom_&amp;lt;version&amp;gt;_i386.deb&lt;br /&gt;
mkdir novacom&lt;br /&gt;
cd novacom&lt;br /&gt;
tar -xzf ../palm-novacom-&amp;lt;version&amp;gt;.tgz&lt;br /&gt;
cd novacom&lt;br /&gt;
cp -a opt/* /opt&lt;br /&gt;
cp -a usr/* /usr&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''NOTE: If you are using Fedora 64bit, You'll need to install the 32bit version of libusb for the novacom driver to work.&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;yum install libusb.i586&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Copy the novacomd-upstart script into place:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cp /opt/Palm/novacom/novacomd-upstart /etc/event.d/palm-novacomd&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Start the novacomd driver:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;start palm-novacomd&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* As your normal user account, launch the emulator.  The first launch will install it into VirtualBox.&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;/opt/PalmSDK/Current/bin/palm-emulator&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''For development, you should strongly consider using Eclipse and the plugins for Mojo.  Installation instructions of these plugins can be found at:&lt;br /&gt;
[http://developer.palm.com/index.php?option=com_content&amp;amp;view=article&amp;amp;id=1639 Official Palm Eclipse plugin Installation Guide]&lt;/div&gt;</summary>
		<author><name>Robertjw</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=WLAN&amp;diff=7191</id>
		<title>WLAN</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=WLAN&amp;diff=7191"/>
		<updated>2009-11-16T16:45:50Z</updated>

		<summary type="html">&lt;p&gt;Robertjw: /* Information about a Linux Kernel module */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= WLAN / WIFI=&lt;br /&gt;
&lt;br /&gt;
== Marvell 88W8686 chipset (connected over SDIO) ==&lt;br /&gt;
&lt;br /&gt;
* http://i.cmpnet.com/eetimes/eedesign/2009/image5_060709.jpg&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
=== Information about a Linux Kernel module ===&lt;br /&gt;
 modinfo sd8xxx&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 filename:       /lib/modules/2.6.24-palm-joplin-3430/kernel/net/wifi/sd8xxx.ko&lt;br /&gt;
 license:        GPL&lt;br /&gt;
 author:         Marvell International Ltd.&lt;br /&gt;
 description:    M-WLAN Driver&lt;br /&gt;
 srcversion:     533BB7E5866E52F63B9ACCB&lt;br /&gt;
 depends:&lt;br /&gt;
 vermagic:       2.6.24-palm-joplin-3430 mod_unload ARMv7&lt;br /&gt;
 parm:           param_sd_slot_selector:int&lt;br /&gt;
 parm:           param_sdio_bus_width:int&lt;br /&gt;
 parm:           param_use_sdio_irq:int&lt;br /&gt;
 parm:           helper_name:charp&lt;br /&gt;
 parm:           fw_name:charp&lt;br /&gt;
 parm:           mfgmode:int&lt;br /&gt;
&lt;br /&gt;
The sd8xxx driver is open source (although it requires proprietary firmware) and available under the GPL.&lt;br /&gt;
But why is it not on palm's open source packages site? Where is the source?&lt;br /&gt;
Didn't find it under http://opensource.palm.com/1.1.3/index.html&lt;br /&gt;
&lt;br /&gt;
The original Marvell GPL sources are published in this download:  http://www.marvell.com/drivers/driverDisplay.do?driverId=203 however the palm modifications to these sources do not appear to be published.&lt;br /&gt;
&lt;br /&gt;
=== Exploring the /proc/net/wlan=== &lt;br /&gt;
 cat /proc/net/wlan/info&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 driver_name = &amp;quot;wlan&amp;quot;&lt;br /&gt;
 driver_version = sd8686-9.15.14-26409.p62-(FP4)&lt;br /&gt;
 InterfaceName=&amp;quot;eth0&amp;quot;&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Exploring Kernel configuration ===&lt;br /&gt;
 cat /boot/config-2.6.24-palm-joplin-3430&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 [...]&lt;br /&gt;
 #&lt;br /&gt;
 # Wireless LAN&lt;br /&gt;
 #&lt;br /&gt;
 # CONFIG_WLAN_PRE80211 is not set&lt;br /&gt;
 CONFIG_WLAN_80211=y&lt;br /&gt;
 # CONFIG_LIBERTAS is not set&lt;br /&gt;
 # CONFIG_USB_ZD1201 is not set&lt;br /&gt;
 # CONFIG_HOSTAP is not set&lt;br /&gt;
 [...]&lt;br /&gt;
&lt;br /&gt;
CONFIG_LIBERTAS is not set ???&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==libertas==&lt;br /&gt;
* http://wireless.kernel.org/en/users/Drivers/libertas&lt;br /&gt;
* http://lists.infradead.org/pipermail/libertas-dev/&lt;br /&gt;
Why don't they use libertas ???&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Firmware==&lt;br /&gt;
&lt;br /&gt;
 md5sum /lib/firmware/*.bin&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 2a4d8f4df198ce949c350df5674f4ac6  /lib/firmware/helper_sd.bin&lt;br /&gt;
 83006642f0ae4d6e9af89f6c852327c2  /lib/firmware/mfg_sd8686.bin&lt;br /&gt;
 261d6ed255f2cc9f5bad014b2234b8cd  /lib/firmware/sd8686.bin&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Firmware from: http://www.marvell.com/drivers/driverDisplay.do?driverId=203&lt;br /&gt;
&lt;br /&gt;
 md5sum FwImage/*.bin&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 2a4d8f4df198ce949c350df5674f4ac6  FwImage/helper_sd.bin&lt;br /&gt;
 3025de2a1ed575fd691958d7da341d8b  FwImage/sd8686.bin&lt;/div&gt;</summary>
		<author><name>Robertjw</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=WLAN&amp;diff=7190</id>
		<title>WLAN</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=WLAN&amp;diff=7190"/>
		<updated>2009-11-16T16:26:56Z</updated>

		<summary type="html">&lt;p&gt;Robertjw: /* Information about a Linux Kernel module */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= WLAN / WIFI=&lt;br /&gt;
&lt;br /&gt;
== Marvell 88W8686 chipset (connected over SDIO) ==&lt;br /&gt;
&lt;br /&gt;
* http://i.cmpnet.com/eetimes/eedesign/2009/image5_060709.jpg&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
=== Information about a Linux Kernel module ===&lt;br /&gt;
 modinfo sd8xxx&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 filename:       /lib/modules/2.6.24-palm-joplin-3430/kernel/net/wifi/sd8xxx.ko&lt;br /&gt;
 license:        GPL&lt;br /&gt;
 author:         Marvell International Ltd.&lt;br /&gt;
 description:    M-WLAN Driver&lt;br /&gt;
 srcversion:     533BB7E5866E52F63B9ACCB&lt;br /&gt;
 depends:&lt;br /&gt;
 vermagic:       2.6.24-palm-joplin-3430 mod_unload ARMv7&lt;br /&gt;
 parm:           param_sd_slot_selector:int&lt;br /&gt;
 parm:           param_sdio_bus_width:int&lt;br /&gt;
 parm:           param_use_sdio_irq:int&lt;br /&gt;
 parm:           helper_name:charp&lt;br /&gt;
 parm:           fw_name:charp&lt;br /&gt;
 parm:           mfgmode:int&lt;br /&gt;
&lt;br /&gt;
The sd8xxx driver is open source (although it requires proprietary firmware) and available under the GPL.&lt;br /&gt;
But why is it not on palm's open source packages site? Where is the source?&lt;br /&gt;
Didn't find it under http://opensource.palm.com/1.1.3/index.html&lt;br /&gt;
&lt;br /&gt;
=== Exploring the /proc/net/wlan=== &lt;br /&gt;
 cat /proc/net/wlan/info&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 driver_name = &amp;quot;wlan&amp;quot;&lt;br /&gt;
 driver_version = sd8686-9.15.14-26409.p62-(FP4)&lt;br /&gt;
 InterfaceName=&amp;quot;eth0&amp;quot;&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Exploring Kernel configuration ===&lt;br /&gt;
 cat /boot/config-2.6.24-palm-joplin-3430&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 [...]&lt;br /&gt;
 #&lt;br /&gt;
 # Wireless LAN&lt;br /&gt;
 #&lt;br /&gt;
 # CONFIG_WLAN_PRE80211 is not set&lt;br /&gt;
 CONFIG_WLAN_80211=y&lt;br /&gt;
 # CONFIG_LIBERTAS is not set&lt;br /&gt;
 # CONFIG_USB_ZD1201 is not set&lt;br /&gt;
 # CONFIG_HOSTAP is not set&lt;br /&gt;
 [...]&lt;br /&gt;
&lt;br /&gt;
CONFIG_LIBERTAS is not set ???&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==libertas==&lt;br /&gt;
* http://wireless.kernel.org/en/users/Drivers/libertas&lt;br /&gt;
* http://lists.infradead.org/pipermail/libertas-dev/&lt;br /&gt;
Why don't they use libertas ???&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Firmware==&lt;br /&gt;
&lt;br /&gt;
 md5sum /lib/firmware/*.bin&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 2a4d8f4df198ce949c350df5674f4ac6  /lib/firmware/helper_sd.bin&lt;br /&gt;
 83006642f0ae4d6e9af89f6c852327c2  /lib/firmware/mfg_sd8686.bin&lt;br /&gt;
 261d6ed255f2cc9f5bad014b2234b8cd  /lib/firmware/sd8686.bin&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Firmware from: http://www.marvell.com/drivers/driverDisplay.do?driverId=203&lt;br /&gt;
&lt;br /&gt;
 md5sum FwImage/*.bin&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 2a4d8f4df198ce949c350df5674f4ac6  FwImage/helper_sd.bin&lt;br /&gt;
 3025de2a1ed575fd691958d7da341d8b  FwImage/sd8686.bin&lt;/div&gt;</summary>
		<author><name>Robertjw</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Research_Pre_GSM_Modem_Protocol&amp;diff=7085</id>
		<title>Research Pre GSM Modem Protocol</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Research_Pre_GSM_Modem_Protocol&amp;diff=7085"/>
		<updated>2009-11-10T22:08:44Z</updated>

		<summary type="html">&lt;p&gt;Robertjw: /* Escaping */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Here we are collecting informations about the modem protocol. At the moment all the research is done on the european UMTS version of the Palm Pre. The CDMA version is likely to be pretty similar to the UMTS variant with regards to the protocol.&lt;br /&gt;
&lt;br /&gt;
What we are doing to get used to the protocol is to strace the different applications that talk to the modem and log everything that goes over /dev/modemuart to the actual modem. From this wire protocol traces we are working backwards to the actual protocol and packet format.&lt;br /&gt;
&lt;br /&gt;
=== Packet Start ===&lt;br /&gt;
&lt;br /&gt;
A new packet starts with: '''0xFA''' (This may be an address instead as rfc1662 uses only one flag for frame separation). &lt;br /&gt;
&lt;br /&gt;
As we found out that the CRC is calculated even over the flag '''0xFA''' and with assuming that the basic for the protocol is HDLC we can say that 0xFA is not the starting flag of the frame. It should be an adress if we have a real implemenation of HDLC that follows the rfc.&lt;br /&gt;
&lt;br /&gt;
=== Packet End ===&lt;br /&gt;
&lt;br /&gt;
A packet ends with: '''0x7E'''&lt;br /&gt;
&lt;br /&gt;
=== Escaping ===&lt;br /&gt;
&lt;br /&gt;
For the packet end marker there is an escaping sequence inside the packet. It is used '''0x7D 0x5E''' instead. Therefore '''0x7D''' is escaped as '''0x7D  0x5D''' as well.&lt;br /&gt;
&lt;br /&gt;
=== Header ===&lt;br /&gt;
&lt;br /&gt;
No informations about the header format have been gathered yet.&lt;br /&gt;
&lt;br /&gt;
=== Payload ===&lt;br /&gt;
&lt;br /&gt;
No informations about the payload format have been gathered yet.&lt;br /&gt;
&lt;br /&gt;
=== Checksum ===&lt;br /&gt;
&lt;br /&gt;
The last two bytes before the packet ending marker are a CRC16-FCS checksum. (See rfc1662 for polynom and table)&lt;br /&gt;
&lt;br /&gt;
=== Similarity to RFC1662 ===&lt;br /&gt;
&lt;br /&gt;
The usage of CRC-16-FCS but even more the frame boundary packet as well as the escaping for it looks similar to what we found about this protocol. Even a grep -i HDLC over the binary firmware image reports the usage of PPP and HDLC as communication protocol format. So we can be almost sureley that HDLC+PPP is used.&lt;br /&gt;
&lt;br /&gt;
http://tools.ietf.org/html/rfc1662&lt;br /&gt;
&lt;br /&gt;
=== Identified byte sequences ===&lt;br /&gt;
* Sync Message: 0xfa 0x10 0x0&lt;br /&gt;
* Sync Response Message: 0xfa 0x30 0x0&lt;br /&gt;
* Configuration Message: 0xfa 0x30 0x00 0x1&lt;br /&gt;
* Empty Configuration Message: 0xfa 0x40 0x0&lt;br /&gt;
* Configuration Response Message: 0xfa 0x40 0x0&lt;br /&gt;
* Acknowledge Message: 0xfa 0x50 0x0&lt;br /&gt;
* SIM PIN on startup is sent with: 0xfa 0x60 0xe3 0x0f 0x0e 0x00 0x13 0x00 0x00 0x00 0x00 &amp;lt;4 ASCII digits&amp;gt; 0x00 0x00 0x00 0x00 0x00&lt;br /&gt;
* SIM PIN acknowledgement from modem: 0xfa 0x50 0x0f&lt;br /&gt;
&lt;br /&gt;
=== GPS ===&lt;br /&gt;
The [[GPS]] receiver is part of the modem in Palm Pre and all data received and sent related to location goes over the same port using the same frame coding as GSM.  GPS functionality can not be enabled (at least not using the Palm-provided drivers) until modem radio is enabled and seemingly until the modem successfully registers to the network.&lt;br /&gt;
&lt;br /&gt;
Tracing the data sent over /dev/modemuart the following hostnames can be seen being sent from the OS to the modem chip:&lt;br /&gt;
xtra1.gpsonextra.net, xtra2.gpsonextra.net, xtra3.gpsonextra.net&lt;br /&gt;
&lt;br /&gt;
They point to the RX Network's company website (rxnetwork.ca) that claims to provide better geolocation by combining GPS, wifi signals, GSM CellID and live reports downloaded over GPRS.  The modem downloads the following files:&lt;br /&gt;
http://xtra1.gpsonextra.net/xtra.bin, http://xtra2.gpsonextra.net/xtra.bin, http://xtra3.gpsonextra.net/xtra.bin&lt;/div&gt;</summary>
		<author><name>Robertjw</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Research_Pre_GSM_Modem_Protocol&amp;diff=7084</id>
		<title>Research Pre GSM Modem Protocol</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Research_Pre_GSM_Modem_Protocol&amp;diff=7084"/>
		<updated>2009-11-10T22:08:00Z</updated>

		<summary type="html">&lt;p&gt;Robertjw: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Here we are collecting informations about the modem protocol. At the moment all the research is done on the european UMTS version of the Palm Pre. The CDMA version is likely to be pretty similar to the UMTS variant with regards to the protocol.&lt;br /&gt;
&lt;br /&gt;
What we are doing to get used to the protocol is to strace the different applications that talk to the modem and log everything that goes over /dev/modemuart to the actual modem. From this wire protocol traces we are working backwards to the actual protocol and packet format.&lt;br /&gt;
&lt;br /&gt;
=== Packet Start ===&lt;br /&gt;
&lt;br /&gt;
A new packet starts with: '''0xFA''' (This may be an address instead as rfc1662 uses only one flag for frame separation). &lt;br /&gt;
&lt;br /&gt;
As we found out that the CRC is calculated even over the flag '''0xFA''' and with assuming that the basic for the protocol is HDLC we can say that 0xFA is not the starting flag of the frame. It should be an adress if we have a real implemenation of HDLC that follows the rfc.&lt;br /&gt;
&lt;br /&gt;
=== Packet End ===&lt;br /&gt;
&lt;br /&gt;
A packet ends with: '''0x7E'''&lt;br /&gt;
&lt;br /&gt;
=== Escaping ===&lt;br /&gt;
&lt;br /&gt;
For the packet end marker there is an escaping sequence inside the packet. It is used '''0x7D 0x5E''' instead. Therefor '''0x7D''' is escaped as '''0x7D  0x5D''' as well.&lt;br /&gt;
&lt;br /&gt;
=== Header ===&lt;br /&gt;
&lt;br /&gt;
No informations about the header format have been gathered yet.&lt;br /&gt;
&lt;br /&gt;
=== Payload ===&lt;br /&gt;
&lt;br /&gt;
No informations about the payload format have been gathered yet.&lt;br /&gt;
&lt;br /&gt;
=== Checksum ===&lt;br /&gt;
&lt;br /&gt;
The last two bytes before the packet ending marker are a CRC16-FCS checksum. (See rfc1662 for polynom and table)&lt;br /&gt;
&lt;br /&gt;
=== Similarity to RFC1662 ===&lt;br /&gt;
&lt;br /&gt;
The usage of CRC-16-FCS but even more the frame boundary packet as well as the escaping for it looks similar to what we found about this protocol. Even a grep -i HDLC over the binary firmware image reports the usage of PPP and HDLC as communication protocol format. So we can be almost sureley that HDLC+PPP is used.&lt;br /&gt;
&lt;br /&gt;
http://tools.ietf.org/html/rfc1662&lt;br /&gt;
&lt;br /&gt;
=== Identified byte sequences ===&lt;br /&gt;
* Sync Message: 0xfa 0x10 0x0&lt;br /&gt;
* Sync Response Message: 0xfa 0x30 0x0&lt;br /&gt;
* Configuration Message: 0xfa 0x30 0x00 0x1&lt;br /&gt;
* Empty Configuration Message: 0xfa 0x40 0x0&lt;br /&gt;
* Configuration Response Message: 0xfa 0x40 0x0&lt;br /&gt;
* Acknowledge Message: 0xfa 0x50 0x0&lt;br /&gt;
* SIM PIN on startup is sent with: 0xfa 0x60 0xe3 0x0f 0x0e 0x00 0x13 0x00 0x00 0x00 0x00 &amp;lt;4 ASCII digits&amp;gt; 0x00 0x00 0x00 0x00 0x00&lt;br /&gt;
* SIM PIN acknowledgement from modem: 0xfa 0x50 0x0f&lt;br /&gt;
&lt;br /&gt;
=== GPS ===&lt;br /&gt;
The [[GPS]] receiver is part of the modem in Palm Pre and all data received and sent related to location goes over the same port using the same frame coding as GSM.  GPS functionality can not be enabled (at least not using the Palm-provided drivers) until modem radio is enabled and seemingly until the modem successfully registers to the network.&lt;br /&gt;
&lt;br /&gt;
Tracing the data sent over /dev/modemuart the following hostnames can be seen being sent from the OS to the modem chip:&lt;br /&gt;
xtra1.gpsonextra.net, xtra2.gpsonextra.net, xtra3.gpsonextra.net&lt;br /&gt;
&lt;br /&gt;
They point to the RX Network's company website (rxnetwork.ca) that claims to provide better geolocation by combining GPS, wifi signals, GSM CellID and live reports downloaded over GPRS.  The modem downloads the following files:&lt;br /&gt;
http://xtra1.gpsonextra.net/xtra.bin, http://xtra2.gpsonextra.net/xtra.bin, http://xtra3.gpsonextra.net/xtra.bin&lt;/div&gt;</summary>
		<author><name>Robertjw</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Research_Pre_GSM_Modem_Protocol&amp;diff=7083</id>
		<title>Research Pre GSM Modem Protocol</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Research_Pre_GSM_Modem_Protocol&amp;diff=7083"/>
		<updated>2009-11-10T22:07:13Z</updated>

		<summary type="html">&lt;p&gt;Robertjw: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Here we are collecting informations about the modem protocol. At the moment all the research is done on the european UMTS version of the Palm Pre. The CDM version is likely to be pretty similar to the UMTS variant with regards to the protocol.&lt;br /&gt;
&lt;br /&gt;
What we are doing to get used to the protocol is to strace the different applications that talk to the modem and log everything that goes over /dev/modemuart to the actual modem. From this wire protocol traces we are working backwards to the actual protocol and packet format.&lt;br /&gt;
&lt;br /&gt;
=== Packet Start ===&lt;br /&gt;
&lt;br /&gt;
A new packet starts with: '''0xFA''' (This may be an address instead as rfc1662 uses only one flag for frame separation). &lt;br /&gt;
&lt;br /&gt;
As we found out that the CRC is calculated even over the flag '''0xFA''' and with assuming that the basic for the protocol is HDLC we can say that 0xFA is not the starting flag of the frame. It should be an adress if we have a real implemenation of HDLC that follows the rfc.&lt;br /&gt;
&lt;br /&gt;
=== Packet End ===&lt;br /&gt;
&lt;br /&gt;
A packet ends with: '''0x7E'''&lt;br /&gt;
&lt;br /&gt;
=== Escaping ===&lt;br /&gt;
&lt;br /&gt;
For the packet end marker there is an escaping sequence inside the packet. It is used '''0x7D 0x5E''' instead. Therefor '''0x7D''' is escaped as '''0x7D  0x5D''' as well.&lt;br /&gt;
&lt;br /&gt;
=== Header ===&lt;br /&gt;
&lt;br /&gt;
No informations about the header format have been gathered yet.&lt;br /&gt;
&lt;br /&gt;
=== Payload ===&lt;br /&gt;
&lt;br /&gt;
No informations about the payload format have been gathered yet.&lt;br /&gt;
&lt;br /&gt;
=== Checksum ===&lt;br /&gt;
&lt;br /&gt;
The last two bytes before the packet ending marker are a CRC16-FCS checksum. (See rfc1662 for polynom and table)&lt;br /&gt;
&lt;br /&gt;
=== Similarity to RFC1662 ===&lt;br /&gt;
&lt;br /&gt;
The usage of CRC-16-FCS but even more the frame boundary packet as well as the escaping for it looks similar to what we found about this protocol. Even a grep -i HDLC over the binary firmware image reports the usage of PPP and HDLC as communication protocol format. So we can be almost sureley that HDLC+PPP is used.&lt;br /&gt;
&lt;br /&gt;
http://tools.ietf.org/html/rfc1662&lt;br /&gt;
&lt;br /&gt;
=== Identified byte sequences ===&lt;br /&gt;
* Sync Message: 0xfa 0x10 0x0&lt;br /&gt;
* Sync Response Message: 0xfa 0x30 0x0&lt;br /&gt;
* Configuration Message: 0xfa 0x30 0x00 0x1&lt;br /&gt;
* Empty Configuration Message: 0xfa 0x40 0x0&lt;br /&gt;
* Configuration Response Message: 0xfa 0x40 0x0&lt;br /&gt;
* Acknowledge Message: 0xfa 0x50 0x0&lt;br /&gt;
* SIM PIN on startup is sent with: 0xfa 0x60 0xe3 0x0f 0x0e 0x00 0x13 0x00 0x00 0x00 0x00 &amp;lt;4 ASCII digits&amp;gt; 0x00 0x00 0x00 0x00 0x00&lt;br /&gt;
* SIM PIN acknowledgement from modem: 0xfa 0x50 0x0f&lt;br /&gt;
&lt;br /&gt;
=== GPS ===&lt;br /&gt;
The [[GPS]] receiver is part of the modem in Palm Pre and all data received and sent related to location goes over the same port using the same frame coding as GSM.  GPS functionality can not be enabled (at least not using the Palm-provided drivers) until modem radio is enabled and seemingly until the modem successfully registers to the network.&lt;br /&gt;
&lt;br /&gt;
Tracing the data sent over /dev/modemuart the following hostnames can be seen being sent from the OS to the modem chip:&lt;br /&gt;
xtra1.gpsonextra.net, xtra2.gpsonextra.net, xtra3.gpsonextra.net&lt;br /&gt;
&lt;br /&gt;
They point to the RX Network's company website (rxnetwork.ca) that claims to provide better geolocation by combining GPS, wifi signals, GSM CellID and live reports downloaded over GPRS.  The modem downloads the following files:&lt;br /&gt;
http://xtra1.gpsonextra.net/xtra.bin, http://xtra2.gpsonextra.net/xtra.bin, http://xtra3.gpsonextra.net/xtra.bin&lt;/div&gt;</summary>
		<author><name>Robertjw</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Patch_webOS_GPS_Tracking&amp;diff=7082</id>
		<title>Patch webOS GPS Tracking</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Patch_webOS_GPS_Tracking&amp;diff=7082"/>
		<updated>2009-11-10T21:58:03Z</updated>

		<summary type="html">&lt;p&gt;Robertjw: /* Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{template:patch}}&lt;br /&gt;
Here is my super happy awesome tracker script!&lt;br /&gt;
&lt;br /&gt;
== Script code ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
SECRET=make up any secret code here&lt;br /&gt;
DEST=put your e-mail address here&lt;br /&gt;
&lt;br /&gt;
track()&lt;br /&gt;
{&lt;br /&gt;
        export IFS=$'\n'&lt;br /&gt;
        for loc in $(luna-send -n 3 palm://com.palm.location/startTracking '{&amp;quot;appId&amp;quot;: &amp;quot;ILovePalm&amp;quot;, &amp;quot;subscribe&amp;quot;: true}' 2&amp;gt;&amp;amp;1); do&lt;br /&gt;
                send $(echo $loc|cut -f3- -d,)&lt;br /&gt;
        done&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
send()&lt;br /&gt;
{&lt;br /&gt;
        echo &amp;quot;Sending Message: $1&amp;quot;&lt;br /&gt;
        msg=$(echo $1| sed s/\&amp;quot;/\\\\\&amp;quot;/g)&lt;br /&gt;
        luna-send -n 1 palm://com.palm.messaging/sendMessageFromCompose '{&amp;quot;recipientJSONArray&amp;quot;: [{&amp;quot;value&amp;quot;: &amp;quot;'${DEST}'&amp;quot;, &amp;quot;contactDisplay&amp;quot;: &amp;quot;'${DEST}'&amp;quot;, &amp;quot;prefix&amp;quot;: &amp;quot;to$A&amp;quot;, &amp;quot;identifier&amp;quot;: &amp;quot;palm_anon_element_8&amp;quot;}], &amp;quot;messageText&amp;quot;: &amp;quot;'&amp;quot;$msg&amp;quot;'&amp;quot;}'&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
checkmsg()&lt;br /&gt;
{&lt;br /&gt;
        echo &amp;quot;.timeout 30000&amp;quot; &amp;gt; /tmp/trackersql&lt;br /&gt;
        cmd='SELECT messageText FROM com_palm_pim_FolderEntry WHERE timeStamp &amp;gt; (strftime(&amp;quot;%s000&amp;quot;, &amp;quot;now&amp;quot;)-600000);'&lt;br /&gt;
#       output=$(echo $cmd|sqlite3 /var/luna/data/dbdata/PalmDatabase.db3)&lt;br /&gt;
        output=$(echo $cmd|sqlite3 -init /tmp/trackersql /var/luna/data/dbdata/PalmDatabase.db3)&lt;br /&gt;
        echo $output|grep $SECRET 2&amp;gt; /dev/null &amp;gt; /dev/null&lt;br /&gt;
        status=$?&lt;br /&gt;
&lt;br /&gt;
        if [ $status = 0 ]; then&lt;br /&gt;
                track&lt;br /&gt;
        fi&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
checkmsg&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installation==&lt;br /&gt;
# mkdir -p /home/scripts&lt;br /&gt;
# Let's say you put the script in /home/scripts/track.sh&lt;br /&gt;
# rootfs_open -w&lt;br /&gt;
# Go [[Crond | here ]] to enable crond.&lt;br /&gt;
# Add the following line to /etc/cron/crontabs/root&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;*/5 * * * * /home/scripts/track.sh&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Now just send the secret code you set in the script to $YOURNUMBER@messaging.sprintpcs.com (without dollar sign but as a ten digit number with area code prefix)&lt;br /&gt;
&amp;gt; Ex: 3335554444@messaging.sprintpcs.com where 333 is your area code, and 5554444 the rest of your phone number.&lt;br /&gt;
and it will send $DEST the GPS data for the device.&lt;br /&gt;
&lt;br /&gt;
Now, just take the latitude and longitude data and generate the URL. As to the other GPS parameter data available we'll have to investigate to see if Google Maps can take those parameters and how they map to the URL. ~Robi&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
luna-send -n 1 palm://com.palm.location/getCurrentPosition {}&lt;br /&gt;
** Message: serviceResponse Handling: 2, {&amp;quot;errorCode&amp;quot;:0,&amp;quot;timestamp&amp;quot;:1.245799702311E12,&amp;quot;latitude&amp;quot;:37.48660683631897,&amp;quot;longitude&amp;quot;:-122.23269581794739,&amp;quot;horizAccuracy&amp;quot;:37.947330474853516,&amp;quot;heading&amp;quot;:178,&amp;quot;velocity&amp;quot;:0.75,&amp;quot;altitude&amp;quot;:-13,&amp;quot;vertAccuracy&amp;quot;:24}&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which means we can transpose some of that to a Google Maps link:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
http://maps.google.com/?ie=UTF8&amp;amp;q=37.48660683631897,-122.23269581794739+(Heading:%20178%0DSpeed:%200.75%20mph)&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you know more about the GPS parameters, let us know by updating the page. ~Robi&lt;br /&gt;
&lt;br /&gt;
* The velocity, altitude, and accuracy parameters are specified in meters&lt;br /&gt;
&lt;br /&gt;
* Added heading and speed parameters to the URL. If you hover over the pinpoint on the google map, you can see the information, as well as in the info window if you click on the pinpoint. -xluryan&lt;br /&gt;
&lt;br /&gt;
&amp;quot;If [ll=] is used without a query, then the map is centered at the point but no marker or info window is displayed.&amp;quot; To get around this, use q=[Lon,Lat] instead of ll=[Lon,Lat]. I changed the maps link above. -hopspitfire&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Troubleshooting Tip:''' Make sure track.sh has the correct file permissions set. To encompass all possibilities, try 'chmod 755 /home/scripts/track.sh'. You can restrict permissions later if you wish. On Windows it's probably easiest to do this through WinSCP (right click&amp;gt;Properties&amp;gt;Permissions).&lt;br /&gt;
&lt;br /&gt;
== Development Ideas==&lt;br /&gt;
1.  Send response as a google maps link that clicked on shows the phones position on a map.&lt;br /&gt;
2.  Find a way to put a hook into message reception so that messages don't have to be checked with a cron job.  Even better if the message could be intercepted before appearing on the phone, it would be a useful way to track a stolen phone.&lt;br /&gt;
3. After implementing the script that emails me every 20 minutes, it occured to me that the following would be great:&lt;br /&gt;
  3a. The ability to log the entries instead of just sending an email, and maintain a preset number of logged entries (say the last 24 entries).&lt;br /&gt;
  3b. Using the original implementation - send a message to the device to have the logged information emailed. This would show a &amp;quot;track&amp;quot; of where the device has been.&lt;br /&gt;
  3c. Control of the number of log entries, and the frequency.&lt;br /&gt;
== Another Simple Method==&lt;br /&gt;
Why not use this script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
pos=$(luna-send -n 2 palm://com.palm.location/startTracking '{&amp;quot;appId&amp;quot;: &amp;quot;ILovePalm&amp;quot;, &amp;quot;subscribe&amp;quot;: true}' 2&amp;gt;&amp;amp;1 | tail -1 | cut -d, -f4,5,8 | sed -r 's/[^-\.0-9,]//g')&lt;br /&gt;
&lt;br /&gt;
lat=$(echo $pos | cut -d, -f1)&lt;br /&gt;
lon=$(echo $pos | cut -d, -f2)&lt;br /&gt;
spd=$(echo $pos | cut -d, -f3)&lt;br /&gt;
bat=$(grep BATTERY: /var/log/messages | tail -1 | awk '{print $8}' | sed 's/%,//')&lt;br /&gt;
&lt;br /&gt;
ret=$(wget -qO- &amp;quot;http://yoursite.com/trackme/$1/requests.php?lat=$lat&amp;amp;lon=$lon&amp;amp;speed=$spd&amp;amp;batt=$bat&amp;quot; | egrep -o '[0-9]+$')&lt;br /&gt;
exit $ret&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I have a web server setup with //requests.php// taking '''//lat//''', '''//lon//''', '''//speed//''', and '''//batt//''' arguments. Then it writes them to a file. Use the data however you want. I have mine plug into a google map and show me the data.&lt;br /&gt;
&lt;br /&gt;
Just set up a cron job to call the script every 20 minutes or so. Hardly effects battery life at all :)&lt;br /&gt;
&lt;br /&gt;
Credit to ddoc for info on how to grab battery status. I would still like to find a more efficient way of grabbing battery level rather than searching through the entire message log. Though for now, it works exactly like it should.&lt;br /&gt;
&lt;br /&gt;
Here's the Method for getting battery status:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;Mojo.Service.Request('palm://com.palm.power/com/palm/power/', {method: 'batteryStatusQuery',});&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
-pEEf&lt;br /&gt;
&lt;br /&gt;
== Email a URL to open Google Maps showing location of phone.==&lt;br /&gt;
Below is a code snippet that will send an email with working URL to open Google Map and show you the location of your phone.&lt;br /&gt;
The cron job mentioned above is setup to call this script every 20 minutes on my machine...works great.  I let GMAIL archive them.&lt;br /&gt;
If the phone gets stolen, I can find it as long as it has service.&lt;br /&gt;
&lt;br /&gt;
The larger Accuracy is, the further away the coordinates output will be from your actual position.&lt;br /&gt;
&lt;br /&gt;
Added speed &amp;amp; heading to Google URL. Is there any way to have the sent messages not appear in the Text Messaging app, or to use the shell to email the output via mailx? Until I figure out a built-in mail function, you can use an alternative I'm testing that uses a server's mailx command: echo &amp;quot;$msg2&amp;quot; | /opt/bin/ssh -x user@server /bin/mailx $DEST     -hopspitfire&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;modified by wilderf353 on 09-09-01:&amp;lt;/i&amp;gt; &lt;br /&gt;
I modified the original script because the Google URL being sent was getting truncated on my phone and a few other people that posted at forums.precentral.net.  I did some testing and it looks like when you use sendMessageFromCompose, you are limited to a message with less than 136 characters. I shortened the message and added :&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;at the beginning of the script, turn on GPS if it is off&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;at the beginning of the script, turn on Location Services if it is off&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;at the end of the script, turn GPS back off, if it was off when the script started&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;at the end of the script, turn Location Services back off, if it was off when the script started&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;added altitude and altitude accuracy information to message&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;added the ability to only send the message if GPS coordinates have changed since the last run&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;added the ability to send a message on the hour even if GPS coordinates have not changed&amp;lt;/li&amp;gt; &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(NOTE: You will need to add your email address to the script)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
####### Stuff to set&lt;br /&gt;
&lt;br /&gt;
## email address to mail info to&lt;br /&gt;
DEST=johns@gmail.com&lt;br /&gt;
# example: DEST=wsmith@aol.com   (make sure you don't have any spaces)&lt;br /&gt;
&lt;br /&gt;
## send url with embedded heading/speed info&lt;br /&gt;
# we only have ~136 characters to work with. If you embed heading &amp;amp; speed info, you can't &lt;br /&gt;
# include altitude and altitude accuracy information &lt;br /&gt;
# msg_with_heading=0  (don't embed heading/speed info, but include altitude information)&lt;br /&gt;
# msg_with_heading=1  (embed heading/speed info)&lt;br /&gt;
msg_with_heading=0&lt;br /&gt;
&lt;br /&gt;
# run_only_if_diff=0, send a message every time &lt;br /&gt;
# run_only_if_diff=1, send a message only if GPS coords have changed since last run &lt;br /&gt;
run_only_if_diff=1&lt;br /&gt;
&lt;br /&gt;
# file where gps coords should  be stored until next run&lt;br /&gt;
last_gps_coord_file=/tmp/track_coords&lt;br /&gt;
&lt;br /&gt;
# use with run_only_if_diff&lt;br /&gt;
# send_every_hour=1, send a message on the hour, even if the phone hasn't moved&lt;br /&gt;
# send_every_hour=0, don't send a message on the hour&lt;br /&gt;
send_every_hour=1&lt;br /&gt;
&lt;br /&gt;
######&lt;br /&gt;
&lt;br /&gt;
# get current minute and current time&lt;br /&gt;
cur_min=$(date +&amp;quot;%M&amp;quot;)&lt;br /&gt;
now=$(date +&amp;quot;%D %R&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
# The GPS should be turned on to get an accurate fix...otherwise you get the tower location&lt;br /&gt;
# Is the GPS turned on? &lt;br /&gt;
$(luna-send -n 1 palm://com.palm.location/getUseGps '{}' 2&amp;gt;&amp;amp;1 | grep 'true' &amp;gt; /dev/null)&lt;br /&gt;
grep_ret=$?&lt;br /&gt;
if [ $grep_ret -eq 0 ]        # Test exit status of &amp;quot;grep&amp;quot; command.&lt;br /&gt;
then&lt;br /&gt;
   # gps is on&lt;br /&gt;
   gps_on=1&lt;br /&gt;
else  &lt;br /&gt;
   #gps is off...let's turn it on and remember to turn it back off later&lt;br /&gt;
   gps_on=0&lt;br /&gt;
   $(luna-send -n 1 palm://com.palm.location/setUseGps '{&amp;quot;useGps&amp;quot;:true}' &amp;gt; /dev/null 2&amp;gt;&amp;amp;1)&lt;br /&gt;
   # wait for 60 seconds so gps gets a good lock&lt;br /&gt;
   sleep 60&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
# Location services must be turned on, or startTracking will not work (you get a {&amp;quot;errorCode&amp;quot;:7})&lt;br /&gt;
# Are locations service turned on? &lt;br /&gt;
$(luna-send -n 1 palm://com.palm.location/getAutoLocate '{}' 2&amp;gt;&amp;amp;1 | grep 'true' &amp;gt; /dev/null)&lt;br /&gt;
grep_ret=$?&lt;br /&gt;
if [ $grep_ret -eq 0 ]        # Test exit status of &amp;quot;grep&amp;quot; command.&lt;br /&gt;
then&lt;br /&gt;
   # location service is on&lt;br /&gt;
   location_service=1&lt;br /&gt;
else  &lt;br /&gt;
   #location service is off...let's turn it on and remember to turn it back off later&lt;br /&gt;
   location_service=0&lt;br /&gt;
   $(luna-send -n 1 palm://com.palm.location/setAutoLocate '{&amp;quot;autoLocate&amp;quot;:true}' &amp;gt; /dev/null 2&amp;gt;&amp;amp;1)&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
# Get current coords&lt;br /&gt;
pos=$(luna-send -n 2 palm://com.palm.location/startTracking '{&amp;quot;appId&amp;quot;: &amp;quot;ILovePalm&amp;quot;, &amp;quot;subscribe&amp;quot;: true}' 2&amp;gt;&amp;amp;1 | tail -1 | cut -d, -f4,5,6,7,8,9,10 | sed -r 's/[^-\.0-9,]//g')&lt;br /&gt;
&lt;br /&gt;
lat=$(echo $pos | cut -d, -f1)&lt;br /&gt;
lon=$(echo $pos | cut -d, -f2)&lt;br /&gt;
acc=$(echo $pos | cut -d, -f3 | cut -d. -f1)&lt;br /&gt;
dir=$(echo $pos | cut -d, -f4)&lt;br /&gt;
spd=$(echo $pos | cut -d, -f5)&lt;br /&gt;
alt=$(echo $pos | cut -d, -f6)&lt;br /&gt;
altacc=$(echo $pos | cut -d, -f7 | cut -d. -f1)&lt;br /&gt;
bat=$(grep BATTERY: /var/log/messages | tail -1 | awk '{print $8}' | sed 's/%,//')&lt;br /&gt;
&lt;br /&gt;
# turn off GPS?&lt;br /&gt;
if [ $gps_on -eq 0 ]&lt;br /&gt;
then&lt;br /&gt;
   # the GPS was off when we started the script...turn it back off&lt;br /&gt;
   $(luna-send -n 1 palm://com.palm.location/setUseGps '{&amp;quot;useGps&amp;quot;:false}' &amp;gt; /dev/null 2&amp;gt;&amp;amp;1)&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
# turn off location service?&lt;br /&gt;
if [ $location_service -eq 0 ]&lt;br /&gt;
then&lt;br /&gt;
   # location service was off when we started the script...turn it back off&lt;br /&gt;
   $(luna-send -n 1 palm://com.palm.location/setAutoLocate '{&amp;quot;autoLocate&amp;quot;:false}' &amp;gt; /dev/null 2&amp;gt;&amp;amp;1)&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
# check if we should send a message&lt;br /&gt;
if [ $run_only_if_diff -eq 1 ] &lt;br /&gt;
then&lt;br /&gt;
    # create short coords. &lt;br /&gt;
    # use &amp;quot;printf(&amp;quot;%3.4f\n&amp;quot;,$0)&amp;quot; for 4 decimal places (about 30 feet accuracy)&lt;br /&gt;
    # use &amp;quot;printf(&amp;quot;%3.3f\n&amp;quot;,$0)&amp;quot; for 3 decimal places (about 280 feet accuracy)                                                            &lt;br /&gt;
    # use &amp;quot;printf(&amp;quot;%3.2f\n&amp;quot;,$0)&amp;quot; for 2 decimal places (about 0.5 miles accuracy)                                                            &lt;br /&gt;
    sh_lat=$(echo $lat |  awk '{printf(&amp;quot;%3.4f\n&amp;quot;,$0)}')&lt;br /&gt;
    sh_lon=$(echo $lon |  awk '{printf(&amp;quot;%3.4f\n&amp;quot;,$0)}')&lt;br /&gt;
&lt;br /&gt;
   # does the file with the last coords exist?&lt;br /&gt;
    if [ -f $last_gps_coord_file ]&lt;br /&gt;
    then&lt;br /&gt;
        $(grep &amp;quot;$sh_lat $sh_lon&amp;quot; $last_gps_coord_file &amp;gt; /dev/null)&lt;br /&gt;
        grep_ret=$?&lt;br /&gt;
        if [ $grep_ret -eq 0 ]&lt;br /&gt;
        then&lt;br /&gt;
            # coords match...don't send a message&lt;br /&gt;
            send_message=0&lt;br /&gt;
        else&lt;br /&gt;
            # coords don't match...send a message and update coord file&lt;br /&gt;
            send_message=1 &lt;br /&gt;
            echo $sh_lat $sh_lon &amp;gt; $last_gps_coord_file                                                                                                   &lt;br /&gt;
        fi&lt;br /&gt;
    else&lt;br /&gt;
        # there is not a last coords file...create one for next time&lt;br /&gt;
        send_message=1&lt;br /&gt;
        echo $sh_lat $sh_lon &amp;gt; $last_gps_coord_file  &lt;br /&gt;
    fi&lt;br /&gt;
else&lt;br /&gt;
    # $run_only_if_diff is false, so send a message&lt;br /&gt;
    send_message=1        &lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
# if configured to send on the hour...is it time?&lt;br /&gt;
if [ $send_every_hour -eq 1 -a $cur_min = &amp;quot;00&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
  send_message=1 &lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
# Enable this below if you want to keep logs - not sure where to write them /var/home/root not the best place.&lt;br /&gt;
# echo $now,$lat,$lon,$acc,$dir,$spd,$alt,$altacc,$bat &amp;gt;&amp;gt;mygpsdata.log&lt;br /&gt;
&lt;br /&gt;
# send the message&lt;br /&gt;
if [ $send_message -eq 1 ]&lt;br /&gt;
then&lt;br /&gt;
    #Build message content to be sent&lt;br /&gt;
    if [ $msg_with_heading -eq 1 ]&lt;br /&gt;
    then&lt;br /&gt;
       msg=$(echo $now &amp;quot;\n&amp;quot; Bat:$bat Acc:$acc &amp;quot;http://maps.google.com/maps?q=$lat%2C$lon+(Heading:%20$dir%0DSpeed:%20$spd)&amp;quot;)&lt;br /&gt;
    else&lt;br /&gt;
       msg=$(echo $now &amp;quot;\n&amp;quot; &amp;quot;http://maps.google.com/maps?q=$lat%2C$lon&amp;quot; &amp;quot;\n&amp;quot; Bat=$bat,Acc=$acc,Dir=$dir,Spd=$spd,Alt=$alt,AltAcc=$altacc)&lt;br /&gt;
    fi&lt;br /&gt;
&lt;br /&gt;
    $(luna-send -n 1 palm://com.palm.messaging/sendMessageFromCompose '{&amp;quot;recipientJSONArray&amp;quot;: [{&amp;quot;value&amp;quot;: &amp;quot;'${DEST}'&amp;quot;, &amp;quot;contactDisplay&amp;quot;: &amp;quot;'${DEST}'&amp;quot;, &amp;quot;prefix&amp;quot;: &amp;quot;to$A&amp;quot;, &amp;quot;identifier&amp;quot;: &amp;quot;palm_anon_element_8&amp;quot;}], &amp;quot;messageText&amp;quot;: &amp;quot;'&amp;quot;$msg&amp;quot;'&amp;quot;}' &amp;gt; /dev/null 2&amp;gt;&amp;amp;1)&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
This has been running every 20 minutes on my phone for the last 4 days, no problem.&lt;br /&gt;
-dld121&lt;/div&gt;</summary>
		<author><name>Robertjw</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Crond&amp;diff=6677</id>
		<title>Crond</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Crond&amp;diff=6677"/>
		<updated>2009-10-26T05:53:25Z</updated>

		<summary type="html">&lt;p&gt;Robertjw: /* Enabling Stock Cron */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Enabling Stock Cron==&lt;br /&gt;
&lt;br /&gt;
The [[Patch webOS GPS Tracking]] guide had a nice bit about enabling crond on the Pre. It looks like its already pre-installed, just not set up to start. You will need to edit /etc/event.d/mod-crond (don't modify the existing crond startup-script) to enable cron to start. The settings should look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
# -*- mode: conf; -*-&lt;br /&gt;
&lt;br /&gt;
# jobfile for busybox crond, with pre-start commands to create the&lt;br /&gt;
# directory and files it wants by default.  That there's not 'start&lt;br /&gt;
# on' stanza is intentional: it's for development use only.  We can&lt;br /&gt;
# turn it on later if we need it, e.g. to keep the clock synced.  It&lt;br /&gt;
# does work.&lt;br /&gt;
&lt;br /&gt;
start on stopped configure&lt;br /&gt;
stop on started start_update&lt;br /&gt;
&lt;br /&gt;
respawn&lt;br /&gt;
&lt;br /&gt;
exec /usr/sbin/crond -f -L /var/log/crond&lt;br /&gt;
&lt;br /&gt;
pre-start script&lt;br /&gt;
    mkdir -p /var/spool/cron/crontabs&lt;br /&gt;
    ln -sf /etc/cron/crontabs/root /var/spool/cron/crontabs/root&lt;br /&gt;
end script&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A few notes here. Unlike the Dropbear and other scripts I make my upstart scripts so that essential services don't stop when the device exists runlevel 2.  This seems to shutdown these services whenever the device locks. I prefer that my upstart services stop only when the updater runs.  Also I have made cron log to a separate file under /var/log so that it can be monitored better.&lt;br /&gt;
&lt;br /&gt;
One thing to note about the standard script for cron on the Pre is that the /var/spool/cron/crontabs directory is created every time the process runs and a symlink to /etc/cron/crontabs/root is created.  To my surprise this file does not exist.  So we need to create it:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
sudo mkdir -p /etc/cron/crontabs&lt;br /&gt;
sudo sh -c 'echo &amp;gt; /etc/cron/crontabs/root'&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now to start up crond:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;sudo -i initctl start crond&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Note for clarification:  I attempted this and it all works OK, but I can't figure out how to actually schedule jobs.  I modified /etc/cron/crontabs/root, but nothing seems to happen.  I also tried crontab -e, and that doesn't seem to do anything either.  I suggest adding a note here clarifying what needs to be done to actually add a cron job.  -irwinr&lt;br /&gt;
&lt;br /&gt;
*Clarification:  Edit /etc/cron/crontabs/root with test content something like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
# format:&lt;br /&gt;
# minute(0-59) hour(0-23) day(1-31) month(1-12) weekday(0-6) command&lt;br /&gt;
&lt;br /&gt;
* * * * * echo &amp;quot;Hello&amp;quot; &amp;gt;&amp;gt; /var/crondtest&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then restart crond like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
sudo -i initctl stop crond&lt;br /&gt;
sudo -i initctl start crond&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This test will result in a test file at /var/crondtest that grows at the rate of one line per minute.&lt;br /&gt;
&lt;br /&gt;
==Alternative (ipkg-opt) Method==&lt;br /&gt;
&lt;br /&gt;
* Another request for clarification:  It's not clear which of these two methods are preferred.  This method appears to not work when the screen is off (rendering cron pretty useless), the above method appears to delete the cron entries every time the cron daemon starts.  Has anyone worked out either of these issues?  -irwinr.&lt;br /&gt;
&lt;br /&gt;
crond is a system that allows command to be run at specified intervals. &lt;br /&gt;
&lt;br /&gt;
Do not use the built in crontab -e  as it is overwritten on each boot.&lt;br /&gt;
&lt;br /&gt;
Optware has cron available as an installable package, and using /opt/etc/cron.d/ for cron files will not conflict with any Palm files.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
sudo -i &lt;br /&gt;
mount -o remount,rw /&lt;br /&gt;
ipkg-opt update&lt;br /&gt;
ipkg-opt install cron&lt;br /&gt;
/opt/bin/crontab -e&lt;br /&gt;
# Add script and intervals here&lt;br /&gt;
mount -o remount,ro /&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This does not seem to work when the phone's screen turns off. I tried it plugged in for two minutes then unplugged, and turned the screen off for two minutes. I ran &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;echo `date` &amp;gt;&amp;gt; sleep.log&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And got...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
# cat sleep.log &lt;br /&gt;
Wed Jul 1 18:27:01 CDT 2009&lt;br /&gt;
Wed Jul 1 18:28:01 CDT 2009&lt;br /&gt;
Wed Jul 1 18:30:16 CDT 2009  ## Turned the screen back on. It seems to play catch up.&lt;br /&gt;
Wed Jul 1 18:30:16 CDT 2009&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Robertjw</name></author>
	</entry>
</feed>