我正在开发一个Android项目,我希望在我的Android设备和Wii远程/平衡板之间进行连接和通信。目前,我正在尝试使用motej library和bluecove library来完成此任务。我知道这两个库可以在Android下面一起工作以连接设备,因为我有一个正确连接的测试应用程序设置(并且可以发送数据,我可以使远程隆隆声和任何LED开启或关闭)但在连接完成后意外关闭片刻。我不知道为什么会这样结束呢。我对蓝牙开发非常陌生,所以我认为使用这些库可以让我开始运行,而无需了解关于连接的细节。但是由于我当前的测试应用程序遇到了一些问题,我开始怀疑我是否应该甚至打扰这些库,或者它是否可以在Android蓝牙API下工作以使设备连接和通信。所以我的问题是:
INFO / System.out(31264):发现微尘:00191D652A6B
INFO/WiiMoteTest1(31264): 00191D652A6B
WARN/System.err(31264): 14821 [DeviceInquiryThread-0] INFO motej.MoteFinder - found device: TOSHIBA-USER - 00037AB338F7 - 256:12 - 1835008
ERROR/BluetoothEventLoop.cpp(9154): event_filter: Received signal org.bluez.Adapter:DeviceFound from /org/bluez/30823/hci0
DEBUG/BluetoothService(9154): updateDeviceServiceChannelCache(00:03:7A:B3:38:F7)
ERROR/BluetoothEventLoop.cpp(9154): event_filter: Received signal org.bluez.Adapter:DeviceFound from /org/bluez/30823/hci0
DEBUG/BluetoothService(9154): updateDeviceServiceChannelCache(00:03:7A:B3:38:F7)
WARN/System.err(31264): 17470 [DeviceInquiryThread-0] INFO motej.MoteFinder - inquiry completed
DEBUG/dalvikvm(30209): GC_EXPLICIT freed 93 objects / 4464 bytes in 80ms
DEBUG/dalvikvm(31264): Debugger has detached; object registry had 0 entries
WARN/dalvikvm(31264): ReferenceTable overflow (max=512)
WARN/dalvikvm(31264): Last 10 entries in JNI local reference table:
WARN/dalvikvm(31264): 502: 0x44d3a8b8 cls=Ljava/lang/Class; 'Lcom/intel/bluetooth/BluetoothStackBlueZ;' (164 bytes)
WARN/dalvikvm(31264): 503: 0x44d3a8b8 cls=Ljava/lang/Class; 'Lcom/intel/bluetooth/BluetoothStackBlueZ;' (164 bytes)
WARN/dalvikvm(31264): 504: 0x44d3a8b8 cls=Ljava/lang/Class; 'Lcom/intel/bluetooth/BluetoothStackBlueZ;' (164 bytes)
WARN/dalvikvm(31264): 505: 0x44d3a8b8 cls=Ljava/lang/Class; 'Lcom/intel/bluetooth/BluetoothStackBlueZ;' (164 bytes)
WARN/dalvikvm(31264): 506: 0x44d3a8b8 cls=Ljava/lang/Class; 'Lcom/intel/bluetooth/BluetoothStackBlueZ;' (164 bytes)
WARN/dalvikvm(31264): 507: 0x44d3a8b8 cls=Ljava/lang/Class; 'Lcom/intel/bluetooth/BluetoothStackBlueZ;' (164 bytes)
WARN/dalvikvm(31264): 508: 0x44d3a8b8 cls=Ljava/lang/Class; 'Lcom/intel/bluetooth/BluetoothStackBlueZ;' (164 bytes)
WARN/dalvikvm(31264): 509: 0x44d3a8b8 cls=Ljava/lang/Class; 'Lcom/intel/bluetooth/BluetoothStackBlueZ;' (164 bytes)
WARN/dalvikvm(31264): 510: 0x44d3a8b8 cls=Ljava/lang/Class; 'Lcom/intel/bluetooth/BluetoothStackBlueZ;' (164 bytes)
WARN/dalvikvm(31264): 511: 0x44d3a8b8 cls=Ljava/lang/Class; 'Lcom/intel/bluetooth/BluetoothStackBlueZ;' (164 bytes)
WARN/dalvikvm(31264): JNI local reference table summary (512 entries):
WARN/dalvikvm(31264): 512 of Ljava/lang/Class; 164B (1 unique)
WARN/dalvikvm(31264): Memory held directly by tracked refs is 164 bytes
ERROR/dalvikvm(31264): Failed adding to JNI local ref table (has 512 entries)
INFO/dalvikvm(31264): "in:00191D652A6B" prio=5 tid=12 RUNNABLE
INFO/dalvikvm(31264): | group="main" sCount=0 dsCount=0 s=N obj=0x44d59738 self=0x2501b8
INFO/dalvikvm(31264): | sysTid=31283 nice=0 sched=0/0 cgrp=default handle=2425592
INFO/dalvikvm(31264): | schedstat=( 49835206 61798099 541 )
INFO/dalvikvm(31264): at com.intel.bluetooth.BluetoothStackBlueZ.l2Receive(Native Method)
INFO/dalvikvm(31264): at com.intel.bluetooth.BluetoothL2CAPConnection.receive(BluetoothL2CAPConnection.java:117)
INFO/dalvikvm(31264): at motej.IncomingThread.run(IncomingThread.java:260)
ERROR/dalvikvm(31264): VM aborting