I am working on a project on Android where I want to connect and communicate between my Android device and Wii Remote / Balance Board. I am currently trying to use the motej library and the bluecove library to accomplish this. I know that these two libraries can work together under Android to connect the device, because I have a test application that connects correctly (and can send data, I can make a remote hum and install or turn on any of the LEDs), but it unexpectedly closes the moment after the connection. I donโt know why its ending remains. I am very new to bluetooth development, so I thought that going along this route with libraries would make me work and work, not understanding how much this is connected to the connection. But since I am having some problems with my current test application, I begin to wonder if I should worry about these libraries at all, or if it can be effective for running the Android bluetooth API to connect and share devices. So my questions are:
- Is it possible to connect and send / receive data that I would need to get all the functionality of the remote wii under the standard Bluetooth Bluetooth API, or will I have to use something like the bluecove library that I have?
- If this can be done without a third-party bluetooth library, would I be better off changing something like the motej library to work with the Android Bluetooth API, rather than how it is happening now with javax.bluetooth? Or will it require so many changes that I could just drop it and start working on my own new library?
- Does anyone have any clues that could call me in the right direction to get this test application since I have it fixed now? My logging is lower, I do it through the connection, but after a second my application closes without a dialog with force closing or something else.
- Does anyone know of a library that aims to provide access to a remote Wii with bluetooth, which is actually built to work with Android instead of just java?
INFO / System.out (31264): found mount: 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
source share