<?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=StefanSchmidt</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=StefanSchmidt"/>
	<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/wiki/Special:Contributions/StefanSchmidt"/>
	<updated>2026-05-01T17:43:11Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.1</generator>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Research_Pre_Audio&amp;diff=7092</id>
		<title>Research Pre Audio</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Research_Pre_Audio&amp;diff=7092"/>
		<updated>2009-11-11T08:20:10Z</updated>

		<summary type="html">&lt;p&gt;StefanSchmidt: add location of audio scripts&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This side should cover the audio architecture used on the Palm Pre.&lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
&lt;br /&gt;
The used TWL4030 PMIC covers the audio part.&lt;br /&gt;
&lt;br /&gt;
== Soundcards ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
root@castle:/var/home/root# aplay -l    &lt;br /&gt;
**** List of PLAYBACK Hardware Devices ****&lt;br /&gt;
card 0: mcbsp2 [twl4030-i2s (mcbsp2)], device 0: omap-mcbsp-pcm [omap-mcbsp-pcm]&lt;br /&gt;
  Subdevices: 1/1&lt;br /&gt;
  Subdevice #0: subdevice #0&lt;br /&gt;
card 1: mcbsp3 [btsco (mcbsp3)], device 0: omap-mcbsp-pcm [omap-mcbsp-pcm]&lt;br /&gt;
  Subdevices: 1/1&lt;br /&gt;
  Subdevice #0: subdevice #0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Scripts ==&lt;br /&gt;
&lt;br /&gt;
Palm uses scripts to configure the lower levels of the sound system that are executed inside the kernel. Audiod triggers them over a sysfs interface.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
echo &amp;quot;#list&amp;quot; &amp;gt; /sys/devices/platform/twl4030_audio/scdebug&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 for example lists you all available scripts over the kernel message output which you can view with dmesg. You can also try&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#all&lt;br /&gt;
#volume&lt;br /&gt;
#init&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These scripts can be triggered by writing is name as a string into&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/sys/devices/platform/twl4030_audio/scrun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A good start to dive into this is sound/arm/omap-twl4030/script.c in the kernel patch from palm.&lt;br /&gt;
&lt;br /&gt;
New scripts are inserted into the kernel list via:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/sys/devices/platform/twl4030_audio/scinit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is also handled by audiod. The scripts can be found in /etc/audio&lt;/div&gt;</summary>
		<author><name>StefanSchmidt</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Research_Pre_Audio&amp;diff=6608</id>
		<title>Research Pre Audio</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Research_Pre_Audio&amp;diff=6608"/>
		<updated>2009-10-21T17:48:04Z</updated>

		<summary type="html">&lt;p&gt;StefanSchmidt: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This side should cover the audio architecture used on the Palm Pre.&lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
&lt;br /&gt;
The used TWL4030 PMIC covers the audio part.&lt;br /&gt;
&lt;br /&gt;
== Soundcards ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
root@castle:/var/home/root# aplay -l    &lt;br /&gt;
**** List of PLAYBACK Hardware Devices ****&lt;br /&gt;
card 0: mcbsp2 [twl4030-i2s (mcbsp2)], device 0: omap-mcbsp-pcm [omap-mcbsp-pcm]&lt;br /&gt;
  Subdevices: 1/1&lt;br /&gt;
  Subdevice #0: subdevice #0&lt;br /&gt;
card 1: mcbsp3 [btsco (mcbsp3)], device 0: omap-mcbsp-pcm [omap-mcbsp-pcm]&lt;br /&gt;
  Subdevices: 1/1&lt;br /&gt;
  Subdevice #0: subdevice #0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Scripts ==&lt;br /&gt;
&lt;br /&gt;
Palm uses scripts to configure the lower levels of the sound system that are executed inside the kernel. Audiod triggers them over a sysfs interface.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
echo &amp;quot;#list&amp;quot; &amp;gt; /sys/devices/platform/twl4030_audio/scdebug&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 for example lists you all available scripts over the kernel message output which you can view with dmesg. You can also try&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#all&lt;br /&gt;
#volume&lt;br /&gt;
#init&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These scripts can be triggered by writing is name as a string into&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/sys/devices/platform/twl4030_audio/scrun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A good start to dive into this is sound/arm/omap-twl4030/script.c in the kernel patch from palm.&lt;br /&gt;
&lt;br /&gt;
New scripts are inserted into the kernel list via:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/sys/devices/platform/twl4030_audio/scinit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is also handled by audiod. Until now there was no place found where the scripts may be stored in the filesystem. Maybe they are build into audiod.&lt;/div&gt;</summary>
		<author><name>StefanSchmidt</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Research_Pre_Audio&amp;diff=6607</id>
		<title>Research Pre Audio</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Research_Pre_Audio&amp;diff=6607"/>
		<updated>2009-10-21T17:24:16Z</updated>

		<summary type="html">&lt;p&gt;StefanSchmidt: update about audio scripts&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This side should cover the audio architecture used on the Palm Pre.&lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
&lt;br /&gt;
The used TWL4030 PMIC covers the audio part.&lt;br /&gt;
&lt;br /&gt;
== Soundcards ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
root@castle:/var/home/root# aplay -l    &lt;br /&gt;
**** List of PLAYBACK Hardware Devices ****&lt;br /&gt;
card 0: mcbsp2 [twl4030-i2s (mcbsp2)], device 0: omap-mcbsp-pcm [omap-mcbsp-pcm]&lt;br /&gt;
  Subdevices: 1/1&lt;br /&gt;
  Subdevice #0: subdevice #0&lt;br /&gt;
card 1: mcbsp3 [btsco (mcbsp3)], device 0: omap-mcbsp-pcm [omap-mcbsp-pcm]&lt;br /&gt;
  Subdevices: 1/1&lt;br /&gt;
  Subdevice #0: subdevice #0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Scripts ==&lt;br /&gt;
&lt;br /&gt;
Palm uses scripts to configure the lower levels of the sound system that are executed inside the kernel. Audiod triggers them over a sysfs interface.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
echo &amp;quot;#list&amp;quot; &amp;gt; /sys/devices/platform/twl4030_audio/scdebug&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 for example lists you all available scripts over the kernel message output which you can view with dmesg. You can also try&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#all&lt;br /&gt;
#volume&lt;br /&gt;
#init&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These scripts can be triggered by writing is name as a string into&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/sys/devices/platform/twl4030_audio/scrun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A good start to dive into this is sound/arm/omap-twl4030/script.c in the kernel patch from palm.&lt;/div&gt;</summary>
		<author><name>StefanSchmidt</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Research_Pre_GSM_Modem_Protocol&amp;diff=6603</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=6603"/>
		<updated>2009-10-20T22:57:57Z</updated>

		<summary type="html">&lt;p&gt;StefanSchmidt: /* Checksum */&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 don 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;
=== 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.&lt;br /&gt;
&lt;br /&gt;
http://tools.ietf.org/html/rfc1662&lt;/div&gt;</summary>
		<author><name>StefanSchmidt</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Research_Pre_GSM_Modem_Protocol&amp;diff=6602</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=6602"/>
		<updated>2009-10-20T22:57:11Z</updated>

		<summary type="html">&lt;p&gt;StefanSchmidt: /* Similarity to HDLC */&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 don 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;
=== 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 seem to be a CRC16 checksum. For now we think it is the CRC-16-CCITT variant.&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.&lt;br /&gt;
&lt;br /&gt;
http://tools.ietf.org/html/rfc1662&lt;/div&gt;</summary>
		<author><name>StefanSchmidt</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Research_Pre_GSM_Modem_Protocol&amp;diff=6601</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=6601"/>
		<updated>2009-10-20T22:55:39Z</updated>

		<summary type="html">&lt;p&gt;StefanSchmidt: /* Packet Start */&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 don 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;
=== 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 seem to be a CRC16 checksum. For now we think it is the CRC-16-CCITT variant.&lt;br /&gt;
&lt;br /&gt;
=== Similarity to HDLC ===&lt;br /&gt;
&lt;br /&gt;
The usage of CRC-16-CCITT but even more the frame boundary packet as well as the escaping for it looks similar to what we found about this protocol. Using HDLC would of course make sense and we need to do further investigation on this.&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Cyclic_redundancy_check&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/HDLC&lt;/div&gt;</summary>
		<author><name>StefanSchmidt</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Research_Pre_GSM_Modem_Protocol&amp;diff=6597</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=6597"/>
		<updated>2009-10-20T10:14:50Z</updated>

		<summary type="html">&lt;p&gt;StefanSchmidt: /* 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 don 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'''&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 seem to be a CRC16 checksum. For now we think it is the CRC-16-CCITT variant.&lt;br /&gt;
&lt;br /&gt;
=== Similarity to HDLC ===&lt;br /&gt;
&lt;br /&gt;
The usage of CRC-16-CCITT but even more the frame boundary packet as well as the escaping for it looks similar to what we found about this protocol. Using HDLC would of course make sense and we need to do further investigation on this.&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Cyclic_redundancy_check&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/HDLC&lt;/div&gt;</summary>
		<author><name>StefanSchmidt</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Research_Pre_GSM_Modem_Protocol&amp;diff=6596</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=6596"/>
		<updated>2009-10-20T10:07:52Z</updated>

		<summary type="html">&lt;p&gt;StefanSchmidt: Its actually FA&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 don 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'''&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.&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 seem to be a CRC16 checksum. For now we think it is the CRC-16-CCITT variant.&lt;br /&gt;
&lt;br /&gt;
=== Similarity to HDLC ===&lt;br /&gt;
&lt;br /&gt;
The usage of CRC-16-CCITT but even more the frame boundary packet as well as the escaping for it looks similar to what we found about this protocol. Using HDLC would of course make sense and we need to do further investigation on this.&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Cyclic_redundancy_check&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/HDLC&lt;/div&gt;</summary>
		<author><name>StefanSchmidt</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Research_Pre_GSM_Modem_Protocol&amp;diff=6595</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=6595"/>
		<updated>2009-10-20T10:01:24Z</updated>

		<summary type="html">&lt;p&gt;StefanSchmidt: links&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 don 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: '''0x7A'''&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.&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 seem to be a CRC16 checksum. For now we think it is the CRC-16-CCITT variant.&lt;br /&gt;
&lt;br /&gt;
=== Similarity to HDLC ===&lt;br /&gt;
&lt;br /&gt;
The usage of CRC-16-CCITT but even more the frame boundary packet as well as the escaping for it looks similar to what we found about this protocol. Using HDLC would of course make sense and we need to do further investigation on this.&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Cyclic_redundancy_check&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/HDLC&lt;/div&gt;</summary>
		<author><name>StefanSchmidt</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Research_Pre_GSM_Modem_Protocol&amp;diff=6594</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=6594"/>
		<updated>2009-10-20T09:59:05Z</updated>

		<summary type="html">&lt;p&gt;StefanSchmidt: more infos about the protocol&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 don 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: '''0x7A'''&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.&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;
&lt;br /&gt;
=== Checksum ===&lt;br /&gt;
&lt;br /&gt;
The last two(?) bytes before the packet ending marker seem to be a CRC16 checksum. For now we think it is the CRC-16-CCITT variant.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Similarity to HDLC ===&lt;br /&gt;
&lt;br /&gt;
The usage of CRC-16-CCITT but even more the frame boundary packet as well as the escaping for it looks similar to what we found about this protocol. Using HDLC would of course make sense and we need to do further investigation on this.&lt;/div&gt;</summary>
		<author><name>StefanSchmidt</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Portal:Research&amp;diff=6593</id>
		<title>Portal:Research</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Portal:Research&amp;diff=6593"/>
		<updated>2009-10-20T09:50:48Z</updated>

		<summary type="html">&lt;p&gt;StefanSchmidt: add modem protocol link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__notoc__&lt;br /&gt;
{{portal-header|&lt;br /&gt;
The Research Portal is for bleeding edge things being done with the device. &lt;br /&gt;
&lt;br /&gt;
Title all pages: '''Research [description]''' or '''Reference [description]'''&lt;br /&gt;
}}&lt;br /&gt;
{{portal-two-columns&lt;br /&gt;
|column1=&lt;br /&gt;
===Research:===&lt;br /&gt;
&lt;br /&gt;
* [[Applications Bundled on the Pre]]&lt;br /&gt;
* [[Application_Framework|Application Framework]]&lt;br /&gt;
* [[Blocking Updates]]&lt;br /&gt;
* [[New Bluetooth|BlueZ (Replacing Palm Bluetooth)]]&lt;br /&gt;
* [[Boot_Chain|Boot Chain]]&lt;br /&gt;
* [[Bootie]]&lt;br /&gt;
* [[ClassicFilesystem]]&lt;br /&gt;
* [[Decrypt SSL (trusted man-in-the-middle technique)|Decrypt SSL (trusted man-in-the-middle technique)]]&lt;br /&gt;
* [[Fonts available on board the Pre]]&lt;br /&gt;
* [[Gstreamer]]&lt;br /&gt;
* [[Hidd]]&lt;br /&gt;
* [[Introspecting_Dbus|Introspecting Dbus]]&lt;br /&gt;
* [[Key Codes|Key Codes]] &lt;br /&gt;
* [[Pre Specific Hash Codes|Pre Specific Hash Codes]] &lt;br /&gt;
* [[Pictures from Self-Test|Pictures from Self-Test]] &lt;br /&gt;
* [[Restore Debug Log|Restore Debug Log]] &lt;br /&gt;
* [[Reverse_Engineering_WebOS_Doctor|Reverse Engineering WebOS Doctor]]&lt;br /&gt;
* [[Rooted Pre Issues|Rooted Pre Issues]] &lt;br /&gt;
* [[Research_Securing_Pre|Securing your Pre]]&lt;br /&gt;
* [[Running Processes|Running Processes]] &lt;br /&gt;
* [[Symlink Applications|Symlink Applications]] &lt;br /&gt;
* [[System Sounds|System Sounds]] &lt;br /&gt;
* [[TestApps|TestApps]] &lt;br /&gt;
* [[Update Service Trace|Update Service Trace]] &lt;br /&gt;
* [[Tidbits|Tidbits]] &lt;br /&gt;
* [[VideoRecording]]&lt;br /&gt;
* [[WebOS Exploration - Various Information|WebOS Exploration - Various Information]] &lt;br /&gt;
* [[Research_Pre_GSM_Modem | Pre GSM modem device informations]]&lt;br /&gt;
* [[Research_Pre_GSM_Modem_Protocol | Pre GSM modem protocol informations]]&lt;br /&gt;
* [[Research_Pre_Audio | Audio routing and setup on the Pre]]&lt;br /&gt;
* [[Research_mpt | MSM modem passthru mode ]]&lt;br /&gt;
&lt;br /&gt;
|column2=&lt;br /&gt;
===Reference===&lt;br /&gt;
* [[Packaging Standards|Packaging Standards]]&lt;br /&gt;
* [[webkit_transform|Webkit Transform]]- a powerful set of commands for manipulating elements.&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>StefanSchmidt</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Research_Pre_GSM_Modem_Protocol&amp;diff=6592</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=6592"/>
		<updated>2009-10-20T09:49:19Z</updated>

		<summary type="html">&lt;p&gt;StefanSchmidt: start modem protocol page&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 don 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: '''0x7A'''&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.&lt;/div&gt;</summary>
		<author><name>StefanSchmidt</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Research_mpt&amp;diff=6518</id>
		<title>Research mpt</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Research_mpt&amp;diff=6518"/>
		<updated>2009-10-16T14:24:41Z</updated>

		<summary type="html">&lt;p&gt;StefanSchmidt: infos about mpt passthru&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The system contains a tool called mpt which allows to route some of the MSM modem traffic to the microUSB connection and such enables a passthru mode where the host PC could use the modem directly. That way the modem can be configured with some special software from Quallcom.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
root@castle:/var/home/root# mpt&lt;br /&gt;
Usage:&lt;br /&gt;
To enable passthru: mpt [port_spec]&lt;br /&gt;
To disable passthru: mpt disable (or mpt x)&lt;br /&gt;
&lt;br /&gt;
[port_spec]&lt;br /&gt;
dun (or '0')       : DUN (port0) only&lt;br /&gt;
diag (or 'd')      : Diag port only&lt;br /&gt;
dun,diag (or '0d') : DUN (port0) and Diag port&lt;br /&gt;
diag,gps           : Diag port and GPS port&lt;br /&gt;
userial            : Serial passthru with USB cable&lt;br /&gt;
serial             : Serial passthru with Serial cable&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sadly a special USB driver is needed for this. It shows up like this on my linux box:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[16675.933683] usb 2-4.4: new full speed USB device using ohci_hcd and address 10&lt;br /&gt;
[16676.032663] usb 2-4.4: not running at top speed; connect to a high speed hub&lt;br /&gt;
[16676.048665] usb 2-4.4: New USB device found, idVendor=0830, idProduct=8003&lt;br /&gt;
[16676.048675] usb 2-4.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0&lt;br /&gt;
[16676.048682] usb 2-4.4: Product: Pre&lt;br /&gt;
[16676.048686] usb 2-4.4: Manufacturer: Palm Inc.&lt;br /&gt;
[16676.048876] usb 2-4.4: configuration #1 chosen from 1 choice&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>StefanSchmidt</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Portal:Research&amp;diff=6517</id>
		<title>Portal:Research</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Portal:Research&amp;diff=6517"/>
		<updated>2009-10-16T14:21:09Z</updated>

		<summary type="html">&lt;p&gt;StefanSchmidt: add link to new page about mpt&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__notoc__&lt;br /&gt;
{{portal-header|&lt;br /&gt;
The Research Portal is for bleeding edge things being done with the device. &lt;br /&gt;
&lt;br /&gt;
Title all pages: '''Research [description]''' or '''Reference [description]'''&lt;br /&gt;
}}&lt;br /&gt;
{{portal-two-columns&lt;br /&gt;
|column1=&lt;br /&gt;
===Research:===&lt;br /&gt;
&lt;br /&gt;
* [[Applications Bundled on the Pre]]&lt;br /&gt;
* [[Application_Framework|Application Framework]]&lt;br /&gt;
* [[Blocking Updates]]&lt;br /&gt;
* [[New Bluetooth|BlueZ (Replacing Palm Bluetooth)]]&lt;br /&gt;
* [[Boot_Chain|Boot Chain]]&lt;br /&gt;
* [[Bootie]]&lt;br /&gt;
* [[ClassicFilesystem]]&lt;br /&gt;
* [[Decrypt SSL (trusted man-in-the-middle technique)|Decrypt SSL (trusted man-in-the-middle technique)]]&lt;br /&gt;
* [[Fonts available on board the Pre]]&lt;br /&gt;
* [[Gstreamer]]&lt;br /&gt;
* [[Hidd]]&lt;br /&gt;
* [[Introspecting_Dbus|Introspecting Dbus]]&lt;br /&gt;
* [[Key Codes|Key Codes]] &lt;br /&gt;
* [[Pre Specific Hash Codes|Pre Specific Hash Codes]] &lt;br /&gt;
* [[Pictures from Self-Test|Pictures from Self-Test]] &lt;br /&gt;
* [[Restore Debug Log|Restore Debug Log]] &lt;br /&gt;
* [[Reverse_Engineering_WebOS_Doctor|Reverse Engineering WebOS Doctor]]&lt;br /&gt;
* [[Rooted Pre Issues|Rooted Pre Issues]] &lt;br /&gt;
* [[Research_Securing_Pre|Securing your Pre]]&lt;br /&gt;
* [[Running Processes|Running Processes]] &lt;br /&gt;
* [[Symlink Applications|Symlink Applications]] &lt;br /&gt;
* [[System Sounds|System Sounds]] &lt;br /&gt;
* [[TestApps|TestApps]] &lt;br /&gt;
* [[Update Service Trace|Update Service Trace]] &lt;br /&gt;
* [[Tidbits|Tidbits]] &lt;br /&gt;
* [[VideoRecording]]&lt;br /&gt;
* [[WebOS Exploration - Various Information|WebOS Exploration - Various Information]] &lt;br /&gt;
* [[Research_Pre_GSM_Modem | Pre GSM modem devices, protocols, etc]]&lt;br /&gt;
* [[Research_Pre_Audio | Audio routing and setup on the Pre]]&lt;br /&gt;
* [[Research_mpt | MSM modem passthru mode ]]&lt;br /&gt;
&lt;br /&gt;
|column2=&lt;br /&gt;
===Reference===&lt;br /&gt;
* [[Packaging Standards|Packaging Standards]]&lt;br /&gt;
* [[webkit_transform|Webkit Transform]]- a powerful set of commands for manipulating elements.&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>StefanSchmidt</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Research_Pre_GSM_Modem&amp;diff=6509</id>
		<title>Research Pre GSM Modem</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Research_Pre_GSM_Modem&amp;diff=6509"/>
		<updated>2009-10-16T00:35:16Z</updated>

		<summary type="html">&lt;p&gt;StefanSchmidt: Script to trace modemuart communication&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Modem Ports ==&lt;br /&gt;
There are several ports for communicating with the modem on the Palm Pre:&lt;br /&gt;
* /dev/modemuart: Modem UART (UART Port)&lt;br /&gt;
* /dev/tts/modem0 (Symlink for ttyACM0): USB Serial to Modem for AT commands (Data Port)&lt;br /&gt;
* /dev/tts/modemdiag (Symlink for ttyACM1): USB Serial to Modem for Diagnositics (DIAG Port)&lt;br /&gt;
&lt;br /&gt;
== sysfs Entries ==&lt;br /&gt;
* Power Control: /sys/user_hw/pins/modem/power_on/level&lt;br /&gt;
&lt;br /&gt;
== Palm Programs for communicating with the modem ==&lt;br /&gt;
In /usr/bin are some interessting programs:&lt;br /&gt;
* PmLinuxModemCmd: You can do some operations on the modem from command line&lt;br /&gt;
* PmModemInfo: Shows you the IMEI and the version of the modem firmware&lt;br /&gt;
* PmModemPower: A simple shell script to turn on/reset the modem&lt;br /&gt;
* PmModemUpdater: Flash the modem with a new firmware&lt;br /&gt;
&lt;br /&gt;
The binary sequences are:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
00014a1c &amp;lt;enableloopbackdataport&amp;gt;:&lt;br /&gt;
   14a1c:	31455441 	.word	0x31455441&lt;br /&gt;
	...&lt;br /&gt;
   159c0:	0a0d      	.short	0x0a0d&lt;br /&gt;
&lt;br /&gt;
000159c2 &amp;lt;loopback&amp;gt;:&lt;br /&gt;
   159c2:	0f88      	.short	0x0f88&lt;br /&gt;
   159c4:	00010000 	.word	0x00010000&lt;br /&gt;
   159c8:	7eb3d400 	.word	0x7eb3d400&lt;br /&gt;
&lt;br /&gt;
000159cc &amp;lt;identify&amp;gt;:&lt;br /&gt;
   159cc:	7e3b1c1d 	.word	0x7e3b1c1d&lt;br /&gt;
&lt;br /&gt;
000159d0 &amp;lt;getVer&amp;gt;:&lt;br /&gt;
   159d0:	1b0000fa 	.word	0x1b0000fa&lt;br /&gt;
   159d4:	00000009 	.word	0x00000009&lt;br /&gt;
   159d8:	00000000 	.word	0x00000000&lt;br /&gt;
   159dc:	7e          	.byte	0x7e&lt;br /&gt;
&lt;br /&gt;
000159dd &amp;lt;testAlive&amp;gt;:&lt;br /&gt;
   159dd:	fa          	.byte	0xfa&lt;br /&gt;
   159de:	0000      	.short	0x0000&lt;br /&gt;
   159e0:	0000011b 	.word	0x0000011b&lt;br /&gt;
   159e4:	00000000 	.word	0x00000000&lt;br /&gt;
   159e8:	b74c      	.short	0xb74c&lt;br /&gt;
   159ea:	7e          	.byte	0x7e&lt;br /&gt;
&lt;br /&gt;
000159eb &amp;lt;testAliveResp&amp;gt;:&lt;br /&gt;
   159eb:	1b          	.byte	0x1b&lt;br /&gt;
   159ec:	00000001 	.word	0x00000001&lt;br /&gt;
   159f0:	0000      	.short	0x0000&lt;br /&gt;
	...&lt;br /&gt;
&lt;br /&gt;
000159f3 &amp;lt;testAliveResp1&amp;gt;:&lt;br /&gt;
   159f3:	1c          	.byte	0x1c&lt;br /&gt;
   159f4:	00000002 	.word	0x00000002&lt;br /&gt;
   159f8:	0000      	.short	0x0000&lt;br /&gt;
	...&lt;br /&gt;
&lt;br /&gt;
000159fb &amp;lt;testAliveCDMA&amp;gt;:&lt;br /&gt;
   159fb:	fa          	.byte	0xfa&lt;br /&gt;
   159fc:	14080000 	.word	0x14080000&lt;br /&gt;
   15a00:	f904d200 	.word	0xf904d200&lt;br /&gt;
   15a04:	7e27      	.short	0x7e27&lt;br /&gt;
&lt;br /&gt;
00015a06 &amp;lt;testAliveRespCDMA&amp;gt;:&lt;br /&gt;
   15a06:	0122      	.short	0x0122&lt;br /&gt;
   15a08:	0000      	.short	0x0000&lt;br /&gt;
	...&lt;br /&gt;
&lt;br /&gt;
00015a0b &amp;lt;enterFTMmode&amp;gt;:&lt;br /&gt;
   15a0b:	29          	.byte	0x29&lt;br /&gt;
   15a0c:	73810003 	.word	0x73810003&lt;br /&gt;
   15a10:	7e          	.byte	0x7e&lt;br /&gt;
&lt;br /&gt;
00015a11 &amp;lt;CDMAdiagPortOnUART&amp;gt;:&lt;br /&gt;
   15a11:	fa          	.byte	0xfa&lt;br /&gt;
   15a12:	0000      	.short	0x0000&lt;br /&gt;
   15a14:	00002308 	.word	0x00002308&lt;br /&gt;
   15a18:	fbf1      	.short	0xfbf1&lt;br /&gt;
   15a1a:	7e          	.byte	0x7e&lt;br /&gt;
&lt;br /&gt;
00015a1b &amp;lt;CDMAdiagPortOnUSB&amp;gt;:&lt;br /&gt;
   15a1b:	fa          	.byte	0xfa&lt;br /&gt;
   15a1c:	23080000 	.word	0x23080000&lt;br /&gt;
   15a20:	29e20001 	.word	0x29e20001&lt;br /&gt;
   15a24:	7e          	.byte	0x7e&lt;br /&gt;
&lt;br /&gt;
00015a25 &amp;lt;resetCDMA&amp;gt;:&lt;br /&gt;
   15a25:	29          	.byte	0x29&lt;br /&gt;
   15a26:	0002      	.short	0x0002&lt;br /&gt;
   15a28:	6a59      	.short	0x6a59&lt;br /&gt;
   15a2a:	7e          	.byte	0x7e&lt;br /&gt;
&lt;br /&gt;
00015a2b &amp;lt;onlineMode&amp;gt;:&lt;br /&gt;
   15a2b:	fa          	.byte	0xfa&lt;br /&gt;
   15a2c:	00030000 	.word	0x00030000&lt;br /&gt;
   15a30:	00000000 	.word	0x00000000&lt;br /&gt;
   15a34:	09f00500 	.word	0x09f00500&lt;br /&gt;
   15a38:	7e          	.byte	0x7e&lt;br /&gt;
&lt;br /&gt;
00015a39 &amp;lt;offlineMode&amp;gt;:&lt;br /&gt;
   15a39:	fa          	.byte	0xfa&lt;br /&gt;
   15a3a:	0000      	.short	0x0000&lt;br /&gt;
   15a3c:	00000003 	.word	0x00000003&lt;br /&gt;
   15a40:	06000000 	.word	0x06000000&lt;br /&gt;
   15a44:	3b6b      	.short	0x3b6b&lt;br /&gt;
   15a46:	7e          	.byte	0x7e&lt;br /&gt;
&lt;br /&gt;
00015a47 &amp;lt;ATCGDCONT&amp;gt;:&lt;br /&gt;
   15a47:	41          	.byte	0x41&lt;br /&gt;
   15a48:	47432b54 	.word	0x47432b54&lt;br /&gt;
   15a4c:	4e4f4344 	.word	0x4e4f4344&lt;br /&gt;
   15a50:	0a0d3f54 	.word	0x0a0d3f54&lt;br /&gt;
&lt;br /&gt;
00015a54 &amp;lt;ATE0E1Cmd&amp;gt;:&lt;br /&gt;
   15a54:	30455441 	.word	0x30455441&lt;br /&gt;
   15a58:	30453145 	.word	0x30453145&lt;br /&gt;
   15a5c:	30453145 	.word	0x30453145&lt;br /&gt;
   15a60:	30453145 	.word	0x30453145&lt;br /&gt;
   15a64:	0a0d3145 	.word	0x0a0d3145&lt;br /&gt;
&lt;br /&gt;
00015a68 &amp;lt;ATCmd&amp;gt;:&lt;br /&gt;
   15a68:	0a0d5441 	.word	0x0a0d5441&lt;br /&gt;
&lt;br /&gt;
00015a6c &amp;lt;Charging90mA&amp;gt;:&lt;br /&gt;
   15a6c:	1b0000fa 	.word	0x1b0000fa&lt;br /&gt;
   15a70:	00000006 	.word	0x00000006&lt;br /&gt;
   15a74:	00180000 	.word	0x00180000&lt;br /&gt;
   15a78:	f0f30000 	.word	0xf0f30000&lt;br /&gt;
   15a7c:	7e          	.byte	0x7e&lt;br /&gt;
&lt;br /&gt;
00015a7d &amp;lt;Charging500mA&amp;gt;:&lt;br /&gt;
   15a7d:	fa          	.byte	0xfa&lt;br /&gt;
   15a7e:	0000      	.short	0x0000&lt;br /&gt;
   15a80:	0000061b 	.word	0x0000061b&lt;br /&gt;
   15a84:	18000000 	.word	0x18000000&lt;br /&gt;
   15a88:	2b000100 	.word	0x2b000100&lt;br /&gt;
   15a8c:	7ee9      	.short	0x7ee9&lt;br /&gt;
&lt;br /&gt;
00015a8e &amp;lt;Charging1A&amp;gt;:&lt;br /&gt;
   15a8e:	00fa      	.short	0x00fa&lt;br /&gt;
   15a90:	00061b00 	.word	0x00061b00&lt;br /&gt;
   15a94:	00000000 	.word	0x00000000&lt;br /&gt;
   15a98:	00070018 	.word	0x00070018&lt;br /&gt;
   15a9c:	bdfb      	.short	0xbdfb&lt;br /&gt;
   15a9e:	7e          	.byte	0x7e&lt;br /&gt;
&lt;br /&gt;
00015a9f &amp;lt;getQPSTConfig&amp;gt;:&lt;br /&gt;
   15a9f:	0c          	.byte	0x0c&lt;br /&gt;
   15aa0:	417e3a14 	.word	0x417e3a14&lt;br /&gt;
   15aa4:	43512454 	.word	0x43512454&lt;br /&gt;
   15aa8:	0d474d44 	.word	0x0d474d44&lt;br /&gt;
   15aac:	51245441 	.word	0x51245441&lt;br /&gt;
   15ab0:	474d4443 	.word	0x474d4443&lt;br /&gt;
   15ab4:	2454410d 	.word	0x2454410d&lt;br /&gt;
   15ab8:	4d444351 	.word	0x4d444351&lt;br /&gt;
   15abc:	067e0d47 	.word	0x067e0d47&lt;br /&gt;
   15ac0:	7e7e954e 	.word	0x7e7e954e&lt;br /&gt;
&lt;br /&gt;
00015ac4 &amp;lt;getESN&amp;gt;:&lt;br /&gt;
   15ac4:	00000026 	.word	0x00000026&lt;br /&gt;
	...&lt;br /&gt;
   15b48:	7ed2ad00 	.word	0x7ed2ad00&lt;br /&gt;
&lt;br /&gt;
00015b4c &amp;lt;CDMAPcmLoopbackOn&amp;gt;:&lt;br /&gt;
   15b4c:	000e0b4b 	.word	0x000e0b4b&lt;br /&gt;
   15b50:	00010003 	.word	0x00010003&lt;br /&gt;
   15b54:	0001000c 	.word	0x0001000c&lt;br /&gt;
   15b58:	7e00      	.short	0x7e00&lt;br /&gt;
&lt;br /&gt;
00015b5a &amp;lt;CDMAPcmLoopbackOff&amp;gt;:&lt;br /&gt;
   15b5a:	0b4b      	.short	0x0b4b&lt;br /&gt;
   15b5c:	0003000e 	.word	0x0003000e&lt;br /&gt;
   15b60:	000c0001 	.word	0x000c0001&lt;br /&gt;
   15b64:	7e000000 	.word	0x7e000000&lt;br /&gt;
&lt;br /&gt;
00015b68 &amp;lt;GSMPcmLoopbackOn&amp;gt;:&lt;br /&gt;
   15b68:	000e0b4b 	.word	0x000e0b4b&lt;br /&gt;
   15b6c:	000b0003 	.word	0x000b0003&lt;br /&gt;
   15b70:	0001000c 	.word	0x0001000c&lt;br /&gt;
   15b74:	7e00      	.short	0x7e00&lt;br /&gt;
&lt;br /&gt;
00015b76 &amp;lt;GSMPcmLoopbackOff&amp;gt;:&lt;br /&gt;
   15b76:	0b4b      	.short	0x0b4b&lt;br /&gt;
   15b78:	0003000e 	.word	0x0003000e&lt;br /&gt;
   15b7c:	000c000b 	.word	0x000c000b&lt;br /&gt;
   15b80:	7e000000 	.word	0x7e000000&lt;br /&gt;
&lt;br /&gt;
00015b84 &amp;lt;Dial&amp;gt;:&lt;br /&gt;
   15b84:	000000fa 	.word	0x000000fa&lt;br /&gt;
   15b88:	00000000 	.word	0x00000000&lt;br /&gt;
   15b8c:	04000000 	.word	0x04000000&lt;br /&gt;
	...&lt;br /&gt;
   15bf0:	34000000 	.word	0x34000000&lt;br /&gt;
   15bf4:	31363830 	.word	0x31363830&lt;br /&gt;
   15bf8:	32333837 	.word	0x32333837&lt;br /&gt;
   15bfc:	00000037 	.word	0x00000037&lt;br /&gt;
	...&lt;br /&gt;
   15c30:	0a000000 	.word	0x0a000000&lt;br /&gt;
	...&lt;br /&gt;
   15c58:	0000      	.short	0x0000&lt;br /&gt;
   15c5a:	7e          	.byte	0x7e&lt;br /&gt;
&lt;br /&gt;
00015c5b &amp;lt;disableloopbackdataport&amp;gt;:&lt;br /&gt;
   15c5b:	41          	.byte	0x41&lt;br /&gt;
   15c5c:	0d304554 	.word	0x0d304554&lt;br /&gt;
   15c60:	0a          	.byte	0x0a&lt;br /&gt;
&lt;br /&gt;
00015c61 &amp;lt;ATDT&amp;gt;:&lt;br /&gt;
   15c61:	41          	.byte	0x41&lt;br /&gt;
   15c62:	4454      	.short	0x4454&lt;br /&gt;
   15c64:	37313654 	.word	0x37313654&lt;br /&gt;
   15c68:	37323338 	.word	0x37323338&lt;br /&gt;
   15c6c:	0a0d      	.short	0x0a0d&lt;br /&gt;
&lt;br /&gt;
00015c6e &amp;lt;testAlive_1&amp;gt;:&lt;br /&gt;
   15c6e:	00fa      	.short	0x00fa&lt;br /&gt;
   15c70:	00011b00 	.word	0x00011b00&lt;br /&gt;
   15c74:	00000001 	.word	0x00000001&lt;br /&gt;
   15c78:	7ead8101 	.word	0x7ead8101&lt;br /&gt;
&lt;br /&gt;
00015c7c &amp;lt;onlineMode_1&amp;gt;:&lt;br /&gt;
   15c7c:	030000fa 	.word	0x030000fa&lt;br /&gt;
   15c80:	00000000 	.word	0x00000000&lt;br /&gt;
   15c84:	4f020000 	.word	0x4f020000&lt;br /&gt;
   15c88:	5d7d      	.short	0x5d7d&lt;br /&gt;
   15c8a:	7e          	.byte	0x7e&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== PmModemUpdater ===&lt;br /&gt;
 Usage:&lt;br /&gt;
 PmModemUpdater -h                     Print usage&lt;br /&gt;
 PmModemUpdater -v                     Detect current modem firmware version&lt;br /&gt;
 PmModemUpdater -p  /path/to/firmware.tar  Check the firmware package info&lt;br /&gt;
 PmModemUpdater -b		      Backup NV items from device to /var/firmware/palm_nv_backup.txt &lt;br /&gt;
 PmModemUpdater -r /path/to/nvfile     Load NV items from nvfile   		&lt;br /&gt;
 PmModemUpdater&amp;lt;firmware.tar           Update the firmware using a tar file as input&lt;br /&gt;
 PmModemUpdater&amp;lt;firmware.tar  -f       Force an update even the modem has the same version than tar file&lt;br /&gt;
 PmModemUpdater&amp;lt;firmware.tar  -s xx xx Force the modem to be flashed (RESCUE MODE)&lt;br /&gt;
 PmModemUpdater  -i            	      Start a data/voice test on your umts modem directly&lt;br /&gt;
 PmModemUpdater  -e            	      Ignore stop/start TIL/WAND&lt;br /&gt;
 PmModemUpdater  -o            	      silent mode which means no verbose output at all&lt;br /&gt;
 PmModemUpdater&amp;lt;firmware.tar -m        Force the modem to be flashed (INFINITE USB RESCUE MODE) on USB&lt;br /&gt;
&lt;br /&gt;
=== pmmodempower ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 for i in &amp;quot;$*&amp;quot;&lt;br /&gt;
    if [ &amp;quot;$i&amp;quot; = &amp;quot;on&amp;quot; ]&lt;br /&gt;
    then&lt;br /&gt;
	echo Powering On Modem&lt;br /&gt;
	echo 1 &amp;gt; /sys/user_hw/pins/modem/power_on/level&lt;br /&gt;
    fi&lt;br /&gt;
    if [ &amp;quot;$i&amp;quot; = &amp;quot;off&amp;quot; ]&lt;br /&gt;
    then &lt;br /&gt;
	echo Powering Off Modem&lt;br /&gt;
	echo 0 &amp;gt; /sys/user_hw/pins/modem/boot_mode/level&lt;br /&gt;
	echo 0 &amp;gt; /sys/user_hw/pins/modem/power_on/level&lt;br /&gt;
    fi&lt;br /&gt;
    if [ &amp;quot;$i&amp;quot; = &amp;quot;cycle&amp;quot; ]&lt;br /&gt;
    then&lt;br /&gt;
	echo Powering Off Modem&lt;br /&gt;
	echo 0 &amp;gt; /sys/user_hw/pins/modem/boot_mode/level&lt;br /&gt;
	echo 0 &amp;gt; /sys/user_hw/pins/modem/wakeup_modem/level&lt;br /&gt;
	echo 0 &amp;gt; /sys/user_hw/pins/modem/power_on/level&lt;br /&gt;
	sleep 2&lt;br /&gt;
	echo Powering On Modem&lt;br /&gt;
	echo 1 &amp;gt; /sys/user_hw/pins/modem/power_on/level&lt;br /&gt;
	#echo Waiting for MODEM_WAKE_APP Low&lt;br /&gt;
	#while [ &amp;quot;$appwake&amp;quot; != &amp;quot;0&amp;quot; ]&lt;br /&gt;
	#do&lt;br /&gt;
	#    appwake=`cat /sys/user_hw/pins/modem/wakeup_app/level`&lt;br /&gt;
	#done&lt;br /&gt;
	#echo Waiting for MODEM_WAKE_APP Pulse High&lt;br /&gt;
	#appwake=`cat /sys/user_hw/pins/modem/wakeup_app/level`&lt;br /&gt;
	#while [ &amp;quot;$appwake&amp;quot; != &amp;quot;1&amp;quot; ]&lt;br /&gt;
	#do&lt;br /&gt;
	#    appwake=`cat /sys/user_hw/pins/modem/wakeup_app/level`&lt;br /&gt;
	#done&lt;br /&gt;
	#while [ &amp;quot;$appwake&amp;quot; != &amp;quot;0&amp;quot; ]&lt;br /&gt;
	#do&lt;br /&gt;
	#    appwake=`cat /sys/user_hw/pins/modem/wakeup_app/level`&lt;br /&gt;
	#done&lt;br /&gt;
	echo Asserting APP_WAKE_MODEM&lt;br /&gt;
	echo 1 &amp;gt; /sys/user_hw/pins/modem/wakeup_modem/level&lt;br /&gt;
    fi&lt;br /&gt;
 done&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== PmLinuxModemCmd ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 usage: PmLinuxModemCmd &amp;lt;Port&amp;gt; &amp;lt;[a][b][c][d &amp;lt;number&amp;gt;][e][f][ftm][h][g][i][k &amp;lt;#pkts&amp;gt;][l][m][n][o][pcmloopback &amp;lt;radio&amp;gt; &amp;lt;state&amp;gt;][q][r][s][t][u &amp;lt;#pkts&amp;gt;][zr][zt][zl][1] [5][9]]&amp;gt; [v]&lt;br /&gt;
 where: &amp;lt;Port&amp;gt;:&lt;br /&gt;
           /dev/ttyS0         - Modem UART. - UART PORT&lt;br /&gt;
           /dev/tts/modem0    - USB Serial to Modem for AT commands - DATA PORT.&lt;br /&gt;
           /dev/tts/modemdiag - USB Serial to Modem for Diagnostics - DIAG PORT.&lt;br /&gt;
 where:&lt;br /&gt;
       e - empty read buffer from specified port.&lt;br /&gt;
       u - Loopback mode performance test. Next argument &amp;lt;#pkts&amp;gt;&lt;br /&gt;
  UART PORT COMMANDS: (/dev/ttyS0) &lt;br /&gt;
       b  - Send loopback mode command for 256 bytes. UART goes into loopback mode until power cycle.&lt;br /&gt;
       d  - Send commands to dial a phone number. Phone number in the format 4086178327.&lt;br /&gt;
       f  - Send offline mode and read pkt.&lt;br /&gt;
       ftm - Enter modem FTM mode (both CDMA and GSM modems).&lt;br /&gt;
       i  - Send identify command.&lt;br /&gt;
       l  - Send testalive then loop forever doing ( onlinemode, offlinemode, sleep  to UART.&lt;br /&gt;
       m  - Disable loopback mode.&lt;br /&gt;
       o  - Send online mode and read pkt.&lt;br /&gt;
       pcmloopback - control PCM loopback. &amp;lt;radio&amp;gt; = GSM/CDMA &amp;lt;state&amp;gt; = on/off.&lt;br /&gt;
       q  - Send test alive, online mode and then read pkts.&lt;br /&gt;
       r  - Get firmware version.&lt;br /&gt;
       t  - Send test alive and read pkt.&lt;br /&gt;
       1  - Send command to enable 1A charging.&lt;br /&gt;
       5  - Send command to enable 500mA charging.&lt;br /&gt;
       9  - Send command to enable 90mA charge.&lt;br /&gt;
       zs - CDMA reset modem.&lt;br /&gt;
       zt - CDMA send test alive and read pkts.&lt;br /&gt;
       zdiagonusb - CDMA put diag port on USB diag.&lt;br /&gt;
       zdiagonuart- CDMA put diag port on UART.&lt;br /&gt;
  DATA PORT COMMANDS: (/dev/tts/modem0) &lt;br /&gt;
       a - Send AT\n.&lt;br /&gt;
       c - Send ATCGDCONT\n.&lt;br /&gt;
       h - Send Echo command.&lt;br /&gt;
       k - Test loopback perf using command (ATE1\n).&lt;br /&gt;
  DIAG PORT COMMANDS: (/dev/tts/modemdiag) &lt;br /&gt;
       g  - Get QPST serial port config from DIAG port.&lt;br /&gt;
       s  - Get ESN from DIAG port.&lt;br /&gt;
       zl - CDMA put modemdiag into loopback. &lt;br /&gt;
       zr - CDMA Read performance tests. Takes two arguments &amp;lt;numpkts&amp;gt; and &amp;lt;pktSize&amp;gt;.&lt;br /&gt;
               Eg. %s /dev/tts/modemdiag zr &amp;lt;NumPkts&amp;gt; &amp;lt;PktSize&amp;gt; [v] &lt;br /&gt;
       zw - CDMA Write performance tests. Takes two arguments &amp;lt;numpkts&amp;gt; and &amp;lt;pktSize&amp;gt;.&lt;br /&gt;
               Eg. %s /dev/tts/modemdiag zw &amp;lt;NumPkts&amp;gt; &amp;lt;PktSize&amp;gt; [v] &lt;br /&gt;
       zu - CDMA Performance tests of the diag port after putting it into loopback. Takes two arguments &amp;lt;numpkts&amp;gt; and &amp;lt;pktSize&amp;gt;. &lt;br /&gt;
               Eg. %s /dev/tts/modemdiag zu &amp;lt;NumPkts&amp;gt; &amp;lt;PktSize&amp;gt; [v] &lt;br /&gt;
 where  v - verbose output.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== TelephonyInterfaceLayerGsm ==&lt;br /&gt;
&lt;br /&gt;
/usr/bin/TelephonyInterfaceLayerGsm connects to /dev/modemuart with a baudrate of 115200. Trying the same with screen shows me just rubbish. Seem to be the binary protocol. Make sure you rename the file before killing the process as it gets restarted automatically.&lt;br /&gt;
&lt;br /&gt;
To strace TelephonyInterfaceLayerGsm and write out the relevant communication to /dev/modemuart we offer a small shell script below. Make sure your / is remounted rw for it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
#Make sure TelephonyInterfaceLayerGsm gets not restarted when we kill it&lt;br /&gt;
mv /usr/bin/TelephonyInterfaceLayerGsm /usr/bin/TelephonyInterfaceLayerGsm-backup&lt;br /&gt;
kill $(pidof TelephonyInterfaceLayerGsm)&lt;br /&gt;
&lt;br /&gt;
sleep 2&lt;br /&gt;
&lt;br /&gt;
#I always had fd=10 for /dev/modemuart, be verbose on reads on writes on this fd&lt;br /&gt;
strace -x -s 10000 -f -F -o gsm.log -e read=10 -e write=10 TelephonyInterfaceLayerGsm-backup &amp;amp;&lt;br /&gt;
sleep 25&lt;br /&gt;
kill $(pidof TelephonyInterfaceLayerGsm-backup)&lt;br /&gt;
&lt;br /&gt;
sleep 2&lt;br /&gt;
&lt;br /&gt;
#Bring the system into a useable state again           &lt;br /&gt;
mv /usr/bin/TelephonyInterfaceLayerGsm-backup /usr/bin/TelephonyInterfaceLayerGsm&lt;br /&gt;
sh /etc/event.d/TelephonyInterfaceLayer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>StefanSchmidt</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Custom_Kernels&amp;diff=6504</id>
		<title>Custom Kernels</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Custom_Kernels&amp;diff=6504"/>
		<updated>2009-10-15T18:32:03Z</updated>

		<summary type="html">&lt;p&gt;StefanSchmidt: Clarify the g_compisite part of the custom kernel&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Some caveats and warnings:'''&lt;br /&gt;
&lt;br /&gt;
At this point, the kernels I've compiled seem to work fine.&lt;br /&gt;
These steps assume that root access is enabled on your Pre, and a secure ssh access mechanism is available.&lt;br /&gt;
&lt;br /&gt;
This procedure has only been verified to work on WebOS 1.0.3 through 1.0.4 and 1.1.3.  Any prior or future releases may not work.&lt;br /&gt;
&lt;br /&gt;
If anything goes wrong during the installation, your device may end up in a state where the kernel can't boot, in which case you can use [[bootie]] to change the boot kernel to the previous one.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' currently, unless you plan to do that just out of scientific interest, there's no real reason to build a custom kernel as everything is available in the &amp;quot;standard&amp;quot; one. In fact these instructions should build exactly (well, not //exactly// because Palm may be using a different version of the compiler) the same kernel you already have on the device.&lt;br /&gt;
&lt;br /&gt;
=Custom Kernel=&lt;br /&gt;
== Download and install the cross-compiler==&lt;br /&gt;
&lt;br /&gt;
1. Download the appropriate [http://www.codesourcery.com/sgpp/lite/arm/portal/release858 ARM toolchain] for your the platform you'll be building on.  So far, all testing has been done using the [http://www.codesourcery.com/sgpp/lite/arm/portal/package4571/public/arm-none-linux-gnueabi/arm-2009q1-203-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2 IA32 Linux toolchain, 2009q1 release]. '''NOTE:''' The compiler used by palm is actually [http://www.codesourcery.com/sgpp/lite/arm/portal/release313 this one]. The [http://www.codesourcery.com/sgpp/lite/arm/portal/package1788/public/arm-none-linux-gnueabi/arm-2007q3-51-arm-none-linux-gnueabi-i686-mingw32.tar.bz2 IA32 Linux toolchain, 2007q3-51 release]&lt;br /&gt;
&lt;br /&gt;
2. Un-tar the toolchain distribution to a convenient location on your system.  I extracted it to a temporary directory and moved the arm-2009q1 subdirectory to /usr/local/arm, with subdirectories arm-none-linux-gnueabi, bin  lib, libexec, share, and usr below.&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
tar xjvf arm-2009q1-203-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2&lt;br /&gt;
sudo mv arm-2009q1 /usr/local/arm&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3. To use the toolchain properly for kernel builds (and anything else you want to cross-compile for the Pre) you'll want to have some environment variables set.  The following, based on the setup-env script from the opennoko toolchain, is what I use to setup my Pre cross-compile environment.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
export PRETOOL_DIR=&amp;quot;/usr/local/arm&amp;quot;&lt;br /&gt;
(echo &amp;quot;$PATH&amp;quot; | grep -q &amp;quot;${PRETOOL_DIR}&amp;quot;) || export PATH=&amp;quot;${PRETOOL_DIR}/bin:${PATH}&amp;quot;&lt;br /&gt;
export STRIP=&amp;quot;arm-none-linux-gnueabi-strip&amp;quot;&lt;br /&gt;
export LD=&amp;quot;arm-none-linux-gnueabi-ld&amp;quot;&lt;br /&gt;
export CC=&amp;quot;arm-none-linux-gnueabi-gcc -march=armv4t -mtune=arm920t&amp;quot;&lt;br /&gt;
export CPPFLAGS=&amp;quot;-isystem${PRETOOL_DIR}/arm/arm-none-linux-gnueabi/include&amp;quot;&lt;br /&gt;
export RANLIB=&amp;quot;arm-none-linux-gnueabi-ranlib&amp;quot;&lt;br /&gt;
export CXX=&amp;quot;arm-none-linux-gnueabi-g++ -march=armv4t -mtune=arm920t&amp;quot;&lt;br /&gt;
export OBJCOPY=&amp;quot;arm-none-linux-gnueabi-objcopy&amp;quot;&lt;br /&gt;
export PKG_CONFIG_PATH=&amp;quot;${PRETOOL_DIR}/usr/local/lib/pkgconfig&amp;quot;&lt;br /&gt;
export PKG_CONFIG_SYSROOT_DIR=&amp;quot;${PRETOOL_DIR}/arm/arm-none-linux-gnueabi&amp;quot;&lt;br /&gt;
#export LDFLAGS=&amp;quot;-L${PRETOOL_DIR}/usr/local/lib -Wl,-rpath-link,${PRETOOL_DIR}/arm/arm-none-linux-gnueabi/lib -Wl,-O1&amp;quot;&lt;br /&gt;
export CCLD=&amp;quot;arm-none-linux-gnueabi-gcc -march=armv4t -mtune=arm920t&amp;quot;&lt;br /&gt;
export MAKE=&amp;quot;make&amp;quot;&lt;br /&gt;
export CFLAGS=&amp;quot;-isystem${PRETOOL_DIR}/usr/local/include -fexpensive-optimizations -fomit-frame-pointer -frename-registers -Os&amp;quot;&lt;br /&gt;
export CXXFLAGS=&amp;quot;-isystem${PRETOOL_DIR}/arm/arm-none-linux-gnueabi/include -fexpensive-optimizations -fomit-frame-pointer -frename-registers -Os -fpermissive -fvisibility-inlines-hidden&amp;quot;&lt;br /&gt;
export F77=&amp;quot;arm-none-linux-gnueabi-g77 -march=armv4t -mtune=arm920t&amp;quot;&lt;br /&gt;
export AS=&amp;quot;arm-none-linux-gnueabi-as&amp;quot;&lt;br /&gt;
export AR=&amp;quot;arm-none-linux-gnueabi-ar&amp;quot;&lt;br /&gt;
export CPP=&amp;quot;arm-none-linux-gnueabi-gcc -E&amp;quot;&lt;br /&gt;
export OBJDUMP=&amp;quot;arm-none-linux-gnueabi-objdump&amp;quot;&lt;br /&gt;
export CONFIG_SITE=&amp;quot;${PRETOOL_DIR}/arm/site-config&amp;quot;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To use it, just change PRETOOL_DIR to the root directory of your toolchain, then source it into your shell:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
. /usr/local/pre/setup-env&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Build U-Boot and install the mkimage utility==&lt;br /&gt;
&lt;br /&gt;
To build the kernel as a uImage file, you will need the mkimage utility, which is part of [http://www.denx.de/wiki/U-Boot U-Boot].  If mkimage is already on your system, great.  It wasn't on mine, so here's what I did to install it.&lt;br /&gt;
&lt;br /&gt;
1. Download the [ftp://ftp.denx.de/pub/u-boot/u-boot-2009.06.tar.bz2 latest U-boot release].&lt;br /&gt;
&lt;br /&gt;
2. Extract the tarball&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
tar xjvf ../u-boot-2009.06.tar.bz2&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3. Configure U-Boot for the Pre.  I don't know that the mkimage utility is architecture-specific, but I used the config that looked like it most closely matched the Pre's architecture just to be safe:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
cd u-boot-2009.06&lt;br /&gt;
make omap3_beagle_config&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4. u-boot seems to want the commands in a slightly different format so make some links in /usr/local/arm/bin&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
cd /usr/local/arm/bin&lt;br /&gt;
ln -s arm-none-linux-gnueabi-gcc arm-linux-gcc&lt;br /&gt;
ln -s arm-none-linux-gnueabi-ar arm-linux-ar&lt;br /&gt;
ln -s arm-none-linux-gnueabi-ld arm-linux-ld&lt;br /&gt;
ln -s arm-none-linux-gnueabi-objcopy arm-linux-objcopy&lt;br /&gt;
ln -s arm-none-linux-gnueabi-objdump arm-linux-objdump&lt;br /&gt;
ln -s arm-none-linux-gnueabi-nm arm-linux-nm&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5. The mkimage utility should now be built in the tools subdirectory.  To make it available for the kernel build, I just manually copied it into /usr/local/bin.  Just make sure it's available somewhere in your PATH, or the kernel build will fail.&lt;br /&gt;
&lt;br /&gt;
== Download, patch, configure, and build the kernel.==&lt;br /&gt;
&lt;br /&gt;
6. From Palm's [http://opensource.palm.com/packages.html Open Source Packages] page, download the [http://palm.cdnetworks.net/opensource/1.0.1/linuxkernel-2.6.24.tgz Linux 2.6.24 kernel tarball] and [http://palm.cdnetworks.net/opensource/1.0.1/linux-2.6.24-patch.gz Palm's kernel modifications].&lt;br /&gt;
&lt;br /&gt;
7. Extract the kernel tarball somewhere on your system, and gunzip the compressed patch file in the linux-2.6.24 directory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
cd linux-2.6.24&lt;br /&gt;
gunzip linux-2.6.24-patch.gz                                                &lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
8. Apply Palm's kernel patches to the kernel source tree.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
patch -p1 &amp;lt; linux-2.6.24-patch&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
9. Configure the kernel&lt;br /&gt;
&lt;br /&gt;
Your Pre should have a config file in the /boot directory that is ostensibly what was used to build the original kernel.  This file is virtually identical to the file arch/arm/configs/omap_sirloin_3430_defconfig in the patched kernel tree.  Copy either file (I used the defconfig) to a file named &amp;quot;.config&amp;quot; in the top level of your source tree.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' if you change the vermagic, you won't be able to load binary-only modules. Until you can rebuild all the modules, it's probably a good idea to leave CONFIG_LOCALVERSION=&amp;quot;-joplin-3430&amp;quot;&lt;br /&gt;
&lt;br /&gt;
'''Modules'''&lt;br /&gt;
These are the modules that look to be binary only.&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
./dspbridge/bridgedriver.ko&lt;br /&gt;
./drivers/misc/exmap.ko&lt;br /&gt;
./kernel/net/wifi/sd8xxx.ko&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, you're ready to build.&lt;br /&gt;
&lt;br /&gt;
10. Build the kernel&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
make &amp;amp;&amp;amp; make uImage&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will take some time.  Assuming you followed the above steps, and assuming I didn't miss anything in documenting them, you should have a uImage file in arch/arm/boot once the &amp;quot;make uImage&amp;quot; command completes.  The uImage target requires the mkimage mentioned earlier.  Again, make sure it's in your path.&lt;br /&gt;
&lt;br /&gt;
Now that the kernel's built, it's time to install it on the Pre.&lt;br /&gt;
&lt;br /&gt;
== Install the kernel on your Pre (here be dragons)==&lt;br /&gt;
&lt;br /&gt;
The following steps are crucial.  I've done my best to capture the steps I went through, but I make no promises.  If you botch the kernel install, you're probably looking at wiping your phone clean with WebOS doctor and restoring all your files/settings.  You've been warned.&lt;br /&gt;
&lt;br /&gt;
These instructions assume you've installed and configured the sudo package.  If you prefer, you can just do everything as root.&lt;br /&gt;
&lt;br /&gt;
1. Copy it over&lt;br /&gt;
&lt;br /&gt;
There are a bunch of ways to copy files onto the Pre.  I use scp to copy the arch/arm/boot/uImage and System.map files into the /tmp directory first.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
scp -P 222 arch/arm/boot/uImage userid@1.2.3.4:/tmp/uImage-2.6.24-palm-joplin-3430-custom&lt;br /&gt;
scp -P 222 drivers/usb/gadget/composite/g_composite.ko userid@1.2.3.4:/tmp/&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. Fix file ownership and permissions&lt;br /&gt;
&lt;br /&gt;
Next, I ssh in to my Pre and change the owner/group of the files to root, and make sure the permissions are set properly.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
sudo chown root:root /tmp/uImage-2.6.24-palm-joplin-3430-custom /tmp/System.map-2.6.24-palm-joplin-3430-custom&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3. Prepare modules for new kernel&lt;br /&gt;
&lt;br /&gt;
The above mentioned modules will only load when we have the same LOCALVERSION set. Thje defconfig does that for you. Still the g_composite module did not load for me with a custom kernel due to symbol problems. Luckily the source is included in the kernel patch and already built as module. We need to make a backup of our modules directory and then replace the old g_composite.ko with our selfbuild one.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
cd /lib/modules&lt;br /&gt;
sudo cp -rp 2.6.24-palm-joplin-3430 2.6.24-palm-joplin-3430-backup&lt;br /&gt;
sudo mv /tmp/g_composite.ko 2.6.24-palm-joplin-3430/kernel/drivers/usb/gadget/composite/&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4. Switcheroo time!&lt;br /&gt;
&lt;br /&gt;
Now, you're going to to mount the /boot partition read-write, remove the uImage symbolic link, replace it with a link to your new kernel, and remount the /boot partition read-only.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
cd /boot&lt;br /&gt;
sudo mount -o remount,rw /boot&lt;br /&gt;
sudo rm uImage&lt;br /&gt;
sudo ln -s uImage-2.6.24-palm-joplin-3430 uImage&lt;br /&gt;
sudo mount -o remount,ro /boot&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5. Double check the files and permissions&lt;br /&gt;
&lt;br /&gt;
Just because I'm paranoid, I always take a look at the /boot directory to make sure everything is in order.  The uImage symbolic link should properly point to your new kernel file, and the permissions should match those of the original kernel.  Here's what mine looks like after replacing the kernel:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
-rw-r--r--    1 root     root      1098470 May 22 16:24 System.map-2.6.24-palm-joplin-3430&lt;br /&gt;
drwxr-xr-x    2 root     root         4096 Dec 31  1999 bin&lt;br /&gt;
-rw-r--r--    1 root     root        53756 Jun 16 21:47 boot.bin&lt;br /&gt;
-rw-r--r--    1 root     root            8 Jun 16 21:47 bootheader&lt;br /&gt;
-rw-r--r--    1 root     root        43372 May 22 16:24 config-2.6.24-palm-joplin-3430&lt;br /&gt;
drwxr-xr-x    2 root     root         4096 Dec 31  1999 dev&lt;br /&gt;
drwxr-xr-x    3 root     root         4096 Dec 31  1999 etc&lt;br /&gt;
drwxr-xr-x    2 root     root         4096 Dec 31  1999 lib&lt;br /&gt;
drwx------    2 root     root        16384 Dec 31  1999 lost+found&lt;br /&gt;
drwxr-xr-x    2 root     root         4096 Dec 31  1999 proc&lt;br /&gt;
drwxr-xr-x    2 root     root         4096 Dec 31  1999 realroot&lt;br /&gt;
drwxr-xr-x    2 root     root         4096 Dec 31  1999 sbin&lt;br /&gt;
drwxr-xr-x    2 root     root         4096 Dec 31  1999 sys&lt;br /&gt;
lrwxrwxrwx    1 root     root           30 Jun 24 12:16 uImage -&amp;gt; uImage-2.6.24-palm-joplin-3430&lt;br /&gt;
-rw-r--r--    1 root     root      2217848 May 22 16:24 uImage-2.6.24-palm-joplin-3430&lt;br /&gt;
-rw-r--r--    1 root     root      2226296 Jun 24 00:17 uImage-2.6.24-palm-joplin-3430-backup&lt;br /&gt;
drwxr-xr-x    5 root     root         4096 Dec 31  1999 usr&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== The moment of truth==&lt;br /&gt;
&lt;br /&gt;
1. Reset your Pre&lt;br /&gt;
&lt;br /&gt;
Hold '''Orange-Sym-R''' to reboot.  If all goes well, you'll see the flashing Palm logo and eventually WebOS will come up.  ssh into your Pre and run uname -a to confirm that the new kernel is indeed running.  If it is, congrats, you're running your own kernel.  Happy hunting!&lt;/div&gt;</summary>
		<author><name>StefanSchmidt</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Custom_Kernels&amp;diff=6503</id>
		<title>Custom Kernels</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Custom_Kernels&amp;diff=6503"/>
		<updated>2009-10-15T18:22:45Z</updated>

		<summary type="html">&lt;p&gt;StefanSchmidt: remove notes to change the LOCALVERSION as they bring more problems then advantage&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Some caveats and warnings:'''&lt;br /&gt;
&lt;br /&gt;
At this point, the kernels I've compiled seem to work fine.&lt;br /&gt;
These steps assume that root access is enabled on your Pre, and a secure ssh access mechanism is available.&lt;br /&gt;
&lt;br /&gt;
This procedure has only been verified to work on WebOS 1.0.3 through 1.0.4 and 1.1.3.  Any prior or future releases may not work.&lt;br /&gt;
&lt;br /&gt;
If anything goes wrong during the installation, your device may end up in a state where the kernel can't boot, in which case you can use [[bootie]] to change the boot kernel to the previous one.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' currently, unless you plan to do that just out of scientific interest, there's no real reason to build a custom kernel as everything is available in the &amp;quot;standard&amp;quot; one. In fact these instructions should build exactly (well, not //exactly// because Palm may be using a different version of the compiler) the same kernel you already have on the device.&lt;br /&gt;
&lt;br /&gt;
=Custom Kernel=&lt;br /&gt;
== Download and install the cross-compiler==&lt;br /&gt;
&lt;br /&gt;
1. Download the appropriate [http://www.codesourcery.com/sgpp/lite/arm/portal/release858 ARM toolchain] for your the platform you'll be building on.  So far, all testing has been done using the [http://www.codesourcery.com/sgpp/lite/arm/portal/package4571/public/arm-none-linux-gnueabi/arm-2009q1-203-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2 IA32 Linux toolchain, 2009q1 release]. '''NOTE:''' The compiler used by palm is actually [http://www.codesourcery.com/sgpp/lite/arm/portal/release313 this one]. The [http://www.codesourcery.com/sgpp/lite/arm/portal/package1788/public/arm-none-linux-gnueabi/arm-2007q3-51-arm-none-linux-gnueabi-i686-mingw32.tar.bz2 IA32 Linux toolchain, 2007q3-51 release]&lt;br /&gt;
&lt;br /&gt;
2. Un-tar the toolchain distribution to a convenient location on your system.  I extracted it to a temporary directory and moved the arm-2009q1 subdirectory to /usr/local/arm, with subdirectories arm-none-linux-gnueabi, bin  lib, libexec, share, and usr below.&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
tar xjvf arm-2009q1-203-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2&lt;br /&gt;
sudo mv arm-2009q1 /usr/local/arm&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3. To use the toolchain properly for kernel builds (and anything else you want to cross-compile for the Pre) you'll want to have some environment variables set.  The following, based on the setup-env script from the opennoko toolchain, is what I use to setup my Pre cross-compile environment.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
export PRETOOL_DIR=&amp;quot;/usr/local/arm&amp;quot;&lt;br /&gt;
(echo &amp;quot;$PATH&amp;quot; | grep -q &amp;quot;${PRETOOL_DIR}&amp;quot;) || export PATH=&amp;quot;${PRETOOL_DIR}/bin:${PATH}&amp;quot;&lt;br /&gt;
export STRIP=&amp;quot;arm-none-linux-gnueabi-strip&amp;quot;&lt;br /&gt;
export LD=&amp;quot;arm-none-linux-gnueabi-ld&amp;quot;&lt;br /&gt;
export CC=&amp;quot;arm-none-linux-gnueabi-gcc -march=armv4t -mtune=arm920t&amp;quot;&lt;br /&gt;
export CPPFLAGS=&amp;quot;-isystem${PRETOOL_DIR}/arm/arm-none-linux-gnueabi/include&amp;quot;&lt;br /&gt;
export RANLIB=&amp;quot;arm-none-linux-gnueabi-ranlib&amp;quot;&lt;br /&gt;
export CXX=&amp;quot;arm-none-linux-gnueabi-g++ -march=armv4t -mtune=arm920t&amp;quot;&lt;br /&gt;
export OBJCOPY=&amp;quot;arm-none-linux-gnueabi-objcopy&amp;quot;&lt;br /&gt;
export PKG_CONFIG_PATH=&amp;quot;${PRETOOL_DIR}/usr/local/lib/pkgconfig&amp;quot;&lt;br /&gt;
export PKG_CONFIG_SYSROOT_DIR=&amp;quot;${PRETOOL_DIR}/arm/arm-none-linux-gnueabi&amp;quot;&lt;br /&gt;
#export LDFLAGS=&amp;quot;-L${PRETOOL_DIR}/usr/local/lib -Wl,-rpath-link,${PRETOOL_DIR}/arm/arm-none-linux-gnueabi/lib -Wl,-O1&amp;quot;&lt;br /&gt;
export CCLD=&amp;quot;arm-none-linux-gnueabi-gcc -march=armv4t -mtune=arm920t&amp;quot;&lt;br /&gt;
export MAKE=&amp;quot;make&amp;quot;&lt;br /&gt;
export CFLAGS=&amp;quot;-isystem${PRETOOL_DIR}/usr/local/include -fexpensive-optimizations -fomit-frame-pointer -frename-registers -Os&amp;quot;&lt;br /&gt;
export CXXFLAGS=&amp;quot;-isystem${PRETOOL_DIR}/arm/arm-none-linux-gnueabi/include -fexpensive-optimizations -fomit-frame-pointer -frename-registers -Os -fpermissive -fvisibility-inlines-hidden&amp;quot;&lt;br /&gt;
export F77=&amp;quot;arm-none-linux-gnueabi-g77 -march=armv4t -mtune=arm920t&amp;quot;&lt;br /&gt;
export AS=&amp;quot;arm-none-linux-gnueabi-as&amp;quot;&lt;br /&gt;
export AR=&amp;quot;arm-none-linux-gnueabi-ar&amp;quot;&lt;br /&gt;
export CPP=&amp;quot;arm-none-linux-gnueabi-gcc -E&amp;quot;&lt;br /&gt;
export OBJDUMP=&amp;quot;arm-none-linux-gnueabi-objdump&amp;quot;&lt;br /&gt;
export CONFIG_SITE=&amp;quot;${PRETOOL_DIR}/arm/site-config&amp;quot;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To use it, just change PRETOOL_DIR to the root directory of your toolchain, then source it into your shell:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
. /usr/local/pre/setup-env&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Build U-Boot and install the mkimage utility==&lt;br /&gt;
&lt;br /&gt;
To build the kernel as a uImage file, you will need the mkimage utility, which is part of [http://www.denx.de/wiki/U-Boot U-Boot].  If mkimage is already on your system, great.  It wasn't on mine, so here's what I did to install it.&lt;br /&gt;
&lt;br /&gt;
1. Download the [ftp://ftp.denx.de/pub/u-boot/u-boot-2009.06.tar.bz2 latest U-boot release].&lt;br /&gt;
&lt;br /&gt;
2. Extract the tarball&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
tar xjvf ../u-boot-2009.06.tar.bz2&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3. Configure U-Boot for the Pre.  I don't know that the mkimage utility is architecture-specific, but I used the config that looked like it most closely matched the Pre's architecture just to be safe:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
cd u-boot-2009.06&lt;br /&gt;
make omap3_beagle_config&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4. u-boot seems to want the commands in a slightly different format so make some links in /usr/local/arm/bin&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
cd /usr/local/arm/bin&lt;br /&gt;
ln -s arm-none-linux-gnueabi-gcc arm-linux-gcc&lt;br /&gt;
ln -s arm-none-linux-gnueabi-ar arm-linux-ar&lt;br /&gt;
ln -s arm-none-linux-gnueabi-ld arm-linux-ld&lt;br /&gt;
ln -s arm-none-linux-gnueabi-objcopy arm-linux-objcopy&lt;br /&gt;
ln -s arm-none-linux-gnueabi-objdump arm-linux-objdump&lt;br /&gt;
ln -s arm-none-linux-gnueabi-nm arm-linux-nm&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5. The mkimage utility should now be built in the tools subdirectory.  To make it available for the kernel build, I just manually copied it into /usr/local/bin.  Just make sure it's available somewhere in your PATH, or the kernel build will fail.&lt;br /&gt;
&lt;br /&gt;
== Download, patch, configure, and build the kernel.==&lt;br /&gt;
&lt;br /&gt;
6. From Palm's [http://opensource.palm.com/packages.html Open Source Packages] page, download the [http://palm.cdnetworks.net/opensource/1.0.1/linuxkernel-2.6.24.tgz Linux 2.6.24 kernel tarball] and [http://palm.cdnetworks.net/opensource/1.0.1/linux-2.6.24-patch.gz Palm's kernel modifications].&lt;br /&gt;
&lt;br /&gt;
7. Extract the kernel tarball somewhere on your system, and gunzip the compressed patch file in the linux-2.6.24 directory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
cd linux-2.6.24&lt;br /&gt;
gunzip linux-2.6.24-patch.gz                                                &lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
8. Apply Palm's kernel patches to the kernel source tree.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
patch -p1 &amp;lt; linux-2.6.24-patch&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
9. Configure the kernel&lt;br /&gt;
&lt;br /&gt;
Your Pre should have a config file in the /boot directory that is ostensibly what was used to build the original kernel.  This file is virtually identical to the file arch/arm/configs/omap_sirloin_3430_defconfig in the patched kernel tree.  Copy either file (I used the defconfig) to a file named &amp;quot;.config&amp;quot; in the top level of your source tree.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' if you change the vermagic, you won't be able to load binary-only modules. Until you can rebuild all the modules, it's probably a good idea to leave CONFIG_LOCALVERSION=&amp;quot;-joplin-3430&amp;quot;&lt;br /&gt;
&lt;br /&gt;
'''Modules'''&lt;br /&gt;
These are the modules that look to be binary only.&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
./dspbridge/bridgedriver.ko&lt;br /&gt;
./drivers/misc/exmap.ko&lt;br /&gt;
./kernel/net/wifi/sd8xxx.ko&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, you're ready to build.&lt;br /&gt;
&lt;br /&gt;
10. Build the kernel&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
make &amp;amp;&amp;amp; make uImage&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will take some time.  Assuming you followed the above steps, and assuming I didn't miss anything in documenting them, you should have a uImage file in arch/arm/boot once the &amp;quot;make uImage&amp;quot; command completes.  The uImage target requires the mkimage mentioned earlier.  Again, make sure it's in your path.&lt;br /&gt;
&lt;br /&gt;
Now that the kernel's built, it's time to install it on the Pre.&lt;br /&gt;
&lt;br /&gt;
== Install the kernel on your Pre (here be dragons)==&lt;br /&gt;
&lt;br /&gt;
The following steps are crucial.  I've done my best to capture the steps I went through, but I make no promises.  If you botch the kernel install, you're probably looking at wiping your phone clean with WebOS doctor and restoring all your files/settings.  You've been warned.&lt;br /&gt;
&lt;br /&gt;
These instructions assume you've installed and configured the sudo package.  If you prefer, you can just do everything as root.&lt;br /&gt;
&lt;br /&gt;
1. Copy it over&lt;br /&gt;
&lt;br /&gt;
There are a bunch of ways to copy files onto the Pre.  I use scp to copy the arch/arm/boot/uImage and System.map files into the /tmp directory first.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
scp -P 222 arch/arm/boot/uImage userid@1.2.3.4:/tmp/uImage-2.6.24-palm-joplin-3430-custom&lt;br /&gt;
scp -P 222 System.map userid@1.2.3.4:/tmp/System.map-2.6.24-palm-joplin-3430-custom&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. Fix file ownership and permissions&lt;br /&gt;
&lt;br /&gt;
Next, I ssh in to my Pre and change the owner/group of the files to root, and make sure the permissions are set properly.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
sudo chown root:root /tmp/uImage-2.6.24-palm-joplin-3430-custom /tmp/System.map-2.6.24-palm-joplin-3430-custom&lt;br /&gt;
sudo chmod 644 /tmp/uImage-2.6.24-palm-joplin-3430-custom /tmp/System.map-2.6.24-palm-joplin-3430-custom&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3. Duplicate the modules directory from the original kernel&lt;br /&gt;
&lt;br /&gt;
Technically, we should be copying over our custom-compiled kernel modules here, but the Pre seems to have some closed source modules that we can't build ourselves, particularly the Marvell sd8xxx wi-fi driver.  So, I just copied the modules directory for the replacement kernel:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
cd /lib/modules&lt;br /&gt;
sudo cp -rp 2.6.24-palm-joplin-3430 2.6.24-palm-joplin-3430-custom&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4. Switcheroo time!&lt;br /&gt;
&lt;br /&gt;
Now, you're going to to mount the /boot partition read-write, remove the uImage symbolic link, replace it with a link to your new kernel, and remount the /boot partition read-only.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
cd /boot&lt;br /&gt;
sudo mount -o remount,rw /boot&lt;br /&gt;
sudo rm uImage&lt;br /&gt;
sudo ln -s uImage-2.6.24-palm-joplin-3430 uImage&lt;br /&gt;
sudo mount -o remount,ro /boot&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5. Double check the files and permissions&lt;br /&gt;
&lt;br /&gt;
Just because I'm paranoid, I always take a look at the /boot directory to make sure everything is in order.  The uImage symbolic link should properly point to your new kernel file, and the permissions should match those of the original kernel.  Here's what mine looks like after replacing the kernel:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
-rw-r--r--    1 root     root      1098470 May 22 16:24 System.map-2.6.24-palm-joplin-3430&lt;br /&gt;
-rw-r--r--    1 root     root      1098329 Jun 24 00:17 System.map-2.6.24-palm-joplin-3430-custom&lt;br /&gt;
drwxr-xr-x    2 root     root         4096 Dec 31  1999 bin&lt;br /&gt;
-rw-r--r--    1 root     root        53756 Jun 16 21:47 boot.bin&lt;br /&gt;
-rw-r--r--    1 root     root            8 Jun 16 21:47 bootheader&lt;br /&gt;
-rw-r--r--    1 root     root        43372 May 22 16:24 config-2.6.24-palm-joplin-3430&lt;br /&gt;
drwxr-xr-x    2 root     root         4096 Dec 31  1999 dev&lt;br /&gt;
drwxr-xr-x    3 root     root         4096 Dec 31  1999 etc&lt;br /&gt;
drwxr-xr-x    2 root     root         4096 Dec 31  1999 lib&lt;br /&gt;
drwx------    2 root     root        16384 Dec 31  1999 lost+found&lt;br /&gt;
drwxr-xr-x    2 root     root         4096 Dec 31  1999 proc&lt;br /&gt;
drwxr-xr-x    2 root     root         4096 Dec 31  1999 realroot&lt;br /&gt;
drwxr-xr-x    2 root     root         4096 Dec 31  1999 sbin&lt;br /&gt;
drwxr-xr-x    2 root     root         4096 Dec 31  1999 sys&lt;br /&gt;
lrwxrwxrwx    1 root     root           30 Jun 24 12:16 uImage -&amp;gt; uImage-2.6.24-palm-joplin-3430-custom&lt;br /&gt;
-rw-r--r--    1 root     root      2217848 May 22 16:24 uImage-2.6.24-palm-joplin-3430&lt;br /&gt;
-rw-r--r--    1 root     root      2226296 Jun 24 00:17 uImage-2.6.24-palm-joplin-3430-custom&lt;br /&gt;
drwxr-xr-x    5 root     root         4096 Dec 31  1999 usr&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== The moment of truth==&lt;br /&gt;
&lt;br /&gt;
1. Reset your Pre&lt;br /&gt;
&lt;br /&gt;
Hold '''Orange-Sym-R''' to reboot.  If all goes well, you'll see the flashing Palm logo and eventually WebOS will come up.  ssh into your Pre and run uname -a to confirm that the new kernel is indeed running.  If it is, congrats, you're running your own kernel.  Happy hunting!&lt;/div&gt;</summary>
		<author><name>StefanSchmidt</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Research_Pre_GSM_Modem&amp;diff=6476</id>
		<title>Research Pre GSM Modem</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Research_Pre_GSM_Modem&amp;diff=6476"/>
		<updated>2009-10-14T12:14:27Z</updated>

		<summary type="html">&lt;p&gt;StefanSchmidt: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Modem Ports ==&lt;br /&gt;
There are several ports for communicating with the modem on the Palm Pre:&lt;br /&gt;
* /dev/modemuart: Modem UART (UART Port)&lt;br /&gt;
* /dev/tts/modem0 (Symlink for ttyACM0): USB Serial to Modem for AT commands (Data Port)&lt;br /&gt;
* /dev/tts/modemdiag (Symlink for ttyACM1): USB Serial to Modem for Diagnositics (DIAG Port)&lt;br /&gt;
&lt;br /&gt;
== sysfs Entries ==&lt;br /&gt;
* Power Control: /sys/user_hw/pins/modem/power_on/level&lt;br /&gt;
&lt;br /&gt;
== Palm Programs for communicating with the modem ==&lt;br /&gt;
In /usr/bin are some interessting programs:&lt;br /&gt;
* PmLinuxModemCmd: You can do some operations on the modem from command line&lt;br /&gt;
* PmModemInfo: Shows you the IMEI and the version of the modem firmware&lt;br /&gt;
* PmModemPower: A simple shell script to turn on/reset the modem&lt;br /&gt;
* PmModemUpdater: Flash the modem with a new firmware&lt;br /&gt;
&lt;br /&gt;
The binary sequences are:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
00014a1c &amp;lt;enableloopbackdataport&amp;gt;:&lt;br /&gt;
   14a1c:	31455441 	.word	0x31455441&lt;br /&gt;
	...&lt;br /&gt;
   159c0:	0a0d      	.short	0x0a0d&lt;br /&gt;
&lt;br /&gt;
000159c2 &amp;lt;loopback&amp;gt;:&lt;br /&gt;
   159c2:	0f88      	.short	0x0f88&lt;br /&gt;
   159c4:	00010000 	.word	0x00010000&lt;br /&gt;
   159c8:	7eb3d400 	.word	0x7eb3d400&lt;br /&gt;
&lt;br /&gt;
000159cc &amp;lt;identify&amp;gt;:&lt;br /&gt;
   159cc:	7e3b1c1d 	.word	0x7e3b1c1d&lt;br /&gt;
&lt;br /&gt;
000159d0 &amp;lt;getVer&amp;gt;:&lt;br /&gt;
   159d0:	1b0000fa 	.word	0x1b0000fa&lt;br /&gt;
   159d4:	00000009 	.word	0x00000009&lt;br /&gt;
   159d8:	00000000 	.word	0x00000000&lt;br /&gt;
   159dc:	7e          	.byte	0x7e&lt;br /&gt;
&lt;br /&gt;
000159dd &amp;lt;testAlive&amp;gt;:&lt;br /&gt;
   159dd:	fa          	.byte	0xfa&lt;br /&gt;
   159de:	0000      	.short	0x0000&lt;br /&gt;
   159e0:	0000011b 	.word	0x0000011b&lt;br /&gt;
   159e4:	00000000 	.word	0x00000000&lt;br /&gt;
   159e8:	b74c      	.short	0xb74c&lt;br /&gt;
   159ea:	7e          	.byte	0x7e&lt;br /&gt;
&lt;br /&gt;
000159eb &amp;lt;testAliveResp&amp;gt;:&lt;br /&gt;
   159eb:	1b          	.byte	0x1b&lt;br /&gt;
   159ec:	00000001 	.word	0x00000001&lt;br /&gt;
   159f0:	0000      	.short	0x0000&lt;br /&gt;
	...&lt;br /&gt;
&lt;br /&gt;
000159f3 &amp;lt;testAliveResp1&amp;gt;:&lt;br /&gt;
   159f3:	1c          	.byte	0x1c&lt;br /&gt;
   159f4:	00000002 	.word	0x00000002&lt;br /&gt;
   159f8:	0000      	.short	0x0000&lt;br /&gt;
	...&lt;br /&gt;
&lt;br /&gt;
000159fb &amp;lt;testAliveCDMA&amp;gt;:&lt;br /&gt;
   159fb:	fa          	.byte	0xfa&lt;br /&gt;
   159fc:	14080000 	.word	0x14080000&lt;br /&gt;
   15a00:	f904d200 	.word	0xf904d200&lt;br /&gt;
   15a04:	7e27      	.short	0x7e27&lt;br /&gt;
&lt;br /&gt;
00015a06 &amp;lt;testAliveRespCDMA&amp;gt;:&lt;br /&gt;
   15a06:	0122      	.short	0x0122&lt;br /&gt;
   15a08:	0000      	.short	0x0000&lt;br /&gt;
	...&lt;br /&gt;
&lt;br /&gt;
00015a0b &amp;lt;enterFTMmode&amp;gt;:&lt;br /&gt;
   15a0b:	29          	.byte	0x29&lt;br /&gt;
   15a0c:	73810003 	.word	0x73810003&lt;br /&gt;
   15a10:	7e          	.byte	0x7e&lt;br /&gt;
&lt;br /&gt;
00015a11 &amp;lt;CDMAdiagPortOnUART&amp;gt;:&lt;br /&gt;
   15a11:	fa          	.byte	0xfa&lt;br /&gt;
   15a12:	0000      	.short	0x0000&lt;br /&gt;
   15a14:	00002308 	.word	0x00002308&lt;br /&gt;
   15a18:	fbf1      	.short	0xfbf1&lt;br /&gt;
   15a1a:	7e          	.byte	0x7e&lt;br /&gt;
&lt;br /&gt;
00015a1b &amp;lt;CDMAdiagPortOnUSB&amp;gt;:&lt;br /&gt;
   15a1b:	fa          	.byte	0xfa&lt;br /&gt;
   15a1c:	23080000 	.word	0x23080000&lt;br /&gt;
   15a20:	29e20001 	.word	0x29e20001&lt;br /&gt;
   15a24:	7e          	.byte	0x7e&lt;br /&gt;
&lt;br /&gt;
00015a25 &amp;lt;resetCDMA&amp;gt;:&lt;br /&gt;
   15a25:	29          	.byte	0x29&lt;br /&gt;
   15a26:	0002      	.short	0x0002&lt;br /&gt;
   15a28:	6a59      	.short	0x6a59&lt;br /&gt;
   15a2a:	7e          	.byte	0x7e&lt;br /&gt;
&lt;br /&gt;
00015a2b &amp;lt;onlineMode&amp;gt;:&lt;br /&gt;
   15a2b:	fa          	.byte	0xfa&lt;br /&gt;
   15a2c:	00030000 	.word	0x00030000&lt;br /&gt;
   15a30:	00000000 	.word	0x00000000&lt;br /&gt;
   15a34:	09f00500 	.word	0x09f00500&lt;br /&gt;
   15a38:	7e          	.byte	0x7e&lt;br /&gt;
&lt;br /&gt;
00015a39 &amp;lt;offlineMode&amp;gt;:&lt;br /&gt;
   15a39:	fa          	.byte	0xfa&lt;br /&gt;
   15a3a:	0000      	.short	0x0000&lt;br /&gt;
   15a3c:	00000003 	.word	0x00000003&lt;br /&gt;
   15a40:	06000000 	.word	0x06000000&lt;br /&gt;
   15a44:	3b6b      	.short	0x3b6b&lt;br /&gt;
   15a46:	7e          	.byte	0x7e&lt;br /&gt;
&lt;br /&gt;
00015a47 &amp;lt;ATCGDCONT&amp;gt;:&lt;br /&gt;
   15a47:	41          	.byte	0x41&lt;br /&gt;
   15a48:	47432b54 	.word	0x47432b54&lt;br /&gt;
   15a4c:	4e4f4344 	.word	0x4e4f4344&lt;br /&gt;
   15a50:	0a0d3f54 	.word	0x0a0d3f54&lt;br /&gt;
&lt;br /&gt;
00015a54 &amp;lt;ATE0E1Cmd&amp;gt;:&lt;br /&gt;
   15a54:	30455441 	.word	0x30455441&lt;br /&gt;
   15a58:	30453145 	.word	0x30453145&lt;br /&gt;
   15a5c:	30453145 	.word	0x30453145&lt;br /&gt;
   15a60:	30453145 	.word	0x30453145&lt;br /&gt;
   15a64:	0a0d3145 	.word	0x0a0d3145&lt;br /&gt;
&lt;br /&gt;
00015a68 &amp;lt;ATCmd&amp;gt;:&lt;br /&gt;
   15a68:	0a0d5441 	.word	0x0a0d5441&lt;br /&gt;
&lt;br /&gt;
00015a6c &amp;lt;Charging90mA&amp;gt;:&lt;br /&gt;
   15a6c:	1b0000fa 	.word	0x1b0000fa&lt;br /&gt;
   15a70:	00000006 	.word	0x00000006&lt;br /&gt;
   15a74:	00180000 	.word	0x00180000&lt;br /&gt;
   15a78:	f0f30000 	.word	0xf0f30000&lt;br /&gt;
   15a7c:	7e          	.byte	0x7e&lt;br /&gt;
&lt;br /&gt;
00015a7d &amp;lt;Charging500mA&amp;gt;:&lt;br /&gt;
   15a7d:	fa          	.byte	0xfa&lt;br /&gt;
   15a7e:	0000      	.short	0x0000&lt;br /&gt;
   15a80:	0000061b 	.word	0x0000061b&lt;br /&gt;
   15a84:	18000000 	.word	0x18000000&lt;br /&gt;
   15a88:	2b000100 	.word	0x2b000100&lt;br /&gt;
   15a8c:	7ee9      	.short	0x7ee9&lt;br /&gt;
&lt;br /&gt;
00015a8e &amp;lt;Charging1A&amp;gt;:&lt;br /&gt;
   15a8e:	00fa      	.short	0x00fa&lt;br /&gt;
   15a90:	00061b00 	.word	0x00061b00&lt;br /&gt;
   15a94:	00000000 	.word	0x00000000&lt;br /&gt;
   15a98:	00070018 	.word	0x00070018&lt;br /&gt;
   15a9c:	bdfb      	.short	0xbdfb&lt;br /&gt;
   15a9e:	7e          	.byte	0x7e&lt;br /&gt;
&lt;br /&gt;
00015a9f &amp;lt;getQPSTConfig&amp;gt;:&lt;br /&gt;
   15a9f:	0c          	.byte	0x0c&lt;br /&gt;
   15aa0:	417e3a14 	.word	0x417e3a14&lt;br /&gt;
   15aa4:	43512454 	.word	0x43512454&lt;br /&gt;
   15aa8:	0d474d44 	.word	0x0d474d44&lt;br /&gt;
   15aac:	51245441 	.word	0x51245441&lt;br /&gt;
   15ab0:	474d4443 	.word	0x474d4443&lt;br /&gt;
   15ab4:	2454410d 	.word	0x2454410d&lt;br /&gt;
   15ab8:	4d444351 	.word	0x4d444351&lt;br /&gt;
   15abc:	067e0d47 	.word	0x067e0d47&lt;br /&gt;
   15ac0:	7e7e954e 	.word	0x7e7e954e&lt;br /&gt;
&lt;br /&gt;
00015ac4 &amp;lt;getESN&amp;gt;:&lt;br /&gt;
   15ac4:	00000026 	.word	0x00000026&lt;br /&gt;
	...&lt;br /&gt;
   15b48:	7ed2ad00 	.word	0x7ed2ad00&lt;br /&gt;
&lt;br /&gt;
00015b4c &amp;lt;CDMAPcmLoopbackOn&amp;gt;:&lt;br /&gt;
   15b4c:	000e0b4b 	.word	0x000e0b4b&lt;br /&gt;
   15b50:	00010003 	.word	0x00010003&lt;br /&gt;
   15b54:	0001000c 	.word	0x0001000c&lt;br /&gt;
   15b58:	7e00      	.short	0x7e00&lt;br /&gt;
&lt;br /&gt;
00015b5a &amp;lt;CDMAPcmLoopbackOff&amp;gt;:&lt;br /&gt;
   15b5a:	0b4b      	.short	0x0b4b&lt;br /&gt;
   15b5c:	0003000e 	.word	0x0003000e&lt;br /&gt;
   15b60:	000c0001 	.word	0x000c0001&lt;br /&gt;
   15b64:	7e000000 	.word	0x7e000000&lt;br /&gt;
&lt;br /&gt;
00015b68 &amp;lt;GSMPcmLoopbackOn&amp;gt;:&lt;br /&gt;
   15b68:	000e0b4b 	.word	0x000e0b4b&lt;br /&gt;
   15b6c:	000b0003 	.word	0x000b0003&lt;br /&gt;
   15b70:	0001000c 	.word	0x0001000c&lt;br /&gt;
   15b74:	7e00      	.short	0x7e00&lt;br /&gt;
&lt;br /&gt;
00015b76 &amp;lt;GSMPcmLoopbackOff&amp;gt;:&lt;br /&gt;
   15b76:	0b4b      	.short	0x0b4b&lt;br /&gt;
   15b78:	0003000e 	.word	0x0003000e&lt;br /&gt;
   15b7c:	000c000b 	.word	0x000c000b&lt;br /&gt;
   15b80:	7e000000 	.word	0x7e000000&lt;br /&gt;
&lt;br /&gt;
00015b84 &amp;lt;Dial&amp;gt;:&lt;br /&gt;
   15b84:	000000fa 	.word	0x000000fa&lt;br /&gt;
   15b88:	00000000 	.word	0x00000000&lt;br /&gt;
   15b8c:	04000000 	.word	0x04000000&lt;br /&gt;
	...&lt;br /&gt;
   15bf0:	34000000 	.word	0x34000000&lt;br /&gt;
   15bf4:	31363830 	.word	0x31363830&lt;br /&gt;
   15bf8:	32333837 	.word	0x32333837&lt;br /&gt;
   15bfc:	00000037 	.word	0x00000037&lt;br /&gt;
	...&lt;br /&gt;
   15c30:	0a000000 	.word	0x0a000000&lt;br /&gt;
	...&lt;br /&gt;
   15c58:	0000      	.short	0x0000&lt;br /&gt;
   15c5a:	7e          	.byte	0x7e&lt;br /&gt;
&lt;br /&gt;
00015c5b &amp;lt;disableloopbackdataport&amp;gt;:&lt;br /&gt;
   15c5b:	41          	.byte	0x41&lt;br /&gt;
   15c5c:	0d304554 	.word	0x0d304554&lt;br /&gt;
   15c60:	0a          	.byte	0x0a&lt;br /&gt;
&lt;br /&gt;
00015c61 &amp;lt;ATDT&amp;gt;:&lt;br /&gt;
   15c61:	41          	.byte	0x41&lt;br /&gt;
   15c62:	4454      	.short	0x4454&lt;br /&gt;
   15c64:	37313654 	.word	0x37313654&lt;br /&gt;
   15c68:	37323338 	.word	0x37323338&lt;br /&gt;
   15c6c:	0a0d      	.short	0x0a0d&lt;br /&gt;
&lt;br /&gt;
00015c6e &amp;lt;testAlive_1&amp;gt;:&lt;br /&gt;
   15c6e:	00fa      	.short	0x00fa&lt;br /&gt;
   15c70:	00011b00 	.word	0x00011b00&lt;br /&gt;
   15c74:	00000001 	.word	0x00000001&lt;br /&gt;
   15c78:	7ead8101 	.word	0x7ead8101&lt;br /&gt;
&lt;br /&gt;
00015c7c &amp;lt;onlineMode_1&amp;gt;:&lt;br /&gt;
   15c7c:	030000fa 	.word	0x030000fa&lt;br /&gt;
   15c80:	00000000 	.word	0x00000000&lt;br /&gt;
   15c84:	4f020000 	.word	0x4f020000&lt;br /&gt;
   15c88:	5d7d      	.short	0x5d7d&lt;br /&gt;
   15c8a:	7e          	.byte	0x7e&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== PmModemUpdater ===&lt;br /&gt;
 Usage:&lt;br /&gt;
 PmModemUpdater -h                     Print usage&lt;br /&gt;
 PmModemUpdater -v                     Detect current modem firmware version&lt;br /&gt;
 PmModemUpdater -p  /path/to/firmware.tar  Check the firmware package info&lt;br /&gt;
 PmModemUpdater -b		      Backup NV items from device to /var/firmware/palm_nv_backup.txt &lt;br /&gt;
 PmModemUpdater -r /path/to/nvfile     Load NV items from nvfile   		&lt;br /&gt;
 PmModemUpdater&amp;lt;firmware.tar           Update the firmware using a tar file as input&lt;br /&gt;
 PmModemUpdater&amp;lt;firmware.tar  -f       Force an update even the modem has the same version than tar file&lt;br /&gt;
 PmModemUpdater&amp;lt;firmware.tar  -s xx xx Force the modem to be flashed (RESCUE MODE)&lt;br /&gt;
 PmModemUpdater  -i            	      Start a data/voice test on your umts modem directly&lt;br /&gt;
 PmModemUpdater  -e            	      Ignore stop/start TIL/WAND&lt;br /&gt;
 PmModemUpdater  -o            	      silent mode which means no verbose output at all&lt;br /&gt;
 PmModemUpdater&amp;lt;firmware.tar -m        Force the modem to be flashed (INFINITE USB RESCUE MODE) on USB&lt;br /&gt;
&lt;br /&gt;
=== pmmodempower ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 for i in &amp;quot;$*&amp;quot;&lt;br /&gt;
    if [ &amp;quot;$i&amp;quot; = &amp;quot;on&amp;quot; ]&lt;br /&gt;
    then&lt;br /&gt;
	echo Powering On Modem&lt;br /&gt;
	echo 1 &amp;gt; /sys/user_hw/pins/modem/power_on/level&lt;br /&gt;
    fi&lt;br /&gt;
    if [ &amp;quot;$i&amp;quot; = &amp;quot;off&amp;quot; ]&lt;br /&gt;
    then &lt;br /&gt;
	echo Powering Off Modem&lt;br /&gt;
	echo 0 &amp;gt; /sys/user_hw/pins/modem/boot_mode/level&lt;br /&gt;
	echo 0 &amp;gt; /sys/user_hw/pins/modem/power_on/level&lt;br /&gt;
    fi&lt;br /&gt;
    if [ &amp;quot;$i&amp;quot; = &amp;quot;cycle&amp;quot; ]&lt;br /&gt;
    then&lt;br /&gt;
	echo Powering Off Modem&lt;br /&gt;
	echo 0 &amp;gt; /sys/user_hw/pins/modem/boot_mode/level&lt;br /&gt;
	echo 0 &amp;gt; /sys/user_hw/pins/modem/wakeup_modem/level&lt;br /&gt;
	echo 0 &amp;gt; /sys/user_hw/pins/modem/power_on/level&lt;br /&gt;
	sleep 2&lt;br /&gt;
	echo Powering On Modem&lt;br /&gt;
	echo 1 &amp;gt; /sys/user_hw/pins/modem/power_on/level&lt;br /&gt;
	#echo Waiting for MODEM_WAKE_APP Low&lt;br /&gt;
	#while [ &amp;quot;$appwake&amp;quot; != &amp;quot;0&amp;quot; ]&lt;br /&gt;
	#do&lt;br /&gt;
	#    appwake=`cat /sys/user_hw/pins/modem/wakeup_app/level`&lt;br /&gt;
	#done&lt;br /&gt;
	#echo Waiting for MODEM_WAKE_APP Pulse High&lt;br /&gt;
	#appwake=`cat /sys/user_hw/pins/modem/wakeup_app/level`&lt;br /&gt;
	#while [ &amp;quot;$appwake&amp;quot; != &amp;quot;1&amp;quot; ]&lt;br /&gt;
	#do&lt;br /&gt;
	#    appwake=`cat /sys/user_hw/pins/modem/wakeup_app/level`&lt;br /&gt;
	#done&lt;br /&gt;
	#while [ &amp;quot;$appwake&amp;quot; != &amp;quot;0&amp;quot; ]&lt;br /&gt;
	#do&lt;br /&gt;
	#    appwake=`cat /sys/user_hw/pins/modem/wakeup_app/level`&lt;br /&gt;
	#done&lt;br /&gt;
	echo Asserting APP_WAKE_MODEM&lt;br /&gt;
	echo 1 &amp;gt; /sys/user_hw/pins/modem/wakeup_modem/level&lt;br /&gt;
    fi&lt;br /&gt;
 done&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== PmLinuxModemCmd ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 usage: PmLinuxModemCmd &amp;lt;Port&amp;gt; &amp;lt;[a][b][c][d &amp;lt;number&amp;gt;][e][f][ftm][h][g][i][k &amp;lt;#pkts&amp;gt;][l][m][n][o][pcmloopback &amp;lt;radio&amp;gt; &amp;lt;state&amp;gt;][q][r][s][t][u &amp;lt;#pkts&amp;gt;][zr][zt][zl][1] [5][9]]&amp;gt; [v]&lt;br /&gt;
 where: &amp;lt;Port&amp;gt;:&lt;br /&gt;
           /dev/ttyS0         - Modem UART. - UART PORT&lt;br /&gt;
           /dev/tts/modem0    - USB Serial to Modem for AT commands - DATA PORT.&lt;br /&gt;
           /dev/tts/modemdiag - USB Serial to Modem for Diagnostics - DIAG PORT.&lt;br /&gt;
 where:&lt;br /&gt;
       e - empty read buffer from specified port.&lt;br /&gt;
       u - Loopback mode performance test. Next argument &amp;lt;#pkts&amp;gt;&lt;br /&gt;
  UART PORT COMMANDS: (/dev/ttyS0) &lt;br /&gt;
       b  - Send loopback mode command for 256 bytes. UART goes into loopback mode until power cycle.&lt;br /&gt;
       d  - Send commands to dial a phone number. Phone number in the format 4086178327.&lt;br /&gt;
       f  - Send offline mode and read pkt.&lt;br /&gt;
       ftm - Enter modem FTM mode (both CDMA and GSM modems).&lt;br /&gt;
       i  - Send identify command.&lt;br /&gt;
       l  - Send testalive then loop forever doing ( onlinemode, offlinemode, sleep  to UART.&lt;br /&gt;
       m  - Disable loopback mode.&lt;br /&gt;
       o  - Send online mode and read pkt.&lt;br /&gt;
       pcmloopback - control PCM loopback. &amp;lt;radio&amp;gt; = GSM/CDMA &amp;lt;state&amp;gt; = on/off.&lt;br /&gt;
       q  - Send test alive, online mode and then read pkts.&lt;br /&gt;
       r  - Get firmware version.&lt;br /&gt;
       t  - Send test alive and read pkt.&lt;br /&gt;
       1  - Send command to enable 1A charging.&lt;br /&gt;
       5  - Send command to enable 500mA charging.&lt;br /&gt;
       9  - Send command to enable 90mA charge.&lt;br /&gt;
       zs - CDMA reset modem.&lt;br /&gt;
       zt - CDMA send test alive and read pkts.&lt;br /&gt;
       zdiagonusb - CDMA put diag port on USB diag.&lt;br /&gt;
       zdiagonuart- CDMA put diag port on UART.&lt;br /&gt;
  DATA PORT COMMANDS: (/dev/tts/modem0) &lt;br /&gt;
       a - Send AT\n.&lt;br /&gt;
       c - Send ATCGDCONT\n.&lt;br /&gt;
       h - Send Echo command.&lt;br /&gt;
       k - Test loopback perf using command (ATE1\n).&lt;br /&gt;
  DIAG PORT COMMANDS: (/dev/tts/modemdiag) &lt;br /&gt;
       g  - Get QPST serial port config from DIAG port.&lt;br /&gt;
       s  - Get ESN from DIAG port.&lt;br /&gt;
       zl - CDMA put modemdiag into loopback. &lt;br /&gt;
       zr - CDMA Read performance tests. Takes two arguments &amp;lt;numpkts&amp;gt; and &amp;lt;pktSize&amp;gt;.&lt;br /&gt;
               Eg. %s /dev/tts/modemdiag zr &amp;lt;NumPkts&amp;gt; &amp;lt;PktSize&amp;gt; [v] &lt;br /&gt;
       zw - CDMA Write performance tests. Takes two arguments &amp;lt;numpkts&amp;gt; and &amp;lt;pktSize&amp;gt;.&lt;br /&gt;
               Eg. %s /dev/tts/modemdiag zw &amp;lt;NumPkts&amp;gt; &amp;lt;PktSize&amp;gt; [v] &lt;br /&gt;
       zu - CDMA Performance tests of the diag port after putting it into loopback. Takes two arguments &amp;lt;numpkts&amp;gt; and &amp;lt;pktSize&amp;gt;. &lt;br /&gt;
               Eg. %s /dev/tts/modemdiag zu &amp;lt;NumPkts&amp;gt; &amp;lt;PktSize&amp;gt; [v] &lt;br /&gt;
 where  v - verbose output.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== TelephonyInterfaceLayerGsm ==&lt;br /&gt;
&lt;br /&gt;
/usr/bin/TelephonyInterfaceLayerGsm connects to /dev/modemuart with a baudrate of 115200. Trying the same with screen shows me just rubbish. Seem to be the binary protocol. Make sure you rename the file before killing the process as it gets restarted automatically.&lt;/div&gt;</summary>
		<author><name>StefanSchmidt</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Research_Pre_GSM_Modem&amp;diff=6470</id>
		<title>Research Pre GSM Modem</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Research_Pre_GSM_Modem&amp;diff=6470"/>
		<updated>2009-10-13T18:19:06Z</updated>

		<summary type="html">&lt;p&gt;StefanSchmidt: some infos about TelephonyInterfaceLayerGsm&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Modem Ports ==&lt;br /&gt;
There are several ports for communicating with the modem on the Palm Pre:&lt;br /&gt;
* /dev/modemuart: Modem UART (UART Port)&lt;br /&gt;
* /dev/tts/modem0 (Symlink for ttyACM0): USB Serial to Modem for AT commands (Data Port)&lt;br /&gt;
* /dev/tts/modemdiag (Symlink for ttyACM1): USB Serial to Modem for Diagnositics (DIAG Port)&lt;br /&gt;
&lt;br /&gt;
== sysfs Entries ==&lt;br /&gt;
* Power Control: /sys/user_hw/pins/modem/power_on/level&lt;br /&gt;
&lt;br /&gt;
== Palm Programs for communicating with the modem ==&lt;br /&gt;
In /usr/bin are some interessting programs:&lt;br /&gt;
* PmLinuxModemCmd: You can do some operations on the modem from command line&lt;br /&gt;
* PmModemInfo: Shows you the IMEI and the version of the modem firmware&lt;br /&gt;
* PmModemPower: A simple shell script to turn on/reset the modem&lt;br /&gt;
* PmModemUpdater: Flash the modem with a new firmware&lt;br /&gt;
&lt;br /&gt;
Through disassembling the PmLinuxModemCmd binary I found some binary sequences which indicates that the Pre communicates with the modem over a binary protocol.&lt;br /&gt;
&lt;br /&gt;
The binary sequences are:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
00014a1c &amp;lt;enableloopbackdataport&amp;gt;:&lt;br /&gt;
   14a1c:	31455441 	.word	0x31455441&lt;br /&gt;
	...&lt;br /&gt;
   159c0:	0a0d      	.short	0x0a0d&lt;br /&gt;
&lt;br /&gt;
000159c2 &amp;lt;loopback&amp;gt;:&lt;br /&gt;
   159c2:	0f88      	.short	0x0f88&lt;br /&gt;
   159c4:	00010000 	.word	0x00010000&lt;br /&gt;
   159c8:	7eb3d400 	.word	0x7eb3d400&lt;br /&gt;
&lt;br /&gt;
000159cc &amp;lt;identify&amp;gt;:&lt;br /&gt;
   159cc:	7e3b1c1d 	.word	0x7e3b1c1d&lt;br /&gt;
&lt;br /&gt;
000159d0 &amp;lt;getVer&amp;gt;:&lt;br /&gt;
   159d0:	1b0000fa 	.word	0x1b0000fa&lt;br /&gt;
   159d4:	00000009 	.word	0x00000009&lt;br /&gt;
   159d8:	00000000 	.word	0x00000000&lt;br /&gt;
   159dc:	7e          	.byte	0x7e&lt;br /&gt;
&lt;br /&gt;
000159dd &amp;lt;testAlive&amp;gt;:&lt;br /&gt;
   159dd:	fa          	.byte	0xfa&lt;br /&gt;
   159de:	0000      	.short	0x0000&lt;br /&gt;
   159e0:	0000011b 	.word	0x0000011b&lt;br /&gt;
   159e4:	00000000 	.word	0x00000000&lt;br /&gt;
   159e8:	b74c      	.short	0xb74c&lt;br /&gt;
   159ea:	7e          	.byte	0x7e&lt;br /&gt;
&lt;br /&gt;
000159eb &amp;lt;testAliveResp&amp;gt;:&lt;br /&gt;
   159eb:	1b          	.byte	0x1b&lt;br /&gt;
   159ec:	00000001 	.word	0x00000001&lt;br /&gt;
   159f0:	0000      	.short	0x0000&lt;br /&gt;
	...&lt;br /&gt;
&lt;br /&gt;
000159f3 &amp;lt;testAliveResp1&amp;gt;:&lt;br /&gt;
   159f3:	1c          	.byte	0x1c&lt;br /&gt;
   159f4:	00000002 	.word	0x00000002&lt;br /&gt;
   159f8:	0000      	.short	0x0000&lt;br /&gt;
	...&lt;br /&gt;
&lt;br /&gt;
000159fb &amp;lt;testAliveCDMA&amp;gt;:&lt;br /&gt;
   159fb:	fa          	.byte	0xfa&lt;br /&gt;
   159fc:	14080000 	.word	0x14080000&lt;br /&gt;
   15a00:	f904d200 	.word	0xf904d200&lt;br /&gt;
   15a04:	7e27      	.short	0x7e27&lt;br /&gt;
&lt;br /&gt;
00015a06 &amp;lt;testAliveRespCDMA&amp;gt;:&lt;br /&gt;
   15a06:	0122      	.short	0x0122&lt;br /&gt;
   15a08:	0000      	.short	0x0000&lt;br /&gt;
	...&lt;br /&gt;
&lt;br /&gt;
00015a0b &amp;lt;enterFTMmode&amp;gt;:&lt;br /&gt;
   15a0b:	29          	.byte	0x29&lt;br /&gt;
   15a0c:	73810003 	.word	0x73810003&lt;br /&gt;
   15a10:	7e          	.byte	0x7e&lt;br /&gt;
&lt;br /&gt;
00015a11 &amp;lt;CDMAdiagPortOnUART&amp;gt;:&lt;br /&gt;
   15a11:	fa          	.byte	0xfa&lt;br /&gt;
   15a12:	0000      	.short	0x0000&lt;br /&gt;
   15a14:	00002308 	.word	0x00002308&lt;br /&gt;
   15a18:	fbf1      	.short	0xfbf1&lt;br /&gt;
   15a1a:	7e          	.byte	0x7e&lt;br /&gt;
&lt;br /&gt;
00015a1b &amp;lt;CDMAdiagPortOnUSB&amp;gt;:&lt;br /&gt;
   15a1b:	fa          	.byte	0xfa&lt;br /&gt;
   15a1c:	23080000 	.word	0x23080000&lt;br /&gt;
   15a20:	29e20001 	.word	0x29e20001&lt;br /&gt;
   15a24:	7e          	.byte	0x7e&lt;br /&gt;
&lt;br /&gt;
00015a25 &amp;lt;resetCDMA&amp;gt;:&lt;br /&gt;
   15a25:	29          	.byte	0x29&lt;br /&gt;
   15a26:	0002      	.short	0x0002&lt;br /&gt;
   15a28:	6a59      	.short	0x6a59&lt;br /&gt;
   15a2a:	7e          	.byte	0x7e&lt;br /&gt;
&lt;br /&gt;
00015a2b &amp;lt;onlineMode&amp;gt;:&lt;br /&gt;
   15a2b:	fa          	.byte	0xfa&lt;br /&gt;
   15a2c:	00030000 	.word	0x00030000&lt;br /&gt;
   15a30:	00000000 	.word	0x00000000&lt;br /&gt;
   15a34:	09f00500 	.word	0x09f00500&lt;br /&gt;
   15a38:	7e          	.byte	0x7e&lt;br /&gt;
&lt;br /&gt;
00015a39 &amp;lt;offlineMode&amp;gt;:&lt;br /&gt;
   15a39:	fa          	.byte	0xfa&lt;br /&gt;
   15a3a:	0000      	.short	0x0000&lt;br /&gt;
   15a3c:	00000003 	.word	0x00000003&lt;br /&gt;
   15a40:	06000000 	.word	0x06000000&lt;br /&gt;
   15a44:	3b6b      	.short	0x3b6b&lt;br /&gt;
   15a46:	7e          	.byte	0x7e&lt;br /&gt;
&lt;br /&gt;
00015a47 &amp;lt;ATCGDCONT&amp;gt;:&lt;br /&gt;
   15a47:	41          	.byte	0x41&lt;br /&gt;
   15a48:	47432b54 	.word	0x47432b54&lt;br /&gt;
   15a4c:	4e4f4344 	.word	0x4e4f4344&lt;br /&gt;
   15a50:	0a0d3f54 	.word	0x0a0d3f54&lt;br /&gt;
&lt;br /&gt;
00015a54 &amp;lt;ATE0E1Cmd&amp;gt;:&lt;br /&gt;
   15a54:	30455441 	.word	0x30455441&lt;br /&gt;
   15a58:	30453145 	.word	0x30453145&lt;br /&gt;
   15a5c:	30453145 	.word	0x30453145&lt;br /&gt;
   15a60:	30453145 	.word	0x30453145&lt;br /&gt;
   15a64:	0a0d3145 	.word	0x0a0d3145&lt;br /&gt;
&lt;br /&gt;
00015a68 &amp;lt;ATCmd&amp;gt;:&lt;br /&gt;
   15a68:	0a0d5441 	.word	0x0a0d5441&lt;br /&gt;
&lt;br /&gt;
00015a6c &amp;lt;Charging90mA&amp;gt;:&lt;br /&gt;
   15a6c:	1b0000fa 	.word	0x1b0000fa&lt;br /&gt;
   15a70:	00000006 	.word	0x00000006&lt;br /&gt;
   15a74:	00180000 	.word	0x00180000&lt;br /&gt;
   15a78:	f0f30000 	.word	0xf0f30000&lt;br /&gt;
   15a7c:	7e          	.byte	0x7e&lt;br /&gt;
&lt;br /&gt;
00015a7d &amp;lt;Charging500mA&amp;gt;:&lt;br /&gt;
   15a7d:	fa          	.byte	0xfa&lt;br /&gt;
   15a7e:	0000      	.short	0x0000&lt;br /&gt;
   15a80:	0000061b 	.word	0x0000061b&lt;br /&gt;
   15a84:	18000000 	.word	0x18000000&lt;br /&gt;
   15a88:	2b000100 	.word	0x2b000100&lt;br /&gt;
   15a8c:	7ee9      	.short	0x7ee9&lt;br /&gt;
&lt;br /&gt;
00015a8e &amp;lt;Charging1A&amp;gt;:&lt;br /&gt;
   15a8e:	00fa      	.short	0x00fa&lt;br /&gt;
   15a90:	00061b00 	.word	0x00061b00&lt;br /&gt;
   15a94:	00000000 	.word	0x00000000&lt;br /&gt;
   15a98:	00070018 	.word	0x00070018&lt;br /&gt;
   15a9c:	bdfb      	.short	0xbdfb&lt;br /&gt;
   15a9e:	7e          	.byte	0x7e&lt;br /&gt;
&lt;br /&gt;
00015a9f &amp;lt;getQPSTConfig&amp;gt;:&lt;br /&gt;
   15a9f:	0c          	.byte	0x0c&lt;br /&gt;
   15aa0:	417e3a14 	.word	0x417e3a14&lt;br /&gt;
   15aa4:	43512454 	.word	0x43512454&lt;br /&gt;
   15aa8:	0d474d44 	.word	0x0d474d44&lt;br /&gt;
   15aac:	51245441 	.word	0x51245441&lt;br /&gt;
   15ab0:	474d4443 	.word	0x474d4443&lt;br /&gt;
   15ab4:	2454410d 	.word	0x2454410d&lt;br /&gt;
   15ab8:	4d444351 	.word	0x4d444351&lt;br /&gt;
   15abc:	067e0d47 	.word	0x067e0d47&lt;br /&gt;
   15ac0:	7e7e954e 	.word	0x7e7e954e&lt;br /&gt;
&lt;br /&gt;
00015ac4 &amp;lt;getESN&amp;gt;:&lt;br /&gt;
   15ac4:	00000026 	.word	0x00000026&lt;br /&gt;
	...&lt;br /&gt;
   15b48:	7ed2ad00 	.word	0x7ed2ad00&lt;br /&gt;
&lt;br /&gt;
00015b4c &amp;lt;CDMAPcmLoopbackOn&amp;gt;:&lt;br /&gt;
   15b4c:	000e0b4b 	.word	0x000e0b4b&lt;br /&gt;
   15b50:	00010003 	.word	0x00010003&lt;br /&gt;
   15b54:	0001000c 	.word	0x0001000c&lt;br /&gt;
   15b58:	7e00      	.short	0x7e00&lt;br /&gt;
&lt;br /&gt;
00015b5a &amp;lt;CDMAPcmLoopbackOff&amp;gt;:&lt;br /&gt;
   15b5a:	0b4b      	.short	0x0b4b&lt;br /&gt;
   15b5c:	0003000e 	.word	0x0003000e&lt;br /&gt;
   15b60:	000c0001 	.word	0x000c0001&lt;br /&gt;
   15b64:	7e000000 	.word	0x7e000000&lt;br /&gt;
&lt;br /&gt;
00015b68 &amp;lt;GSMPcmLoopbackOn&amp;gt;:&lt;br /&gt;
   15b68:	000e0b4b 	.word	0x000e0b4b&lt;br /&gt;
   15b6c:	000b0003 	.word	0x000b0003&lt;br /&gt;
   15b70:	0001000c 	.word	0x0001000c&lt;br /&gt;
   15b74:	7e00      	.short	0x7e00&lt;br /&gt;
&lt;br /&gt;
00015b76 &amp;lt;GSMPcmLoopbackOff&amp;gt;:&lt;br /&gt;
   15b76:	0b4b      	.short	0x0b4b&lt;br /&gt;
   15b78:	0003000e 	.word	0x0003000e&lt;br /&gt;
   15b7c:	000c000b 	.word	0x000c000b&lt;br /&gt;
   15b80:	7e000000 	.word	0x7e000000&lt;br /&gt;
&lt;br /&gt;
00015b84 &amp;lt;Dial&amp;gt;:&lt;br /&gt;
   15b84:	000000fa 	.word	0x000000fa&lt;br /&gt;
   15b88:	00000000 	.word	0x00000000&lt;br /&gt;
   15b8c:	04000000 	.word	0x04000000&lt;br /&gt;
	...&lt;br /&gt;
   15bf0:	34000000 	.word	0x34000000&lt;br /&gt;
   15bf4:	31363830 	.word	0x31363830&lt;br /&gt;
   15bf8:	32333837 	.word	0x32333837&lt;br /&gt;
   15bfc:	00000037 	.word	0x00000037&lt;br /&gt;
	...&lt;br /&gt;
   15c30:	0a000000 	.word	0x0a000000&lt;br /&gt;
	...&lt;br /&gt;
   15c58:	0000      	.short	0x0000&lt;br /&gt;
   15c5a:	7e          	.byte	0x7e&lt;br /&gt;
&lt;br /&gt;
00015c5b &amp;lt;disableloopbackdataport&amp;gt;:&lt;br /&gt;
   15c5b:	41          	.byte	0x41&lt;br /&gt;
   15c5c:	0d304554 	.word	0x0d304554&lt;br /&gt;
   15c60:	0a          	.byte	0x0a&lt;br /&gt;
&lt;br /&gt;
00015c61 &amp;lt;ATDT&amp;gt;:&lt;br /&gt;
   15c61:	41          	.byte	0x41&lt;br /&gt;
   15c62:	4454      	.short	0x4454&lt;br /&gt;
   15c64:	37313654 	.word	0x37313654&lt;br /&gt;
   15c68:	37323338 	.word	0x37323338&lt;br /&gt;
   15c6c:	0a0d      	.short	0x0a0d&lt;br /&gt;
&lt;br /&gt;
00015c6e &amp;lt;testAlive_1&amp;gt;:&lt;br /&gt;
   15c6e:	00fa      	.short	0x00fa&lt;br /&gt;
   15c70:	00011b00 	.word	0x00011b00&lt;br /&gt;
   15c74:	00000001 	.word	0x00000001&lt;br /&gt;
   15c78:	7ead8101 	.word	0x7ead8101&lt;br /&gt;
&lt;br /&gt;
00015c7c &amp;lt;onlineMode_1&amp;gt;:&lt;br /&gt;
   15c7c:	030000fa 	.word	0x030000fa&lt;br /&gt;
   15c80:	00000000 	.word	0x00000000&lt;br /&gt;
   15c84:	4f020000 	.word	0x4f020000&lt;br /&gt;
   15c88:	5d7d      	.short	0x5d7d&lt;br /&gt;
   15c8a:	7e          	.byte	0x7e&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== PmModemUpdater ===&lt;br /&gt;
 Usage:&lt;br /&gt;
 PmModemUpdater -h                     Print usage&lt;br /&gt;
 PmModemUpdater -v                     Detect current modem firmware version&lt;br /&gt;
 PmModemUpdater -p  /path/to/firmware.tar  Check the firmware package info&lt;br /&gt;
 PmModemUpdater -b		      Backup NV items from device to /var/firmware/palm_nv_backup.txt &lt;br /&gt;
 PmModemUpdater -r /path/to/nvfile     Load NV items from nvfile   		&lt;br /&gt;
 PmModemUpdater&amp;lt;firmware.tar           Update the firmware using a tar file as input&lt;br /&gt;
 PmModemUpdater&amp;lt;firmware.tar  -f       Force an update even the modem has the same version than tar file&lt;br /&gt;
 PmModemUpdater&amp;lt;firmware.tar  -s xx xx Force the modem to be flashed (RESCUE MODE)&lt;br /&gt;
 PmModemUpdater  -i            	      Start a data/voice test on your umts modem directly&lt;br /&gt;
 PmModemUpdater  -e            	      Ignore stop/start TIL/WAND&lt;br /&gt;
 PmModemUpdater  -o            	      silent mode which means no verbose output at all&lt;br /&gt;
 PmModemUpdater&amp;lt;firmware.tar -m        Force the modem to be flashed (INFINITE USB RESCUE MODE) on USB&lt;br /&gt;
&lt;br /&gt;
=== pmmodempower ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 for i in &amp;quot;$*&amp;quot;&lt;br /&gt;
    if [ &amp;quot;$i&amp;quot; = &amp;quot;on&amp;quot; ]&lt;br /&gt;
    then&lt;br /&gt;
	echo Powering On Modem&lt;br /&gt;
	echo 1 &amp;gt; /sys/user_hw/pins/modem/power_on/level&lt;br /&gt;
    fi&lt;br /&gt;
    if [ &amp;quot;$i&amp;quot; = &amp;quot;off&amp;quot; ]&lt;br /&gt;
    then &lt;br /&gt;
	echo Powering Off Modem&lt;br /&gt;
	echo 0 &amp;gt; /sys/user_hw/pins/modem/boot_mode/level&lt;br /&gt;
	echo 0 &amp;gt; /sys/user_hw/pins/modem/power_on/level&lt;br /&gt;
    fi&lt;br /&gt;
    if [ &amp;quot;$i&amp;quot; = &amp;quot;cycle&amp;quot; ]&lt;br /&gt;
    then&lt;br /&gt;
	echo Powering Off Modem&lt;br /&gt;
	echo 0 &amp;gt; /sys/user_hw/pins/modem/boot_mode/level&lt;br /&gt;
	echo 0 &amp;gt; /sys/user_hw/pins/modem/wakeup_modem/level&lt;br /&gt;
	echo 0 &amp;gt; /sys/user_hw/pins/modem/power_on/level&lt;br /&gt;
	sleep 2&lt;br /&gt;
	echo Powering On Modem&lt;br /&gt;
	echo 1 &amp;gt; /sys/user_hw/pins/modem/power_on/level&lt;br /&gt;
	#echo Waiting for MODEM_WAKE_APP Low&lt;br /&gt;
	#while [ &amp;quot;$appwake&amp;quot; != &amp;quot;0&amp;quot; ]&lt;br /&gt;
	#do&lt;br /&gt;
	#    appwake=`cat /sys/user_hw/pins/modem/wakeup_app/level`&lt;br /&gt;
	#done&lt;br /&gt;
	#echo Waiting for MODEM_WAKE_APP Pulse High&lt;br /&gt;
	#appwake=`cat /sys/user_hw/pins/modem/wakeup_app/level`&lt;br /&gt;
	#while [ &amp;quot;$appwake&amp;quot; != &amp;quot;1&amp;quot; ]&lt;br /&gt;
	#do&lt;br /&gt;
	#    appwake=`cat /sys/user_hw/pins/modem/wakeup_app/level`&lt;br /&gt;
	#done&lt;br /&gt;
	#while [ &amp;quot;$appwake&amp;quot; != &amp;quot;0&amp;quot; ]&lt;br /&gt;
	#do&lt;br /&gt;
	#    appwake=`cat /sys/user_hw/pins/modem/wakeup_app/level`&lt;br /&gt;
	#done&lt;br /&gt;
	echo Asserting APP_WAKE_MODEM&lt;br /&gt;
	echo 1 &amp;gt; /sys/user_hw/pins/modem/wakeup_modem/level&lt;br /&gt;
    fi&lt;br /&gt;
 done&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== PmLinuxModemCmd ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 usage: PmLinuxModemCmd &amp;lt;Port&amp;gt; &amp;lt;[a][b][c][d &amp;lt;number&amp;gt;][e][f][ftm][h][g][i][k &amp;lt;#pkts&amp;gt;][l][m][n][o][pcmloopback &amp;lt;radio&amp;gt; &amp;lt;state&amp;gt;][q][r][s][t][u &amp;lt;#pkts&amp;gt;][zr][zt][zl][1] [5][9]]&amp;gt; [v]&lt;br /&gt;
 where: &amp;lt;Port&amp;gt;:&lt;br /&gt;
           /dev/ttyS0         - Modem UART. - UART PORT&lt;br /&gt;
           /dev/tts/modem0    - USB Serial to Modem for AT commands - DATA PORT.&lt;br /&gt;
           /dev/tts/modemdiag - USB Serial to Modem for Diagnostics - DIAG PORT.&lt;br /&gt;
 where:&lt;br /&gt;
       e - empty read buffer from specified port.&lt;br /&gt;
       u - Loopback mode performance test. Next argument &amp;lt;#pkts&amp;gt;&lt;br /&gt;
  UART PORT COMMANDS: (/dev/ttyS0) &lt;br /&gt;
       b  - Send loopback mode command for 256 bytes. UART goes into loopback mode until power cycle.&lt;br /&gt;
       d  - Send commands to dial a phone number. Phone number in the format 4086178327.&lt;br /&gt;
       f  - Send offline mode and read pkt.&lt;br /&gt;
       ftm - Enter modem FTM mode (both CDMA and GSM modems).&lt;br /&gt;
       i  - Send identify command.&lt;br /&gt;
       l  - Send testalive then loop forever doing ( onlinemode, offlinemode, sleep  to UART.&lt;br /&gt;
       m  - Disable loopback mode.&lt;br /&gt;
       o  - Send online mode and read pkt.&lt;br /&gt;
       pcmloopback - control PCM loopback. &amp;lt;radio&amp;gt; = GSM/CDMA &amp;lt;state&amp;gt; = on/off.&lt;br /&gt;
       q  - Send test alive, online mode and then read pkts.&lt;br /&gt;
       r  - Get firmware version.&lt;br /&gt;
       t  - Send test alive and read pkt.&lt;br /&gt;
       1  - Send command to enable 1A charging.&lt;br /&gt;
       5  - Send command to enable 500mA charging.&lt;br /&gt;
       9  - Send command to enable 90mA charge.&lt;br /&gt;
       zs - CDMA reset modem.&lt;br /&gt;
       zt - CDMA send test alive and read pkts.&lt;br /&gt;
       zdiagonusb - CDMA put diag port on USB diag.&lt;br /&gt;
       zdiagonuart- CDMA put diag port on UART.&lt;br /&gt;
  DATA PORT COMMANDS: (/dev/tts/modem0) &lt;br /&gt;
       a - Send AT\n.&lt;br /&gt;
       c - Send ATCGDCONT\n.&lt;br /&gt;
       h - Send Echo command.&lt;br /&gt;
       k - Test loopback perf using command (ATE1\n).&lt;br /&gt;
  DIAG PORT COMMANDS: (/dev/tts/modemdiag) &lt;br /&gt;
       g  - Get QPST serial port config from DIAG port.&lt;br /&gt;
       s  - Get ESN from DIAG port.&lt;br /&gt;
       zl - CDMA put modemdiag into loopback. &lt;br /&gt;
       zr - CDMA Read performance tests. Takes two arguments &amp;lt;numpkts&amp;gt; and &amp;lt;pktSize&amp;gt;.&lt;br /&gt;
               Eg. %s /dev/tts/modemdiag zr &amp;lt;NumPkts&amp;gt; &amp;lt;PktSize&amp;gt; [v] &lt;br /&gt;
       zw - CDMA Write performance tests. Takes two arguments &amp;lt;numpkts&amp;gt; and &amp;lt;pktSize&amp;gt;.&lt;br /&gt;
               Eg. %s /dev/tts/modemdiag zw &amp;lt;NumPkts&amp;gt; &amp;lt;PktSize&amp;gt; [v] &lt;br /&gt;
       zu - CDMA Performance tests of the diag port after putting it into loopback. Takes two arguments &amp;lt;numpkts&amp;gt; and &amp;lt;pktSize&amp;gt;. &lt;br /&gt;
               Eg. %s /dev/tts/modemdiag zu &amp;lt;NumPkts&amp;gt; &amp;lt;PktSize&amp;gt; [v] &lt;br /&gt;
 where  v - verbose output.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== TelephonyInterfaceLayerGsm ==&lt;br /&gt;
&lt;br /&gt;
/usr/bin/TelephonyInterfaceLayerGsm connects to /dev/modemuart with a baudrate of 115200. Trying the same with screen shows me just rubbish. Seem to be the binary protocol. Make sure you rename the file before killing the process as it gets restarted automatically.&lt;/div&gt;</summary>
		<author><name>StefanSchmidt</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Research_Pre_GSM_Modem&amp;diff=6469</id>
		<title>Research Pre GSM Modem</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Research_Pre_GSM_Modem&amp;diff=6469"/>
		<updated>2009-10-13T18:13:50Z</updated>

		<summary type="html">&lt;p&gt;StefanSchmidt: its /dev/modemuart not ttyS0&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Modem Ports ==&lt;br /&gt;
There are several ports for communicating with the modem on the Palm Pre:&lt;br /&gt;
* /dev/modemuart: Modem UART (UART Port)&lt;br /&gt;
* /dev/tts/modem0 (Symlink for ttyACM0): USB Serial to Modem for AT commands (Data Port)&lt;br /&gt;
* /dev/tts/modemdiag (Symlink for ttyACM1): USB Serial to Modem for Diagnositics (DIAG Port)&lt;br /&gt;
&lt;br /&gt;
== sysfs Entries ==&lt;br /&gt;
* Power Control: /sys/user_hw/pins/modem/power_on/level&lt;br /&gt;
&lt;br /&gt;
== Palm Programs for communicating with the modem ==&lt;br /&gt;
In /usr/bin are some interessting programs:&lt;br /&gt;
* PmLinuxModemCmd: You can do some operations on the modem from command line&lt;br /&gt;
* PmModemInfo: Shows you the IMEI and the version of the modem firmware&lt;br /&gt;
* PmModemPower: A simple shell script to turn on/reset the modem&lt;br /&gt;
* PmModemUpdater: Flash the modem with a new firmware&lt;br /&gt;
&lt;br /&gt;
Through disassembling the PmLinuxModemCmd binary I found some binary sequences which indicates that the Pre communicates with the modem over a binary protocol.&lt;br /&gt;
&lt;br /&gt;
The binary sequences are:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
00014a1c &amp;lt;enableloopbackdataport&amp;gt;:&lt;br /&gt;
   14a1c:	31455441 	.word	0x31455441&lt;br /&gt;
	...&lt;br /&gt;
   159c0:	0a0d      	.short	0x0a0d&lt;br /&gt;
&lt;br /&gt;
000159c2 &amp;lt;loopback&amp;gt;:&lt;br /&gt;
   159c2:	0f88      	.short	0x0f88&lt;br /&gt;
   159c4:	00010000 	.word	0x00010000&lt;br /&gt;
   159c8:	7eb3d400 	.word	0x7eb3d400&lt;br /&gt;
&lt;br /&gt;
000159cc &amp;lt;identify&amp;gt;:&lt;br /&gt;
   159cc:	7e3b1c1d 	.word	0x7e3b1c1d&lt;br /&gt;
&lt;br /&gt;
000159d0 &amp;lt;getVer&amp;gt;:&lt;br /&gt;
   159d0:	1b0000fa 	.word	0x1b0000fa&lt;br /&gt;
   159d4:	00000009 	.word	0x00000009&lt;br /&gt;
   159d8:	00000000 	.word	0x00000000&lt;br /&gt;
   159dc:	7e          	.byte	0x7e&lt;br /&gt;
&lt;br /&gt;
000159dd &amp;lt;testAlive&amp;gt;:&lt;br /&gt;
   159dd:	fa          	.byte	0xfa&lt;br /&gt;
   159de:	0000      	.short	0x0000&lt;br /&gt;
   159e0:	0000011b 	.word	0x0000011b&lt;br /&gt;
   159e4:	00000000 	.word	0x00000000&lt;br /&gt;
   159e8:	b74c      	.short	0xb74c&lt;br /&gt;
   159ea:	7e          	.byte	0x7e&lt;br /&gt;
&lt;br /&gt;
000159eb &amp;lt;testAliveResp&amp;gt;:&lt;br /&gt;
   159eb:	1b          	.byte	0x1b&lt;br /&gt;
   159ec:	00000001 	.word	0x00000001&lt;br /&gt;
   159f0:	0000      	.short	0x0000&lt;br /&gt;
	...&lt;br /&gt;
&lt;br /&gt;
000159f3 &amp;lt;testAliveResp1&amp;gt;:&lt;br /&gt;
   159f3:	1c          	.byte	0x1c&lt;br /&gt;
   159f4:	00000002 	.word	0x00000002&lt;br /&gt;
   159f8:	0000      	.short	0x0000&lt;br /&gt;
	...&lt;br /&gt;
&lt;br /&gt;
000159fb &amp;lt;testAliveCDMA&amp;gt;:&lt;br /&gt;
   159fb:	fa          	.byte	0xfa&lt;br /&gt;
   159fc:	14080000 	.word	0x14080000&lt;br /&gt;
   15a00:	f904d200 	.word	0xf904d200&lt;br /&gt;
   15a04:	7e27      	.short	0x7e27&lt;br /&gt;
&lt;br /&gt;
00015a06 &amp;lt;testAliveRespCDMA&amp;gt;:&lt;br /&gt;
   15a06:	0122      	.short	0x0122&lt;br /&gt;
   15a08:	0000      	.short	0x0000&lt;br /&gt;
	...&lt;br /&gt;
&lt;br /&gt;
00015a0b &amp;lt;enterFTMmode&amp;gt;:&lt;br /&gt;
   15a0b:	29          	.byte	0x29&lt;br /&gt;
   15a0c:	73810003 	.word	0x73810003&lt;br /&gt;
   15a10:	7e          	.byte	0x7e&lt;br /&gt;
&lt;br /&gt;
00015a11 &amp;lt;CDMAdiagPortOnUART&amp;gt;:&lt;br /&gt;
   15a11:	fa          	.byte	0xfa&lt;br /&gt;
   15a12:	0000      	.short	0x0000&lt;br /&gt;
   15a14:	00002308 	.word	0x00002308&lt;br /&gt;
   15a18:	fbf1      	.short	0xfbf1&lt;br /&gt;
   15a1a:	7e          	.byte	0x7e&lt;br /&gt;
&lt;br /&gt;
00015a1b &amp;lt;CDMAdiagPortOnUSB&amp;gt;:&lt;br /&gt;
   15a1b:	fa          	.byte	0xfa&lt;br /&gt;
   15a1c:	23080000 	.word	0x23080000&lt;br /&gt;
   15a20:	29e20001 	.word	0x29e20001&lt;br /&gt;
   15a24:	7e          	.byte	0x7e&lt;br /&gt;
&lt;br /&gt;
00015a25 &amp;lt;resetCDMA&amp;gt;:&lt;br /&gt;
   15a25:	29          	.byte	0x29&lt;br /&gt;
   15a26:	0002      	.short	0x0002&lt;br /&gt;
   15a28:	6a59      	.short	0x6a59&lt;br /&gt;
   15a2a:	7e          	.byte	0x7e&lt;br /&gt;
&lt;br /&gt;
00015a2b &amp;lt;onlineMode&amp;gt;:&lt;br /&gt;
   15a2b:	fa          	.byte	0xfa&lt;br /&gt;
   15a2c:	00030000 	.word	0x00030000&lt;br /&gt;
   15a30:	00000000 	.word	0x00000000&lt;br /&gt;
   15a34:	09f00500 	.word	0x09f00500&lt;br /&gt;
   15a38:	7e          	.byte	0x7e&lt;br /&gt;
&lt;br /&gt;
00015a39 &amp;lt;offlineMode&amp;gt;:&lt;br /&gt;
   15a39:	fa          	.byte	0xfa&lt;br /&gt;
   15a3a:	0000      	.short	0x0000&lt;br /&gt;
   15a3c:	00000003 	.word	0x00000003&lt;br /&gt;
   15a40:	06000000 	.word	0x06000000&lt;br /&gt;
   15a44:	3b6b      	.short	0x3b6b&lt;br /&gt;
   15a46:	7e          	.byte	0x7e&lt;br /&gt;
&lt;br /&gt;
00015a47 &amp;lt;ATCGDCONT&amp;gt;:&lt;br /&gt;
   15a47:	41          	.byte	0x41&lt;br /&gt;
   15a48:	47432b54 	.word	0x47432b54&lt;br /&gt;
   15a4c:	4e4f4344 	.word	0x4e4f4344&lt;br /&gt;
   15a50:	0a0d3f54 	.word	0x0a0d3f54&lt;br /&gt;
&lt;br /&gt;
00015a54 &amp;lt;ATE0E1Cmd&amp;gt;:&lt;br /&gt;
   15a54:	30455441 	.word	0x30455441&lt;br /&gt;
   15a58:	30453145 	.word	0x30453145&lt;br /&gt;
   15a5c:	30453145 	.word	0x30453145&lt;br /&gt;
   15a60:	30453145 	.word	0x30453145&lt;br /&gt;
   15a64:	0a0d3145 	.word	0x0a0d3145&lt;br /&gt;
&lt;br /&gt;
00015a68 &amp;lt;ATCmd&amp;gt;:&lt;br /&gt;
   15a68:	0a0d5441 	.word	0x0a0d5441&lt;br /&gt;
&lt;br /&gt;
00015a6c &amp;lt;Charging90mA&amp;gt;:&lt;br /&gt;
   15a6c:	1b0000fa 	.word	0x1b0000fa&lt;br /&gt;
   15a70:	00000006 	.word	0x00000006&lt;br /&gt;
   15a74:	00180000 	.word	0x00180000&lt;br /&gt;
   15a78:	f0f30000 	.word	0xf0f30000&lt;br /&gt;
   15a7c:	7e          	.byte	0x7e&lt;br /&gt;
&lt;br /&gt;
00015a7d &amp;lt;Charging500mA&amp;gt;:&lt;br /&gt;
   15a7d:	fa          	.byte	0xfa&lt;br /&gt;
   15a7e:	0000      	.short	0x0000&lt;br /&gt;
   15a80:	0000061b 	.word	0x0000061b&lt;br /&gt;
   15a84:	18000000 	.word	0x18000000&lt;br /&gt;
   15a88:	2b000100 	.word	0x2b000100&lt;br /&gt;
   15a8c:	7ee9      	.short	0x7ee9&lt;br /&gt;
&lt;br /&gt;
00015a8e &amp;lt;Charging1A&amp;gt;:&lt;br /&gt;
   15a8e:	00fa      	.short	0x00fa&lt;br /&gt;
   15a90:	00061b00 	.word	0x00061b00&lt;br /&gt;
   15a94:	00000000 	.word	0x00000000&lt;br /&gt;
   15a98:	00070018 	.word	0x00070018&lt;br /&gt;
   15a9c:	bdfb      	.short	0xbdfb&lt;br /&gt;
   15a9e:	7e          	.byte	0x7e&lt;br /&gt;
&lt;br /&gt;
00015a9f &amp;lt;getQPSTConfig&amp;gt;:&lt;br /&gt;
   15a9f:	0c          	.byte	0x0c&lt;br /&gt;
   15aa0:	417e3a14 	.word	0x417e3a14&lt;br /&gt;
   15aa4:	43512454 	.word	0x43512454&lt;br /&gt;
   15aa8:	0d474d44 	.word	0x0d474d44&lt;br /&gt;
   15aac:	51245441 	.word	0x51245441&lt;br /&gt;
   15ab0:	474d4443 	.word	0x474d4443&lt;br /&gt;
   15ab4:	2454410d 	.word	0x2454410d&lt;br /&gt;
   15ab8:	4d444351 	.word	0x4d444351&lt;br /&gt;
   15abc:	067e0d47 	.word	0x067e0d47&lt;br /&gt;
   15ac0:	7e7e954e 	.word	0x7e7e954e&lt;br /&gt;
&lt;br /&gt;
00015ac4 &amp;lt;getESN&amp;gt;:&lt;br /&gt;
   15ac4:	00000026 	.word	0x00000026&lt;br /&gt;
	...&lt;br /&gt;
   15b48:	7ed2ad00 	.word	0x7ed2ad00&lt;br /&gt;
&lt;br /&gt;
00015b4c &amp;lt;CDMAPcmLoopbackOn&amp;gt;:&lt;br /&gt;
   15b4c:	000e0b4b 	.word	0x000e0b4b&lt;br /&gt;
   15b50:	00010003 	.word	0x00010003&lt;br /&gt;
   15b54:	0001000c 	.word	0x0001000c&lt;br /&gt;
   15b58:	7e00      	.short	0x7e00&lt;br /&gt;
&lt;br /&gt;
00015b5a &amp;lt;CDMAPcmLoopbackOff&amp;gt;:&lt;br /&gt;
   15b5a:	0b4b      	.short	0x0b4b&lt;br /&gt;
   15b5c:	0003000e 	.word	0x0003000e&lt;br /&gt;
   15b60:	000c0001 	.word	0x000c0001&lt;br /&gt;
   15b64:	7e000000 	.word	0x7e000000&lt;br /&gt;
&lt;br /&gt;
00015b68 &amp;lt;GSMPcmLoopbackOn&amp;gt;:&lt;br /&gt;
   15b68:	000e0b4b 	.word	0x000e0b4b&lt;br /&gt;
   15b6c:	000b0003 	.word	0x000b0003&lt;br /&gt;
   15b70:	0001000c 	.word	0x0001000c&lt;br /&gt;
   15b74:	7e00      	.short	0x7e00&lt;br /&gt;
&lt;br /&gt;
00015b76 &amp;lt;GSMPcmLoopbackOff&amp;gt;:&lt;br /&gt;
   15b76:	0b4b      	.short	0x0b4b&lt;br /&gt;
   15b78:	0003000e 	.word	0x0003000e&lt;br /&gt;
   15b7c:	000c000b 	.word	0x000c000b&lt;br /&gt;
   15b80:	7e000000 	.word	0x7e000000&lt;br /&gt;
&lt;br /&gt;
00015b84 &amp;lt;Dial&amp;gt;:&lt;br /&gt;
   15b84:	000000fa 	.word	0x000000fa&lt;br /&gt;
   15b88:	00000000 	.word	0x00000000&lt;br /&gt;
   15b8c:	04000000 	.word	0x04000000&lt;br /&gt;
	...&lt;br /&gt;
   15bf0:	34000000 	.word	0x34000000&lt;br /&gt;
   15bf4:	31363830 	.word	0x31363830&lt;br /&gt;
   15bf8:	32333837 	.word	0x32333837&lt;br /&gt;
   15bfc:	00000037 	.word	0x00000037&lt;br /&gt;
	...&lt;br /&gt;
   15c30:	0a000000 	.word	0x0a000000&lt;br /&gt;
	...&lt;br /&gt;
   15c58:	0000      	.short	0x0000&lt;br /&gt;
   15c5a:	7e          	.byte	0x7e&lt;br /&gt;
&lt;br /&gt;
00015c5b &amp;lt;disableloopbackdataport&amp;gt;:&lt;br /&gt;
   15c5b:	41          	.byte	0x41&lt;br /&gt;
   15c5c:	0d304554 	.word	0x0d304554&lt;br /&gt;
   15c60:	0a          	.byte	0x0a&lt;br /&gt;
&lt;br /&gt;
00015c61 &amp;lt;ATDT&amp;gt;:&lt;br /&gt;
   15c61:	41          	.byte	0x41&lt;br /&gt;
   15c62:	4454      	.short	0x4454&lt;br /&gt;
   15c64:	37313654 	.word	0x37313654&lt;br /&gt;
   15c68:	37323338 	.word	0x37323338&lt;br /&gt;
   15c6c:	0a0d      	.short	0x0a0d&lt;br /&gt;
&lt;br /&gt;
00015c6e &amp;lt;testAlive_1&amp;gt;:&lt;br /&gt;
   15c6e:	00fa      	.short	0x00fa&lt;br /&gt;
   15c70:	00011b00 	.word	0x00011b00&lt;br /&gt;
   15c74:	00000001 	.word	0x00000001&lt;br /&gt;
   15c78:	7ead8101 	.word	0x7ead8101&lt;br /&gt;
&lt;br /&gt;
00015c7c &amp;lt;onlineMode_1&amp;gt;:&lt;br /&gt;
   15c7c:	030000fa 	.word	0x030000fa&lt;br /&gt;
   15c80:	00000000 	.word	0x00000000&lt;br /&gt;
   15c84:	4f020000 	.word	0x4f020000&lt;br /&gt;
   15c88:	5d7d      	.short	0x5d7d&lt;br /&gt;
   15c8a:	7e          	.byte	0x7e&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== PmModemUpdater ===&lt;br /&gt;
 Usage:&lt;br /&gt;
 PmModemUpdater -h                     Print usage&lt;br /&gt;
 PmModemUpdater -v                     Detect current modem firmware version&lt;br /&gt;
 PmModemUpdater -p  /path/to/firmware.tar  Check the firmware package info&lt;br /&gt;
 PmModemUpdater -b		      Backup NV items from device to /var/firmware/palm_nv_backup.txt &lt;br /&gt;
 PmModemUpdater -r /path/to/nvfile     Load NV items from nvfile   		&lt;br /&gt;
 PmModemUpdater&amp;lt;firmware.tar           Update the firmware using a tar file as input&lt;br /&gt;
 PmModemUpdater&amp;lt;firmware.tar  -f       Force an update even the modem has the same version than tar file&lt;br /&gt;
 PmModemUpdater&amp;lt;firmware.tar  -s xx xx Force the modem to be flashed (RESCUE MODE)&lt;br /&gt;
 PmModemUpdater  -i            	      Start a data/voice test on your umts modem directly&lt;br /&gt;
 PmModemUpdater  -e            	      Ignore stop/start TIL/WAND&lt;br /&gt;
 PmModemUpdater  -o            	      silent mode which means no verbose output at all&lt;br /&gt;
 PmModemUpdater&amp;lt;firmware.tar -m        Force the modem to be flashed (INFINITE USB RESCUE MODE) on USB&lt;br /&gt;
&lt;br /&gt;
=== pmmodempower ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 for i in &amp;quot;$*&amp;quot;&lt;br /&gt;
    if [ &amp;quot;$i&amp;quot; = &amp;quot;on&amp;quot; ]&lt;br /&gt;
    then&lt;br /&gt;
	echo Powering On Modem&lt;br /&gt;
	echo 1 &amp;gt; /sys/user_hw/pins/modem/power_on/level&lt;br /&gt;
    fi&lt;br /&gt;
    if [ &amp;quot;$i&amp;quot; = &amp;quot;off&amp;quot; ]&lt;br /&gt;
    then &lt;br /&gt;
	echo Powering Off Modem&lt;br /&gt;
	echo 0 &amp;gt; /sys/user_hw/pins/modem/boot_mode/level&lt;br /&gt;
	echo 0 &amp;gt; /sys/user_hw/pins/modem/power_on/level&lt;br /&gt;
    fi&lt;br /&gt;
    if [ &amp;quot;$i&amp;quot; = &amp;quot;cycle&amp;quot; ]&lt;br /&gt;
    then&lt;br /&gt;
	echo Powering Off Modem&lt;br /&gt;
	echo 0 &amp;gt; /sys/user_hw/pins/modem/boot_mode/level&lt;br /&gt;
	echo 0 &amp;gt; /sys/user_hw/pins/modem/wakeup_modem/level&lt;br /&gt;
	echo 0 &amp;gt; /sys/user_hw/pins/modem/power_on/level&lt;br /&gt;
	sleep 2&lt;br /&gt;
	echo Powering On Modem&lt;br /&gt;
	echo 1 &amp;gt; /sys/user_hw/pins/modem/power_on/level&lt;br /&gt;
	#echo Waiting for MODEM_WAKE_APP Low&lt;br /&gt;
	#while [ &amp;quot;$appwake&amp;quot; != &amp;quot;0&amp;quot; ]&lt;br /&gt;
	#do&lt;br /&gt;
	#    appwake=`cat /sys/user_hw/pins/modem/wakeup_app/level`&lt;br /&gt;
	#done&lt;br /&gt;
	#echo Waiting for MODEM_WAKE_APP Pulse High&lt;br /&gt;
	#appwake=`cat /sys/user_hw/pins/modem/wakeup_app/level`&lt;br /&gt;
	#while [ &amp;quot;$appwake&amp;quot; != &amp;quot;1&amp;quot; ]&lt;br /&gt;
	#do&lt;br /&gt;
	#    appwake=`cat /sys/user_hw/pins/modem/wakeup_app/level`&lt;br /&gt;
	#done&lt;br /&gt;
	#while [ &amp;quot;$appwake&amp;quot; != &amp;quot;0&amp;quot; ]&lt;br /&gt;
	#do&lt;br /&gt;
	#    appwake=`cat /sys/user_hw/pins/modem/wakeup_app/level`&lt;br /&gt;
	#done&lt;br /&gt;
	echo Asserting APP_WAKE_MODEM&lt;br /&gt;
	echo 1 &amp;gt; /sys/user_hw/pins/modem/wakeup_modem/level&lt;br /&gt;
    fi&lt;br /&gt;
 done&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== PmLinuxModemCmd ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 usage: PmLinuxModemCmd &amp;lt;Port&amp;gt; &amp;lt;[a][b][c][d &amp;lt;number&amp;gt;][e][f][ftm][h][g][i][k &amp;lt;#pkts&amp;gt;][l][m][n][o][pcmloopback &amp;lt;radio&amp;gt; &amp;lt;state&amp;gt;][q][r][s][t][u &amp;lt;#pkts&amp;gt;][zr][zt][zl][1] [5][9]]&amp;gt; [v]&lt;br /&gt;
 where: &amp;lt;Port&amp;gt;:&lt;br /&gt;
           /dev/ttyS0         - Modem UART. - UART PORT&lt;br /&gt;
           /dev/tts/modem0    - USB Serial to Modem for AT commands - DATA PORT.&lt;br /&gt;
           /dev/tts/modemdiag - USB Serial to Modem for Diagnostics - DIAG PORT.&lt;br /&gt;
 where:&lt;br /&gt;
       e - empty read buffer from specified port.&lt;br /&gt;
       u - Loopback mode performance test. Next argument &amp;lt;#pkts&amp;gt;&lt;br /&gt;
  UART PORT COMMANDS: (/dev/ttyS0) &lt;br /&gt;
       b  - Send loopback mode command for 256 bytes. UART goes into loopback mode until power cycle.&lt;br /&gt;
       d  - Send commands to dial a phone number. Phone number in the format 4086178327.&lt;br /&gt;
       f  - Send offline mode and read pkt.&lt;br /&gt;
       ftm - Enter modem FTM mode (both CDMA and GSM modems).&lt;br /&gt;
       i  - Send identify command.&lt;br /&gt;
       l  - Send testalive then loop forever doing ( onlinemode, offlinemode, sleep  to UART.&lt;br /&gt;
       m  - Disable loopback mode.&lt;br /&gt;
       o  - Send online mode and read pkt.&lt;br /&gt;
       pcmloopback - control PCM loopback. &amp;lt;radio&amp;gt; = GSM/CDMA &amp;lt;state&amp;gt; = on/off.&lt;br /&gt;
       q  - Send test alive, online mode and then read pkts.&lt;br /&gt;
       r  - Get firmware version.&lt;br /&gt;
       t  - Send test alive and read pkt.&lt;br /&gt;
       1  - Send command to enable 1A charging.&lt;br /&gt;
       5  - Send command to enable 500mA charging.&lt;br /&gt;
       9  - Send command to enable 90mA charge.&lt;br /&gt;
       zs - CDMA reset modem.&lt;br /&gt;
       zt - CDMA send test alive and read pkts.&lt;br /&gt;
       zdiagonusb - CDMA put diag port on USB diag.&lt;br /&gt;
       zdiagonuart- CDMA put diag port on UART.&lt;br /&gt;
  DATA PORT COMMANDS: (/dev/tts/modem0) &lt;br /&gt;
       a - Send AT\n.&lt;br /&gt;
       c - Send ATCGDCONT\n.&lt;br /&gt;
       h - Send Echo command.&lt;br /&gt;
       k - Test loopback perf using command (ATE1\n).&lt;br /&gt;
  DIAG PORT COMMANDS: (/dev/tts/modemdiag) &lt;br /&gt;
       g  - Get QPST serial port config from DIAG port.&lt;br /&gt;
       s  - Get ESN from DIAG port.&lt;br /&gt;
       zl - CDMA put modemdiag into loopback. &lt;br /&gt;
       zr - CDMA Read performance tests. Takes two arguments &amp;lt;numpkts&amp;gt; and &amp;lt;pktSize&amp;gt;.&lt;br /&gt;
               Eg. %s /dev/tts/modemdiag zr &amp;lt;NumPkts&amp;gt; &amp;lt;PktSize&amp;gt; [v] &lt;br /&gt;
       zw - CDMA Write performance tests. Takes two arguments &amp;lt;numpkts&amp;gt; and &amp;lt;pktSize&amp;gt;.&lt;br /&gt;
               Eg. %s /dev/tts/modemdiag zw &amp;lt;NumPkts&amp;gt; &amp;lt;PktSize&amp;gt; [v] &lt;br /&gt;
       zu - CDMA Performance tests of the diag port after putting it into loopback. Takes two arguments &amp;lt;numpkts&amp;gt; and &amp;lt;pktSize&amp;gt;. &lt;br /&gt;
               Eg. %s /dev/tts/modemdiag zu &amp;lt;NumPkts&amp;gt; &amp;lt;PktSize&amp;gt; [v] &lt;br /&gt;
 where  v - verbose output.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>StefanSchmidt</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Research_Pre_Audio&amp;diff=6462</id>
		<title>Research Pre Audio</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Research_Pre_Audio&amp;diff=6462"/>
		<updated>2009-10-13T13:51:15Z</updated>

		<summary type="html">&lt;p&gt;StefanSchmidt: mention PMIC chip used also for audio&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This side should cover the audio architecture used on the Palm Pre.&lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
&lt;br /&gt;
The used TWL4030 PMIC covers the audio part.&lt;br /&gt;
&lt;br /&gt;
== Soundcards ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
root@castle:/var/home/root# aplay -l    &lt;br /&gt;
**** List of PLAYBACK Hardware Devices ****&lt;br /&gt;
card 0: mcbsp2 [twl4030-i2s (mcbsp2)], device 0: omap-mcbsp-pcm [omap-mcbsp-pcm]&lt;br /&gt;
  Subdevices: 1/1&lt;br /&gt;
  Subdevice #0: subdevice #0&lt;br /&gt;
card 1: mcbsp3 [btsco (mcbsp3)], device 0: omap-mcbsp-pcm [omap-mcbsp-pcm]&lt;br /&gt;
  Subdevices: 1/1&lt;br /&gt;
  Subdevice #0: subdevice #0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>StefanSchmidt</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Portal:Research&amp;diff=6461</id>
		<title>Portal:Research</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Portal:Research&amp;diff=6461"/>
		<updated>2009-10-13T13:44:10Z</updated>

		<summary type="html">&lt;p&gt;StefanSchmidt: audio research link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__notoc__&lt;br /&gt;
{{portal-header|&lt;br /&gt;
The Research Portal is for bleeding edge things being done with the device. &lt;br /&gt;
&lt;br /&gt;
Title all pages: '''Research [description]''' or '''Reference [description]'''&lt;br /&gt;
}}&lt;br /&gt;
{{portal-two-columns&lt;br /&gt;
|column1=&lt;br /&gt;
===Research:===&lt;br /&gt;
&lt;br /&gt;
* [[Applications Bundled on the Pre]]&lt;br /&gt;
* [[Application_Framework|Application Framework]]&lt;br /&gt;
* [[Blocking Updates]]&lt;br /&gt;
* [[New Bluetooth|BlueZ (Replacing Palm Bluetooth)]]&lt;br /&gt;
* [[Boot_Chain|Boot Chain]]&lt;br /&gt;
* [[Bootie]]&lt;br /&gt;
* [[ClassicFilesystem]]&lt;br /&gt;
* [[Decrypt SSL (trusted man-in-the-middle technique)|Decrypt SSL (trusted man-in-the-middle technique)]]&lt;br /&gt;
* [[Fonts available on board the Pre]]&lt;br /&gt;
* [[Gstreamer]]&lt;br /&gt;
* [[Hidd]]&lt;br /&gt;
* [[Introspecting_Dbus|Introspecting Dbus]]&lt;br /&gt;
* [[Key Codes|Key Codes]] &lt;br /&gt;
* [[Pre Specific Hash Codes|Pre Specific Hash Codes]] &lt;br /&gt;
* [[Pictures from Self-Test|Pictures from Self-Test]] &lt;br /&gt;
* [[Restore Debug Log|Restore Debug Log]] &lt;br /&gt;
* [[Reverse_Engineering_WebOS_Doctor|Reverse Engineering WebOS Doctor]]&lt;br /&gt;
* [[Rooted Pre Issues|Rooted Pre Issues]] &lt;br /&gt;
* [[Research_Securing_Pre|Securing your Pre]]&lt;br /&gt;
* [[Running Processes|Running Processes]] &lt;br /&gt;
* [[Symlink Applications|Symlink Applications]] &lt;br /&gt;
* [[System Sounds|System Sounds]] &lt;br /&gt;
* [[TestApps|TestApps]] &lt;br /&gt;
* [[Update Service Trace|Update Service Trace]] &lt;br /&gt;
* [[Tidbits|Tidbits]] &lt;br /&gt;
* [[VideoRecording]]&lt;br /&gt;
* [[WebOS Exploration - Various Information|WebOS Exploration - Various Information]] &lt;br /&gt;
* [[Research_Pre_GSM_Modem | Pre GSM modem devices, protocols, etc]]&lt;br /&gt;
* [[Research_Pre_Audio | Audio routing and setup on the Pre]]&lt;br /&gt;
&lt;br /&gt;
|column2=&lt;br /&gt;
===Reference===&lt;br /&gt;
* [[Packaging Standards|Packaging Standards]]&lt;br /&gt;
* [[webkit_transform|Webkit Transform]]- a powerful set of commands for manipulating elements.&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>StefanSchmidt</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Research_Pre_Audio&amp;diff=6460</id>
		<title>Research Pre Audio</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Research_Pre_Audio&amp;diff=6460"/>
		<updated>2009-10-13T13:43:14Z</updated>

		<summary type="html">&lt;p&gt;StefanSchmidt: start audio research page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This side should cover the audio architecture used on the Palm Pre.&lt;br /&gt;
&lt;br /&gt;
== Soundcards ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
root@castle:/var/home/root# aplay -l    &lt;br /&gt;
**** List of PLAYBACK Hardware Devices ****&lt;br /&gt;
card 0: mcbsp2 [twl4030-i2s (mcbsp2)], device 0: omap-mcbsp-pcm [omap-mcbsp-pcm]&lt;br /&gt;
  Subdevices: 1/1&lt;br /&gt;
  Subdevice #0: subdevice #0&lt;br /&gt;
card 1: mcbsp3 [btsco (mcbsp3)], device 0: omap-mcbsp-pcm [omap-mcbsp-pcm]&lt;br /&gt;
  Subdevices: 1/1&lt;br /&gt;
  Subdevice #0: subdevice #0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>StefanSchmidt</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Portal:Research&amp;diff=6459</id>
		<title>Portal:Research</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Portal:Research&amp;diff=6459"/>
		<updated>2009-10-13T13:25:02Z</updated>

		<summary type="html">&lt;p&gt;StefanSchmidt: link for the new GSm research page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__notoc__&lt;br /&gt;
{{portal-header|&lt;br /&gt;
The Research Portal is for bleeding edge things being done with the device. &lt;br /&gt;
&lt;br /&gt;
Title all pages: '''Research [description]''' or '''Reference [description]'''&lt;br /&gt;
}}&lt;br /&gt;
{{portal-two-columns&lt;br /&gt;
|column1=&lt;br /&gt;
===Research:===&lt;br /&gt;
&lt;br /&gt;
* [[Applications Bundled on the Pre]]&lt;br /&gt;
* [[Application_Framework|Application Framework]]&lt;br /&gt;
* [[Blocking Updates]]&lt;br /&gt;
* [[New Bluetooth|BlueZ (Replacing Palm Bluetooth)]]&lt;br /&gt;
* [[Boot_Chain|Boot Chain]]&lt;br /&gt;
* [[Bootie]]&lt;br /&gt;
* [[ClassicFilesystem]]&lt;br /&gt;
* [[Decrypt SSL (trusted man-in-the-middle technique)|Decrypt SSL (trusted man-in-the-middle technique)]]&lt;br /&gt;
* [[Fonts available on board the Pre]]&lt;br /&gt;
* [[Gstreamer]]&lt;br /&gt;
* [[Hidd]]&lt;br /&gt;
* [[Introspecting_Dbus|Introspecting Dbus]]&lt;br /&gt;
* [[Key Codes|Key Codes]] &lt;br /&gt;
* [[Pre Specific Hash Codes|Pre Specific Hash Codes]] &lt;br /&gt;
* [[Pictures from Self-Test|Pictures from Self-Test]] &lt;br /&gt;
* [[Restore Debug Log|Restore Debug Log]] &lt;br /&gt;
* [[Reverse_Engineering_WebOS_Doctor|Reverse Engineering WebOS Doctor]]&lt;br /&gt;
* [[Rooted Pre Issues|Rooted Pre Issues]] &lt;br /&gt;
* [[Research_Securing_Pre|Securing your Pre]]&lt;br /&gt;
* [[Running Processes|Running Processes]] &lt;br /&gt;
* [[Symlink Applications|Symlink Applications]] &lt;br /&gt;
* [[System Sounds|System Sounds]] &lt;br /&gt;
* [[TestApps|TestApps]] &lt;br /&gt;
* [[Update Service Trace|Update Service Trace]] &lt;br /&gt;
* [[Tidbits|Tidbits]] &lt;br /&gt;
* [[VideoRecording]]&lt;br /&gt;
* [[WebOS Exploration - Various Information|WebOS Exploration - Various Information]] &lt;br /&gt;
* [[Research_Pre_GSM_Modem | Pre GSM modem devices, protocols, etc]]&lt;br /&gt;
&lt;br /&gt;
|column2=&lt;br /&gt;
===Reference===&lt;br /&gt;
* [[Packaging Standards|Packaging Standards]]&lt;br /&gt;
* [[webkit_transform|Webkit Transform]]- a powerful set of commands for manipulating elements.&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>StefanSchmidt</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Research_Pre_GSM_Modem&amp;diff=6458</id>
		<title>Research Pre GSM Modem</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Research_Pre_GSM_Modem&amp;diff=6458"/>
		<updated>2009-10-13T13:23:33Z</updated>

		<summary type="html">&lt;p&gt;StefanSchmidt: GSM modem information moved over from http://www.freesmartphone.org/index.php/PalmPreGSM&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Modem Ports ==&lt;br /&gt;
There are several ports for communicating with the modem on the Palm Pre:&lt;br /&gt;
* /dev/ttyS0: Modem UART (UART Port)&lt;br /&gt;
* /dev/tts/modem0 (Symlink for ttyACM0): USB Serial to Modem for AT commands (Data Port)&lt;br /&gt;
* /dev/tts/modemdiag (Symlink for ttyACM1): USB Serial to Modem for Diagnositics (DIAG Port)&lt;br /&gt;
&lt;br /&gt;
== sysfs Entries ==&lt;br /&gt;
* Power Control: /sys/user_hw/pins/modem/power_on/level&lt;br /&gt;
&lt;br /&gt;
== Palm Programs for communicating with the modem ==&lt;br /&gt;
In /usr/bin are some interessting programs:&lt;br /&gt;
* PmLinuxModemCmd: You can do some operations on the modem from command line&lt;br /&gt;
* PmModemInfo: Shows you the IMEI and the version of the modem firmware&lt;br /&gt;
* PmModemPower: A simple shell script to turn on/reset the modem&lt;br /&gt;
* PmModemUpdater: Flash the modem with a new firmware&lt;br /&gt;
&lt;br /&gt;
Through disassembling the PmLinuxModemCmd binary I found some binary sequences which indicates that the Pre communicates with the modem over a binary protocol.&lt;br /&gt;
&lt;br /&gt;
The binary sequences are:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
00014a1c &amp;lt;enableloopbackdataport&amp;gt;:&lt;br /&gt;
   14a1c:	31455441 	.word	0x31455441&lt;br /&gt;
	...&lt;br /&gt;
   159c0:	0a0d      	.short	0x0a0d&lt;br /&gt;
&lt;br /&gt;
000159c2 &amp;lt;loopback&amp;gt;:&lt;br /&gt;
   159c2:	0f88      	.short	0x0f88&lt;br /&gt;
   159c4:	00010000 	.word	0x00010000&lt;br /&gt;
   159c8:	7eb3d400 	.word	0x7eb3d400&lt;br /&gt;
&lt;br /&gt;
000159cc &amp;lt;identify&amp;gt;:&lt;br /&gt;
   159cc:	7e3b1c1d 	.word	0x7e3b1c1d&lt;br /&gt;
&lt;br /&gt;
000159d0 &amp;lt;getVer&amp;gt;:&lt;br /&gt;
   159d0:	1b0000fa 	.word	0x1b0000fa&lt;br /&gt;
   159d4:	00000009 	.word	0x00000009&lt;br /&gt;
   159d8:	00000000 	.word	0x00000000&lt;br /&gt;
   159dc:	7e          	.byte	0x7e&lt;br /&gt;
&lt;br /&gt;
000159dd &amp;lt;testAlive&amp;gt;:&lt;br /&gt;
   159dd:	fa          	.byte	0xfa&lt;br /&gt;
   159de:	0000      	.short	0x0000&lt;br /&gt;
   159e0:	0000011b 	.word	0x0000011b&lt;br /&gt;
   159e4:	00000000 	.word	0x00000000&lt;br /&gt;
   159e8:	b74c      	.short	0xb74c&lt;br /&gt;
   159ea:	7e          	.byte	0x7e&lt;br /&gt;
&lt;br /&gt;
000159eb &amp;lt;testAliveResp&amp;gt;:&lt;br /&gt;
   159eb:	1b          	.byte	0x1b&lt;br /&gt;
   159ec:	00000001 	.word	0x00000001&lt;br /&gt;
   159f0:	0000      	.short	0x0000&lt;br /&gt;
	...&lt;br /&gt;
&lt;br /&gt;
000159f3 &amp;lt;testAliveResp1&amp;gt;:&lt;br /&gt;
   159f3:	1c          	.byte	0x1c&lt;br /&gt;
   159f4:	00000002 	.word	0x00000002&lt;br /&gt;
   159f8:	0000      	.short	0x0000&lt;br /&gt;
	...&lt;br /&gt;
&lt;br /&gt;
000159fb &amp;lt;testAliveCDMA&amp;gt;:&lt;br /&gt;
   159fb:	fa          	.byte	0xfa&lt;br /&gt;
   159fc:	14080000 	.word	0x14080000&lt;br /&gt;
   15a00:	f904d200 	.word	0xf904d200&lt;br /&gt;
   15a04:	7e27      	.short	0x7e27&lt;br /&gt;
&lt;br /&gt;
00015a06 &amp;lt;testAliveRespCDMA&amp;gt;:&lt;br /&gt;
   15a06:	0122      	.short	0x0122&lt;br /&gt;
   15a08:	0000      	.short	0x0000&lt;br /&gt;
	...&lt;br /&gt;
&lt;br /&gt;
00015a0b &amp;lt;enterFTMmode&amp;gt;:&lt;br /&gt;
   15a0b:	29          	.byte	0x29&lt;br /&gt;
   15a0c:	73810003 	.word	0x73810003&lt;br /&gt;
   15a10:	7e          	.byte	0x7e&lt;br /&gt;
&lt;br /&gt;
00015a11 &amp;lt;CDMAdiagPortOnUART&amp;gt;:&lt;br /&gt;
   15a11:	fa          	.byte	0xfa&lt;br /&gt;
   15a12:	0000      	.short	0x0000&lt;br /&gt;
   15a14:	00002308 	.word	0x00002308&lt;br /&gt;
   15a18:	fbf1      	.short	0xfbf1&lt;br /&gt;
   15a1a:	7e          	.byte	0x7e&lt;br /&gt;
&lt;br /&gt;
00015a1b &amp;lt;CDMAdiagPortOnUSB&amp;gt;:&lt;br /&gt;
   15a1b:	fa          	.byte	0xfa&lt;br /&gt;
   15a1c:	23080000 	.word	0x23080000&lt;br /&gt;
   15a20:	29e20001 	.word	0x29e20001&lt;br /&gt;
   15a24:	7e          	.byte	0x7e&lt;br /&gt;
&lt;br /&gt;
00015a25 &amp;lt;resetCDMA&amp;gt;:&lt;br /&gt;
   15a25:	29          	.byte	0x29&lt;br /&gt;
   15a26:	0002      	.short	0x0002&lt;br /&gt;
   15a28:	6a59      	.short	0x6a59&lt;br /&gt;
   15a2a:	7e          	.byte	0x7e&lt;br /&gt;
&lt;br /&gt;
00015a2b &amp;lt;onlineMode&amp;gt;:&lt;br /&gt;
   15a2b:	fa          	.byte	0xfa&lt;br /&gt;
   15a2c:	00030000 	.word	0x00030000&lt;br /&gt;
   15a30:	00000000 	.word	0x00000000&lt;br /&gt;
   15a34:	09f00500 	.word	0x09f00500&lt;br /&gt;
   15a38:	7e          	.byte	0x7e&lt;br /&gt;
&lt;br /&gt;
00015a39 &amp;lt;offlineMode&amp;gt;:&lt;br /&gt;
   15a39:	fa          	.byte	0xfa&lt;br /&gt;
   15a3a:	0000      	.short	0x0000&lt;br /&gt;
   15a3c:	00000003 	.word	0x00000003&lt;br /&gt;
   15a40:	06000000 	.word	0x06000000&lt;br /&gt;
   15a44:	3b6b      	.short	0x3b6b&lt;br /&gt;
   15a46:	7e          	.byte	0x7e&lt;br /&gt;
&lt;br /&gt;
00015a47 &amp;lt;ATCGDCONT&amp;gt;:&lt;br /&gt;
   15a47:	41          	.byte	0x41&lt;br /&gt;
   15a48:	47432b54 	.word	0x47432b54&lt;br /&gt;
   15a4c:	4e4f4344 	.word	0x4e4f4344&lt;br /&gt;
   15a50:	0a0d3f54 	.word	0x0a0d3f54&lt;br /&gt;
&lt;br /&gt;
00015a54 &amp;lt;ATE0E1Cmd&amp;gt;:&lt;br /&gt;
   15a54:	30455441 	.word	0x30455441&lt;br /&gt;
   15a58:	30453145 	.word	0x30453145&lt;br /&gt;
   15a5c:	30453145 	.word	0x30453145&lt;br /&gt;
   15a60:	30453145 	.word	0x30453145&lt;br /&gt;
   15a64:	0a0d3145 	.word	0x0a0d3145&lt;br /&gt;
&lt;br /&gt;
00015a68 &amp;lt;ATCmd&amp;gt;:&lt;br /&gt;
   15a68:	0a0d5441 	.word	0x0a0d5441&lt;br /&gt;
&lt;br /&gt;
00015a6c &amp;lt;Charging90mA&amp;gt;:&lt;br /&gt;
   15a6c:	1b0000fa 	.word	0x1b0000fa&lt;br /&gt;
   15a70:	00000006 	.word	0x00000006&lt;br /&gt;
   15a74:	00180000 	.word	0x00180000&lt;br /&gt;
   15a78:	f0f30000 	.word	0xf0f30000&lt;br /&gt;
   15a7c:	7e          	.byte	0x7e&lt;br /&gt;
&lt;br /&gt;
00015a7d &amp;lt;Charging500mA&amp;gt;:&lt;br /&gt;
   15a7d:	fa          	.byte	0xfa&lt;br /&gt;
   15a7e:	0000      	.short	0x0000&lt;br /&gt;
   15a80:	0000061b 	.word	0x0000061b&lt;br /&gt;
   15a84:	18000000 	.word	0x18000000&lt;br /&gt;
   15a88:	2b000100 	.word	0x2b000100&lt;br /&gt;
   15a8c:	7ee9      	.short	0x7ee9&lt;br /&gt;
&lt;br /&gt;
00015a8e &amp;lt;Charging1A&amp;gt;:&lt;br /&gt;
   15a8e:	00fa      	.short	0x00fa&lt;br /&gt;
   15a90:	00061b00 	.word	0x00061b00&lt;br /&gt;
   15a94:	00000000 	.word	0x00000000&lt;br /&gt;
   15a98:	00070018 	.word	0x00070018&lt;br /&gt;
   15a9c:	bdfb      	.short	0xbdfb&lt;br /&gt;
   15a9e:	7e          	.byte	0x7e&lt;br /&gt;
&lt;br /&gt;
00015a9f &amp;lt;getQPSTConfig&amp;gt;:&lt;br /&gt;
   15a9f:	0c          	.byte	0x0c&lt;br /&gt;
   15aa0:	417e3a14 	.word	0x417e3a14&lt;br /&gt;
   15aa4:	43512454 	.word	0x43512454&lt;br /&gt;
   15aa8:	0d474d44 	.word	0x0d474d44&lt;br /&gt;
   15aac:	51245441 	.word	0x51245441&lt;br /&gt;
   15ab0:	474d4443 	.word	0x474d4443&lt;br /&gt;
   15ab4:	2454410d 	.word	0x2454410d&lt;br /&gt;
   15ab8:	4d444351 	.word	0x4d444351&lt;br /&gt;
   15abc:	067e0d47 	.word	0x067e0d47&lt;br /&gt;
   15ac0:	7e7e954e 	.word	0x7e7e954e&lt;br /&gt;
&lt;br /&gt;
00015ac4 &amp;lt;getESN&amp;gt;:&lt;br /&gt;
   15ac4:	00000026 	.word	0x00000026&lt;br /&gt;
	...&lt;br /&gt;
   15b48:	7ed2ad00 	.word	0x7ed2ad00&lt;br /&gt;
&lt;br /&gt;
00015b4c &amp;lt;CDMAPcmLoopbackOn&amp;gt;:&lt;br /&gt;
   15b4c:	000e0b4b 	.word	0x000e0b4b&lt;br /&gt;
   15b50:	00010003 	.word	0x00010003&lt;br /&gt;
   15b54:	0001000c 	.word	0x0001000c&lt;br /&gt;
   15b58:	7e00      	.short	0x7e00&lt;br /&gt;
&lt;br /&gt;
00015b5a &amp;lt;CDMAPcmLoopbackOff&amp;gt;:&lt;br /&gt;
   15b5a:	0b4b      	.short	0x0b4b&lt;br /&gt;
   15b5c:	0003000e 	.word	0x0003000e&lt;br /&gt;
   15b60:	000c0001 	.word	0x000c0001&lt;br /&gt;
   15b64:	7e000000 	.word	0x7e000000&lt;br /&gt;
&lt;br /&gt;
00015b68 &amp;lt;GSMPcmLoopbackOn&amp;gt;:&lt;br /&gt;
   15b68:	000e0b4b 	.word	0x000e0b4b&lt;br /&gt;
   15b6c:	000b0003 	.word	0x000b0003&lt;br /&gt;
   15b70:	0001000c 	.word	0x0001000c&lt;br /&gt;
   15b74:	7e00      	.short	0x7e00&lt;br /&gt;
&lt;br /&gt;
00015b76 &amp;lt;GSMPcmLoopbackOff&amp;gt;:&lt;br /&gt;
   15b76:	0b4b      	.short	0x0b4b&lt;br /&gt;
   15b78:	0003000e 	.word	0x0003000e&lt;br /&gt;
   15b7c:	000c000b 	.word	0x000c000b&lt;br /&gt;
   15b80:	7e000000 	.word	0x7e000000&lt;br /&gt;
&lt;br /&gt;
00015b84 &amp;lt;Dial&amp;gt;:&lt;br /&gt;
   15b84:	000000fa 	.word	0x000000fa&lt;br /&gt;
   15b88:	00000000 	.word	0x00000000&lt;br /&gt;
   15b8c:	04000000 	.word	0x04000000&lt;br /&gt;
	...&lt;br /&gt;
   15bf0:	34000000 	.word	0x34000000&lt;br /&gt;
   15bf4:	31363830 	.word	0x31363830&lt;br /&gt;
   15bf8:	32333837 	.word	0x32333837&lt;br /&gt;
   15bfc:	00000037 	.word	0x00000037&lt;br /&gt;
	...&lt;br /&gt;
   15c30:	0a000000 	.word	0x0a000000&lt;br /&gt;
	...&lt;br /&gt;
   15c58:	0000      	.short	0x0000&lt;br /&gt;
   15c5a:	7e          	.byte	0x7e&lt;br /&gt;
&lt;br /&gt;
00015c5b &amp;lt;disableloopbackdataport&amp;gt;:&lt;br /&gt;
   15c5b:	41          	.byte	0x41&lt;br /&gt;
   15c5c:	0d304554 	.word	0x0d304554&lt;br /&gt;
   15c60:	0a          	.byte	0x0a&lt;br /&gt;
&lt;br /&gt;
00015c61 &amp;lt;ATDT&amp;gt;:&lt;br /&gt;
   15c61:	41          	.byte	0x41&lt;br /&gt;
   15c62:	4454      	.short	0x4454&lt;br /&gt;
   15c64:	37313654 	.word	0x37313654&lt;br /&gt;
   15c68:	37323338 	.word	0x37323338&lt;br /&gt;
   15c6c:	0a0d      	.short	0x0a0d&lt;br /&gt;
&lt;br /&gt;
00015c6e &amp;lt;testAlive_1&amp;gt;:&lt;br /&gt;
   15c6e:	00fa      	.short	0x00fa&lt;br /&gt;
   15c70:	00011b00 	.word	0x00011b00&lt;br /&gt;
   15c74:	00000001 	.word	0x00000001&lt;br /&gt;
   15c78:	7ead8101 	.word	0x7ead8101&lt;br /&gt;
&lt;br /&gt;
00015c7c &amp;lt;onlineMode_1&amp;gt;:&lt;br /&gt;
   15c7c:	030000fa 	.word	0x030000fa&lt;br /&gt;
   15c80:	00000000 	.word	0x00000000&lt;br /&gt;
   15c84:	4f020000 	.word	0x4f020000&lt;br /&gt;
   15c88:	5d7d      	.short	0x5d7d&lt;br /&gt;
   15c8a:	7e          	.byte	0x7e&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== PmModemUpdater ===&lt;br /&gt;
 Usage:&lt;br /&gt;
 PmModemUpdater -h                     Print usage&lt;br /&gt;
 PmModemUpdater -v                     Detect current modem firmware version&lt;br /&gt;
 PmModemUpdater -p  /path/to/firmware.tar  Check the firmware package info&lt;br /&gt;
 PmModemUpdater -b		      Backup NV items from device to /var/firmware/palm_nv_backup.txt &lt;br /&gt;
 PmModemUpdater -r /path/to/nvfile     Load NV items from nvfile   		&lt;br /&gt;
 PmModemUpdater&amp;lt;firmware.tar           Update the firmware using a tar file as input&lt;br /&gt;
 PmModemUpdater&amp;lt;firmware.tar  -f       Force an update even the modem has the same version than tar file&lt;br /&gt;
 PmModemUpdater&amp;lt;firmware.tar  -s xx xx Force the modem to be flashed (RESCUE MODE)&lt;br /&gt;
 PmModemUpdater  -i            	      Start a data/voice test on your umts modem directly&lt;br /&gt;
 PmModemUpdater  -e            	      Ignore stop/start TIL/WAND&lt;br /&gt;
 PmModemUpdater  -o            	      silent mode which means no verbose output at all&lt;br /&gt;
 PmModemUpdater&amp;lt;firmware.tar -m        Force the modem to be flashed (INFINITE USB RESCUE MODE) on USB&lt;br /&gt;
&lt;br /&gt;
=== pmmodempower ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 for i in &amp;quot;$*&amp;quot;&lt;br /&gt;
    if [ &amp;quot;$i&amp;quot; = &amp;quot;on&amp;quot; ]&lt;br /&gt;
    then&lt;br /&gt;
	echo Powering On Modem&lt;br /&gt;
	echo 1 &amp;gt; /sys/user_hw/pins/modem/power_on/level&lt;br /&gt;
    fi&lt;br /&gt;
    if [ &amp;quot;$i&amp;quot; = &amp;quot;off&amp;quot; ]&lt;br /&gt;
    then &lt;br /&gt;
	echo Powering Off Modem&lt;br /&gt;
	echo 0 &amp;gt; /sys/user_hw/pins/modem/boot_mode/level&lt;br /&gt;
	echo 0 &amp;gt; /sys/user_hw/pins/modem/power_on/level&lt;br /&gt;
    fi&lt;br /&gt;
    if [ &amp;quot;$i&amp;quot; = &amp;quot;cycle&amp;quot; ]&lt;br /&gt;
    then&lt;br /&gt;
	echo Powering Off Modem&lt;br /&gt;
	echo 0 &amp;gt; /sys/user_hw/pins/modem/boot_mode/level&lt;br /&gt;
	echo 0 &amp;gt; /sys/user_hw/pins/modem/wakeup_modem/level&lt;br /&gt;
	echo 0 &amp;gt; /sys/user_hw/pins/modem/power_on/level&lt;br /&gt;
	sleep 2&lt;br /&gt;
	echo Powering On Modem&lt;br /&gt;
	echo 1 &amp;gt; /sys/user_hw/pins/modem/power_on/level&lt;br /&gt;
	#echo Waiting for MODEM_WAKE_APP Low&lt;br /&gt;
	#while [ &amp;quot;$appwake&amp;quot; != &amp;quot;0&amp;quot; ]&lt;br /&gt;
	#do&lt;br /&gt;
	#    appwake=`cat /sys/user_hw/pins/modem/wakeup_app/level`&lt;br /&gt;
	#done&lt;br /&gt;
	#echo Waiting for MODEM_WAKE_APP Pulse High&lt;br /&gt;
	#appwake=`cat /sys/user_hw/pins/modem/wakeup_app/level`&lt;br /&gt;
	#while [ &amp;quot;$appwake&amp;quot; != &amp;quot;1&amp;quot; ]&lt;br /&gt;
	#do&lt;br /&gt;
	#    appwake=`cat /sys/user_hw/pins/modem/wakeup_app/level`&lt;br /&gt;
	#done&lt;br /&gt;
	#while [ &amp;quot;$appwake&amp;quot; != &amp;quot;0&amp;quot; ]&lt;br /&gt;
	#do&lt;br /&gt;
	#    appwake=`cat /sys/user_hw/pins/modem/wakeup_app/level`&lt;br /&gt;
	#done&lt;br /&gt;
	echo Asserting APP_WAKE_MODEM&lt;br /&gt;
	echo 1 &amp;gt; /sys/user_hw/pins/modem/wakeup_modem/level&lt;br /&gt;
    fi&lt;br /&gt;
 done&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== PmLinuxModemCmd ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 usage: PmLinuxModemCmd &amp;lt;Port&amp;gt; &amp;lt;[a][b][c][d &amp;lt;number&amp;gt;][e][f][ftm][h][g][i][k &amp;lt;#pkts&amp;gt;][l][m][n][o][pcmloopback &amp;lt;radio&amp;gt; &amp;lt;state&amp;gt;][q][r][s][t][u &amp;lt;#pkts&amp;gt;][zr][zt][zl][1] [5][9]]&amp;gt; [v]&lt;br /&gt;
 where: &amp;lt;Port&amp;gt;:&lt;br /&gt;
           /dev/ttyS0         - Modem UART. - UART PORT&lt;br /&gt;
           /dev/tts/modem0    - USB Serial to Modem for AT commands - DATA PORT.&lt;br /&gt;
           /dev/tts/modemdiag - USB Serial to Modem for Diagnostics - DIAG PORT.&lt;br /&gt;
 where:&lt;br /&gt;
       e - empty read buffer from specified port.&lt;br /&gt;
       u - Loopback mode performance test. Next argument &amp;lt;#pkts&amp;gt;&lt;br /&gt;
  UART PORT COMMANDS: (/dev/ttyS0) &lt;br /&gt;
       b  - Send loopback mode command for 256 bytes. UART goes into loopback mode until power cycle.&lt;br /&gt;
       d  - Send commands to dial a phone number. Phone number in the format 4086178327.&lt;br /&gt;
       f  - Send offline mode and read pkt.&lt;br /&gt;
       ftm - Enter modem FTM mode (both CDMA and GSM modems).&lt;br /&gt;
       i  - Send identify command.&lt;br /&gt;
       l  - Send testalive then loop forever doing ( onlinemode, offlinemode, sleep  to UART.&lt;br /&gt;
       m  - Disable loopback mode.&lt;br /&gt;
       o  - Send online mode and read pkt.&lt;br /&gt;
       pcmloopback - control PCM loopback. &amp;lt;radio&amp;gt; = GSM/CDMA &amp;lt;state&amp;gt; = on/off.&lt;br /&gt;
       q  - Send test alive, online mode and then read pkts.&lt;br /&gt;
       r  - Get firmware version.&lt;br /&gt;
       t  - Send test alive and read pkt.&lt;br /&gt;
       1  - Send command to enable 1A charging.&lt;br /&gt;
       5  - Send command to enable 500mA charging.&lt;br /&gt;
       9  - Send command to enable 90mA charge.&lt;br /&gt;
       zs - CDMA reset modem.&lt;br /&gt;
       zt - CDMA send test alive and read pkts.&lt;br /&gt;
       zdiagonusb - CDMA put diag port on USB diag.&lt;br /&gt;
       zdiagonuart- CDMA put diag port on UART.&lt;br /&gt;
  DATA PORT COMMANDS: (/dev/tts/modem0) &lt;br /&gt;
       a - Send AT\n.&lt;br /&gt;
       c - Send ATCGDCONT\n.&lt;br /&gt;
       h - Send Echo command.&lt;br /&gt;
       k - Test loopback perf using command (ATE1\n).&lt;br /&gt;
  DIAG PORT COMMANDS: (/dev/tts/modemdiag) &lt;br /&gt;
       g  - Get QPST serial port config from DIAG port.&lt;br /&gt;
       s  - Get ESN from DIAG port.&lt;br /&gt;
       zl - CDMA put modemdiag into loopback. &lt;br /&gt;
       zr - CDMA Read performance tests. Takes two arguments &amp;lt;numpkts&amp;gt; and &amp;lt;pktSize&amp;gt;.&lt;br /&gt;
               Eg. %s /dev/tts/modemdiag zr &amp;lt;NumPkts&amp;gt; &amp;lt;PktSize&amp;gt; [v] &lt;br /&gt;
       zw - CDMA Write performance tests. Takes two arguments &amp;lt;numpkts&amp;gt; and &amp;lt;pktSize&amp;gt;.&lt;br /&gt;
               Eg. %s /dev/tts/modemdiag zw &amp;lt;NumPkts&amp;gt; &amp;lt;PktSize&amp;gt; [v] &lt;br /&gt;
       zu - CDMA Performance tests of the diag port after putting it into loopback. Takes two arguments &amp;lt;numpkts&amp;gt; and &amp;lt;pktSize&amp;gt;. &lt;br /&gt;
               Eg. %s /dev/tts/modemdiag zu &amp;lt;NumPkts&amp;gt; &amp;lt;PktSize&amp;gt; [v] &lt;br /&gt;
 where  v - verbose output.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>StefanSchmidt</name></author>
	</entry>
</feed>