ปัญหาบ้านผมมันอับจนสัญญาณครับถ้าวางโทรศัพท์หรือใช้งานที่ชั้นล่างมันแทบจะไม่มีสัญญาณเลยใครโทรหาก็
ติดบ้างไม่ติดบ้าง
ยิ่งจะใช้งานอินเตอร์เน็ตไม่ต้องพูดถึง แบบว่า มา ค้าง นิ่ง
แต่ดีอย่างไม่หลุดแฮะ ถ้าจะให้ OK มันต้องมาใช้งานที่ชั้นบนครับ
แถมมีแค่ AIS เจ้าเดียวด้วยค่ายอื่นไม่คิดจะมาลงทุนที่ แก่งหางแมว
บ้างเหรอ ตอนนี้ 3G (ไม่รู้ว่าจะชาติใหนหว่า) ยังไม่มา ใช้ EDGE
ไปพลางๆก่อนแบบว่าบ้านอยู่ในป่านะครับ
แต่ชีวิตมันต้องเคลื่อนที่ไปมาครับเลยคิดว่าจะทำ Internet Gateway
เพื่อให้ใช้งานที่ชั้นล่างได้ครับ
พอดีมีคอมพิวเตอร์เก่าอยู่และก็มี Bluetooth USB อยู่
แบบว่า
จะได้เอามือถือวางไว้ห่างจาก คอมพิวเตอร์ได้ครับ วิ่งหาสัญญาณ
โอ้รันทด
ผมทำตาม Link นี้ครับ
https://help.ubuntu.com/community/BluetoothDialup
แต่ปรับแต่งไปตามสถานการณ์
ฺUbuntu BlueTooth Issue Link
http://blog.projectnibble.org/2010/08/08/how-ubuntus-broken-bluetooth-support-came-to-be/
ขั้นแรกลง Ubuntu Server 10.04 ครับเครื่องมันเก่าถ้าลง Desktop
ไม่ไหวแน่
#ติดตั้ง BlueTooth Tool และ Dialup Package
manop@acomm:~$ sudo aptitude install bluez-utils ppp
<--- bluez-pin ตาม Link ใน Ubuntu 10.04 ไม่มี Package
นี้แล้ว
#เสียบ Bluetooth USB เข้าำไป มันจะ detect ให้
manop@acomm:~$ lsusb
Bus 001 Device 002: ID 050d:0121 Belkin Components F5D5050 100Mbps
Ethernet <--- เจอครับแต่มันบอกผิด
ตอนแรกก็งงแต่ทำตามไปมันก็ได้
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
#Listing Bluetooth devices
#เปิดbluetoothที่โทรศัพท์ของผม Nokia 5800 XpressMusic
ครับ
manop@acomm:~$ hcitool scan
Scanning ...
00:00:00:00:00:00
NAMEPHONE <--- หาโทรศัพท์เจอ ได้ MAC Address
จดเอาไว้
#Pairing <--- ผมทำไม่ผ่าน bluez-pin
ไม่มี
#Configuring the rfcomm device
manop@acomm:~$ sdptool search DUN
Inquiring ...
Searching for DUN on 00:00:00:00:00:00 ...
Service Name: Dial-Up Networking
Service RecHandle: 0x10012
Service Class ID List:
"Dialup Networking" (0x1103)
Protocol Descriptor List:
"L2CAP" (0x0100)
"RFCOMM" (0x0003)
Channel:
20
<--- จดไว้
Language Base Attr List:
code_ISO639: 0x454e
encoding: 0x6a
base_offset: 0x100
Profile Descriptor List:
"Dialup Networking" (0x1103)
Version: 0x0100
#แก้ไข /etc/bluetooth/rfcomm.conf
manop@acomm:~$ sudo vim /etc/bluetooth/rfcomm.conf
rfcomm0 {
# Automatically bind the
device at startup
bind yes;
# Bluetooth address of
the device
device
00:00:00:00:00:00; <--- MAC Address โทรศัพท์ ี่จดไว้
# RFCOMM channel for the
connection
channel 20;
<--- channel ที่จดไว้
# Description of the
connection
comment "Nokia 5800
XpressMusic Bluetooth PPP";
}
manop@acomm:~$ sudo /etc/init.d/bluetooth restart
#Configuring PPP
manop@acomm:~$ sudo vim /etc/ppp/peers/BluetoothDialup
debug
noauth
connect "/usr/sbin/chat -v -f /etc/chatscripts/BluetoothDialup"
usepeerdns
/dev/rfcomm0 115200
defaultroute
replacedefaultroute
crtscts
lcp-echo-failure 0
manop@acomm:~$ sudo vim /etc/chatscripts/BluetoothDialup
TIMEOUT 35
ECHO ON
ABORT '\nBUSY\r'
ABORT '\nERROR\r'
ABORT '\nNO ANSWER\r'
ABORT '\nNO CARRIER\r'
ABORT '\nNO DIALTONE\r'
ABORT '\nRINGING\r\n\r\nRINGING\r'
'' \rAT
OK
'AT+CGDCONT=2,"IP","AIS-GPRS-2.Internet"' <---
AIS-GPRS-2.Internet คือ ชื่อ Access Point ในโทรศัพท์
OK ATD*99#
CONNECT ""
#เพิ่ม iface hci0 inet static ใน
/etc/network/interfaces
manop@acomm:~$ sudo /etc/init.d/networing restart
#Script เวลาจะใช้งาน
manop@acomm:~$ vim ~/bdial
bluetooth-agent 11111 & <--- 11111 คือ PIN
ที่ใช้ Pairing กับโทรศัพท์
rfcomm bind 0 00:00:00:00:00:00 20 <--- MAC Address
และ Chanel
pon BluetoothDialup
route add -net 0.0.0.0 dev ppp0
#ทำให้ script execute ได้
manop@acomm:~$ chmod +x ~/bdial
#Script เวลาวางสาย
vim ~/bhangup
poff BluetoothDialup
#ทำให้ script execute ได้
manop@acomm:~$ chmod +x ~/bhangup
#เวลาจะใช้งานก็
manop@acomm:~$ sudo bdial
#ทดสอบว่าต่อติด
manop@acomm:~$ ifconfig
ppp0 Link encap:Point-to-Point
Protocol
inet
addr:10.31.45.167 P-t-P:10.6.6.6
Mask:255.255.255.255
UP
POINTOPOINT RUNNING NOARP MULTICAST MTU:1500
Metric:1
RX
packets:1147 errors:0 dropped:0 overruns:0 frame:0
TX
packets:1265 errors:0 dropped:0 overruns:0 carrier:0
collisions:0
txqueuelen:3
RX
bytes:1032124 (1.0 MB) TX bytes:195656 (195.6 KB)
#Check Default Gateway
manop@acomm:~/bin$ route -n
Kernel IP routing table
Destination
Gateway
Genmask Flags
Metric Ref Use Iface
10.6.6.6
0.0.0.0
255.255.255.255 UH
0
0 0 ppp0
192.168.0.0
0.0.0.0
255.255.255.0 U
0
0 0 eth0
0.0.0.0
0.0.0.0
0.0.0.0
U 0
0 0 ppp0
#วางสาย
manop@acomm:~$ sudo bhangup
ตอนนี้ Server ต่อติดแล้วขั้นต่อไปก็เรื่อง Proxy,NAT
แล้วค่อยว่ากันครับ ขำๆ
นายเทิ่ง
ไม่มีความเห็น