Moderators: roger, 99jonathan, imaqine
charles12 wrote:Has anyone ever successfully paired the Droid with a brick running leJOS 0.8.5?

SpikeT wrote:I'm still wondering why it is so hard for droid OS to come up with a solution for their Bluetooth failure. It only works with just very few Bluetooth profiles and protocols. Maybe the Android itself wasn't completed yet.

charles12 wrote: Has anyone ever successfully paired the Droid with a brick running leJOS 0.8.5?
BTConnection btc = Bluetooth.waitForConnection(0, NXTConnection.RAW);
DataInputStream dis = btc.openDataInputStream();
DataOutputStream dos = btc.openDataOutputStream();
...
leftSpeed = dis.readInt();
rightSpeed = dis.readInt();
...
BluetoothAdapter btAdapter = BluetoothAdapter.getDefaultAdapter();
Set<BluetoothDevice> bondedDevices = btAdapter.getBondedDevices();
for (BluetoothDevice bluetoothDevice : bondedDevices)
{
if (bluetoothDevice.getName().equals("NXT")) {
nxtDevice = bluetoothDevice;
}
}
if (nxtDevice == null)
{
tStatus.setText("No paired NXT device found");
return;
}
try {
nxtBTsocket = nxtDevice.createRfcommSocketToServiceRecord(UUID.fromString("00001101-0000-1000-8000-00805F9B34FB"));
nxtBTsocket.connect();
nxtDos = new DataOutputStream(nxtBTsocket.getOutputStream());
tStatus.setText("Successfully connected to NXT");
} catch (IOException e) {
tStatus.setText("Connection to NXT failed");
...
}
...
nxtBTsocket = nxtDevice.createRfcommSocketToServiceRecord(UUID.fromString("00001101-0000-1000-8000-00805F9B34FB"));jawora wrote:Where did you get the UUID from?
esmetaman wrote:Hi,
I tested a original solution from shawn to connect from Nexus one to NXT brick with leJOS.
http://www.youtube.com/watch?v=7HDEMxQpc_s
If you like, I can send you the example.
Cheers
esmetaman wrote:Hi,
I tested a original solution from shawn to connect from Nexus one to NXT brick with leJOS.
http://www.youtube.com/watch?v=7HDEMxQpc_s
If you like, I can send you the example.
Cheers
ghoelzl wrote:I implemented the code in "NXTControl", an application to control the robot via the orientation sensor of the phone. There is also an Action-Button for doing other things than moving around. A video, instructions and source code can be found at http://sites.google.com/site/ghoelzl/nxtcontrolv2.
<activity android:name=".NXTControlAndroid"
android:label="@string/app_name"
android:screenOrientation="portrait">
Users browsing this forum: No registered users and 2 guests