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