Coder Social home page Coder Social logo

Comments (10)

GoogleCodeExporter avatar GoogleCodeExporter commented on August 16, 2024
I've written a sample class to demonstrate the issue. Just run this code with 
any sort of discoverable bluetooth 
device nearby on a Mac and you should get the error I mentioned above.

import javax.bluetooth.*;

public class BluetoothTest
{
    public static void main(String[] args) throws Exception
    {
        DiscoveryAgent agent = LocalDevice.getLocalDevice().getDiscoveryAgent();
        DiscoveryListener listener = new DiscoveryListener()
        {
            public void deviceDiscovered(RemoteDevice rDevice, DeviceClass dClass)
            {
                try
                {
                    System.out.println("Discovery");
                    System.out.println(rDevice.getFriendlyName(false));
                }
                catch(Exception e){e.printStackTrace();}
            }
            public void inquiryCompleted(int discType){System.out.println("Inquiry completed");}
            public void servicesDiscovered(int transID, ServiceRecord[] servRecord){}
            public void serviceSearchCompleted(int transID, int respCode){}
        };

        agent.startInquiry(DiscoveryAgent.GIAC, listener);
        Thread.currentThread().sleep(30000);
    }

}



Original comment by [email protected] on 30 Dec 2007 at 7:07

from bluecove.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 16, 2024
Hi ctta0s
 I run the last build bluecove-2.0.2-20071230.060228-70.jar and your test application
works fine. I used OS X 10.4.8

 I remember that I fixed this problem some time two weeks ago.
 Can you conform that you have a problem with the latest build on your OS version?

Vlad

Original comment by [email protected] on 31 Dec 2007 at 6:00

  • Changed state: Started
  • Added labels: OpSys-OSX

from bluecove.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 16, 2024
I ran it with the build you specified downloaded from 
http://www.pyx4me.com/maven2-
snapshot/net/sf/bluecove/bluecove/2.0.2-SNAPSHOT/

I got the same error:
BlueCove version 2.0.2-SNAPSHOT on mac
Discovery
javax.bluetooth.BluetoothStateException: Another inquiry already running
    at com.intel.bluetooth.BluetoothStackOSX.getRemoteDeviceFriendlyName(Native Method)
    at com.intel.bluetooth.RemoteDeviceHelper.getFriendlyName(RemoteDeviceHelper.java:211)
    at javax.bluetooth.RemoteDevice.getFriendlyName(RemoteDevice.java:131)
    at BluetoothTest$1.deviceDiscovered(BluetoothTest.java:15)
    at com.intel.bluetooth.BluetoothStackOSX.deviceDiscoveredCallback(BluetoothStackOSX.java:273)
    at com.intel.bluetooth.BluetoothStackOSX.runDeviceInquiryImpl(Native Method)
    at com.intel.bluetooth.BluetoothStackOSX.runDeviceInquiry(BluetoothStackOSX.java:250)
    at com.intel.bluetooth.DeviceInquiryThread.run(DeviceInquiryThread.java:82)
^CBlueCove stack shutdown completed

This is from the exact code I mentioned above. If it matters, the device it 
probably discovered was my cell 
phone.

Original comment by [email protected] on 31 Dec 2007 at 6:59

from bluecove.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 16, 2024
There are 74 different versions in this directory. Which version did you took?

Original comment by [email protected] on 31 Dec 2007 at 7:06

from bluecove.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 16, 2024
The most recent, bluecove-2.0.2-20071230.060228-70.jar.

Original comment by [email protected] on 31 Dec 2007 at 7:09

from bluecove.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 16, 2024
Ok try new build:
 bluecove-2.0.2-20071231.191639-71.jar

Original comment by [email protected] on 31 Dec 2007 at 7:18

from bluecove.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 16, 2024
Ignore last comment I see the problem

Original comment by [email protected] on 31 Dec 2007 at 7:53

from bluecove.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 16, 2024
Now I change the function getRemoteDeviceFriendlyName
Tested and works fine. I even used rDevice.getFriendlyName(true)

Use build bluecove-2.0.2-20080102.194747-73.jar and later.

Are you the one making WiiRemoteJ?

Original comment by [email protected] on 2 Jan 2008 at 7:51

  • Changed state: Fixed

from bluecove.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 16, 2024
Ah, it's working now thanks, though there is one bug. Pretty much every other 
time I try to connect, I get this 
error:
WARNING: Error, unexpected IO error.
java.io.IOException: Error sending data!
    at wiiremotej.WiiRemote.sendCommand(WiiRemote.java:503)
    at wiiremotej.WiiRemote.setInputReport(WiiRemote.java:764)
    at wiiremotej.WiiRemote.setInputReport(WiiRemote.java:770)
    at wiiremotej.WiiRemote.access$300(WiiRemote.java:60)
    at wiiremotej.WiiRemote$1.run(WiiRemote.java:318)
    at java.lang.Thread.run(Thread.java:613)
Caused by: java.io.IOException: Failed to write [0xe00002bc]
    at com.intel.bluetooth.BluetoothStackOSX.l2Send(Native Method)
    at com.intel.bluetooth.BluetoothL2CAPConnection.send(BluetoothL2CAPConnection.java:113)
    at wiiremotej.WiiRemote.sendCommand(WiiRemote.java:499)
    ... 5 more
Jan 2, 2008 4:10:46 PM wiiremotej.WiiRemote construct
FINER: Initialization complete.
java.io.IOException: Error sending data!
    at wiiremotej.WiiRemote.sendCommand(WiiRemote.java:503)
    at wiiremotej.WiiRemote.setInputReport(WiiRemote.java:764)
    at wiiremotej.WiiRemote.setInputReport(WiiRemote.java:770)
    at wiiremotej.WiiRemote.setAccelerometerEnabled(WiiRemote.java:1450)
    at WRLImpl.main(WRLImpl.java:137)
Caused by: java.io.IOException: Connection is closed
    at com.intel.bluetooth.BluetoothStackOSX.l2Send(Native Method)
    at com.intel.bluetooth.BluetoothL2CAPConnection.send(BluetoothL2CAPConnection.java:113)
    at wiiremotej.WiiRemote.sendCommand(WiiRemote.java:499)
    ... 4 more

It may have to do with the timing of the connection and whether or not it finds 
another device first, though 
I'm not sure.

P.S. Yes, I am the one making WiiRemoteJ. :)

Original comment by [email protected] on 3 Jan 2008 at 12:10

from bluecove.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 16, 2024
Hi Cha0s
 The problem with names solved? The bug closed.
 If you have a different problem contact me directly or open the new bug as
descriptive as you did before I will do my best to help and fix.

 I have BlueCove on OSX L2CAP connecting to two cell phones working fine for last 2
hours no problems. I don't have Wii to test the application with...

 Failed to write [0xe00002bc] == IOReturnError (A general error (0xe00002bc))
http://developer.apple.com/documentation/Darwin/Reference/IOKit/IOReturn/


Vlad 
[email protected]

Original comment by [email protected] on 3 Jan 2008 at 1:21

from bluecove.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.