Showing posts with label htc diamond. Show all posts
Showing posts with label htc diamond. Show all posts

Thursday, November 13, 2008

HTC Diamond as a Rndis Modem (GPRS/EDGE/HSDPA)

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

Monday, September 29, 2008

Extract Cab Files From EXE - Pocket PC

Hi there,

I recently bougth a HTC Diamond, which unfortunately is not linux based.

I started to download some aplications and noticed that many off them were exe files for Windows XP or Vista, so i had to use Windows XP or Vista via Active Sync to install them, and that some were cab which i could copy to my PDA via Windows or Linux if when i pluged in the usb cable i select the disk option an not active sync, which made my PDA apear as a USB Pen Drive.

Later on e noticed that the Windows XP or Vista exe, only copied a cab file and executed.
So i tried to find were did the cab was and found that the cab file was temporaly in:

Windows\AppMgr\Install

so i thougth that i could catch the cab rigth before installing it, and i succeded.


Basicly what i did was to execute the exe in Windows Xp, them PDA asked if i wanted to install the cab that the exe on Windows XP tranfered i said yes, and that's when you reach the below screen




Now i hit the home button on the PDA to select the file explorer in order to copy the cab, that is temporarily at Windows\AppMgr\Install to another location on PDA, so that you can store it on your PC so that when you want to install it i can do it from linux.

So i selected the explorer as shown bellow.





And went to Windows\AppMgr\Install where the cab was temporarily and copied it to another location on my PDA and canceled the install process in the first picture, but if you wan you can install.

I have tried to copy the cab before the screen on the first picture when it asks if you want to install, but it keep disapering, and the instalation being canceled.

And thats it! Happy Cab Hunt!