<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>George Wright's Blog: Using a Windows Mobile phone to connect to the internet</title>
    <link>http://blog.gwright.org.uk/articles/2006/11/22/using-a-windows-mobile-phone-to-connect-to-the-internet</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>Random bloggings of a clearly disturbed KDE geek</description>
    <item>
      <title>Using a Windows Mobile phone to connect to the internet</title>
      <description>&lt;p&gt;As some of you may know, I have a Windows Mobile 5 based phone. It&amp;#8217;s possibly got the worst software I&amp;#8217;ve ever used in my life but the hardware&amp;#8217;s really nice so I put up with it.&lt;/p&gt;

&lt;p&gt;One of the major things I use the phone for is as a modem for Linux because I have an (effectively) unlimited data tarriff on my contract, so being able to use it with my laptop is incredibly useful.&lt;/p&gt;

&lt;p&gt;Previously, I have been using the USB cable and using wvdial to treat the phone as a dial up modem to connect to the internet. This wasn&amp;#8217;t without complications as Windows Mobile seems to require an initialisation string which no other phone uses. This is:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;
AT+CGDCONT=1,"IP","APN",""
&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Where &amp;#8216;APN&amp;#8217; is the access point name for your data carrier. In my case (T-Mobile), it&amp;#8217;s &amp;#8220;general.t-mobile.uk&amp;#8221;.&lt;/p&gt;

&lt;p&gt;To connect via USB though, you first need to load the appropriate module to give you a serial interface (/dev/ttyUSB0) to communicate through. You&amp;#8217;d think this was as simple as running &amp;#8221;&lt;code&gt;modprobe ipaq&lt;/code&gt;&amp;#8221;, but no - it&amp;#8217;s more complicated.&lt;/p&gt;

&lt;p&gt;First you have to modprobe ipaq then run &lt;code&gt;lsusb -v&lt;/code&gt;. You then need to look up your phone&amp;#8217;s entry and record the hex numbers for the vendorID and the productID then rmmod ipaq and load it again passing those identification numbers as parameters to the module, so in my case:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;
modprobe ipaq vendor=0x0bb4 product=0x00cf
&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This will then give you /dev/ttyUSB0 to play with. However, it&amp;#8217;s still isn&amp;#8217;t that simple from here. You need one more fiddle to get it working. You need to set &amp;#8220;Stupid Mode&amp;#8221; in wvdial to force pppd to start as soon as the modem connects. Thus, the final wvdial.conf is as follows:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;
[Dialer Defaults]&lt;br /&gt;
Modem = /dev/ttyUSB0&lt;br /&gt;
Baud = 115200&lt;br /&gt;
Init = AT+CGDCONT=1,"IP","APN",""&lt;br /&gt;
Phone = *99#&lt;br /&gt;
Username = USERNAME&lt;br /&gt;
Password = PASSWORD&lt;br /&gt;
New PPPD = yes&lt;br /&gt;
Stupid Mode = yes
&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;So, after setting up Linux you just need to run the &amp;#8220;Wireless  Modem&amp;#8221; program on the phone and start the softmodem.&lt;/p&gt;

&lt;p&gt;Unfortunately, trying to get it to connect via bluetooth appears to be infinitely more difficult. Luckily, I &lt;b&gt;finally&lt;/b&gt; managed to get it to connect today after a few hours of research and fiddling, and it now seems rather trivial.&lt;/p&gt;

&lt;p&gt;Firstly, Edgy&amp;#8217;s bluez packages appear to be sufficiently broken that it doesn&amp;#8217;t bring up the bluetooth adapter in discoverable mode - thus resulting in severe breakage when trying to connect the phone. This is fixed by running the command:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;
hciconfig hci0 piscan
&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;You then need to fiddle some values in &lt;code&gt;/etc/bluetooth/hcid.conf&lt;/code&gt; to allow the phone to pair.&lt;/p&gt;

&lt;p&gt;I set a default passkey using the &lt;code&gt;passkey "xyz";&lt;/code&gt;  option in &lt;code&gt;hcid.conf&lt;/code&gt; as I couldn&amp;#8217;t be bothered to set up a helper application. However, it should work just fine if you do set up a helper application. That&amp;#8217;s basically all that needs to be altered.&lt;/p&gt;

&lt;p&gt;Now onto the phone.&lt;/p&gt;

&lt;p&gt;Going into Settings -&gt; Connections -&gt; Bluetooth, make sure the phone is discoverable and pair it with the computer. Once it&amp;#8217;s paired, the Linux box&amp;#8217;s ID should appear in the list on the &amp;#8220;Devices&amp;#8221; tab. You then just need to go into the &amp;#8220;Internet Connection Sharing&amp;#8221; program and start the connection using &amp;#8220;Bluetooth PAN&amp;#8221;. Once that&amp;#8217;s done, it&amp;#8217;s fairly trivial. On the computer, run the command:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;
pand --connect BADDR -n
&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Where &amp;#8220;BADDR&amp;#8221; is the 6-element bluetooth address of your phone, which can be obtained using the command &lt;code&gt;hcitool scan&lt;/code&gt;. After that, it should splurt out something like:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;
pand[8361]: Bluetooth PAN daemon version 3.7&lt;br /&gt;
pand[8361]: Connecting to BADDR&lt;br /&gt;
pand[8361]: bnep0 connected&lt;br /&gt;
&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This means that pand has brought up a new ethernet interface called &lt;code&gt;bnep0&lt;/code&gt; for you to play with. After this, it&amp;#8217;s just standard networking. Run a dhcp client on &lt;code&gt;bnep0&lt;/code&gt; and it will give you an IP address and NAT you across to the phone.&lt;/p&gt;

&lt;p&gt;Hooray - the phone is connected via bluetooth to the internet. I still haven&amp;#8217;t worked out how to get it to act as an actual modem over bluetooth (taking AT commands etc), but to be honest, I fail to see any point if we have Bluetooth PAN instead.&lt;/p&gt;</description>
      <pubDate>Wed, 22 Nov 2006 01:31:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:e54f5933-7592-42e2-907d-714739c52a34</guid>
      <author>gwright@kde.org (George Wright)</author>
      <link>http://blog.gwright.org.uk/articles/2006/11/22/using-a-windows-mobile-phone-to-connect-to-the-internet</link>
      <category>Computing</category>
      <category>Misc</category>
    </item>
    <item>
      <title>"Using a Windows Mobile phone to connect to the internet" by musakahmad@rocketmail.com</title>
      <description>&lt;p&gt;i want to connect mobile phone with internet , phone model no nokia N95 china product.my phone number is 08072585977 or 08084367008.&lt;/p&gt;</description>
      <pubDate>Fri, 10 Oct 2008 12:10:29 +0100</pubDate>
      <guid isPermaLink="false">urn:uuid:e016cf4d-0593-48ae-a174-b38a7abc12a4</guid>
      <link>http://blog.gwright.org.uk/articles/2006/11/22/using-a-windows-mobile-phone-to-connect-to-the-internet#comment-668</link>
    </item>
    <item>
      <title>"Using a Windows Mobile phone to connect to the internet" by barry wheeler</title>
      <description>&lt;p&gt;how can i conect my windows live telephone having trouble&lt;/p&gt;</description>
      <pubDate>Mon, 17 Dec 2007 17:19:14 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:4b52c926-ec60-44a2-9211-a8cb478613ce</guid>
      <link>http://blog.gwright.org.uk/articles/2006/11/22/using-a-windows-mobile-phone-to-connect-to-the-internet#comment-375</link>
    </item>
    <item>
      <title>"Using a Windows Mobile phone to connect to the internet" by orbistertius</title>
      <description>&lt;p&gt;Hello, I&amp;#8217;ve just found out that you can do a similar thing over the USB connection.&lt;/p&gt;

&lt;p&gt;You need a recent RNDIS linux kernel driver (see &lt;a href="http://www.synce.org/index.php/Connecting_your_Windows_Mobile_2005_device_via_USB_%28usb-rndis-lite%29" rel="nofollow"&gt;this page&lt;/a&gt; in the SynCE wiki).&lt;/p&gt;

&lt;p&gt;Once you have the modules loaded:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; edit /etc/network/interfaces adding this line:
&lt;pre&gt;      iface rndis0 inet dhcp&lt;/pre&gt;
(this might be Debian / Ubuntu specific but other distros shouldn&amp;#8217;t differ much)
&lt;li&gt; connect handheld and linux machine with the USB cable;
&lt;li&gt; go to Internet connection sharing on the handheld, choose USB for the PC connection and click &amp;#8220;Connect&amp;#8221;;
&lt;li&gt; on the linux machine, run (as root or with sudo) ifup rndis0
&lt;/li&gt;&lt;/li&gt;&lt;/li&gt;&lt;/li&gt;&lt;/ol&gt;

&lt;p&gt;That&amp;#8217;s it. The device should give your rndis0 interface an IP address and the default route, and populate /etc/resolv.conf with the IP address of the nameserver.&lt;/p&gt;</description>
      <pubDate>Tue, 07 Aug 2007 10:36:52 +0100</pubDate>
      <guid isPermaLink="false">urn:uuid:35e6710c-44d3-4979-986f-facfdd20fd86</guid>
      <link>http://blog.gwright.org.uk/articles/2006/11/22/using-a-windows-mobile-phone-to-connect-to-the-internet#comment-293</link>
    </item>
    <item>
      <title>"Using a Windows Mobile phone to connect to the internet" by orbistertius</title>
      <description>&lt;p&gt;Hello, I&amp;#8217;ve just found out that you can do a similar thing over the USB connection.&lt;/p&gt;

&lt;p&gt;You need a recent RNDIS linux kernel driver (see &lt;a href="http://www.synce.org/index.php/Connecting_your_Windows_Mobile_2005_device_via_USB_%28usb-rndis-lite%29" rel="nofollow"&gt;this page&lt;/a&gt; in the SynCE wiki).&lt;/p&gt;

&lt;p&gt;Once you have the modules loaded:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; edit /etc/network/interfaces adding this line:
&lt;pre&gt;      iface rndis0 inet dhcp&lt;/pre&gt;
(this might be Debian / Ubuntu specific but other distros shouldn&amp;#8217;t differ much)
&lt;li&gt; connect handheld and linux machine with the USB cable;
&lt;li&gt; go to Internet connection sharing on the handheld, choose USB for the PC connection and click &amp;#8220;Connect&amp;#8221;;
&lt;li&gt; on the linux machine, run (as root or with sudo) ifup rndis0
&lt;/li&gt;&lt;/li&gt;&lt;/li&gt;&lt;/li&gt;&lt;/ol&gt;

&lt;p&gt;That&amp;#8217;s it. The device should give your rndis0 interface an IP address and the default route, and populate /etc/resolv.conf with the IP address of the nameserver.&lt;/p&gt;</description>
      <pubDate>Tue, 07 Aug 2007 10:05:10 +0100</pubDate>
      <guid isPermaLink="false">urn:uuid:805506d8-c346-4e36-a75a-d82df21fdcad</guid>
      <link>http://blog.gwright.org.uk/articles/2006/11/22/using-a-windows-mobile-phone-to-connect-to-the-internet#comment-292</link>
    </item>
    <item>
      <title>"Using a Windows Mobile phone to connect to the internet" by e.sjamal@gmail.com</title>
      <description>&lt;p&gt;hiiiii:
my name is Samer and ealy i&amp;#8217;m trying to get or control the mobile throw internet .. i mean i have a mobile phone so far from me and i want to control it the PC-&gt;Internet-&gt;NMS-&gt;pSTn ..
or i don&amp;#8217;t know who .. so can u give me help please ..
thanks alot.&lt;/p&gt;</description>
      <pubDate>Thu, 02 Aug 2007 07:28:37 +0100</pubDate>
      <guid isPermaLink="false">urn:uuid:a0b0b424-14c6-4249-81f0-02c78aec42e9</guid>
      <link>http://blog.gwright.org.uk/articles/2006/11/22/using-a-windows-mobile-phone-to-connect-to-the-internet#comment-288</link>
    </item>
    <item>
      <title>"Using a Windows Mobile phone to connect to the internet" by Nathan</title>
      <description>&lt;p&gt;Thanks for sharing your experience with the BT PAN connection! I&amp;#8217;d spent a lot of time before reading of the simple but effective way of doing it.&lt;/p&gt;</description>
      <pubDate>Thu, 31 May 2007 05:01:14 +0100</pubDate>
      <guid isPermaLink="false">urn:uuid:d0945aa7-04a8-41b7-93b3-65cc7dae4725</guid>
      <link>http://blog.gwright.org.uk/articles/2006/11/22/using-a-windows-mobile-phone-to-connect-to-the-internet#comment-260</link>
    </item>
    <item>
      <title>"Using a Windows Mobile phone to connect to the internet" by Enrico</title>
      <description>&lt;p&gt;I&amp;#8217;ve tried ypur config but it&amp;#8217;s wasn&amp;#8217;t possibile to use the ipaq as a mode.
I&amp;#8217;ve added thees line to the wvdial config &lt;/p&gt;

&lt;p&gt;[Dialer Defaults]
Modem = /dev/ttyUSB0
Baud = 115200
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &amp;amp;C1 &amp;amp;D2 +FCLASS=0
Init3 = AT+CGDCONT=1,&amp;#8221;IP&amp;#8221;,&amp;#8221;APN&amp;#8221;
Phone =  *99#
Username=&amp;#8221;
Password=&amp;#8221;
Stupid mode = yes&lt;/p&gt;

&lt;p&gt;and now it works.&lt;/p&gt;

&lt;p&gt;Tankyou for this post , it was a good starting place.&lt;/p&gt;</description>
      <pubDate>Thu, 10 May 2007 10:33:34 +0100</pubDate>
      <guid isPermaLink="false">urn:uuid:0086bb7b-f771-490f-9287-6661c781d3fd</guid>
      <link>http://blog.gwright.org.uk/articles/2006/11/22/using-a-windows-mobile-phone-to-connect-to-the-internet#comment-253</link>
    </item>
    <item>
      <title>"Using a Windows Mobile phone to connect to the internet" by Henry</title>
      <description>&lt;p&gt;Hi, I&amp;#8217;ve tried what you suggested, without the bluetooth as I am using a docking station, but cannot come right. It connects to the point where it retrieves the local IP, remote IP and DNS servers. It then just seems to sit and wait?!? The device itselfs still says &amp;#8220;Connecting&amp;#8230;&amp;#8221;. Also my APN does not require a username and password. When leaving this blank wvdial complains. Any ideas?&lt;/p&gt;

&lt;p&gt;Thanks.&lt;/p&gt;</description>
      <pubDate>Wed, 14 Feb 2007 12:11:37 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:84a6be85-94ac-44af-820e-6afca5b84d88</guid>
      <link>http://blog.gwright.org.uk/articles/2006/11/22/using-a-windows-mobile-phone-to-connect-to-the-internet#comment-181</link>
    </item>
    <item>
      <title>"Using a Windows Mobile phone to connect to the internet" by frederick</title>
      <description>&lt;p&gt;Hi,
am trying to connect my laptop to the internet through my mobile phone.
but it only gives me 30mbps speed.
instead of 100mbps to allow my laptop to work.
Thanks for your help.&lt;/p&gt;

&lt;p&gt;Frederick.&lt;/p&gt;</description>
      <pubDate>Sun, 24 Dec 2006 21:08:22 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:f7356b10-fcd3-4fb9-aa97-07c1fe9d2999</guid>
      <link>http://blog.gwright.org.uk/articles/2006/11/22/using-a-windows-mobile-phone-to-connect-to-the-internet#comment-330</link>
    </item>
    <item>
      <title>"Using a Windows Mobile phone to connect to the internet" by caveman</title>
      <description>&lt;p&gt;AT+CGDCONT=1,&amp;#8221;IP&amp;#8221;,&amp;#8221;APN&amp;#8221;,&amp;#8221;&amp;#8221;&lt;/p&gt;

&lt;p&gt;isn&amp;#8217;t a windows mobile thing is a GPRS/EDGE thing, you would need to do the same thing with a pcmcia card.&lt;/p&gt;</description>
      <pubDate>Wed, 22 Nov 2006 19:55:04 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:991e6725-1b06-45ef-9e63-9f5a1c6ab01f</guid>
      <link>http://blog.gwright.org.uk/articles/2006/11/22/using-a-windows-mobile-phone-to-connect-to-the-internet#comment-329</link>
    </item>
  </channel>
</rss>
