<?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=208.42.141.209</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=208.42.141.209"/>
	<link rel="alternate" type="text/html" href="https://maemo.octonezd.me/index.php/Special:Contributions/208.42.141.209"/>
	<updated>2026-04-21T22:11:16Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://maemo.octonezd.me/index.php?title=Mer/Documentation/N810_GPS&amp;diff=24013</id>
		<title>Mer/Documentation/N810 GPS</title>
		<link rel="alternate" type="text/html" href="https://maemo.octonezd.me/index.php?title=Mer/Documentation/N810_GPS&amp;diff=24013"/>
		<updated>2009-05-22T18:48:44Z</updated>

		<summary type="html">&lt;p&gt;208.42.141.209: Minor corrections&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Notes ==&lt;br /&gt;
*These directions are confirmed to work on Mer 0.12.&lt;br /&gt;
&lt;br /&gt;
*All commands should be run as root.&lt;br /&gt;
&lt;br /&gt;
*All instances of &amp;quot;YOURUSERNAME&amp;quot; should be changed to whatever your user is named. Commands involving &amp;quot;YOURUSERNAME&amp;quot; [i]probably[/i] don&#039;t have to be run if your user is named &amp;quot;user&amp;quot;, though this is unconfirmed.&lt;br /&gt;
&lt;br /&gt;
*The time to first fix (TTFF) is quite long (~30 min), and GPSD quits after the last client disconnects. Keep this in mind.&lt;br /&gt;
&lt;br /&gt;
== Directions ==&lt;br /&gt;
=== Step 1: Install the necessary files ===&lt;br /&gt;
Install the following packages from the Maemo Updates repository (you can install them on Maemo, then copy the packages from the apt cache):&lt;br /&gt;
 libsupld1&lt;br /&gt;
 osso-gpsd&lt;br /&gt;
 libgpsmgr&lt;br /&gt;
 libgpsbt (?)&lt;br /&gt;
 gpsdriver&lt;br /&gt;
&lt;br /&gt;
=== Step 2: Tweak /etc/init.d/libgpsbt ===&lt;br /&gt;
Edit /etc/init.d/libgpsbt and change all instances of &amp;quot;user:users&amp;quot; to &amp;quot;YOURUSERNAME:users&amp;quot; There should be 2 instances you need to change.&lt;br /&gt;
&lt;br /&gt;
=== Step 3: Change ownership ===&lt;br /&gt;
Run:&lt;br /&gt;
 chown -R YOURUSERNAME:users /var/lib/gps&lt;br /&gt;
&lt;br /&gt;
=== Step 4: Make the necessary files ===&lt;br /&gt;
Make the following files:&lt;br /&gt;
&lt;br /&gt;
/etc/default/gps5300driver.conf:&lt;br /&gt;
 # /etc/default/gps5300driver.conf&lt;br /&gt;
 &lt;br /&gt;
 # The user who can control the driver&lt;br /&gt;
 GPS5300_USER=root&lt;br /&gt;
 &lt;br /&gt;
 # Whether the driver will self-initialize, may or may not work (more on the may not side)&lt;br /&gt;
 GPS5300_SELFINIT=true&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/etc/init.d/gps5300driver:&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 &lt;br /&gt;
 GPS5300_DRIVER=&#039;/usr/sbin/gps5300driver&#039;&lt;br /&gt;
 GPS5300_PIDFILE=&#039;/var/run/gps5300driver.pid&#039;&lt;br /&gt;
 GPS5300_PRELOAD=&#039;/usr/lib/libgps5300faker.so&#039;&lt;br /&gt;
 CONF=/etc/default/gps5300driver.conf&lt;br /&gt;
 &lt;br /&gt;
 if [ -f $CONF ]; then&lt;br /&gt;
          . $CONF&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 case $1 in&lt;br /&gt;
 	start)&lt;br /&gt;
 		echo &amp;quot;Starting GPS5300 driver&amp;quot;&lt;br /&gt;
 		if ! [ -e /sys/devices/platform/gpio-switch/gps_reset/state ]; then&lt;br /&gt;
 			echo &amp;quot;gps_reset state gpio switch missing&amp;quot;&lt;br /&gt;
 #			return 1&lt;br /&gt;
 		fi&lt;br /&gt;
 			&lt;br /&gt;
 		[ -z &amp;quot;${GPS5300_SELFINIT}&amp;quot; ] &amp;amp;&amp;amp; GPS5300_SELFINIT=true&lt;br /&gt;
 		${GPS5300_SELFINIT} || unset GPS5300_SELFINIT&lt;br /&gt;
 		export GPS5300_SELFINIT&lt;br /&gt;
 		&lt;br /&gt;
 		[ -z &amp;quot;${GPS5300_USER}&amp;quot; ] &amp;amp;&amp;amp; GPS5300_USER=root&lt;br /&gt;
 		export GPS5300_USER&lt;br /&gt;
 		&lt;br /&gt;
 		export LD_PRELOAD=${GPS5300_PRELOAD}		&lt;br /&gt;
 	&lt;br /&gt;
 		start-stop-daemon --start \&lt;br /&gt;
 			--quiet \&lt;br /&gt;
 			--background \&lt;br /&gt;
 			--pidfile &amp;quot;${GPS5300_PIDFILE}&amp;quot; \&lt;br /&gt;
 			--make-pidfile \&lt;br /&gt;
 			--exec &amp;quot;${GPS5300_DRIVER}&amp;quot;&lt;br /&gt;
 #			--env &amp;quot;LD_PRELOAD=${GPS5300_PRELOAD}&amp;quot; \&lt;br /&gt;
 #			--exec &amp;quot;${GPS5300_DRIVER}&amp;quot;&lt;br /&gt;
 #		return 0&lt;br /&gt;
 	;;&lt;br /&gt;
 &lt;br /&gt;
 	stop)&lt;br /&gt;
 		echo &amp;quot;Stopping GPS5300 driver&amp;quot;&lt;br /&gt;
 		start-stop-daemon --stop \&lt;br /&gt;
 			--quiet \&lt;br /&gt;
 			--pidfile &amp;quot;${GPS5300_PIDFILE}&amp;quot;&lt;br /&gt;
 		rm ${GPS5300_PIDFILE}&lt;br /&gt;
 #		return 0&lt;br /&gt;
 	;;&lt;br /&gt;
 &lt;br /&gt;
 	restart|force-reload)&lt;br /&gt;
 		$0 stop&lt;br /&gt;
 		$0 start&lt;br /&gt;
 	;;&lt;br /&gt;
 &lt;br /&gt;
 	*)&lt;br /&gt;
 		echo &amp;quot;Usage: $0: {start|stop|restart|force-reload}&amp;quot;&lt;br /&gt;
 		exit 1&lt;br /&gt;
 	;;&lt;br /&gt;
 esac&lt;br /&gt;
&lt;br /&gt;
=== Step 5: Copy gpsdriver ===&lt;br /&gt;
Make a copy of gpsdriver to prevent confusion&lt;br /&gt;
 cp /usr/sbin/gpsdriver /usr/sbin/gps5300driver&lt;br /&gt;
&lt;br /&gt;
=== Step 6: Install libgps5300faker.so ===&lt;br /&gt;
First of all, install the necessary packages (they may be removed later, this may be an excessive list or an incomplete list. Basically keep installing stuff until it stops complaining):&lt;br /&gt;
 apt-get install build-essential m4 automake autoconf&lt;br /&gt;
&lt;br /&gt;
Make the following files somewhere (they may be removed later):&lt;br /&gt;
&lt;br /&gt;
preload_init.c&lt;br /&gt;
 /*&lt;br /&gt;
  * Copyright 2009 Luke Dashjr &amp;lt;luke_n8x0_gps5300driver@dashjr.org&amp;gt;&lt;br /&gt;
  * Licensed for redistribution as-is;&lt;br /&gt;
  * contact me if you want something more permissive&lt;br /&gt;
  */&lt;br /&gt;
 &lt;br /&gt;
 #define _GNU_SOURCE&lt;br /&gt;
 &lt;br /&gt;
 #include &amp;lt;dlfcn.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;string.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;sys/types.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;sys/socket.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;sys/un.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;unistd.h&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 static struct sockaddr_un ctrl_sau = {&lt;br /&gt;
 	AF_UNIX,&lt;br /&gt;
 	&amp;quot;/var/lib/gps/gps_driver_ctrl\0&amp;quot;,&lt;br /&gt;
 };&lt;br /&gt;
 #define CTRL_SCK_PATH ctrl_sau.sun_path&lt;br /&gt;
 &lt;br /&gt;
 static int ctrl_sck = -1;&lt;br /&gt;
 &lt;br /&gt;
 typedef int (*bind_t)(int, const struct sockaddr*, socklen_t);&lt;br /&gt;
 &lt;br /&gt;
 int&lt;br /&gt;
 bind(int sockfd, const struct sockaddr*addr, socklen_t addrlen) {&lt;br /&gt;
 	static bind_t real = NULL;&lt;br /&gt;
 	if (!real)&lt;br /&gt;
 		real = dlsym(RTLD_NEXT, &amp;quot;bind&amp;quot;);&lt;br /&gt;
 	&lt;br /&gt;
 	int rv = real(sockfd, addr, addrlen);&lt;br /&gt;
 	&lt;br /&gt;
 	if (&lt;br /&gt;
 	    addr &amp;amp;&amp;amp;&lt;br /&gt;
 	    addr-&amp;gt;sa_family == AF_FILE &amp;amp;&amp;amp;&lt;br /&gt;
 	    !strcmp(CTRL_SCK_PATH,&lt;br /&gt;
 	            ((struct sockaddr_un*)addr)-&amp;gt;sun_path&lt;br /&gt;
 	           ) &amp;amp;&amp;amp;&lt;br /&gt;
 	    getenv(&amp;quot;GPS5300_SELFINIT&amp;quot;) &amp;amp;&amp;amp;&lt;br /&gt;
 	    1&lt;br /&gt;
 	)&lt;br /&gt;
 		ctrl_sck = sockfd;&lt;br /&gt;
 	&lt;br /&gt;
 	return rv;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 typedef int (*listen_t)(int, int);&lt;br /&gt;
 &lt;br /&gt;
 int&lt;br /&gt;
 listen(int sockfd, int backlog) {&lt;br /&gt;
 	static listen_t real = NULL;&lt;br /&gt;
 	if (!real)&lt;br /&gt;
 		real = dlsym(RTLD_NEXT, &amp;quot;listen&amp;quot;);&lt;br /&gt;
 	&lt;br /&gt;
 	int rv = real(sockfd, backlog);&lt;br /&gt;
 	&lt;br /&gt;
 	if (sockfd == ctrl_sck &amp;amp;&amp;amp; !fork())&lt;br /&gt;
 	{&lt;br /&gt;
 		// Child process :)&lt;br /&gt;
 		&lt;br /&gt;
 		int sck;&lt;br /&gt;
 		char initcmd[] = &amp;quot;P 3\n&amp;quot;;&lt;br /&gt;
 		&lt;br /&gt;
 		sck = socket(PF_FILE, SOCK_STREAM, 0);&lt;br /&gt;
 		if (sck &amp;lt; 0)&lt;br /&gt;
 			exit(1);&lt;br /&gt;
 		if (connect(sck, &amp;amp;ctrl_sau, sizeof ctrl_sau))&lt;br /&gt;
 			exit(1);&lt;br /&gt;
 		write(sck, initcmd, sizeof initcmd);&lt;br /&gt;
 		close(sck);&lt;br /&gt;
 		&lt;br /&gt;
 		exit(0);&lt;br /&gt;
 	}&lt;br /&gt;
 	&lt;br /&gt;
 	return rv;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
preload.c:&lt;br /&gt;
  /*&lt;br /&gt;
  * Copyright 2009 Luke Dashjr &amp;lt;luke_n8x0_gps5300driver@dashjr.org&amp;gt;&lt;br /&gt;
  * Licensed for redistribution as-is;&lt;br /&gt;
  * contact me if you want something more permissive&lt;br /&gt;
  */&lt;br /&gt;
 &lt;br /&gt;
 #define _GNU_SOURCE&lt;br /&gt;
 &lt;br /&gt;
 #include &amp;lt;dlfcn.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;pwd.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;string.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;sys/types.h&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 typedef struct passwd* (*getpwnam_t)(const char*);&lt;br /&gt;
 &lt;br /&gt;
 struct passwd *&lt;br /&gt;
 getpwnam(const char *name) {&lt;br /&gt;
 	static getpwnam_t real = NULL;&lt;br /&gt;
 	if (!real)&lt;br /&gt;
 		real = dlsym(RTLD_NEXT, &amp;quot;getpwnam&amp;quot;);&lt;br /&gt;
 	&lt;br /&gt;
 	if (!strcmp(name, &amp;quot;user&amp;quot;))&lt;br /&gt;
 	{&lt;br /&gt;
 		const char*username = getenv(&amp;quot;GPS5300_USER&amp;quot;);&lt;br /&gt;
 		if (username)&lt;br /&gt;
 			name = username;&lt;br /&gt;
 	}&lt;br /&gt;
 	&lt;br /&gt;
 	return real(name);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Compile them:&lt;br /&gt;
 cd /path/to/source/files/&lt;br /&gt;
 gcc -shared -fPIC -ldl preload.c preload_init.c -o libgps5300faker.so&lt;br /&gt;
&lt;br /&gt;
Put libgps5300faker.so in /usr/lib (assuming you&#039;re still in the same directory):&lt;br /&gt;
 cp libgps5300faker.so /usr/lib&lt;br /&gt;
&lt;br /&gt;
=== Step 7: Reboot ===&lt;br /&gt;
Reboot:&lt;br /&gt;
 reboot&lt;br /&gt;
&lt;br /&gt;
=== Step 8: Prepare to use the GPS ===&lt;br /&gt;
Get ready to use the GPS:&lt;br /&gt;
 /etc/init.d/libgpsbt restart&lt;br /&gt;
 /etc/init.d/gpsdriver restart&lt;br /&gt;
 /etc/init.d/gps5300driver restart&lt;br /&gt;
&lt;br /&gt;
=== Step 9: Start GPSD ===&lt;br /&gt;
Start GPSD:&lt;br /&gt;
 gpsd -n -N -D2 /dev/pgps&lt;br /&gt;
&lt;br /&gt;
When you start getting messages like:&lt;br /&gt;
&lt;br /&gt;
 gpsd: &amp;lt;= GPS: $GPGGA,183757.000,4504.94573,N,09300.43367,W,1,04,2.7,288.8,M,-31.3,M,,*60&lt;br /&gt;
 gpsd: &amp;lt;= GPS: $GPGLL,4504.94573,N,09300.43367,W,183757.000,A,A*42&lt;br /&gt;
 gpsd: can&#039;t use GGA/GGL time until after ZDA or RMC has supplied a year.&lt;br /&gt;
 gpsd: &amp;lt;= GPS: $GPGSA,A,3,31,11,30,32,,,,,,,,,5.9,2.7,5.3*3D&lt;br /&gt;
 gpsd: &amp;lt;= GPS: $GPGST,183757.000,14.3,13.2,37.3,19.1,16.0,32.4,73.2*54&lt;br /&gt;
&lt;br /&gt;
You have a lock and are ready to use your GPS (I&#039;ve also gotten other messages indicating the GPS is ready. Basically anything new/other than what it routinely spits out should be a good indicator).&lt;/div&gt;</summary>
		<author><name>208.42.141.209</name></author>
	</entry>
	<entry>
		<id>https://maemo.octonezd.me/index.php?title=Mer/Documentation/N810_GPS&amp;diff=24014</id>
		<title>Mer/Documentation/N810 GPS</title>
		<link rel="alternate" type="text/html" href="https://maemo.octonezd.me/index.php?title=Mer/Documentation/N810_GPS&amp;diff=24014"/>
		<updated>2009-05-22T18:46:48Z</updated>

		<summary type="html">&lt;p&gt;208.42.141.209: Added libgps5300faker.so code/directions&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Notes ==&lt;br /&gt;
*These directions are confirmed to work on Mer 0.12.&lt;br /&gt;
&lt;br /&gt;
*All commands should be run as root.&lt;br /&gt;
&lt;br /&gt;
*All instances of &amp;quot;YOURUSERNAME&amp;quot; should be changed to whatever your user is named. Commands involving &amp;quot;YOURUSERNAME&amp;quot; [i]probably[/i] don&#039;t have to be run if your user is named &amp;quot;user&amp;quot;, though this is unconfirmed.&lt;br /&gt;
&lt;br /&gt;
*The time to first fix (TTFF) is quite long (~30 min), and GPSD quits after the last client disconnects. Keep this in mind.&lt;br /&gt;
&lt;br /&gt;
== Directions ==&lt;br /&gt;
=== Step 1: Install the necessary files ===&lt;br /&gt;
Install the following packages from the Maemo Updates repository (you can install them on Maemo, then copy the packages from the apt cache):&lt;br /&gt;
 libsupld1&lt;br /&gt;
 osso-gpsd&lt;br /&gt;
 libgpsmgr&lt;br /&gt;
 libgpsbt (?)&lt;br /&gt;
 gpsdriver&lt;br /&gt;
&lt;br /&gt;
=== Step 2: Tweak /etc/init.d/libgpsbt ===&lt;br /&gt;
Edit /etc/init.d/libgpsbt and change all instances of &amp;quot;user:users&amp;quot; to &amp;quot;YOURUSERNAME:users&amp;quot; There should be 2 instances you need to change.&lt;br /&gt;
&lt;br /&gt;
=== Step 3: Change ownership ===&lt;br /&gt;
Run:&lt;br /&gt;
 chown -R YOURUSERNAME:users /var/lib/gps&lt;br /&gt;
&lt;br /&gt;
=== Step 4: Make the necessary files ===&lt;br /&gt;
Make the following files:&lt;br /&gt;
&lt;br /&gt;
/etc/default/gps5300driver.conf:&lt;br /&gt;
 # /etc/default/gps5300driver.conf&lt;br /&gt;
 &lt;br /&gt;
 # The user who can control the driver&lt;br /&gt;
 GPS5300_USER=root&lt;br /&gt;
 &lt;br /&gt;
 # Whether the driver will self-initialize, may or may not work (more on the may not side)&lt;br /&gt;
 GPS5300_SELFINIT=true&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/etc/init.d/gps5300driver:&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 &lt;br /&gt;
 GPS5300_DRIVER=&#039;/usr/sbin/gps5300driver&#039;&lt;br /&gt;
 GPS5300_PIDFILE=&#039;/var/run/gps5300driver.pid&#039;&lt;br /&gt;
 GPS5300_PRELOAD=&#039;/usr/lib/libgps5300faker.so&#039;&lt;br /&gt;
 CONF=/etc/default/gps5300driver.conf&lt;br /&gt;
 &lt;br /&gt;
 if [ -f $CONF ]; then&lt;br /&gt;
          . $CONF&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 case $1 in&lt;br /&gt;
 	start)&lt;br /&gt;
 		echo &amp;quot;Starting GPS5300 driver&amp;quot;&lt;br /&gt;
 		if ! [ -e /sys/devices/platform/gpio-switch/gps_reset/state ]; then&lt;br /&gt;
 			echo &amp;quot;gps_reset state gpio switch missing&amp;quot;&lt;br /&gt;
 #			return 1&lt;br /&gt;
 		fi&lt;br /&gt;
 			&lt;br /&gt;
 		[ -z &amp;quot;${GPS5300_SELFINIT}&amp;quot; ] &amp;amp;&amp;amp; GPS5300_SELFINIT=true&lt;br /&gt;
 		${GPS5300_SELFINIT} || unset GPS5300_SELFINIT&lt;br /&gt;
 		export GPS5300_SELFINIT&lt;br /&gt;
 		&lt;br /&gt;
 		[ -z &amp;quot;${GPS5300_USER}&amp;quot; ] &amp;amp;&amp;amp; GPS5300_USER=root&lt;br /&gt;
 		export GPS5300_USER&lt;br /&gt;
 		&lt;br /&gt;
 		export LD_PRELOAD=${GPS5300_PRELOAD}		&lt;br /&gt;
 	&lt;br /&gt;
 		start-stop-daemon --start \&lt;br /&gt;
 			--quiet \&lt;br /&gt;
 			--background \&lt;br /&gt;
 			--pidfile &amp;quot;${GPS5300_PIDFILE}&amp;quot; \&lt;br /&gt;
 			--make-pidfile \&lt;br /&gt;
 			--exec &amp;quot;${GPS5300_DRIVER}&amp;quot;&lt;br /&gt;
 #			--env &amp;quot;LD_PRELOAD=${GPS5300_PRELOAD}&amp;quot; \&lt;br /&gt;
 #			--exec &amp;quot;${GPS5300_DRIVER}&amp;quot;&lt;br /&gt;
 #		return 0&lt;br /&gt;
 	;;&lt;br /&gt;
 &lt;br /&gt;
 	stop)&lt;br /&gt;
 		echo &amp;quot;Stopping GPS5300 driver&amp;quot;&lt;br /&gt;
 		start-stop-daemon --stop \&lt;br /&gt;
 			--quiet \&lt;br /&gt;
 			--pidfile &amp;quot;${GPS5300_PIDFILE}&amp;quot;&lt;br /&gt;
 		rm ${GPS5300_PIDFILE}&lt;br /&gt;
 #		return 0&lt;br /&gt;
 	;;&lt;br /&gt;
 &lt;br /&gt;
 	restart|force-reload)&lt;br /&gt;
 		$0 stop&lt;br /&gt;
 		$0 start&lt;br /&gt;
 	;;&lt;br /&gt;
 &lt;br /&gt;
 	*)&lt;br /&gt;
 		echo &amp;quot;Usage: $0: {start|stop|restart|force-reload}&amp;quot;&lt;br /&gt;
 		exit 1&lt;br /&gt;
 	;;&lt;br /&gt;
 esac&lt;br /&gt;
&lt;br /&gt;
=== Step 5: Copy gpsdriver ===&lt;br /&gt;
Make a copy of gpsdriver to prevent confusion&lt;br /&gt;
 cp /usr/sbin/gpsdriver /usr/sbin/gps5300driver&lt;br /&gt;
&lt;br /&gt;
=== Step 6: Install libgps5300faker.so ===&lt;br /&gt;
First of all, install the necessary packages (they may be removed later, this may be an excessive list or an incomplete list. Basically keep installing stuff until it stops complaining):&lt;br /&gt;
 apt-get install build-essential m4 automake autoconf&lt;br /&gt;
&lt;br /&gt;
Make the following files somewhere (they may be removed later):&lt;br /&gt;
&lt;br /&gt;
preload_init.c&lt;br /&gt;
 /*&lt;br /&gt;
  * Copyright 2009 Luke Dashjr &amp;lt;luke_n8x0_gps5300driver@dashjr.org&amp;gt;&lt;br /&gt;
  * Licensed for redistribution as-is;&lt;br /&gt;
  * contact me if you want something more permissive&lt;br /&gt;
  */&lt;br /&gt;
 &lt;br /&gt;
 #define _GNU_SOURCE&lt;br /&gt;
 &lt;br /&gt;
 #include &amp;lt;dlfcn.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;string.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;sys/types.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;sys/socket.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;sys/un.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;unistd.h&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 static struct sockaddr_un ctrl_sau = {&lt;br /&gt;
 	AF_UNIX,&lt;br /&gt;
 	&amp;quot;/var/lib/gps/gps_driver_ctrl\0&amp;quot;,&lt;br /&gt;
 };&lt;br /&gt;
 #define CTRL_SCK_PATH ctrl_sau.sun_path&lt;br /&gt;
 &lt;br /&gt;
 static int ctrl_sck = -1;&lt;br /&gt;
 &lt;br /&gt;
 typedef int (*bind_t)(int, const struct sockaddr*, socklen_t);&lt;br /&gt;
 &lt;br /&gt;
 int&lt;br /&gt;
 bind(int sockfd, const struct sockaddr*addr, socklen_t addrlen) {&lt;br /&gt;
 	static bind_t real = NULL;&lt;br /&gt;
 	if (!real)&lt;br /&gt;
 		real = dlsym(RTLD_NEXT, &amp;quot;bind&amp;quot;);&lt;br /&gt;
 	&lt;br /&gt;
 	int rv = real(sockfd, addr, addrlen);&lt;br /&gt;
 	&lt;br /&gt;
 	if (&lt;br /&gt;
 	    addr &amp;amp;&amp;amp;&lt;br /&gt;
 	    addr-&amp;gt;sa_family == AF_FILE &amp;amp;&amp;amp;&lt;br /&gt;
 	    !strcmp(CTRL_SCK_PATH,&lt;br /&gt;
 	            ((struct sockaddr_un*)addr)-&amp;gt;sun_path&lt;br /&gt;
 	           ) &amp;amp;&amp;amp;&lt;br /&gt;
 	    getenv(&amp;quot;GPS5300_SELFINIT&amp;quot;) &amp;amp;&amp;amp;&lt;br /&gt;
 	    1&lt;br /&gt;
 	)&lt;br /&gt;
 		ctrl_sck = sockfd;&lt;br /&gt;
 	&lt;br /&gt;
 	return rv;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 typedef int (*listen_t)(int, int);&lt;br /&gt;
 &lt;br /&gt;
 int&lt;br /&gt;
 listen(int sockfd, int backlog) {&lt;br /&gt;
 	static listen_t real = NULL;&lt;br /&gt;
 	if (!real)&lt;br /&gt;
 		real = dlsym(RTLD_NEXT, &amp;quot;listen&amp;quot;);&lt;br /&gt;
 	&lt;br /&gt;
 	int rv = real(sockfd, backlog);&lt;br /&gt;
 	&lt;br /&gt;
 	if (sockfd == ctrl_sck &amp;amp;&amp;amp; !fork())&lt;br /&gt;
 	{&lt;br /&gt;
 		// Child process :)&lt;br /&gt;
 		&lt;br /&gt;
 		int sck;&lt;br /&gt;
 		char initcmd[] = &amp;quot;P 3\n&amp;quot;;&lt;br /&gt;
 		&lt;br /&gt;
 		sck = socket(PF_FILE, SOCK_STREAM, 0);&lt;br /&gt;
 		if (sck &amp;lt; 0)&lt;br /&gt;
 			exit(1);&lt;br /&gt;
 		if (connect(sck, &amp;amp;ctrl_sau, sizeof ctrl_sau))&lt;br /&gt;
 			exit(1);&lt;br /&gt;
 		write(sck, initcmd, sizeof initcmd);&lt;br /&gt;
 		close(sck);&lt;br /&gt;
 		&lt;br /&gt;
 		exit(0);&lt;br /&gt;
 	}&lt;br /&gt;
 	&lt;br /&gt;
 	return rv;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
preload.c:&lt;br /&gt;
  /*&lt;br /&gt;
  * Copyright 2009 Luke Dashjr &amp;lt;luke_n8x0_gps5300driver@dashjr.org&amp;gt;&lt;br /&gt;
  * Licensed for redistribution as-is;&lt;br /&gt;
  * contact me if you want something more permissive&lt;br /&gt;
  */&lt;br /&gt;
 &lt;br /&gt;
 #define _GNU_SOURCE&lt;br /&gt;
 &lt;br /&gt;
 #include &amp;lt;dlfcn.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;pwd.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;string.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;sys/types.h&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 typedef struct passwd* (*getpwnam_t)(const char*);&lt;br /&gt;
 &lt;br /&gt;
 struct passwd *&lt;br /&gt;
 getpwnam(const char *name) {&lt;br /&gt;
 	static getpwnam_t real = NULL;&lt;br /&gt;
 	if (!real)&lt;br /&gt;
 		real = dlsym(RTLD_NEXT, &amp;quot;getpwnam&amp;quot;);&lt;br /&gt;
 	&lt;br /&gt;
 	if (!strcmp(name, &amp;quot;user&amp;quot;))&lt;br /&gt;
 	{&lt;br /&gt;
 		const char*username = getenv(&amp;quot;GPS5300_USER&amp;quot;);&lt;br /&gt;
 		if (username)&lt;br /&gt;
 			name = username;&lt;br /&gt;
 	}&lt;br /&gt;
 	&lt;br /&gt;
 	return real(name);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Compile them:&lt;br /&gt;
 gcc -shared -fPIC -ldl preload.c preload_init.c -o libgps5300faker.so&lt;br /&gt;
&lt;br /&gt;
Put libgps5300faker.so in /usr/lib (Not posted anywhere yet):&lt;br /&gt;
 cp /path/to/libgps5300faker.so /usr/lib&lt;br /&gt;
&lt;br /&gt;
=== Step 7: Reboot ===&lt;br /&gt;
Reboot:&lt;br /&gt;
 reboot&lt;br /&gt;
&lt;br /&gt;
=== Step 8: Prepare to use the GPS ===&lt;br /&gt;
Get ready to use the GPS:&lt;br /&gt;
 /etc/init.d/libgpsbt restart&lt;br /&gt;
 /etc/init.d/gpsdriver restart&lt;br /&gt;
 /etc/init.d/gps5300driver restart&lt;br /&gt;
&lt;br /&gt;
=== Step 9: Start GPSD ===&lt;br /&gt;
Start GPSD:&lt;br /&gt;
 gpsd -n -N -D2 /dev/pgps&lt;br /&gt;
&lt;br /&gt;
When you start getting messages like:&lt;br /&gt;
&lt;br /&gt;
 gpsd: &amp;lt;= GPS: $GPGGA,183757.000,4504.94573,N,09300.43367,W,1,04,2.7,288.8,M,-31.3,M,,*60&lt;br /&gt;
 gpsd: &amp;lt;= GPS: $GPGLL,4504.94573,N,09300.43367,W,183757.000,A,A*42&lt;br /&gt;
 gpsd: can&#039;t use GGA/GGL time until after ZDA or RMC has supplied a year.&lt;br /&gt;
 gpsd: &amp;lt;= GPS: $GPGSA,A,3,31,11,30,32,,,,,,,,,5.9,2.7,5.3*3D&lt;br /&gt;
 gpsd: &amp;lt;= GPS: $GPGST,183757.000,14.3,13.2,37.3,19.1,16.0,32.4,73.2*54&lt;br /&gt;
&lt;br /&gt;
You have a lock and are ready to use your GPS (I&#039;ve also gotten other messages indicating the GPS is ready. Basically anything new/other than what it routinely spits out should be a good indicator).&lt;/div&gt;</summary>
		<author><name>208.42.141.209</name></author>
	</entry>
	<entry>
		<id>https://maemo.octonezd.me/index.php?title=Mer/Documentation/N810_GPS&amp;diff=24015</id>
		<title>Mer/Documentation/N810 GPS</title>
		<link rel="alternate" type="text/html" href="https://maemo.octonezd.me/index.php?title=Mer/Documentation/N810_GPS&amp;diff=24015"/>
		<updated>2009-05-22T18:20:33Z</updated>

		<summary type="html">&lt;p&gt;208.42.141.209: /* Directions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Notes ==&lt;br /&gt;
*These directions are confirmed to work on Mer 0.12.&lt;br /&gt;
&lt;br /&gt;
*All commands should be run as root.&lt;br /&gt;
&lt;br /&gt;
*All instances of &amp;quot;YOURUSERNAME&amp;quot; should be changed to whatever your user is named. Commands involving &amp;quot;YOURUSERNAME&amp;quot; [i]probably[/i] don&#039;t have to be run if your user is named &amp;quot;user&amp;quot;, though this is unconfirmed.&lt;br /&gt;
&lt;br /&gt;
*The time to first fix (TTFF) is quite long (~30 min), and GPSD quits after the last client disconnects. Keep this in mind.&lt;br /&gt;
&lt;br /&gt;
== Directions ==&lt;br /&gt;
=== Step 1: Install the necessary files ===&lt;br /&gt;
Install the following packages from the Maemo Updates repository (you can install them on Maemo, then copy the packages from the apt cache):&lt;br /&gt;
 libsupld1&lt;br /&gt;
 osso-gpsd&lt;br /&gt;
 libgpsmgr&lt;br /&gt;
 libgpsbt (?)&lt;br /&gt;
 gpsdriver&lt;br /&gt;
&lt;br /&gt;
=== Step 2: Tweak /etc/init.d/libgpsbt ===&lt;br /&gt;
Edit /etc/init.d/libgpsbt and change all instances of &amp;quot;user:users&amp;quot; to &amp;quot;YOURUSERNAME:users&amp;quot; There should be 2 instances you need to change.&lt;br /&gt;
&lt;br /&gt;
=== Step 3: Change ownership ===&lt;br /&gt;
Run:&lt;br /&gt;
 chown -R YOURUSERNAME:users /var/lib/gps&lt;br /&gt;
&lt;br /&gt;
=== Step 4: Make the necessary files ===&lt;br /&gt;
Make the following files:&lt;br /&gt;
&lt;br /&gt;
/etc/default/gps5300driver.conf:&lt;br /&gt;
 # /etc/default/gps5300driver.conf&lt;br /&gt;
 &lt;br /&gt;
 # The user who can control the driver&lt;br /&gt;
 GPS5300_USER=root&lt;br /&gt;
 &lt;br /&gt;
 # Whether the driver will self-initialize, may or may not work (more on the may not side)&lt;br /&gt;
 GPS5300_SELFINIT=true&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/etc/init.d/gps5300driver:&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 &lt;br /&gt;
 GPS5300_DRIVER=&#039;/usr/sbin/gps5300driver&#039;&lt;br /&gt;
 GPS5300_PIDFILE=&#039;/var/run/gps5300driver.pid&#039;&lt;br /&gt;
 GPS5300_PRELOAD=&#039;/usr/lib/libgps5300faker.so&#039;&lt;br /&gt;
 CONF=/etc/default/gps5300driver.conf&lt;br /&gt;
 &lt;br /&gt;
 if [ -f $CONF ]; then&lt;br /&gt;
          . $CONF&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 case $1 in&lt;br /&gt;
 	start)&lt;br /&gt;
 		echo &amp;quot;Starting GPS5300 driver&amp;quot;&lt;br /&gt;
 		if ! [ -e /sys/devices/platform/gpio-switch/gps_reset/state ]; then&lt;br /&gt;
 			echo &amp;quot;gps_reset state gpio switch missing&amp;quot;&lt;br /&gt;
 #			return 1&lt;br /&gt;
 		fi&lt;br /&gt;
 			&lt;br /&gt;
 		[ -z &amp;quot;${GPS5300_SELFINIT}&amp;quot; ] &amp;amp;&amp;amp; GPS5300_SELFINIT=true&lt;br /&gt;
 		${GPS5300_SELFINIT} || unset GPS5300_SELFINIT&lt;br /&gt;
 		export GPS5300_SELFINIT&lt;br /&gt;
 		&lt;br /&gt;
 		[ -z &amp;quot;${GPS5300_USER}&amp;quot; ] &amp;amp;&amp;amp; GPS5300_USER=root&lt;br /&gt;
 		export GPS5300_USER&lt;br /&gt;
 		&lt;br /&gt;
 		export LD_PRELOAD=${GPS5300_PRELOAD}		&lt;br /&gt;
 	&lt;br /&gt;
 		start-stop-daemon --start \&lt;br /&gt;
 			--quiet \&lt;br /&gt;
 			--background \&lt;br /&gt;
 			--pidfile &amp;quot;${GPS5300_PIDFILE}&amp;quot; \&lt;br /&gt;
 			--make-pidfile \&lt;br /&gt;
 			--exec &amp;quot;${GPS5300_DRIVER}&amp;quot;&lt;br /&gt;
 #			--env &amp;quot;LD_PRELOAD=${GPS5300_PRELOAD}&amp;quot; \&lt;br /&gt;
 #			--exec &amp;quot;${GPS5300_DRIVER}&amp;quot;&lt;br /&gt;
 #		return 0&lt;br /&gt;
 	;;&lt;br /&gt;
 &lt;br /&gt;
 	stop)&lt;br /&gt;
 		echo &amp;quot;Stopping GPS5300 driver&amp;quot;&lt;br /&gt;
 		start-stop-daemon --stop \&lt;br /&gt;
 			--quiet \&lt;br /&gt;
 			--pidfile &amp;quot;${GPS5300_PIDFILE}&amp;quot;&lt;br /&gt;
 		rm ${GPS5300_PIDFILE}&lt;br /&gt;
 #		return 0&lt;br /&gt;
 	;;&lt;br /&gt;
 &lt;br /&gt;
 	restart|force-reload)&lt;br /&gt;
 		$0 stop&lt;br /&gt;
 		$0 start&lt;br /&gt;
 	;;&lt;br /&gt;
 &lt;br /&gt;
 	*)&lt;br /&gt;
 		echo &amp;quot;Usage: $0: {start|stop|restart|force-reload}&amp;quot;&lt;br /&gt;
 		exit 1&lt;br /&gt;
 	;;&lt;br /&gt;
 esac&lt;br /&gt;
&lt;br /&gt;
=== Step 5: Copy gpsdriver ===&lt;br /&gt;
Make a copy of gpsdriver to prevent confusion&lt;br /&gt;
 cp /usr/sbin/gpsdriver /usr/sbin/gps5300driver&lt;br /&gt;
&lt;br /&gt;
=== Step 6: Install libgps5300faker.so ===&lt;br /&gt;
Put libgps5300faker.so in /usr/lib (Not posted anywhere yet):&lt;br /&gt;
 cp /path/to/libgps5300faker.so /usr/lib&lt;br /&gt;
&lt;br /&gt;
=== Step 7: Reboot ===&lt;br /&gt;
Reboot:&lt;br /&gt;
 reboot&lt;br /&gt;
&lt;br /&gt;
=== Step 8: Prepare to use the GPS ===&lt;br /&gt;
Get ready to use the GPS:&lt;br /&gt;
 /etc/init.d/libgpsbt restart&lt;br /&gt;
 /etc/init.d/gpsdriver restart&lt;br /&gt;
 /etc/init.d/gps5300driver restart&lt;br /&gt;
&lt;br /&gt;
=== Step 9: Start GPSD ===&lt;br /&gt;
Start GPSD:&lt;br /&gt;
 gpsd -n -N -D2 /dev/pgps&lt;br /&gt;
&lt;br /&gt;
When you start getting messages like:&lt;br /&gt;
&lt;br /&gt;
 gpsd: &amp;lt;= GPS: $GPGGA,183757.000,4504.94573,N,09300.43367,W,1,04,2.7,288.8,M,-31.3,M,,*60&lt;br /&gt;
 gpsd: &amp;lt;= GPS: $GPGLL,4504.94573,N,09300.43367,W,183757.000,A,A*42&lt;br /&gt;
 gpsd: can&#039;t use GGA/GGL time until after ZDA or RMC has supplied a year.&lt;br /&gt;
 gpsd: &amp;lt;= GPS: $GPGSA,A,3,31,11,30,32,,,,,,,,,5.9,2.7,5.3*3D&lt;br /&gt;
 gpsd: &amp;lt;= GPS: $GPGST,183757.000,14.3,13.2,37.3,19.1,16.0,32.4,73.2*54&lt;br /&gt;
&lt;br /&gt;
You have a lock and are ready to use your GPS (I&#039;ve also gotten other messages indicating the GPS is ready. Basically anything new/other than what it routinely spits out should be a good indicator).&lt;/div&gt;</summary>
		<author><name>208.42.141.209</name></author>
	</entry>
	<entry>
		<id>https://maemo.octonezd.me/index.php?title=Mer/Documentation/N810_GPS&amp;diff=24016</id>
		<title>Mer/Documentation/N810 GPS</title>
		<link rel="alternate" type="text/html" href="https://maemo.octonezd.me/index.php?title=Mer/Documentation/N810_GPS&amp;diff=24016"/>
		<updated>2009-05-22T18:14:08Z</updated>

		<summary type="html">&lt;p&gt;208.42.141.209: More formatting&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Notes ==&lt;br /&gt;
*These directions are confirmed to work on Mer 0.12.&lt;br /&gt;
&lt;br /&gt;
*All commands should be run as root.&lt;br /&gt;
&lt;br /&gt;
*All instances of &amp;quot;YOURUSERNAME&amp;quot; should be changed to whatever your user is named. Commands involving &amp;quot;YOURUSERNAME&amp;quot; [i]probably[/i] don&#039;t have to be run if your user is named &amp;quot;user&amp;quot;, though this is unconfirmed.&lt;br /&gt;
&lt;br /&gt;
*The time to first fix (TTFF) is quite long (~30 min), and GPSD quits after the last client disconnects. Keep this in mind.&lt;br /&gt;
&lt;br /&gt;
== Directions ==&lt;br /&gt;
1. Install the following packages from the Maemo Updates repository (you can install them on Maemo, then copy the packages from the apt cache):&lt;br /&gt;
 libsupld1&lt;br /&gt;
 osso-gpsd&lt;br /&gt;
 libgpsmgr&lt;br /&gt;
 libgpsbt (?)&lt;br /&gt;
 gpsdriver&lt;br /&gt;
&lt;br /&gt;
2. Edit /etc/init.d/libgpsbt and change all instances of &amp;quot;user:users&amp;quot; to &amp;quot;YOURUSERNAME:users&amp;quot; There should be 2 instances you need to change.&lt;br /&gt;
&lt;br /&gt;
3. Run:&lt;br /&gt;
 chown -R YOURUSERNAME:users /var/lib/gps&lt;br /&gt;
&lt;br /&gt;
4. Make the following files:&lt;br /&gt;
&lt;br /&gt;
/etc/default/gps5300driver.conf:&lt;br /&gt;
 # /etc/default/gps5300driver.conf&lt;br /&gt;
 &lt;br /&gt;
 # The user who can control the driver&lt;br /&gt;
 GPS5300_USER=root&lt;br /&gt;
 &lt;br /&gt;
 # Whether the driver will self-initialize, may or may not work (more on the may not side)&lt;br /&gt;
 GPS5300_SELFINIT=true&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/etc/init.d/gps5300driver:&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 &lt;br /&gt;
 GPS5300_DRIVER=&#039;/usr/sbin/gps5300driver&#039;&lt;br /&gt;
 GPS5300_PIDFILE=&#039;/var/run/gps5300driver.pid&#039;&lt;br /&gt;
 GPS5300_PRELOAD=&#039;/usr/lib/libgps5300faker.so&#039;&lt;br /&gt;
 CONF=/etc/default/gps5300driver.conf&lt;br /&gt;
 &lt;br /&gt;
 if [ -f $CONF ]; then&lt;br /&gt;
          . $CONF&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 case $1 in&lt;br /&gt;
 	start)&lt;br /&gt;
 		echo &amp;quot;Starting GPS5300 driver&amp;quot;&lt;br /&gt;
 		if ! [ -e /sys/devices/platform/gpio-switch/gps_reset/state ]; then&lt;br /&gt;
 			echo &amp;quot;gps_reset state gpio switch missing&amp;quot;&lt;br /&gt;
 #			return 1&lt;br /&gt;
 		fi&lt;br /&gt;
 			&lt;br /&gt;
 		[ -z &amp;quot;${GPS5300_SELFINIT}&amp;quot; ] &amp;amp;&amp;amp; GPS5300_SELFINIT=true&lt;br /&gt;
 		${GPS5300_SELFINIT} || unset GPS5300_SELFINIT&lt;br /&gt;
 		export GPS5300_SELFINIT&lt;br /&gt;
 		&lt;br /&gt;
 		[ -z &amp;quot;${GPS5300_USER}&amp;quot; ] &amp;amp;&amp;amp; GPS5300_USER=root&lt;br /&gt;
 		export GPS5300_USER&lt;br /&gt;
 		&lt;br /&gt;
 		export LD_PRELOAD=${GPS5300_PRELOAD}		&lt;br /&gt;
 	&lt;br /&gt;
 		start-stop-daemon --start \&lt;br /&gt;
 			--quiet \&lt;br /&gt;
 			--background \&lt;br /&gt;
 			--pidfile &amp;quot;${GPS5300_PIDFILE}&amp;quot; \&lt;br /&gt;
 			--make-pidfile \&lt;br /&gt;
 			--exec &amp;quot;${GPS5300_DRIVER}&amp;quot;&lt;br /&gt;
 #			--env &amp;quot;LD_PRELOAD=${GPS5300_PRELOAD}&amp;quot; \&lt;br /&gt;
 #			--exec &amp;quot;${GPS5300_DRIVER}&amp;quot;&lt;br /&gt;
 #		return 0&lt;br /&gt;
 	;;&lt;br /&gt;
 &lt;br /&gt;
 	stop)&lt;br /&gt;
 		echo &amp;quot;Stopping GPS5300 driver&amp;quot;&lt;br /&gt;
 		start-stop-daemon --stop \&lt;br /&gt;
 			--quiet \&lt;br /&gt;
 			--pidfile &amp;quot;${GPS5300_PIDFILE}&amp;quot;&lt;br /&gt;
 		rm ${GPS5300_PIDFILE}&lt;br /&gt;
 #		return 0&lt;br /&gt;
 	;;&lt;br /&gt;
 &lt;br /&gt;
 	restart|force-reload)&lt;br /&gt;
 		$0 stop&lt;br /&gt;
 		$0 start&lt;br /&gt;
 	;;&lt;br /&gt;
 &lt;br /&gt;
 	*)&lt;br /&gt;
 		echo &amp;quot;Usage: $0: {start|stop|restart|force-reload}&amp;quot;&lt;br /&gt;
 		exit 1&lt;br /&gt;
 	;;&lt;br /&gt;
 esac&lt;br /&gt;
&lt;br /&gt;
5. Run&lt;br /&gt;
 cp /usr/sbin/gpsdriver /usr/sbin/gps5300driver&lt;br /&gt;
&lt;br /&gt;
6. Put libgps5300faker.so in /usr/lib (Not posted anywhere yet):&lt;br /&gt;
 cp /path/to/libgps5300faker.so /usr/lib&lt;br /&gt;
&lt;br /&gt;
7. Reboot:&lt;br /&gt;
 reboot&lt;br /&gt;
&lt;br /&gt;
8. Get ready to use the GPS:&lt;br /&gt;
 /etc/init.d/libgpsbt restart&lt;br /&gt;
 /etc/init.d/gpsdriver restart&lt;br /&gt;
 /etc/init.d/gps5300driver restart&lt;br /&gt;
&lt;br /&gt;
9. Start GPSD:&lt;br /&gt;
 gpsd -n -N -D2 /dev/pgps&lt;br /&gt;
&lt;br /&gt;
When you start getting messages like:&lt;br /&gt;
&lt;br /&gt;
 gpsd: &amp;lt;= GPS: $GPGGA,183757.000,4504.94573,N,09300.43367,W,1,04,2.7,288.8,M,-31.3,M,,*60&lt;br /&gt;
 gpsd: &amp;lt;= GPS: $GPGLL,4504.94573,N,09300.43367,W,183757.000,A,A*42&lt;br /&gt;
 gpsd: can&#039;t use GGA/GGL time until after ZDA or RMC has supplied a year.&lt;br /&gt;
 gpsd: &amp;lt;= GPS: $GPGSA,A,3,31,11,30,32,,,,,,,,,5.9,2.7,5.3*3D&lt;br /&gt;
 gpsd: &amp;lt;= GPS: $GPGST,183757.000,14.3,13.2,37.3,19.1,16.0,32.4,73.2*54&lt;br /&gt;
&lt;br /&gt;
You have a lock and are ready to use your GPS (I&#039;ve also gotten other messages indicating the GPS is ready. Basically anything new/other than what it routinely spits out should be a good indicator).&lt;/div&gt;</summary>
		<author><name>208.42.141.209</name></author>
	</entry>
	<entry>
		<id>https://maemo.octonezd.me/index.php?title=Mer/Documentation/N810_GPS&amp;diff=24017</id>
		<title>Mer/Documentation/N810 GPS</title>
		<link rel="alternate" type="text/html" href="https://maemo.octonezd.me/index.php?title=Mer/Documentation/N810_GPS&amp;diff=24017"/>
		<updated>2009-05-22T18:09:27Z</updated>

		<summary type="html">&lt;p&gt;208.42.141.209: Many formatting fixes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;These directions are confirmed to work on Mer 0.12.&lt;br /&gt;
&lt;br /&gt;
All commands should be run as root.&lt;br /&gt;
&lt;br /&gt;
All instances of &amp;quot;YOURUSERNAME&amp;quot; should be changed to whatever your user is named. Commands involving &amp;quot;YOURUSERNAME&amp;quot; [i]probably[/i] don&#039;t have to be run if your user is named &amp;quot;user&amp;quot;, though this is unconfirmed.&lt;br /&gt;
&lt;br /&gt;
The time to first fix (TTFF) is quite long (~30 min), and GPSD quits after the last client disconnects. Keep this in mind.&lt;br /&gt;
&lt;br /&gt;
The formatting is completely messed up, so if you care to look at directions in any usable way, click the edit link.&lt;br /&gt;
&lt;br /&gt;
1. Install the following packages from the Maemo Updates repository (you can install them on Maemo, then copy the packages from the apt cache):&lt;br /&gt;
 libsupld1&lt;br /&gt;
 osso-gpsd&lt;br /&gt;
 libgpsmgr&lt;br /&gt;
 libgpsbt (?)&lt;br /&gt;
 gpsdriver&lt;br /&gt;
&lt;br /&gt;
2. Edit /etc/init.d/libgpsbt and change all instances of &amp;quot;user:users&amp;quot; to &amp;quot;YOURUSERNAME:users&amp;quot; There should be 2 instances you need to change.&lt;br /&gt;
&lt;br /&gt;
3. Run:&lt;br /&gt;
 chown -R YOURUSERNAME:users /var/lib/gps&lt;br /&gt;
&lt;br /&gt;
4. Make the following files:&lt;br /&gt;
&lt;br /&gt;
/etc/default/gps5300driver.conf:&lt;br /&gt;
 # /etc/default/gps5300driver.conf&lt;br /&gt;
 &lt;br /&gt;
 # The user who can control the driver&lt;br /&gt;
 GPS5300_USER=root&lt;br /&gt;
 &lt;br /&gt;
 # Whether the driver will self-initialize, may or may not work (more on the may not side)&lt;br /&gt;
 GPS5300_SELFINIT=true&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/etc/init.d/gps5300driver:&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 &lt;br /&gt;
 GPS5300_DRIVER=&#039;/usr/sbin/gps5300driver&#039;&lt;br /&gt;
 GPS5300_PIDFILE=&#039;/var/run/gps5300driver.pid&#039;&lt;br /&gt;
 GPS5300_PRELOAD=&#039;/usr/lib/libgps5300faker.so&#039;&lt;br /&gt;
 CONF=/etc/default/gps5300driver.conf&lt;br /&gt;
 &lt;br /&gt;
 if [ -f $CONF ]; then&lt;br /&gt;
          . $CONF&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 case $1 in&lt;br /&gt;
 	start)&lt;br /&gt;
 		echo &amp;quot;Starting GPS5300 driver&amp;quot;&lt;br /&gt;
 		if ! [ -e /sys/devices/platform/gpio-switch/gps_reset/state ]; then&lt;br /&gt;
 			echo &amp;quot;gps_reset state gpio switch missing&amp;quot;&lt;br /&gt;
 #			return 1&lt;br /&gt;
 		fi&lt;br /&gt;
 			&lt;br /&gt;
 		[ -z &amp;quot;${GPS5300_SELFINIT}&amp;quot; ] &amp;amp;&amp;amp; GPS5300_SELFINIT=true&lt;br /&gt;
 		${GPS5300_SELFINIT} || unset GPS5300_SELFINIT&lt;br /&gt;
 		export GPS5300_SELFINIT&lt;br /&gt;
 		&lt;br /&gt;
 		[ -z &amp;quot;${GPS5300_USER}&amp;quot; ] &amp;amp;&amp;amp; GPS5300_USER=root&lt;br /&gt;
 		export GPS5300_USER&lt;br /&gt;
 		&lt;br /&gt;
 		export LD_PRELOAD=${GPS5300_PRELOAD}		&lt;br /&gt;
 	&lt;br /&gt;
 		start-stop-daemon --start \&lt;br /&gt;
 			--quiet \&lt;br /&gt;
 			--background \&lt;br /&gt;
 			--pidfile &amp;quot;${GPS5300_PIDFILE}&amp;quot; \&lt;br /&gt;
 			--make-pidfile \&lt;br /&gt;
 			--exec &amp;quot;${GPS5300_DRIVER}&amp;quot;&lt;br /&gt;
 #			--env &amp;quot;LD_PRELOAD=${GPS5300_PRELOAD}&amp;quot; \&lt;br /&gt;
 #			--exec &amp;quot;${GPS5300_DRIVER}&amp;quot;&lt;br /&gt;
 #		return 0&lt;br /&gt;
 	;;&lt;br /&gt;
 &lt;br /&gt;
 	stop)&lt;br /&gt;
 		echo &amp;quot;Stopping GPS5300 driver&amp;quot;&lt;br /&gt;
 		start-stop-daemon --stop \&lt;br /&gt;
 			--quiet \&lt;br /&gt;
 			--pidfile &amp;quot;${GPS5300_PIDFILE}&amp;quot;&lt;br /&gt;
 		rm ${GPS5300_PIDFILE}&lt;br /&gt;
 #		return 0&lt;br /&gt;
 	;;&lt;br /&gt;
 &lt;br /&gt;
 	restart|force-reload)&lt;br /&gt;
 		$0 stop&lt;br /&gt;
 		$0 start&lt;br /&gt;
 	;;&lt;br /&gt;
 &lt;br /&gt;
 	*)&lt;br /&gt;
 		echo &amp;quot;Usage: $0: {start|stop|restart|force-reload}&amp;quot;&lt;br /&gt;
 		exit 1&lt;br /&gt;
 	;;&lt;br /&gt;
 esac&lt;br /&gt;
&lt;br /&gt;
5. Run&lt;br /&gt;
 cp /usr/sbin/gpsdriver /usr/sbin/gps5300driver&lt;br /&gt;
&lt;br /&gt;
6. Put libgps5300faker.so in /usr/lib (Not posted anywhere yet):&lt;br /&gt;
 cp /path/to/libgps5300faker.so /usr/lib&lt;br /&gt;
&lt;br /&gt;
7. Reboot:&lt;br /&gt;
 reboot&lt;br /&gt;
&lt;br /&gt;
8. Get ready to use the GPS:&lt;br /&gt;
 /etc/init.d/libgpsbt restart&lt;br /&gt;
 /etc/init.d/gpsdriver restart&lt;br /&gt;
 /etc/init.d/gps5300driver restart&lt;br /&gt;
&lt;br /&gt;
9. Start GPSD:&lt;br /&gt;
 gpsd -n -N -D2 /dev/pgps&lt;br /&gt;
&lt;br /&gt;
When you start getting messages like:&lt;br /&gt;
&lt;br /&gt;
 gpsd: &amp;lt;= GPS: $GPGGA,183757.000,4504.94573,N,09300.43367,W,1,04,2.7,288.8,M,-31.3,M,,*60&lt;br /&gt;
 gpsd: &amp;lt;= GPS: $GPGLL,4504.94573,N,09300.43367,W,183757.000,A,A*42&lt;br /&gt;
 gpsd: can&#039;t use GGA/GGL time until after ZDA or RMC has supplied a year.&lt;br /&gt;
 gpsd: &amp;lt;= GPS: $GPGSA,A,3,31,11,30,32,,,,,,,,,5.9,2.7,5.3*3D&lt;br /&gt;
 gpsd: &amp;lt;= GPS: $GPGST,183757.000,14.3,13.2,37.3,19.1,16.0,32.4,73.2*54&lt;br /&gt;
&lt;br /&gt;
You have a lock and are ready to use your GPS.&lt;/div&gt;</summary>
		<author><name>208.42.141.209</name></author>
	</entry>
	<entry>
		<id>https://maemo.octonezd.me/index.php?title=Mer/Documentation/N810_GPS&amp;diff=24018</id>
		<title>Mer/Documentation/N810 GPS</title>
		<link rel="alternate" type="text/html" href="https://maemo.octonezd.me/index.php?title=Mer/Documentation/N810_GPS&amp;diff=24018"/>
		<updated>2009-05-19T19:11:53Z</updated>

		<summary type="html">&lt;p&gt;208.42.141.209: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;These directions are confirmed to work on Mer 0.12.&lt;br /&gt;
&lt;br /&gt;
All commands should be run as root.&lt;br /&gt;
&lt;br /&gt;
All instances of &amp;quot;YOURUSERNAME&amp;quot; should be changed to whatever your user is named. Commands involving &amp;quot;YOURUSERNAME&amp;quot; [i]probably[/i] don&#039;t have to be run if your user is named &amp;quot;user&amp;quot;, though this is unconfirmed.&lt;br /&gt;
&lt;br /&gt;
The time to first fix (TTFF) is quite long (~30 min), and GPSD quits after the last client disconnects. Keep this in mind.&lt;br /&gt;
&lt;br /&gt;
The formatting is completely messed up, so if you care to look at directions in any usable way, click the edit link.&lt;br /&gt;
&lt;br /&gt;
1. Install the following packages from the Maemo Updates repository (you can install them on Maemo, then copy the packages from the apt cache):&lt;br /&gt;
	libsupld1&lt;br /&gt;
	osso-gpsd&lt;br /&gt;
	libgpsmgr&lt;br /&gt;
	libgpsbt (?)&lt;br /&gt;
	gpsdriver&lt;br /&gt;
&lt;br /&gt;
2. Edit /etc/init.d/libgpsbt and change all instances of &amp;quot;user:users&amp;quot; to &amp;quot;YOURUSERNAME:users&amp;quot; There should be 2 instances you need to change.&lt;br /&gt;
&lt;br /&gt;
3. Run: chown -R YOURUSERNAME:users /var/lib/gps&lt;br /&gt;
&lt;br /&gt;
4. Make the following files:&lt;br /&gt;
&lt;br /&gt;
/etc/default/gps5300driver.conf&lt;br /&gt;
=================CUT====================&lt;br /&gt;
&lt;br /&gt;
# /etc/default/gps5300driver.conf&lt;br /&gt;
&lt;br /&gt;
# The user who can control the driver&lt;br /&gt;
GPS5300_USER=root&lt;br /&gt;
&lt;br /&gt;
# Whether the driver will self-initialize, may or may not work (more on the may not side)&lt;br /&gt;
GPS5300_SELFINIT=true&lt;br /&gt;
&lt;br /&gt;
=================CUT====================&lt;br /&gt;
&lt;br /&gt;
/etc/init.d/gps5300driver&lt;br /&gt;
=================CUT====================&lt;br /&gt;
&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
GPS5300_DRIVER=&#039;/usr/sbin/gps5300driver&#039;&lt;br /&gt;
GPS5300_PIDFILE=&#039;/var/run/gps5300driver.pid&#039;&lt;br /&gt;
GPS5300_PRELOAD=&#039;/usr/lib/libgps5300faker.so&#039;&lt;br /&gt;
CONF=/etc/default/gps5300driver.conf&lt;br /&gt;
&lt;br /&gt;
if [ -f $CONF ]; then&lt;br /&gt;
        . $CONF&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
case $1 in&lt;br /&gt;
	start)&lt;br /&gt;
		echo &amp;quot;Starting GPS5300 driver&amp;quot;&lt;br /&gt;
		if ! [ -e /sys/devices/platform/gpio-switch/gps_reset/state ]; then&lt;br /&gt;
			echo &amp;quot;gps_reset state gpio switch missing&amp;quot;&lt;br /&gt;
#			return 1&lt;br /&gt;
		fi&lt;br /&gt;
			&lt;br /&gt;
		[ -z &amp;quot;${GPS5300_SELFINIT}&amp;quot; ] &amp;amp;&amp;amp; GPS5300_SELFINIT=true&lt;br /&gt;
		${GPS5300_SELFINIT} || unset GPS5300_SELFINIT&lt;br /&gt;
		export GPS5300_SELFINIT&lt;br /&gt;
		&lt;br /&gt;
		[ -z &amp;quot;${GPS5300_USER}&amp;quot; ] &amp;amp;&amp;amp; GPS5300_USER=root&lt;br /&gt;
		export GPS5300_USER&lt;br /&gt;
		&lt;br /&gt;
		export LD_PRELOAD=${GPS5300_PRELOAD}		&lt;br /&gt;
	&lt;br /&gt;
		start-stop-daemon --start \&lt;br /&gt;
			--quiet \&lt;br /&gt;
			--background \&lt;br /&gt;
			--pidfile &amp;quot;${GPS5300_PIDFILE}&amp;quot; \&lt;br /&gt;
			--make-pidfile \&lt;br /&gt;
			--exec &amp;quot;${GPS5300_DRIVER}&amp;quot;&lt;br /&gt;
#			--env &amp;quot;LD_PRELOAD=${GPS5300_PRELOAD}&amp;quot; \&lt;br /&gt;
#			--exec &amp;quot;${GPS5300_DRIVER}&amp;quot;&lt;br /&gt;
#		return 0&lt;br /&gt;
	;;&lt;br /&gt;
&lt;br /&gt;
	stop)&lt;br /&gt;
		echo &amp;quot;Stopping GPS5300 driver&amp;quot;&lt;br /&gt;
		start-stop-daemon --stop \&lt;br /&gt;
			--quiet \&lt;br /&gt;
			--pidfile &amp;quot;${GPS5300_PIDFILE}&amp;quot;&lt;br /&gt;
		rm ${GPS5300_PIDFILE}&lt;br /&gt;
#		return 0&lt;br /&gt;
	;;&lt;br /&gt;
&lt;br /&gt;
	restart|force-reload)&lt;br /&gt;
		$0 stop&lt;br /&gt;
		$0 start&lt;br /&gt;
	;;&lt;br /&gt;
&lt;br /&gt;
	*)&lt;br /&gt;
		echo &amp;quot;Usage: $0: {start|stop|restart|force-reload}&amp;quot;&lt;br /&gt;
		exit 1&lt;br /&gt;
	;;&lt;br /&gt;
esac&lt;br /&gt;
&lt;br /&gt;
=================CUT====================&lt;br /&gt;
&lt;br /&gt;
5. Run &amp;quot;cp /usr/sbin/gpsdriver /usr/sbin/gps5300driver&amp;quot;&lt;br /&gt;
&lt;br /&gt;
6. Put libgps5300faker.so in /usr/lib (Not posted anywhere yet)&lt;br /&gt;
&lt;br /&gt;
7. Reboot&lt;br /&gt;
&lt;br /&gt;
8. Run:&lt;br /&gt;
/etc/init.d/libgpsbt restart&lt;br /&gt;
/etc/init.d/gpsdriver restart&lt;br /&gt;
/etc/init.d/gps5300driver restart&lt;br /&gt;
&lt;br /&gt;
9. Run: &amp;quot;gpsd -n -N -D2 /dev/pgps&amp;quot;&lt;br /&gt;
&lt;br /&gt;
When you start getting messages like:&lt;br /&gt;
&lt;br /&gt;
gpsd: &amp;lt;= GPS: $GPGGA,183757.000,4504.94573,N,09300.43367,W,1,04,2.7,288.8,M,-31.3,M,,*60&lt;br /&gt;
gpsd: &amp;lt;= GPS: $GPGLL,4504.94573,N,09300.43367,W,183757.000,A,A*42&lt;br /&gt;
gpsd: can&#039;t use GGA/GGL time until after ZDA or RMC has supplied a year.&lt;br /&gt;
gpsd: &amp;lt;= GPS: $GPGSA,A,3,31,11,30,32,,,,,,,,,5.9,2.7,5.3*3D&lt;br /&gt;
gpsd: &amp;lt;= GPS: $GPGST,183757.000,14.3,13.2,37.3,19.1,16.0,32.4,73.2*54&lt;br /&gt;
&lt;br /&gt;
You&#039;ve got a lock and are ready to use your GPS.&lt;/div&gt;</summary>
		<author><name>208.42.141.209</name></author>
	</entry>
	<entry>
		<id>https://maemo.octonezd.me/index.php?title=Mer/Documentation/N810_GPS&amp;diff=24019</id>
		<title>Mer/Documentation/N810 GPS</title>
		<link rel="alternate" type="text/html" href="https://maemo.octonezd.me/index.php?title=Mer/Documentation/N810_GPS&amp;diff=24019"/>
		<updated>2009-05-19T19:00:56Z</updated>

		<summary type="html">&lt;p&gt;208.42.141.209: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;These directions are confirmed to work on Mer 0.12.&lt;br /&gt;
&lt;br /&gt;
All commands should be run as root.&lt;br /&gt;
&lt;br /&gt;
All instances of &amp;quot;YOURUSERNAME&amp;quot; should be changed to whatever your user is named. Commands involving &amp;quot;YOURUSERNAME&amp;quot; [i]probably[/i] don&#039;t have to be run if your user is named &amp;quot;user&amp;quot;, though this is unconfirmed.&lt;br /&gt;
&lt;br /&gt;
The time to first fix (TTFF) is quite long (~30 min), and GPSD quits after the last client disconnects. Keep this in mind.&lt;br /&gt;
&lt;br /&gt;
1. Install the following packages from the Maemo Updates repository (you can install them on Maemo, then copy the packages from the apt cache):&lt;br /&gt;
	libsupld1&lt;br /&gt;
	osso-gpsd&lt;br /&gt;
	libgpsmgr&lt;br /&gt;
	libgpsbt (?)&lt;br /&gt;
	gpsdriver&lt;br /&gt;
&lt;br /&gt;
2. Edit /etc/init.d/libgpsbt and change all instances of &amp;quot;user:users&amp;quot; to &amp;quot;YOURUSERNAME:users&amp;quot; There should be 2 instances you need to change.&lt;br /&gt;
&lt;br /&gt;
3. Run: chown -R YOURUSERNAME:users /var/lib/gps&lt;br /&gt;
&lt;br /&gt;
4. Make the following files:&lt;br /&gt;
&lt;br /&gt;
/etc/default/gps5300driver.conf&lt;br /&gt;
=================CUT====================&lt;br /&gt;
&lt;br /&gt;
# /etc/default/gps5300driver.conf&lt;br /&gt;
&lt;br /&gt;
# The user who can control the driver&lt;br /&gt;
GPS5300_USER=root&lt;br /&gt;
&lt;br /&gt;
# Whether the driver will self-initialize, may or may not work (more on the may not side)&lt;br /&gt;
GPS5300_SELFINIT=true&lt;br /&gt;
&lt;br /&gt;
=================CUT====================&lt;br /&gt;
&lt;br /&gt;
/etc/init.d/gps5300driver&lt;br /&gt;
=================CUT====================&lt;br /&gt;
&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
GPS5300_DRIVER=&#039;/usr/sbin/gps5300driver&#039;&lt;br /&gt;
GPS5300_PIDFILE=&#039;/var/run/gps5300driver.pid&#039;&lt;br /&gt;
GPS5300_PRELOAD=&#039;/usr/lib/libgps5300faker.so&#039;&lt;br /&gt;
CONF=/etc/default/gps5300driver.conf&lt;br /&gt;
&lt;br /&gt;
if [ -f $CONF ]; then&lt;br /&gt;
        . $CONF&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
case $1 in&lt;br /&gt;
	start)&lt;br /&gt;
		echo &amp;quot;Starting GPS5300 driver&amp;quot;&lt;br /&gt;
		if ! [ -e /sys/devices/platform/gpio-switch/gps_reset/state ]; then&lt;br /&gt;
			echo &amp;quot;gps_reset state gpio switch missing&amp;quot;&lt;br /&gt;
#			return 1&lt;br /&gt;
		fi&lt;br /&gt;
			&lt;br /&gt;
		[ -z &amp;quot;${GPS5300_SELFINIT}&amp;quot; ] &amp;amp;&amp;amp; GPS5300_SELFINIT=true&lt;br /&gt;
		${GPS5300_SELFINIT} || unset GPS5300_SELFINIT&lt;br /&gt;
		export GPS5300_SELFINIT&lt;br /&gt;
		&lt;br /&gt;
		[ -z &amp;quot;${GPS5300_USER}&amp;quot; ] &amp;amp;&amp;amp; GPS5300_USER=root&lt;br /&gt;
		export GPS5300_USER&lt;br /&gt;
		&lt;br /&gt;
		export LD_PRELOAD=${GPS5300_PRELOAD}		&lt;br /&gt;
	&lt;br /&gt;
		start-stop-daemon --start \&lt;br /&gt;
			--quiet \&lt;br /&gt;
			--background \&lt;br /&gt;
			--pidfile &amp;quot;${GPS5300_PIDFILE}&amp;quot; \&lt;br /&gt;
			--make-pidfile \&lt;br /&gt;
			--exec &amp;quot;${GPS5300_DRIVER}&amp;quot;&lt;br /&gt;
#			--env &amp;quot;LD_PRELOAD=${GPS5300_PRELOAD}&amp;quot; \&lt;br /&gt;
#			--exec &amp;quot;${GPS5300_DRIVER}&amp;quot;&lt;br /&gt;
#		return 0&lt;br /&gt;
	;;&lt;br /&gt;
&lt;br /&gt;
	stop)&lt;br /&gt;
		echo &amp;quot;Stopping GPS5300 driver&amp;quot;&lt;br /&gt;
		start-stop-daemon --stop \&lt;br /&gt;
			--quiet \&lt;br /&gt;
			--pidfile &amp;quot;${GPS5300_PIDFILE}&amp;quot;&lt;br /&gt;
		rm ${GPS5300_PIDFILE}&lt;br /&gt;
#		return 0&lt;br /&gt;
	;;&lt;br /&gt;
&lt;br /&gt;
	restart|force-reload)&lt;br /&gt;
		$0 stop&lt;br /&gt;
		$0 start&lt;br /&gt;
	;;&lt;br /&gt;
&lt;br /&gt;
	*)&lt;br /&gt;
		echo &amp;quot;Usage: $0: {start|stop|restart|force-reload}&amp;quot;&lt;br /&gt;
		exit 1&lt;br /&gt;
	;;&lt;br /&gt;
esac&lt;br /&gt;
&lt;br /&gt;
=================CUT====================&lt;br /&gt;
&lt;br /&gt;
5. Run &amp;quot;cp /usr/sbin/gpsdriver /usr/sbin/gps5300driver&amp;quot;&lt;br /&gt;
&lt;br /&gt;
6. Put libgps5300faker.so in /usr/lib (HOSTING)&lt;br /&gt;
&lt;br /&gt;
7. Reboot&lt;br /&gt;
&lt;br /&gt;
8. Run:&lt;br /&gt;
/etc/init.d/libgpsbt restart&lt;br /&gt;
/etc/init.d/gpsdriver restart&lt;br /&gt;
/etc/init.d/gps5300driver restart&lt;br /&gt;
&lt;br /&gt;
9. Run: &amp;quot;gpsd -n -N -D2 /dev/pgps&amp;quot;&lt;br /&gt;
&lt;br /&gt;
When you start getting messages like:&lt;br /&gt;
&lt;br /&gt;
gpsd: &amp;lt;= GPS: $GPGGA,183757.000,4504.94573,N,09300.43367,W,1,04,2.7,288.8,M,-31.3,M,,*60&lt;br /&gt;
gpsd: &amp;lt;= GPS: $GPGLL,4504.94573,N,09300.43367,W,183757.000,A,A*42&lt;br /&gt;
gpsd: can&#039;t use GGA/GGL time until after ZDA or RMC has supplied a year.&lt;br /&gt;
gpsd: &amp;lt;= GPS: $GPGSA,A,3,31,11,30,32,,,,,,,,,5.9,2.7,5.3*3D&lt;br /&gt;
gpsd: &amp;lt;= GPS: $GPGST,183757.000,14.3,13.2,37.3,19.1,16.0,32.4,73.2*54&lt;br /&gt;
&lt;br /&gt;
You&#039;ve got a lock and are ready to use your GPS.&lt;/div&gt;</summary>
		<author><name>208.42.141.209</name></author>
	</entry>
	<entry>
		<id>https://maemo.octonezd.me/index.php?title=Mer/Documentation/N810_GPS&amp;diff=24020</id>
		<title>Mer/Documentation/N810 GPS</title>
		<link rel="alternate" type="text/html" href="https://maemo.octonezd.me/index.php?title=Mer/Documentation/N810_GPS&amp;diff=24020"/>
		<updated>2009-05-19T18:54:29Z</updated>

		<summary type="html">&lt;p&gt;208.42.141.209: New page: These directions are confirmed to work on Mer 0.12.  All commands should be run as root.  All instances of &amp;quot;YOURUSERNAME&amp;quot; should be changed to whatever your user is named. Commands involvi...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;These directions are confirmed to work on Mer 0.12.&lt;br /&gt;
&lt;br /&gt;
All commands should be run as root.&lt;br /&gt;
&lt;br /&gt;
All instances of &amp;quot;YOURUSERNAME&amp;quot; should be changed to whatever your user is named. Commands involving &amp;quot;YOURUSERNAME&amp;quot; [i]probably[/i] don&#039;t have to be run if your user is named &amp;quot;user&amp;quot;, though this is unconfirmed.&lt;br /&gt;
&lt;br /&gt;
The time to first fix (TTFF) is quite long (~30 min), and GPSD quits after the last client disconnects. Keep this in mind.&lt;br /&gt;
&lt;br /&gt;
1. Install the following packages from the Maemo Updates repository (you can install them on Maemo, then copy the packages from the apt cache):&lt;br /&gt;
	libsupld1&lt;br /&gt;
	osso-gpsd&lt;br /&gt;
	libgpsmgr&lt;br /&gt;
	libgpsbt (?)&lt;br /&gt;
	gpsdriver&lt;br /&gt;
&lt;br /&gt;
2. Edit /etc/init.d/libgpsbt and change all instances of &amp;quot;user:users&amp;quot; to &amp;quot;YOURUSERNAME:users&amp;quot; There should be 2 instances you need to change.&lt;br /&gt;
&lt;br /&gt;
3. Run: chown -R YOURUSERNAME:users /var/lib/gps&lt;br /&gt;
&lt;br /&gt;
4. Make the following files:&lt;br /&gt;
&lt;br /&gt;
/etc/default/gps5300driver.conf&lt;br /&gt;
#=================CUT====================&lt;br /&gt;
&lt;br /&gt;
# /etc/default/gps5300driver.conf&lt;br /&gt;
&lt;br /&gt;
# The user who can control the driver&lt;br /&gt;
GPS5300_USER=root&lt;br /&gt;
&lt;br /&gt;
# Whether the driver will self-initialize, may or may not work (more on the may not side)&lt;br /&gt;
GPS5300_SELFINIT=true&lt;br /&gt;
&lt;br /&gt;
#=================CUT====================&lt;br /&gt;
&lt;br /&gt;
/etc/init.d/gps5300driver&lt;br /&gt;
#=================CUT====================&lt;br /&gt;
&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
GPS5300_DRIVER=&#039;/usr/sbin/gps5300driver&#039;&lt;br /&gt;
GPS5300_PIDFILE=&#039;/var/run/gps5300driver.pid&#039;&lt;br /&gt;
GPS5300_PRELOAD=&#039;/usr/lib/libgps5300faker.so&#039;&lt;br /&gt;
CONF=/etc/default/gps5300driver.conf&lt;br /&gt;
&lt;br /&gt;
if [ -f $CONF ]; then&lt;br /&gt;
        . $CONF&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
case $1 in&lt;br /&gt;
	start)&lt;br /&gt;
		echo &amp;quot;Starting GPS5300 driver&amp;quot;&lt;br /&gt;
		if ! [ -e /sys/devices/platform/gpio-switch/gps_reset/state ]; then&lt;br /&gt;
			echo &amp;quot;gps_reset state gpio switch missing&amp;quot;&lt;br /&gt;
#			return 1&lt;br /&gt;
		fi&lt;br /&gt;
			&lt;br /&gt;
		[ -z &amp;quot;${GPS5300_SELFINIT}&amp;quot; ] &amp;amp;&amp;amp; GPS5300_SELFINIT=true&lt;br /&gt;
		${GPS5300_SELFINIT} || unset GPS5300_SELFINIT&lt;br /&gt;
		export GPS5300_SELFINIT&lt;br /&gt;
		&lt;br /&gt;
		[ -z &amp;quot;${GPS5300_USER}&amp;quot; ] &amp;amp;&amp;amp; GPS5300_USER=root&lt;br /&gt;
		export GPS5300_USER&lt;br /&gt;
		&lt;br /&gt;
		export LD_PRELOAD=${GPS5300_PRELOAD}		&lt;br /&gt;
	&lt;br /&gt;
		start-stop-daemon --start \&lt;br /&gt;
			--quiet \&lt;br /&gt;
			--background \&lt;br /&gt;
			--pidfile &amp;quot;${GPS5300_PIDFILE}&amp;quot; \&lt;br /&gt;
			--make-pidfile \&lt;br /&gt;
			--exec &amp;quot;${GPS5300_DRIVER}&amp;quot;&lt;br /&gt;
#			--env &amp;quot;LD_PRELOAD=${GPS5300_PRELOAD}&amp;quot; \&lt;br /&gt;
#			--exec &amp;quot;${GPS5300_DRIVER}&amp;quot;&lt;br /&gt;
#		return 0&lt;br /&gt;
	;;&lt;br /&gt;
&lt;br /&gt;
	stop)&lt;br /&gt;
		echo &amp;quot;Stopping GPS5300 driver&amp;quot;&lt;br /&gt;
		start-stop-daemon --stop \&lt;br /&gt;
			--quiet \&lt;br /&gt;
			--pidfile &amp;quot;${GPS5300_PIDFILE}&amp;quot;&lt;br /&gt;
		rm ${GPS5300_PIDFILE}&lt;br /&gt;
#		return 0&lt;br /&gt;
	;;&lt;br /&gt;
&lt;br /&gt;
	restart|force-reload)&lt;br /&gt;
		$0 stop&lt;br /&gt;
		$0 start&lt;br /&gt;
	;;&lt;br /&gt;
&lt;br /&gt;
	*)&lt;br /&gt;
		echo &amp;quot;Usage: $0: {start|stop|restart|force-reload}&amp;quot;&lt;br /&gt;
		exit 1&lt;br /&gt;
	;;&lt;br /&gt;
esac&lt;br /&gt;
&lt;br /&gt;
#=================CUT====================&lt;br /&gt;
&lt;br /&gt;
5. Run &amp;quot;cp /usr/sbin/gpsdriver /usr/sbin/gps5300driver&amp;quot;&lt;br /&gt;
&lt;br /&gt;
6. Put libgps5300faker.so in /usr/lib (HOSTING)&lt;br /&gt;
&lt;br /&gt;
7. Reboot&lt;br /&gt;
&lt;br /&gt;
8. Run:&lt;br /&gt;
/etc/init.d/libgpsbt restart&lt;br /&gt;
/etc/init.d/gpsdriver restart&lt;br /&gt;
/etc/init.d/gps5300driver restart&lt;br /&gt;
&lt;br /&gt;
9. Run: &amp;quot;gpsd -n -N -D2 /dev/pgps&amp;quot;&lt;br /&gt;
&lt;br /&gt;
When you start getting messages like:&lt;br /&gt;
&lt;br /&gt;
gpsd: &amp;lt;= GPS: $GPGGA,183757.000,4504.94573,N,09300.43367,W,1,04,2.7,288.8,M,-31.3,M,,*60&lt;br /&gt;
gpsd: &amp;lt;= GPS: $GPGLL,4504.94573,N,09300.43367,W,183757.000,A,A*42&lt;br /&gt;
gpsd: can&#039;t use GGA/GGL time until after ZDA or RMC has supplied a year.&lt;br /&gt;
gpsd: &amp;lt;= GPS: $GPGSA,A,3,31,11,30,32,,,,,,,,,5.9,2.7,5.3*3D&lt;br /&gt;
gpsd: &amp;lt;= GPS: $GPGST,183757.000,14.3,13.2,37.3,19.1,16.0,32.4,73.2*54&lt;br /&gt;
&lt;br /&gt;
You&#039;ve got a lock and are ready to use your GPS.&lt;/div&gt;</summary>
		<author><name>208.42.141.209</name></author>
	</entry>
</feed>