newton板已出版。下面再组织我调试的一小方面,,蓝牙功能的实现和测试:
转载请注明出处:http://blog.csdn.net/wang_zheng_kai
以下是我写的newton开发板中bluetooth阅读文档README的一部分。
3.2. Bluetooth Function Test 141 142 1)View the Bluetooth MAC address and device names:hcitool dev 143 144 eg: 145 146 [root@Ingenic /]# hcitool dev 147 Devices: 148 hci0 11:11:11:11:11:11 149 150 2)View the Bluetooth device (detailed) information:hciconfig 151 152 eg: 153 154 [root@Ingenic /]# hciconfig 155 hci0: Type: BR/EDR Bus: UART 156 BD Address: 43:34:1B:00:00:00 ACL MTU: 1021:8 SCO MTU: 64:1 157 DOWN 158 RX bytes:2582 acl:0 sco:0 events:80 errors:0 159 TX bytes:1651 acl:0 sco:0 commands:80 errors:0 160 161 /*Note: If you want to get detailed information , Please execute the following command:*/ 162 163 [root@Ingenic /]# hciconfig -a 164 165 3)Active Bluetooth Device:hciconfig hci0 up 166 167 eg: 168 169 [root@Ingenic /]# hciconfig 170 hci0: Type: BR/EDR Bus: UART 171 BD Address: 43:34:1B:00:00:00 ACL MTU: 1021:8 SCO MTU: 64:1 172 UP RUNNING PSCAN 173 RX bytes:3444 acl:0 sco:0 events:114 errors:0 174 TX bytes:2327 acl:0 sco:0 commands:114 errors:0 176 4)Scan for nearby Bluetooth devices: hcitool scan 177 178 eg: 179 180 [root@Ingenic /]# hcitool scan 181 Scanning ... 182 B8:FF:FE:59:C4:F8 MB525 183 78:CA:04:81:74:6F Nokia C5-00 184 49:F2:1C:4E:66:12 zkwang-00 186 5)View services that the local Bluetooth device supported:sdptool browse local 187 View sercices that other Bluetooth devices supported:sdptool browse xx:xx:xx:xx:xx:xx 188 189 /*Note: xx:xx:xx:xx:xx:xx is the MAC Address of target Bluetooth device.*/ 190 191 eg: 192 193 [root@Ingenic /]# sdptool browse 78:CA:04:81:74:6F 194 195 /*Note: Now you can get the services and Channel information of "Nokia C5-00".*/ 196
版权声明:本文博客原创文章,博客,未经同意,不得转载。