<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>nikrivers.com &#187; pda</title>
	<atom:link href="http://www.nikrivers.com/tag/pda/feed" rel="self" type="application/rss+xml" />
	<link>http://www.nikrivers.com</link>
	<description></description>
	<lastBuildDate>Tue, 07 Sep 2010 16:42:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>HTC Desire, Android 2.2 and MMS</title>
		<link>http://www.nikrivers.com/2010/09/05/htc-desire-android-2-2-and-mms</link>
		<comments>http://www.nikrivers.com/2010/09/05/htc-desire-android-2-2-and-mms#comments</comments>
		<pubDate>Sun, 05 Sep 2010 20:39:27 +0000</pubDate>
		<dc:creator>Nik</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[htc desire]]></category>
		<category><![CDATA[ipaq]]></category>
		<category><![CDATA[ku990]]></category>
		<category><![CDATA[lg]]></category>
		<category><![CDATA[outlook]]></category>
		<category><![CDATA[pda]]></category>
		<category><![CDATA[viewty]]></category>

		<guid isPermaLink="false">http://www.nikrivers.com/?p=898</guid>
		<description><![CDATA[Without going into boring details, I have replaced my trusty (but failing) Sony Ericsson W995 with a new phone.  The W995 was a marvellous beast, with a lovely feel to it, but it had simply become too unreliable. I have replaced it with an HTC Desire.  It has a lovely big touch screen, which is [...]]]></description>
			<content:encoded><![CDATA[<p>Without going into boring details, I have replaced my trusty (but failing) Sony Ericsson W995 with a new phone.  The W995 was a marvellous beast, with a lovely feel to it, but it had simply become too unreliable.</p>
<p>I have replaced it with an HTC Desire.  It has a lovely big touch screen, which is a joy to use (a relief after having had <a href="http://www.nikrivers.com/2009/07/06/i-hate-my-lg-viewty" target="_self">very bad experiences with an LG Viewty</a>), has built-in GPS, and synchronises with Outlook via HTC Sync like a dream.  It has enabled me to ditch my HP iPaq, which was relatively large, had battery life of only a few hours, and needed a separate GPS receiver (oh, and a separate phone if you wanted to make calls).</p>
<p>All in all I&#8217;m very happy with the new phone.  It runs on the Android operating system; I had heard a lot of good things about Android, and a lot of bad things about Windows Mobile 7, which probably influenced my decision.  I probably would have chosen the Microsoft route otherwise.</p>
<p>However, after upgrading to Android 2.2 (known as Froyo) the HTC Desire stopped sending MMS messages (though to be honest, I don&#8217;t know that this didn&#8217;t happen <em>before</em> the upgrade).</p>
<p><span id="more-898"></span>Every time I tried, I would receive one of the following errors, and the message would sit in my outbox:</p>
<blockquote><p>Generic network failure<br />
Message format corrupt</p></blockquote>
<p>After a long investigation and a lot of hunting on Google (which led me down the red-herring route of setting up additional APNs), I discovered the problem: the default messaging app has issues sending MMS messages to contacts with spaces in the phone number.  For example, the app would send an MMS just fine to 07712123456, but would fail if the number was entered as 07712 123456 or +44 7712 123456.  The latter format is the one I favour, for both readability and functionality when dialling from abroad.</p>
<p>The problem is compounded because (for UK regional settings) Outlook forces a space into the number straight after the +44 country code and there&#8217;s no way to avoid it &#8211; and this gets transferred to the phone when it syncs.</p>
<p>I have found two solutions to this:</p>
<ol>
<li>Reformat all your contact numbers to remove country codes and spaces</li>
<li>Download and use Handcent for all outgoing MMS messages</li>
</ol>
<p>The first solution is a pain the backside because you need to remember the country code when abroad and dialing UK numbers (or when dialing foreign numbers from the UK), and the second solution is less than perfect because, while Handcent thankfully integrates with Android&#8217;s Share menu, it is not as polished and easy to use as the built-in messaging app.</p>
<p>As a possible third solution you could probably add an additional number to each contact you&#8217;re likely to want to send MMS messages to; this number would be the same as their mobile number, but formatted with no spaces.  If you sync with Outlook you&#8217;d also need to omit country codes (since Outlook will force a space after the country code).</p>
<p>I&#8217;m currently using solution #2, mainly because I rarely send MMS messages, so don&#8217;t want to go to too much effort &#8211; but I <em>do</em> want it to work on those rare occassions.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nikrivers.com/2010/09/05/htc-desire-android-2-2-and-mms/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Netgear DG834G and NAT loopback</title>
		<link>http://www.nikrivers.com/2009/10/26/netgear-dg834g-and-nat-loopback</link>
		<comments>http://www.nikrivers.com/2009/10/26/netgear-dg834g-and-nat-loopback#comments</comments>
		<pubDate>Mon, 26 Oct 2009 21:13:33 +0000</pubDate>
		<dc:creator>Nik</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Techie Stuff]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[firmware]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[iptables]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mail server]]></category>
		<category><![CDATA[nat loopback]]></category>
		<category><![CDATA[netgear dg834g]]></category>
		<category><![CDATA[ntp]]></category>
		<category><![CDATA[pda]]></category>
		<category><![CDATA[router]]></category>
		<category><![CDATA[tcp port 80]]></category>
		<category><![CDATA[update]]></category>
		<category><![CDATA[upgrade]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://www.nikrivers.com/?p=591</guid>
		<description><![CDATA[UPDATE 18th April 2010: Netgear have since released a firmware update for the DG834Gv4 which supports NAT loopback.  It took them long enough! Yesterday I made the decision (read: mistake) to update my Netgear DG834G router (hardware v4, firmware v5.01.09) to firmware v5.01.14 &#8211; and, as is the way with these things, it brought trouble.  After the upgrade I [...]]]></description>
			<content:encoded><![CDATA[<p><span style="color: #ff6600;"><strong>UPDATE 18th April 2010:</strong> Netgear have since released a </span><a href="http://kb.netgear.com/app/answers/detail/a_id/13354" target="_blank"><span style="color: #ff6600;">firmware update</span></a><span style="color: #ff6600;"> for the DG834Gv4 which supports NAT loopback.  It took them long enough!</span></p>
<p>Yesterday I made the decision (read: mistake) to update my Netgear DG834G router (hardware v4, firmware v5.01.09) to firmware v5.01.14 &#8211; and, as is the way with these things, it brought trouble.  After the upgrade I couldn&#8217;t reach <a href="http://www.nikrivers.com">www.nikrivers.com</a> from the LAN side of the router.</p>
<p>The problem is caused by the way the router handles traffic coming from an internal IP address and destined for the WAN (i.e. external) IP address.  In this situation it requires that the router first transfers the traffic from the internal network to the external network, and then immediately passes it back whilst applying any firewall or routing rules that are relevant to incoming external traffic.</p>
<p><span id="more-591"></span>This behaviour is called &#8216;NAT loopback&#8217;, and it seems the vast majority of routers built for the home market have this ability turned off, or do not have the ability at all.  It can be a big problem if you host a website and wish to access that same website using its domain name.  The domain name will resolve to the WAN IP address of your router, and any traffic headed there (such as an HTTP GET request on port 80) from the internal network will be ignored by the router.</p>
<p>There are a few ways to solve this, but none of them are ideal.</p>
<ol>
<li>Use the server name instead of the domain name to access your website</li>
<li>Modify the list of known network hosts on each client to point your domain name straight to the server in question.</li>
<li>Run your own DNS server, using a view to return the server&#8217;s local IP address to requests for your domain name originating from your network.</li>
</ol>
<p>Of course, the situation gets more complex if you&#8217;re also using your router to send TCP traffic on port 80 to your webserver and UDP traffic on port 8668 to a game server.</p>
<p>The solution is to get NAT loopback working on your router.  With some routers, such as the Touchspeed 535 as provided by Be Broadband, this feature can be enabled using a <a href="http://thicksliced.blogspot.com/2006/08/speedtouch-and-nat-loopback.html" target="_blank">simple CLI command</a>.  For other routers, such as the Netgear DG834G, it&#8217;s not quite so easy.</p>
<p>For the purposes of this post I&#8217;ll assume the internal network is on the 192.168.0.x range, the router is 192.168.0.254, and the web server is 192.168.0.1.  <strong>You will need to modify these IP addresses according to your own network setup</strong>.</p>
<p>The first thing to do is to enable debug mode on the router.  Simply go to <a href="http://192.168.0.254/setup.cgi?todo=debug">http://192.168.0.254/setup.cgi?todo=debug</a> and you&#8217;ll be rewarded with an appropriate message, &#8220;Debug Enable!&#8221;.  Nice.</p>
<p>Now connect to the router with &#8216;telnet 192.168.0.254&#8242; to gain access to the router&#8217;s cut-down installation of Linux.  All that is required is to add one additional entry to the router&#8217;s iptables (which is a standard Linux feature; <a href="http://www.google.com/search?q=iptables+tutorial" target="_blank">Google it</a> or more info).  Type the following, amending any IP addresses according to the network setup:</p>
<blockquote><p>iptables -t nat -A POSTROUTING -d 192.168.0.1 -s 192.168.0.0/24 -p tcp &#8211;dport 80 -j SNAT &#8211;to 192.168.0.254</p></blockquote>
<p>This adds a rule to the POSTROUTING chain on the nat table which applies to all TCP traffic on port 80 (HTTP) coming from the private network and headed to the router.  The rule redirects the traffic to the server, and then processing jumps to the SNAT chain.</p>
<p>If the server is more than just a simple web server, such as an NTP server or mail server as well, the above step needs to be performed (changing the -p and &#8211;dport parameters accordingly) for each port and protocol combination you require.  Alternatively, those parameters could be omitted altogether, which will allow all traffic types on all ports through:</p>
<blockquote><p>iptables -t nat -A POSTROUTING -d 192.168.0.1 -s 192.168.0.0/24 -j SNAT &#8211;to 192.168.0.254</p></blockquote>
<p>If you do this, I recommend you run a firewall on your server, with only the appropriate ports opened.</p>
<p>There is more information in <a href="http://www.netfilter.org/documentation/HOWTO/NAT-HOWTO-10.html" target="_blank">section 10</a> of Rusty Russell&#8217;s <a href="http://www.netfilter.org/documentation/HOWTO/NAT-HOWTO.html" target="_blank">Linux 2.4 NAT Howto</a>.</p>
<p>Unfortunately, the iptables change isn&#8217;t retained when the router restarts, so it is necessary to go through the process every time &#8211; which is a pain in the backside.  Fortunately, however, the Netgear support website has a download link for previous firmware versions, so I downgraded my router back to <a href="http://kb.netgear.com/app/answers/detail/a_id/271" target="_blank">firmware v5.01.09</a> and everything worked fine again&#8211;including NAT loopback&#8211;with no iptables hack required.</p>
<h3>A robust solution with DNS</h3>
<p>Simply put, proper DNS is the best way to get around a router&#8217;s lack of/poorly implemented NAT loopback.</p>
<p>If you have the resources to host a website then you most likely also have the resources to host a DNS server for your internal network.  Simply create an ACL list describing all the clients on your internal network (probably as simple as specifying the CIDR block for your network, maybe something like 192.168.1.0/24).  Then create a view whose clients match that ACL, and define that view as a master DNS server for your website domain.  You then need to create a zone file for that domain &#8211; but instead of using an external IP for your webserver, use its internal IP.</p>
<p>All requests for other domains will be routed to the DNS forwarders, but requests for your webserver&#8217;s domain will be handled locally, and internal IP addresses will be returned.</p>
<p>The benefit is that you avoid traversing your gateway router to simply come back inside your network.  It doesn&#8217;t make sense that you rely on your gateway router to access a website within your own network.  In addition, the firewall on your router can be hardened to a much greater degree: for example, you needn&#8217;t leave FTP ports open on your router if you&#8217;re only connecting locally.  Or, to put it another way, you&#8217;re likely going to want to give yourself more access to your server than you want to give to the outside world; configuring a router&#8217;s firewall rules for this kind of conditional logic is simply asking for trouble.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nikrivers.com/2009/10/26/netgear-dg834g-and-nat-loopback/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>After 200m perform factory reset</title>
		<link>http://www.nikrivers.com/2008/10/12/after-200m-perform-factory-reset</link>
		<comments>http://www.nikrivers.com/2008/10/12/after-200m-perform-factory-reset#comments</comments>
		<pubDate>Sun, 12 Oct 2008 14:10:49 +0000</pubDate>
		<dc:creator>Nik</dc:creator>
				<category><![CDATA[Techie Stuff]]></category>
		<category><![CDATA[bluetooth]]></category>
		<category><![CDATA[gps]]></category>
		<category><![CDATA[hard reset]]></category>
		<category><![CDATA[ipaq]]></category>
		<category><![CDATA[london]]></category>
		<category><![CDATA[pda]]></category>
		<category><![CDATA[tomtom]]></category>

		<guid isPermaLink="false">http://www.nikrivers.com/2008/10/12/after-200m-perform-factory-reset/</guid>
		<description><![CDATA[Yesterday, just as we were starting out on a car journey into deepest, darkest London, my iPaq 2790 decided it would refuse to connect to my TomTom GPS receiver. Having worked perfectly less than 2 weeks ago, it was now complaining about lack of memory. Specifically, &#8220;The Bluetooth Radio failed to turn ON due to [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday, just as we were starting out on a car journey into deepest, darkest London, my iPaq 2790 decided it would refuse to connect to my TomTom GPS receiver. Having worked perfectly less than 2 weeks ago, it was now complaining about lack of memory.</p>
<p><span id="more-307"></span></p>
<p>Specifically, &#8220;The Bluetooth Radio failed to turn ON due to insufficient driver memory available&#8221;. Hmm. Fortunately we were only 1/2 a mile from home when we realised it wasn&#8217;t going play ball, so we went home. &#8220;It will only take 2 minutes to fix&#8221;, I claimed.</p>
<p>I was wrong.</p>
<p>A Google search only resulted in pages that seemed to think that the problem was the order in which software gets loaded into memory in Windows Mobile 5.0; the Bluetooth drivers always get loaded into a specific memory address, and if this address is already in use, the drivers don&#8217;t load and the Bluetooth stack doesn&#8217;t work.</p>
<p>But uninstalling everything from the iPaq and performing a million hard resets didn&#8217;t work. I decided that the Bluetooth hardware had broken, and Windows was giving the above error message by default.</p>
<p>So I resigned myself to buying a new PDA, because I lost my iPaq restore CD in a <a href="http://www.nikrivers.com/2007/11/04/idiot-proof/">previous incident</a>, and had no way to reinstall the OS from scratch.</p>
<p>Fortunately, I stumbled across a page for the 2790 on <a href="http://www.hardreset.eu/hp_ipaq_hx2790_hard_reset_soft_reset_en.html" target="_blank">hardreset.eu</a>, which describes the way in which the 2790 can be restored to factory settings; just hold the Calendar, Messaging, and power buttons, and then press the reset button until the iPaq reboots. It will then reformat its internal storage, and (presumably) copy the factory configuration from a neatly tucked away back-up ROM.</p>
<p>And now it works. Bluetooth, I mean. It works. It wasn&#8217;t broken, it just had an unidentified problem (which may or may not have been accurately described by the error message it caused).</p>
<p>I can now safely venture past the end of our road without the risk of getting lost.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nikrivers.com/2008/10/12/after-200m-perform-factory-reset/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Never simple</title>
		<link>http://www.nikrivers.com/2008/05/27/never-simple</link>
		<comments>http://www.nikrivers.com/2008/05/27/never-simple#comments</comments>
		<pubDate>Tue, 27 May 2008 13:29:22 +0000</pubDate>
		<dc:creator>Nik</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Techie Stuff]]></category>
		<category><![CDATA[draytek]]></category>
		<category><![CDATA[ethereal]]></category>
		<category><![CDATA[firmware]]></category>
		<category><![CDATA[gallery]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[lunch]]></category>
		<category><![CDATA[pda]]></category>
		<category><![CDATA[router]]></category>
		<category><![CDATA[tcp port 80]]></category>
		<category><![CDATA[update]]></category>
		<category><![CDATA[weekend]]></category>
		<category><![CDATA[wireshark]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://www.nikrivers.com/?p=46</guid>
		<description><![CDATA[At the weekend I decided to make a major update to the photo gallery, since a large number of photos weren&#8217;t up yet. Although a bit clunky, the gallery software I was using (Gallery2) did the job nicely &#8211; and it even has an accompanying desktop app which lets you upload photos en masse. But [...]]]></description>
			<content:encoded><![CDATA[<p>At the weekend I decided to make a major update to the photo gallery, since a large number of photos weren&#8217;t up yet. Although a bit clunky, the gallery software I was using (<a href="http://gallery.menalto.com/">Gallery2</a>) did the job nicely &#8211; and it even has an accompanying desktop app which lets you upload photos <em>en masse</em>.</p>
<p><span id="more-28"></span>But at the weekend it refused to upload anything successfully, complaining about PHP and web server upload limits &#8211; things over which I have no control. So I went back to using the clunky web interface to upload my photos, only to be greeted by the useless &#8220;Internet Explorer cannot display the webpage&#8221; page on each attempt.</p>
<p>Things didn&#8217;t look good. So I decided to download a cleaner-looking and simpler gallery application (<a href="http://www.plogger.org/">Plogger</a>) to give it a go. Still no luck.</p>
<p>Having ruled out the problem being Gallery2, I decided my website host had changed some things on their side. A quick Google later, and I realised that I couldn&#8217;t upload anything more than small text files to any server. So it&#8217;s not my website host.</p>
<p>Good job I didn&#8217;t send them that email.</p>
<p>But wait, I can upload files to the gallery using a machine on the other side of the corporate VPN&#8230; which uses the corporate Internet connection. So it must be my ISP. It must be. Surely? After another quick Google, I read that a number of ISPs have been caught sending fake TCP reset packets to their users so that &#8216;undesirable&#8217; connections (ie. file sharing applications) are disconnected.</p>
<p>Knowing how to troubleshoot this kind of problem, I proceed to download <a href="http://www.wireshark.org/">Wireshark</a>, a network protocol analyzer (formerly Ethereal). Sure enough, each time I try to upload a .jpeg or .bmp or&#8230; in fact almost <em>any</em> type of file, I receive a TCP RST message &#8211; surely the fake reset message sent to me by my interfering ISP!</p>
<p>However, it seems that my ISP is blameless after all.</p>
<p>It turns out the latest firmware for my Draytek 2800 router adds an innocent-looking option called &#8220;Drop non-http connection on TCP port 80&#8243; which is enabled by default. I feel it should be more accurately called &#8220;break everything&#8221;. Disabling it fixed the problem, but it took an entire lunch break.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nikrivers.com/2008/05/27/never-simple/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
