2009/11/18
Q5 用Android 1101 固件接駁藍芽手機上網
本篇的出現是因為日前在Q5上瞎搞華為E180時發現,1101版固件內有 BlueZ 及 PPPD 套件,其3G撥號底層也是運行 PPPD的。在搞定E180後、基本上我不需要用藍芽手機上網、但心想 3G USB Modem 並不是每位機友們都擁有的,反之我估計有藍芽手機的機友卻會有不少。於是為了廣大機友的福利、只有再次進行瞎搞,終於皇天不負苦心人,總算找到了方法、須然沒有漂亮的介面,但當設定好後、打幾個字就行,不會太難使用的。
溫馨提示
- 小弟只有 Nokia 5800 手機一隻,瞎搞出來的並不可能對應所有手機、所以其它手機有可能須要修改接駁腳本( Nokia S60 系統的藍芽手機應該沒有問題), 我只能盡力拹助。
- Android是一個重度使用網絡的操作系統,系統只要偵測到在線、就算放在一旁、也會有不少服務來存取網絡,這就會產生數據流量!所以各位機友請明白這點、以免令到我好心做壞事、白白令機友們損失金錢。
- 這篇是要有一定動手能力的機友才能完成的。
1.安裝終端機 connectbot
2.下載附件及解包
3.修改 bt-connect-chat 文檔中的預設接入點。(預設為 SmarTone-Vodafone)
4.在Android系統下把手機和Q5配對
5.Telnet 至 Q5
6.輸入下列命令
hcitool scan --class
輸出示範
Scanning ... BD Address: 00:25:CF:15:B8:7B [mode 1, clkoffset 0x0ab4] Device name: Nokia 5800 XpressMusic Device class: Phone, Smart phone (0x5a020c)
7.記下 BD Address再輸入下列命令。(把下方的 00:25:CF:15:B8:7B 替換成上面記下的 BD Address)
sdptool search --bdaddr 00:25:CF:15:B8:7B DUN
輸出示範
Searching for DUN on 00:25:CF:15:B8:7B ... Service Name: Dial-Up Networking Service RecHandle: 0x10009 Service Class ID List: "Dialup Networking" (0x1103) Protocol Descriptor List: "L2CAP" (0x0100) "RFCOMM" (0x0003) Channel: 22 Language Base Attr List: code_ISO639: 0x454e encoding: 0x6a base_offset: 0x100 Profile Descriptor List: "Dialup Networking" (0x1103) Version: 0x0100
記下 Channel: 之數目
8.修改 call 文檔,把文檔中的 BD Address(00:25:CF:15:B8:7B) 及 Channel(22) 替換成上面得到的。
9.把所有文檔複製到 SD卡的根目錄上
文本解說
call – 與手機建立聯機
drop – 與手機斷開聯機
test-bt – 測試聯機
bt-connet , bt-connect-chat – 聯機腳本
bt-install – 把各文件複製到相應目錄
10.用 ConnectBot 及使用 Telnet 拹議並連接至 localhost(成功連接後該看到#號)
11.輸入下列命令。
sh /sdcard/bt-install
測試聯機
12.閉關Q5的WiFi
13.運行終端機 ConnectBot
14.使用 Telnet 拹議並連接至 localhost(成功連接後該看到#號)
15.輸入下列命令進行測試
call test-bt drop
如 test-bt 結果正常、恭喜!你已成功! 否則請看下面的常見問題
test-bt 輸出示範
Display Routing Table ===================== Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 10.6.6.6 * 255.255.255.255 U 0 0 0 ppp0 default 10.6.6.6 0.0.0.0 UG 0 0 0 ppp0 Display Network =============== lo Link encapocal Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:16436 Metric: RX packets:97 errors:0 dropped:0 overruns:0 frame:0 TX packets:97 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:6384 (6.2 KiB) TX bytes:6384 (6.2 KiB ppp0 Link encapoint-to-Point Protocol inet addr:10.73.68.110 P-t-P:10.6.6.6 Mask:255.255.255.255 UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1 RX packets:4 errors:0 dropped:0 overruns:0 frame:0 TX packets:5 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:3 RX bytes:64 (64.0 B) TX bytes:97 (97.0 B) Ping IP Addtress ================ PING 122.70.144.125 (122.70.144.125) 56(84) bytes of data. 64 bytes from 122.70.144.125: icmp_seq=1 ttl=53 time=226 ms 64 bytes from 122.70.144.125: icmp_seq=2 ttl=53 time=240 ms --- 122.70.144.125 ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 2000ms rtt min/avg/max/mdev = 80.627/81.883/82.591/0.890 ms Ping Hostname ============= PING www.smartdevices.com.cn (122.70.144.125) 56(84) bytes of data. 64 bytes from 122.70.144.125: icmp_seq=1 ttl=115 time=83.8 ms 64 bytes from 122.70.144.125: icmp_seq=2 ttl=115 time=81.1 ms --- www.smartdevices.com.cn ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 3079ms rtt min/avg/max/mdev = 81.184/82.434/83.837/1.113 ms
test-bt 輸出解說
test-bt 測試分四部份
- Display Routing Table : 重點要有2行 ppp0出現, 如無 ppp0 則表示撥號失敗
- Display Network : 重點要有 ppp0 出現
- Ping IP Address : 使用 IP 測試連接, 重點要有 packets received
- Ping Host Name : 使用域名測試連接, 重點要有packets received
日常使用
- 打開 Q5 及手機的藍芽
- 關閉 Q5 的 WiFi
- 打開ConnectBot
- 使用 Telnet 拹議並連接至 localhost(成功連接後該看到#號)
- 輸入call 來進行聯機
- 使用後在ConnectBot 中輸入drop來斷開
Alekib said,
2009/12/05 at 9:59 pm
Hi, i tried your method but:
1) when i launch #sh call it returns me :bad variable name.
2) then i launch manually pppd call bt-connect
3) it returns: unrecognized option:”/dev/rfcomm0′
4) i list in dev dir and rfcomm0 is not present.
Can u help me? Thanks.
wsoft2002 said,
2009/12/07 at 11:42 pm
Hi Alekib,
Sorry for the late replay, I am busy in a GUI version in last few days. It ready for download at android.gval.biz, please feel free to give comments.
Wsoft
Alekib said,
2009/12/09 at 4:25 pm
HI!
Thanks for the replay…i have a problem with the download of Q5 Root Enabler:
Not Found
The requested URL /download/Q5_Root_Enabler.apk was not found on this server.
Pls can you fix this!!!
Thanks for your great job!! I will post it on several forum!
wsoft2002 said,
2009/12/09 at 5:08 pm
Hi Alekib, Problem fixed, please try again.
Alekib said,
2009/12/09 at 6:02 pm
All ok!!! All working!
Great job mate!
I want to suport you with a donation: howto???
wsoft2002 said,
2009/12/10 at 2:07 pm
It’s great to know they can work!! May I know which phone you are using?
About the donation, I have place a link on my website. I am greatly appreciated for your donation.
WSoft
Alekib said,
2009/12/10 at 4:14 pm
Hi.
I have a Nokia N78 with a H3G Italy.
All works great!!
Now my q5 with Android is a great device!
Thanks again!!
Cyrille (skin_CG) said,
2009/12/18 at 3:51 am
Congratulations for your hard and awesome work wsoft2002!!
Xié Xié!
roy said,
2010/01/08 at 11:48 pm
我也是用5800和smartQ5,哈哈,幸会幸会
风野 said,
2010/04/13 at 2:19 pm
我的是N78,配对、地址、频道、APN、以及拨号都调好了,连接时手机蓝牙图标显示连接中,但两秒后就消失了,几秒后V5显示连接失败。请问可能是什么原因呢?