Using the HTC Wizard as modem in Linux

vess's picture
Submitted by vess on Mon, 21/08/2006 - 17:55. Networking

Hello.

I've been trying to setup the HTC as modem in Linux (just as I've been able to do in Windows). So far I've had little luck.

Any suggestions?

--




Magdiragdag's picture
Submitted by Magdiragdag on Fri, 25/08/2006 - 11:03.

I used to have this working, but I lost the configuration and am now trying to get it to work again. So far, I'm connection to the HTC over bluetooth:

# hcitool scan

produced

Scanning ...
00:12:34:56:78:9A MyPhoneName

# rfcomm bind 0 00:12:34:56:78:9A 1

# rfcomm -a

gave

rfcomm0: 00:12:34:56:78:9A channel 1 clean

I think at this point I tried "cat < /dev/rfcomm0"; the HTC said my computer wanted to make contact, so I gave it the pincode that was in /etc/bluetooth/hcid.conf. Both the computer and the HTC remember the pairing: I don't get asked for the pincode anymore unless I remove the information from the HTC by hand.

This is about where I am. At this point I should be able to talk to the modem with minicom. I can send AT-commands, but the modem doesn't respond OK as it should. I remember that when I had this working, I encountered the same problem - I think I had to tweak some modem settings in minicom (baudrate? flowcontrol? parity?), but I forgot which. I'll be back here when I've figured it out.

--


Teun's picture
Submitted by Teun on Fri, 07/12/2007 - 23:30.

Magdiragdag wrote:
I used to have this working, but I lost the configuration and am now trying to get it to work again. So far, I'm connection to the HTC over bluetooth:

# hcitool scan

produced

Scanning ...
00:12:34:56:78:9A MyPhoneName

# rfcomm bind 0 00:12:34:56:78:9A 1

# rfcomm -a

gave

rfcomm0: 00:12:34:56:78:9A channel 1 clean

I think at this point I tried "cat < /dev/rfcomm0"; the HTC said my computer wanted to make contact, so I gave it the pincode that was in /etc/bluetooth/hcid.conf. Both the computer and the HTC remember the pairing: I don't get asked for the pincode anymore unless I remove the information from the HTC by hand.

This is about where I am. At this point I should be able to talk to the modem with minicom. I can send AT-commands, but the modem doesn't respond OK as it should. I remember that when I had this working, I encountered the same problem - I think I had to tweak some modem settings in minicom (baudrate? flowcontrol? parity?), but I forgot which. I'll be back here when I've figured it out.

Use channel 5 for communication and it works.
At the wrong channel (1 in your case) you can sent AT commando's and the stupid HTC says always OK at any channel ;-)

At channel 5 it gives some real feedback.

You can also use the rfcomm connect command as ordinairy user:

$ rfcomm connect 0 00:12:37:90:AF:5C 5
Connected /dev/rfcomm0 to 00:12:37:90:AF:5C on channel 5
Press CTRL-C for hangup

--


technobunny's picture
Submitted by technobunny on Mon, 25/09/2006 - 06:49.

I am currently using the my tmobile mda as a modem via usb cable. I have not tried via blue tooth. here are the settings for me to get it working. these are for usb cable, and the number and wap are for the usa. so you would need to change for your carrier.

/etc/ppp/peers/tmobile
***************
/dev/ttyUSB0
115200

crtscts
idle 300
lcp-echo-failure 0
lcp-echo-interval 0
local
lock
noauth
#nodetach
noipdefault
noipdefault
noproxyarp
defaultroute
usepeerdns
ipparam tmobile
password tmobile
remotename tmobile
user ''
connect "/usr/sbin/chat -f /etc/chatscripts/tmobile-connect"

/etc/chatscripts/tmobile-connect
**********************
SAY 'Starting GPRS connect script. please work\n'
TIMEOUT 10
ABORT 'BUSY'
ABORT 'NO DIAL TONE'
ABORT 'NO ANSWER'
ABORT DELAYED
"" ATZ
SAY 'Setting APN\n'
OK 'AT+CGDCONT=1,"IP","wap.voicestream.com"'
SAY 'Dialing...\n'
OK ATD*99#
CONNECT ' '

--


wykedengel's picture
Submitted by wykedengel on Mon, 09/10/2006 - 13:25.

technobunny(or anyone else) where you put the settings? would you create a new file or does this already exist?

--


JHB's picture
Submitted by JHB on Tue, 06/02/2007 - 11:28.

Hi

I managed to get the TyTN working as a bluetooth modem under OpenSuSE Linux 10.2 - No thanks to the useless htc support!

The steps were as follows:

Switch on bluetooth on both devices.

# sdptool search DUN
Inquiring ...
Searching for DUN on 00:12:D1:F8:31:19 ...
Service Name: Dial-up Networking
Service RecHandle: 0x10005
Service Class ID List:
"Dialup Networking" (0x1103)
Protocol Descriptor List:
"L2CAP" (0x0100)
"RFCOMM" (0x0003)
Channel: 3
Language Base Attr List:
code_ISO639: 0x656e
encoding: 0x6a
base_offset: 0x100
Profile Descriptor List:
"Dialup Networking" (0x1103)
Version: 0x0100

# rfcomm bind 0 00:12:D1:F8:31:19 3
(Just substitute your own hex-id and channel according to the information from sdptool)

You should now have a /dev/rfcomm0 device.

Modify the /etc/wvdial.conf file to resemble the following:

# cat /etc/wvdial.conf
[Dialer Defaults]
Modem = /dev/rfcomm0
Baud = 115200
Init1 = ATS0=0
Init2 = AT
Init3 = ATE0V1&D2
Init4 = ATS7=60L1M1X3
Init5 = at+cgdcont=1,"IP","internet"
Area Code =
Phone = *99#
Username = JHB
Password =
Ask Password = 0
Dial Command = ATDT
Stupid Mode = 1
Compuserve = 0
Force Address =
Idle Seconds = 300
DialMessage1 =
DialMessage2 =
ISDN = 0
Auto DNS = 1

To connect:
#wvdial

I still can't sync it, and with the response from the HTC support is just that they don't support Linux.

I would not recommend buying this phone if you use Linux - wait until it is possible to sync it, or better yet, until it is possible to run Linux on it!
It is better to buy one of the new phones that already come with Linux - especially if you can X applications to your phone.

--


sakpo's picture
Submitted by sakpo on Sat, 23/06/2007 - 21:17.

wykedengel wrote:
technobunny(or anyone else) where you put the settings? would you create a new file or does this already exist?

That's the question!!! I need to know how to perform that!

--