Blackberry as USB Modem connect into internet wvdial on Ubuntu with Barry


I have Blackberry Bold 9800 and Ubuntu 11.10 Oneiric. Also, I have two of indonesian internet cards called “Telkomselflash” and “Indosat Broadband”. Now, I will introduce you how to make Blackberry Bold as USB Modem and connect into internet using Barry and PPPD.

First, you should install “Barry” packages in Ubuntu via apt-get or synaptic.

1
sudo apt-get install barry-util barrybackup-gui libbarry0

Then, you should plug your Blackberry via USB cable. Check if your Blackberry is detected by :

1
lsusb

For example:

1
Bus 002 Device 016: ID 0fca:8004 Research In Motion, Ltd. Blackberry Handheld

Then, you can detect your Blackberry devices (To avoid no devices detected / selected) using “btool”.

1
btool -l

And it should show result :

1
2
Blackberry devices found:
Device ID: 0x1x2xxxx. PIN: xxxxxxx, Description: RIM BlackBerry Device

Then, we should configure two items which we will inserting our internet provider username, password and APN.
Here are files we need to create / modify. In this example, I will create two files (bb and flash) which contains configuration for Telkomsel and Indosat Broadband.

1
2
3
4
sudo su
cd /etc/ppp/peers/
touch flash
touch bb

flash:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#
# Some of these options found documented at:
#    http://wiki.colar.net/tethering_with_blackberry_pearl_on_linux
#
# Others are based on the peer file in XmBlackBerry
#
# Please send all working peer files to cdfrey@foursquare.net, so we can
# build a library of peer files for different carriers.
#

connect "/usr/sbin/chat -f /etc/chatscripts/flash.chat"

#
# authentication options – no need for ISP to authenticate to us, but
#                          we may need a login here: user/password/name
#
noauth
user telkomsel
password telkomsel
name telkomsel

#
# handle the default route and DNS
#
#nodefaultroute
defaultroute
usepeerdns

#
# disable unsupported options
#
noipdefault
nodetach
#novj
nodeflate
nobsdcomp
noaccomp
#default-asyncmap
nocrtscts
nopcomp
nomagic

passive

#nomultilink
ipcp-restart 7
ipcp-accept-local
ipcp-accept-remote
# need lcp-echo turned off, at least for tmobile, otherwise c0onnectin
# disconnects after few mn of inactivity.
# thanks to loon for this info
lcp-echo-interval 0
lcp-echo-failure 999


#
# limit size of packets
#
mtu 1492

#
# operate in debug mode
#
debug
#debug debug debug

#
# call pppob for the USB link
#
pty "/usr/sbin/pppob -P1234"

#
# unused options
#

#modem
## refused anyway, no point in trying every time
#novj

bb:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#
# Some of these options found documented at:
#    http://wiki.colar.net/tethering_with_blackberry_pearl_on_linux
#
# Others are based on the peer file in XmBlackBerry
#
# Please send all working peer files to cdfrey@foursquare.net, so we can
# build a library of peer files for different carriers.
#

connect "/usr/sbin/chat -f /etc/chatscripts/bb.chat"
#
# authentication options – no need for ISP to authenticate to us, but
#                          we may need a login here: user/password/name
#
noauth
user indosat
password indosat
name indosat3g

#
# handle the default route and DNS
#
#nodefaultroute
defaultroute
usepeerdns

#
# disable unsupported options
#
noipdefault
nodetach
#novj
nodeflate
nobsdcomp
noaccomp
#default-asyncmap
nocrtscts
nopcomp
nomagic

passive

#nomultilink
ipcp-restart 7
ipcp-accept-local
ipcp-accept-remote
# need lcp-echo turned off, at least for tmobile, otherwise c0onnectin
# disconnects after few mn of inactivity.
# thanks to loon for this info
lcp-echo-interval 0
lcp-echo-failure 999


#
# limit size of packets
#
mtu 1492

#
# operate in debug mode
#
debug
#debug debug debug

#
# call pppob for the USB link
#
pty "/usr/sbin/pppob"

#
# unused options
#

#modem
## refused anyway, no point in trying every time
#novj

You will see that at near first line of files, it need another file. Eg :

1
2
3
connect "/usr/sbin/chat -f /etc/chatscripts/flash.chat"
….
connect "/usr/sbin/chat -f /etc/chatscripts/bb.chat"

So, we go to /etc/chatscripts and create file configuration for APN

1
2
3
cd /etc/chatscripts/
touch flash.chat
touch bb.chat

flash.chat

1
2
3
4
5
6
7
8
9
10
11
12
13
14
#
# This sample chat script was reported to the mailing list by Andy Herkey,
# for his Sprint provider.
#
# Please send all working peer files to cdfrey@foursquare.net, so we can
# build a library of peer files for different carriers.
#
ABORT ERROR
” AT&F
OK ATZ
OK ATI
OK ‘AT+CGDCONT=1,"ip","internet"’
OK ATDT*99#
CONNECT

bb.chat

1
2
3
4
5
6
7
8
9
10
11
12
13
14
#
# This sample chat script was reported to the mailing list by Andy Herkey,
# for his Sprint provider.
#
# Please send all working peer files to cdfrey@foursquare.net, so we can
# build a library of peer files for different carriers.
#
ABORT ERROR
” AT&F
OK ATZ
OK ATI
OK ‘AT+CGDCONT=1,"ip","indosat3g"’
OK ATDT*99#
CONNECT

There are custom configurations for APN and dial number which you can see :

1
2
OK ‘AT+CGDCONT=1,"ip","indosat3g"’
OK ATDT*99#

So, you can change it with your APN and dialed number.

Then, we just connect using PPPD and call it files, eg : “sudo pppd call

1
sudo pppd call flash

And it will give results for instance :

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Script /usr/sbin/chat -f /etc/chatscripts/flash.chat finished (pid 2542), status = 0x0
Serial connection established.
using channel 19
Using interface ppp1
Connect: ppp1 <–> /dev/pts/5
sent [LCP ConfReq id=0x1 <asyncmap 0x0>]
rcvd [LCP ConfReq id=0x0 <asyncmap 0x0> <auth pap>]
sent [LCP ConfAck id=0x0 <asyncmap 0x0> <auth pap>]
rcvd [LCP ConfAck id=0x1 <asyncmap 0x0>]
sent [PAP AuthReq id=0x1 user="telkomsel" password=<hidden>]
rcvd [PAP AuthAck id=0x1]
PAP authentication succeeded
sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
Received bad configure-nak:  02 06 00 2d 0f 01 81 06 00 00 00 00 83 06 00 00 00 00
sent [IPCP ConfReq id=0x64 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
rcvd [IPCP ConfRej id=0x64 <compress VJ 0f 01> <ms-dns2 0.0.0.0>]
sent [IPCP ConfReq id=0x65 <addr 0.0.0.0> <ms-dns1 0.0.0.0>]
rcvd [IPCP ConfNak id=0x65 <addr 39.209.46.174> <ms-dns1 192.168.39.28>]
sent [IPCP ConfReq id=0x66 <addr 39.209.46.174> <ms-dns1 192.168.39.28>]
rcvd [IPCP ConfAck id=0x66 <addr 39.209.46.174> <ms-dns1 192.168.39.28>]
not replacing existing default route through ppp0
local  IP address 39.209.46.174
remote IP address 169.254.1.1
primary   DNS address 192.168.39.28
Script /etc/ppp/ip-up started (pid 2552)
Script /etc/ppp/ip-up finished (pid 2552), status = 0x0

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.