Using HTC Diamond as a Rndis modem
Hi, after a small amount of investigation I have finally got the HTC Diamond working as a Rndis modem over the USB port.
What this means is that you can use the Internet connection sharing function of the Diamond to get a computer onto the Internet using the H or G phone data connection.
Please note that the first steps of this guide will work for any ACTIVESYNC connected HTC phone that has the Connection Sharing (it's in the Connection Manager on other HTC phones)
Obviously using data on your mobile costs money so be aware of this and make sure you have a package that has reasonable charges.
finally I have only tested this on an ORANGE HTC Diamond in the UK.
The reason you have to modify the source is that if you don't the rndis fails with an error like (this is seen in the /var/log/syslog)
Code:
[355.215268] rndis_host 5-3:1.0: dev can't take 1558 byte packets (max 1536)
you need a working internet connection to set this up
1. Install Pre-requisites
2. Get the Source
3. Modify the source (Diamond only)
4. Compile and make and install
5. Start the Internet Connection Sharing
6. Plug in the Phone (USB)
Once you have done steps 1-4 you will only ever need to do steps 5 & 6 to get re-connected.
Step 1 - Install Pre-requisites
open a terminal (use same terminal in next steps)
Code:
$ sudo apt-get install subversion
Step 2 - Get the Source
Code:
$ svn co http://synce.svn.sourceforge.net/svnroot/synce/trunk/usb-rndis-lite
cd usb-rndis-lite/
Step 3 - Modify the source (Diamond only)
Code:
$ gedit rndis_host.c
on line 524, find this bit
Code:
if (tmp <>hard_mtu) {
dev_err(&intf->dev,
"dev can't take %u byte packets (max %u)\n",
dev->hard_mtu, tmp);
goto fail;
}
change it to this
Code:
if (tmp <>hard_mtu) {
dev_err(&intf->dev,
"dev can't take %u byte packets (max %u)\n",
dev->hard_mtu, tmp);
retval = -EINVAL;
/* goto fail;*/
}
save the file
Step 4 - Compile and make and install
Code:
$ make
$ sudo ./clean.sh
$ sudo make install
Step 5 - Start the Internet Connection Sharing
On OLD Tytn II's open Comm Manager on your phone and click on the Internet Sharing Now make sure USB is selected and choose connect
On Diamonds it's a seperate program called Internet Connection Sharing
Step 6 - Plug in the Phone (USB)
Plug the phone in, once the Phone has a data connection the Internet connection sharing will say connecting, then connected.
If this takes a while the dhcp may timeout and you will have to run the following command.
Code:
$ sudo dhclient
You should then see that you have an ip on the rndis device
Code:
$ ifconfig
Taken From: http://ubuntuforums.org/archive/index.php/t-935203.html
14 comments:
Nice one mate, works on Hardy on an Asus EEE, took 5 mins to set up max.
Really, I'm in your debt
Ish
On Ubuntu 8.10 none off this is needed!
Just plug the PDA to the PC with ubuntu 8.10 and select the share conection icon on the PDA and ubuntu rapidly takes care off the rest, and in no time you are surfing!
Hi guys!
Thanks a lot for your short description.
If you want to use your HTC DIAMOND as a Rndis Modem (even with ubuntu 8.10) you have to do these steps.
I tried it in Germany with t-mobile - it works just fine :-)
anyone know howto reduce the connection errors.
when you run ifconfig you get tons of errors:
rndis0 Link encap:Ethernet HWaddr 80:00:60:0f:e8:00
inet addr:192.168.0.102 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::8200:60ff:fe0f:e800/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:8050 Metric:1
RX packets:42567 errors:41854 dropped:0 overruns:0 frame:4
TX packets:47675 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
I could only make it work when i changed the bit of code to:
if (tmp < dev->hard_mtu) {
dev_err(&intf->dev,
"dev can't take %u byte packets (max %u)\n",
dev->hard_mtu, tmp);
retval = -EINVAL;
/* goto fail;*/
}
See http://ubuntuforums.org/showthread.php?t=869229&page=4
(Using now Ubuntu 8.10 connected via USB to a HTC Diamond WM6.1)
I'm getting a message saying the repository has moved. Anyone got a new location?
Ignore the above. Eventually spotted my mistake
Works perfect. Great work.
I cannot get this to work in linux slackware, it wont load the rndis0 device under ifconfig..
These steps work on jaunty 9.04 and HTC Kaiser II?
It was extremely interesting for me to read the blog. Thanx for it. I like such topics and anything connected to them. I would like to read more soon.
Alex
Phone blocker
This message, is matchless)))
From my observation, shopping for gadgets online may be easily expensive.
gift ideas
Post a Comment