一:s3c2440开发板通过蓝牙手机联网: [root@WEIYAN /]$ /etc/init.d/dbus start [root@WEIYAN /]$ /etc/init.d/bluetooth start
[root@WEIYAN /]$ hciconfig hci0 up [root@WEIYAN /]$ hciconfig hci0: Type: USB BD Address: 2C:3D:4F:04:10:60 ACL MTU: 339:6 SCO MTU: 180:1 UP RUNNING PSCAN ISCAN RX bytes:637 acl:0 sco:0 events:16 errors:0 TX bytes:60 acl:0 sco:0 commands:13 errors:0
扫描蓝牙设备 [root@WEIYAN /]$ hcitool scan Scanning ... 00:1D:28:27:F7:C8 2008.
[root@WEIYAN /]$ passkey-agent --default /usr/bin/bt-pin &
连接蓝牙手机 [root@WEIYAN /]$ rfcomm connect hci0 00:1D:28:27:F7:C8 7 &
利用蓝牙手机进行PPP拨号上网 [root@WEIYAN /]$ pppd call gprs Initializing modem Setting APN Dialing... Serial connection established. using channel 2 Using interface ppp0 Connect: ppp0 <--> /dev/rfcomm0 sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x76d171f4> <pcomp> <accomp>] rcvd [LCP ConfReq id=0x2 <auth chap MD5> <accomp> <pcomp> <asyncmap 0x0> <magic 0xca0427c4>] sent [LCP ConfAck id=0x2 <auth chap MD5> <accomp> <pcomp> <asyncmap 0x0> <magic 0xca0427c4>] rcvd [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0x76d171f4> <pcomp> <accomp>] rcvd [CHAP Challenge id=0x0 <c4ade27330a92ecf5c653aeb48e106c7f41d92636019debf8cd5eadb7851b6b7248d425390898eafbc459acba8c1>, name = "Kermit"] sent [CHAP Response id=0x0 <870e6184c4f1f1fd3336bc8e94a567ed>, name = "wap"] rcvd [CHAP Success id=0x0 "Congratulations!"] CHAP authentication succeeded: Congratulations! CHAP authentication succeeded sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 0.0.0.0>] rcvd [IPCP ConfReq id=0x1] sent [IPCP ConfNak id=0x1 <addr 0.0.0.0>] rcvd [IPCP ConfNak id=0x1 <addr 10.55.47.86>] sent [IPCP ConfReq id=0x2 <compress VJ 0f 01> <addr 10.55.47.86>] rcvd [IPCP ConfReq id=0x2] sent [IPCP ConfAck id=0x2] rcvd [IPCP ConfAck id=0x2 <compress VJ 0f 01> <addr 10.55.47.86>] Could not determine remote IP address: defaulting to 10.64.64.64 local IP address 10.55.47.86 remote IP address 10.64.64.64 login[496]: root login on 'pts/1'
查看ppp网络状态,连接正常 [root@WEIYAN /]$ ifconfig ppp0 ppp0 Link encap:Point-to-Point Protocol inet addr:10.55.42.248 P-t-P:10.64.64.64 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:4 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:3 RX bytes:34 (34.0 B) TX bytes:46 (46.0 B)
二:s3c2440开发板使用蓝牙互联,可与wince,xp互联
A: 作为主机,等待连接 [root@WEIYAN /]$ pand --listen --role NAP --master [root@WEIYAN /]$ ifconfig bnep0 192.168.2.11
B: 作为从机,主动连接 [root@WEIYAN /]$ pand --connect 2C:3D:4F:04:10:60 --role NAPU [root@WEIYAN /]$ ifconfig bnep0 192.168.2.22
ping测试 [root@WEIYAN /]$ ping 192.168.2.11 PING 192.168.2.11 (192.168.2.11): 56 data bytes 64 bytes from 192.168.2.11: seq=0 ttl=64 time=76.278 ms 64 bytes from 192.168.2.11: seq=1 ttl=64 time=38.562 ms 64 bytes from 192.168.2.11: seq=2 ttl=64 time=37.854 ms 64 bytes from 192.168.2.11: seq=3 ttl=64 time=38.241 ms ^C --- 192.168.2.11 ping statistics --- 4 packets transmitted, 4 packets received, 0% packet loss round-trip min/avg/max = 37.854/47.733/76.278 ms
tftp下载测试 [root@WEIYAN /]$ tftp -g -r u-boot.bin 192.168.2.11 [root@WEIYAN /]$ ll u-boot.bin -rw-r--r-- 1 root root 122776 Sep 1 14:32 u-boot.bin
相关链接:http://www.gzweiyan.com |