2013年7月26日 星期五

Asus Eee PC 1005PE w/ Android x86使用Bluetooth分享手機網路

很簡單,因為基本的profile都包了~~~
把手機藍芽網路分享打開,讓Eee PC跟手機透過藍芽連線~~~

在Eee PC開啟控制台視窗,輸入"netcfg"會看到bnep0,Bluetooth網路~~~
由於預設並沒有設定,所以不會獲得IP.

下"netcfg bnep0 dhcp",透由DHCP獲得位置,網路就可以用了~~~
不知道能不能用dhcpcd bnep0,應該來試試的 ><

但是Bluetooth網路並沒有設定DNS server,不認得yahoo、google等這些網址,
可以透由"getprop net.dns1"看看DNS的設定。
透由"setprop net.dns1 8.8.8.8"設定DNS。
瀏覽器就可以用Bluetooth上網了。

/sys/class/net/bnep0,在這裡可以看到有bnep0。

透由pand設定Bluetooth role。

Name
pand - BlueZ Bluetooth PAN daemon

Description
The pand (PAN daemon) allows your computer to connect to Ethernet networks using Bluetooth.
Synposis
pand <options>
Options
--show --list -l
   Show active PAN connections
--listen -s
   Listen for PAN connections
--connect -c <bdaddr>
   Create PAN connection
--search -Q[duration]
   Search and connect
--kill -k <bdaddr>
   Kill PAN connection
--killall -K
   Kill all PAN connections
--role -r <role>
   Local PAN role (PANU, NAP, GN)
--service -d <role>
   Remote PAN service (PANU, NAP, GN)
--ethernet -e <name>
   Network interface name
--device -i <bdaddr>
   Source bdaddr
--nosdp -D
   Disable SDP
--encrypt -E
   Enable encryption
--secure -S
   Secure connection
--master -M
   Become the master of a piconet
--nodetach -n
   Do not become a daemon
--persist -p[interval]
   Persist mode
--cache -C[valid]
   Cache addresses
--pidfile -P <pidfile>
   Create PID file
--devup -u <script>
   Script to run when interface comes up
--devdown -o <script>
   Script to run when interface comes down
--autozap -z
   Disconnect automatically on exit
Scripts
    The devup/devdown script will be called with bluetooth device as first argument and bluetooth destination address as second argument.

沒有留言:

張貼留言