<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://maemo.octonezd.me/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=156.220.133.251</id>
	<title>Maemo Wiki Mirror - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://maemo.octonezd.me/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=156.220.133.251"/>
	<link rel="alternate" type="text/html" href="https://maemo.octonezd.me/index.php/Special:Contributions/156.220.133.251"/>
	<updated>2026-04-22T09:48:25Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://maemo.octonezd.me/index.php?title=N900_GPS_Reverse_Engineering&amp;diff=27504</id>
		<title>N900 GPS Reverse Engineering</title>
		<link rel="alternate" type="text/html" href="https://maemo.octonezd.me/index.php?title=N900_GPS_Reverse_Engineering&amp;diff=27504"/>
		<updated>2022-02-11T06:57:16Z</updated>

		<summary type="html">&lt;p&gt;156.220.133.251: /* Packet Graph */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;acquire packets like:&lt;br /&gt;
 strace -p $(pidof location-daemon) -e read=6 2&amp;gt;&amp;amp;1|grep &#039;| 000&#039;&lt;br /&gt;
&lt;br /&gt;
alternatively you can capture them from the network interface, but this will include other modem information:&lt;br /&gt;
 tcpdump -i phonet0 -s 0 -w phonet.cap&lt;br /&gt;
&lt;br /&gt;
عملية تصحيح النظر بالليزر هو اجراء جراحى نقوم به لتحسين وتصحيح النظر مما يقلل من استخدام المريض للنظارات او العدسات اللاصقه&lt;br /&gt;
&lt;br /&gt;
 [https://mshhor.com/%D8%B9%D9%85%D9%84%D9%8A%D8%A9-%D8%AA%D8%B5%D8%AD%D9%8A%D8%AD-%D8%A7%D9%84%D9%86%D8%B8%D8%B1-%D8%A8%D8%A7%D9%84%D9%84%D9%8A%D8%B2%D8%B1-2/ عملية تصحيح طول النظر بالليزر]&lt;br /&gt;
&lt;br /&gt;
== Packet Analysis ==&lt;br /&gt;
*??? = mode: The mode of the fix &lt;br /&gt;
*??? = fields: A bitfield representing which items of this tuple contain valid data&lt;br /&gt;
*00 = ISI sequence ID (seems to be always 0 for GPS)&lt;br /&gt;
*01 = GPS Data Opcode (0x92)&lt;br /&gt;
*10,11 = time year&lt;br /&gt;
*12 = time month&lt;br /&gt;
*13 = time day&lt;br /&gt;
*15 = time hour&lt;br /&gt;
*16 = time minute&lt;br /&gt;
*18,19 = time seconds and milliseconds (in milliseconds)&lt;br /&gt;
*1a,1b = *probably* ept: Time accuracy, but *always* 0, so no way to verify&lt;br /&gt;
*20,21,22,23 = latitude / 360 * 256*256*256*256&lt;br /&gt;
*24,25,26,27 = longitude / 360 * 256*256*256*256&lt;br /&gt;
*28 =&lt;br /&gt;
*2b,2c = 0590-12a9 (hex)&lt;br /&gt;
*2e,2f = eph (cm)&lt;br /&gt;
*30 =&lt;br /&gt;
*32,33,,36,37 = altitude; ((p32;33) - (p36;37)) / 2 = meters&lt;br /&gt;
*(34?,)35 = (double epv: Vertical position accuracy) * 2&lt;br /&gt;
*3c,3d = track: Direction of motion in hundredths of a degree&lt;br /&gt;
*3e,3f = epd: Track accuracy (in hundredths?)&lt;br /&gt;
*42,43 = speed, in centimetres per second&lt;br /&gt;
*44,45 = eps: speed accuracy, in centimetres per second&lt;br /&gt;
*46,47 = climb: Current rate of climb in cm/s&lt;br /&gt;
*48,4a = epc: Climb accuracy, in cm/s&lt;br /&gt;
&lt;br /&gt;
== Protocol Details ==&lt;br /&gt;
&lt;br /&gt;
NOTE: I am counting octets based on zero.&lt;br /&gt;
&lt;br /&gt;
The actual packets are comprised of &amp;quot;sub-packets&amp;quot;.&lt;br /&gt;
The overall packet has a 12 byte header.&lt;br /&gt;
The number of sub-packets is located at octet 8 (and possibly little-endian extended to octet 11).&lt;br /&gt;
&lt;br /&gt;
Each subpacket has a 4 byte header:&lt;br /&gt;
* Octet 0 is always 9&lt;br /&gt;
* Octet 1 is the subpacket type&lt;br /&gt;
* Octet 2 is always 0&lt;br /&gt;
* Octet 3 is the length of the subpacket (which includes the subpacket header itself)&lt;br /&gt;
&lt;br /&gt;
Subpacket 2 contains position information:&lt;br /&gt;
* Octets 0-3 are the latitude&lt;br /&gt;
* Octets 4-7 are the longitude&lt;br /&gt;
* Octets 12-15 are &amp;quot;eph&amp;quot; (in centimetres)&lt;br /&gt;
* Octets 18-23 are the altitude (and accuracy information)&lt;br /&gt;
&lt;br /&gt;
Subpacket 3 contains date and time information:&lt;br /&gt;
* Octets 0-1 are the year&lt;br /&gt;
* Octet 2 is the month&lt;br /&gt;
* Octet 3 is the day of month&lt;br /&gt;
* Octet 5 is the hour&lt;br /&gt;
* Octet 6 is the minute&lt;br /&gt;
* Octets 8-9 are milliseconds (including seconds)&lt;br /&gt;
* Octets 10-11 are the time accuracy&lt;br /&gt;
&lt;br /&gt;
Subpacket 4 contains information on track, speed, and climb:&lt;br /&gt;
* Octets 0-1 are track (direction of motion) in cm/sec&lt;br /&gt;
* Octets 2-3 are the track accuracy&lt;br /&gt;
* Octets 6-7 are the speed in cm/sec&lt;br /&gt;
* Octets 8-9 are speed accuracy&lt;br /&gt;
* Octets 8-11 are climb in cm/sec&lt;br /&gt;
* Octets 12-13 are climb accuracy&lt;br /&gt;
&lt;br /&gt;
Subpacket 5 contains satellite information:&lt;br /&gt;
* Octet 0 is the number of sats visible&lt;br /&gt;
* Beginning with octet 8, there are series of 12-octet info for each sat visible:&lt;br /&gt;
** Octet 1 is the PRN&lt;br /&gt;
** Octet 2 is 1 if the sat is being used, and 0 otherwise&lt;br /&gt;
** Octets 3-4 are the signal strength&lt;br /&gt;
** Octets 6-7 are the elevation&lt;br /&gt;
** Octets 8-9 are the azimuth&lt;br /&gt;
&lt;br /&gt;
Subpacket 7 contains information on the GSM cellular network:&lt;br /&gt;
** Octets 0-1 contain the Mobile Country Code&lt;br /&gt;
** Octets 2-3 contain the Mobile Network Code&lt;br /&gt;
** Octets 4-5 contain the Location Area Code&lt;br /&gt;
** Octets 6-7 contain the Cell ID&lt;br /&gt;
&lt;br /&gt;
Subpacket 8 contains information on the WCDMA cellular network:&lt;br /&gt;
** Octets 0-1 contain the Mobile Country Code&lt;br /&gt;
** Octets 2-3 contain the Mobile Network Code&lt;br /&gt;
** Octets 4-7 contain the UC ID&lt;br /&gt;
&lt;br /&gt;
== Wireshark ==&lt;br /&gt;
&lt;br /&gt;
[[User:sre|Sebastian Reichel]] writes a lowlevel library to access the N900&#039;s modem features and a wireshark plugin to analyze the packages. The information from above is currently only included in the Wireshark Plugin:&lt;br /&gt;
&lt;br /&gt;
* [http://elektranox.org/n900/images/wireshark/04.png Screenshot]&lt;br /&gt;
* [https://git.ring0.de/isi-wireshark-plugin/ Plugin]&lt;br /&gt;
&lt;br /&gt;
[http://maemo.org/profile/view/luke-jr Luke Dashjr] wrote small program in C which show GPS data from phonet modem stack.&lt;br /&gt;
&lt;br /&gt;
* [http://luke.dashjr.org/tmp/code/gps2.c gps2.c]&lt;br /&gt;
&lt;br /&gt;
[[Category:N900 Hardware]]&lt;/div&gt;</summary>
		<author><name>156.220.133.251</name></author>
	</entry>
</feed>