As a result of some discussion on the Raspberry Pi forums, I decided to make my Pi into a dock of sorts for my HTC Desire.
Rather than using WiFi to connect to the Pi, I ended up using USB so that it doesn’t have to rely on anything external.
First thing I had to do was add this line into /etc/network/interfaces
iface usb0 inet dhcp
This let my HTC Desire assign an IP address to the Pi when I activated USB Tethering.
Second thing was to activate USB tethering itself after I plugged the phone into the USB Dock that I had.
Once the phone was plugged in, and USB tethering activated, the phone got an IP address on the usb0 interface.
Running ifconfig usb0 gave me this –
usb0 Link encap:Ethernet HWaddr ee:21:82:8b:eb:d1
inet addr:192.168.42.144 Bcast:192.168.42.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:616 errors:0 dropped:1 overruns:0 frame:0
TX packets:422 errors:0 dropped:0 overruns:0 carrier:0
RX bytes:220596 (215.4 KiB) TX bytes:58184 (56.8 KiB)
As you can see, it has the IP address of 192.168.42.144 which has been assigned by the Desire.
I have installed a VNC server on the HTC Desire which allowed me to access the screen of the Desire, and also allows me to use my keyboard to do typing on the Desire.
The VNC server I used was called Droid VNC Server. Unfortunately it needs a rooted phone, but I had already rooted my Desire so it was no problem for me.
Once the VNC server was started, I used tightvncviewer on my Pi to access the VNC server on the Desire, and as you can see in the picture above, it’s very viewable.
Responsiveness leaves a bit to be desired, but it’s usable enough as long as you’re not playing games.