Jullian’s Musings

October 5th, 2009

Karmic Koala is Coming!!!

Posted by Administrator in Linux, Ubuntu

You know guys, it’s that time of the year again, so here it is:

May 17th, 2007

Ubuntu Feisty Bluetooth Indosat Mentari Connection

Posted by Administrator in Internet, Linux, Telecommunication, Ubuntu

Because I don’t have an internet connection anymore at home (I used to have a Kabelvision connection), I was quite excited to have a pretty advanced phone, a Nokia 6288. It’s pretty much 3G ready, it has infrared, bluetooth, and Java MIDP 2.0. It was definitely a step up from my old 5110, the original ‘handphone sejuta umat’.

Anyway, the appeal was simple, I want to connect my notebook, a NEC Versa E400 without a built-in bluetooth, to my handphone. I originally tried to connect my 6288 to the computer via the supplied CA-53 cable. However, I have figured out that Nokia’s cables (and their Window$ drivers and software) are basically junk. Their software was terrible in connection (if they can connect at all) they are useless.

First of all, you need to make sure that your phone can already connect to the internet. If it can’t, no need to continue here :).

So, I decided to connect it via a cheap USB bluetooth that I bought - Windows reported it as ISSC Bluetooth Device, the drivers reported it as Blue Soleil. It still won’t connect to the internet in Windows, so I then tried it in Ubuntu and hoped for the worst.

Because I am using MarkDown for this blog, make sure to remove the spaces in the lines colored red. Long story.

You gotta make sure that the needed packages are installed:

sudo apt-get install bluez-passkey-gnome gnome-bluetooth bluetooth wvdial

I inserted the bluetooth adapter and my tail -f /var/log/syslog:

May 17 22:14:22 localhost kernel: [ 474.468000] usb 1-1: new full speed USB device using ohci_hcd and address 4
May 17 22:14:32 localhost hcid[4543]: HCI dev 0 registered
May 17 22:14:33 localhost hcid[4543]: HCI dev 0 up
May 17 22:14:33 localhost hcid[4543]: Device hci0 has been added
May 17 22:14:33 localhost hcid[4543]: Starting security manager 0
May 17 22:14:33 localhost hcid[4543]: Device hci0 has been activated
May 17 22:14:33 localhost kernel: [ 484.680000] usb 1-1: configuration #1 chosen from 1 choice

And my lsusb:


Bus 002 Device 001: ID 0000:0000
Bus 001 Device 004: ID 1131:1001 Integrated System Solution Corp. KY-BT100 Bluetooth Adapter
Bus 001 Device 001: ID 0000:0000

And my hciconfig:

hci0: Type: USB
BD Address: 11:11:11:11:11:11 ACL MTU: 678:8 SCO MTU: 48:10
UP RUNNING PSCAN ISCAN
RX bytes:662 acl:0 sco:0 events:19 errors:0
TX bytes:323 acl:0 sco:0 commands:19 errors:0

Now, I need to find out the mac address of my phone (make sure you’ve already turn on the bluetooth of the phone and set it to ‘Shown to all’):

iwlist scan
00:00:00:00:00:00 phone_name # of course these are not the real name and mac address of my phone, but you get the idea.

Make sure you write down the mac address, you’ll need this to connect.

sudo hcitool cc [mac_address]

Then you need to connect your phone with authorization:

sudo hcitool autho [mac_address]

To check your connection you can:

hcitool con
    Connections:
    < ACL [mac_address] handle 1 state 1 lm MASTER

If the device are not connected, make sure you keep trying it until connected. I found that on average I needed to try to connect it for around 3 times - I guess my bluetooth adapter is not good enough :) (it costs me only RP. 100.000).

Now, after it is connected, let’s setup the wvdial configuration file:

sudo vi /etc/wvdial.conf.indosat

And put the following in that file:


[Dialer Defaults]
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Modem Type = USB Modem
Phone = \*99\***1\#
ISDN = 0
Username = ”
Init1 = ATZ
Password = ”
Modem = /dev/rfcomm0
Baud = 460800

You’re pretty much all set here, so now you can connect via:

wvdial -C /etc/wvdial.conf.indosat

This is the output:


--> WvDial: Internet dialer version 1.56
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATZ
ATZ
OK
--> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
OK
--> Modem initialized.
--> Sending: ATDT\*99\*\*\*1\#
--> Waiting for carrier.
ATDT\*99\*\*\*1\#
CONNECT
~[7f]}#@!}!} } }2}#}$@#}!}$}%\}”}&} }*} } g}%~
–> Carrier detected. Waiting for prompt.
~[7f]}#@!}!} } }2}#}$@#}!}$}%\}”}&} }*} } g}%~
–> PPP negotiation detected.
–> Starting pppd at Thu May 17 22:43:12 2007
–> Warning: Could not modify /etc/ppp/pap-secrets: Permission denied
–> –> PAP (Password Authentication Protocol) may be flaky.
–> Warning: Could not modify /etc/ppp/chap-secrets: Permission denied
–> –> CHAP (Challenge Handshake) may be flaky.
–> Pid of pppd: 7821
–> Using interface ppp0
–> pppd: [0b][06][08][11][06][08]
–> pppd: [0b][06][08][11][06][08]
–> pppd: [0b][06][08][11][06][08]
–> pppd: [0b][06][08][11][06][08]
–> pppd: [0b][06][08][11][06][08]
–> local IP address 10.33.31.204
–> pppd: [0b][06][08][11][06][08]
–> remote IP address 10.6.6.6
–> pppd: [0b][06][08][11][06][08]
–> primary DNS address 202.155.46.77
–> pppd: [0b][06][08][11][06][08]
–> secondary DNS address 202.155.0.10
–> pppd: [0b][06][08][11][06][08]

You’re basically done here. Oh yeah, it will modify your routing table, so in case you are trying this out, make sure you disconnect your wifi or ethernet connection before you do this, else it will not know which connection to use to connect to the internet. Press Ctrl+C to disconnect from the console.

Enjoy!