IOException: Can't create Service [General fail]

293 views
Skip to first unread message

Felipe Somolinos

unread,
Sep 5, 2008, 3:30:21 PM9/5/08
to bluecov...@googlegroups.com
Hi,

I am trying to implement this following little example:

public class EchoServer {
   
    public static void main(String args[]) {
        try {
           
            LocalDevice.getLocalDevice().setDiscoverable(DiscoveryAgent.GIAC);
           
            // 001583B3D0CC
           
            StreamConnectionNotifier notifier = (StreamConnectionNotifier) Connector
                    .open("btspp://localhost:1231242432434AAAABB;name=EchoServer");
           
            displayConnectionString(notifier);

            while(true) {
                StreamConnection conn = notifier.acceptAndOpen();
                OutputStream output = conn.openOutputStream();
                InputStream input = conn.openInputStream();

                byte[] data = new byte[10];
                int length = 0;
                while ((length = input.read(data)) != -1) {
                    System.out.println(new String(data, 0, length));
                    output.write(data, 0, length);
                    output.flush();
                }

                output.close();
                input.close();
                conn.close();
            }

        } catch (IOException e) {
            System.out.println("IOException: " + e.getMessage());
            e.printStackTrace();
        }

    }

    private static void displayConnectionString(StreamConnectionNotifier notifier) {
        try {
            LocalDevice device = LocalDevice.getLocalDevice();
            ServiceRecord record = device.getRecord(notifier);
            String connString = record.getConnectionURL(ServiceRecord.NOAUTHENTICATE_NOENCRYPT, false);
            int index = connString.indexOf(';');
            connString = connString.substring(0, index);
            // Display the connection string on the Form
            System.out.println("Connection String: " + connString);
        } catch (BluetoothStateException e) {
            System.out.println("BluetoothStateException: " + e.getMessage());
        }
    }
}

However, it keeps throwing an error at the line
StreamConnectionNotifier notifier = (StreamConnectionNotifier) Connector.open("btspp://localhost:1231242432434AAAABB;name=EchoServer");

Follows the error:
BlueCove version 2.0.3 on bluesoleil
IOException: Can't create Service [General fail]
java.io.IOException: Can't create Service [General fail]
    at com.intel.bluetooth.BluetoothStackBlueSoleil.rfServerOpenImpl(Native Method)
    at com.intel.bluetooth.BluetoothStackBlueSoleil.rfServerOpen(BluetoothStackBlueSoleil.java:367)
    at com.intel.bluetooth.BluetoothRFCommConnectionNotifier.<init>(BluetoothRFCommConnectionNotifier.java:39)
    at com.intel.bluetooth.MicroeditionConnector.openImpl(MicroeditionConnector.java:383)
    at com.intel.bluetooth.MicroeditionConnector.open(MicroeditionConnector.java:163)
    at javax.microedition.io.Connector.open(Connector.java:81)
    at com.jabwt.book.EchoServer.main(EchoServer.java:25)

This "General fail" doesn´t means anything for me. Could anyone help me with this?

Thanks.
--
Felipe Gabriel Somolinos Fernandes
--------------------------------------------------------------------
http://www.mjv.com.br
http://www.maino-geosistemas.com
21 8869-1782
Skype: felipe.somolinos

Vlad Skarzhevskyy

unread,
Sep 5, 2008, 3:51:42 PM9/5/08
to bluecov...@googlegroups.com
New version of bluesolei do not have compatible API for version 2 used
to create bluecove
Even so bluecove may work some time on versions 3 and 5 of bluesolei software

Felipe Somolinos

unread,
Sep 5, 2008, 4:08:41 PM9/5/08
to bluecov...@googlegroups.com
Wow!!! Thanks. I would never notice it.

Felipe Somolinos

unread,
Sep 5, 2008, 4:16:10 PM9/5/08
to bluecov...@googlegroups.com
Sorry Vlad, but I haven´t noticed this specification anywhere at www.bluecove.org. How can I find this information? I have already seen loads of bluecove users with the same issue on foruns and I think that is a so much valuable piece of information to not being visible to the users.

Thanks.

Vlad Skarzhevskyy

unread,
Sep 5, 2008, 4:20:07 PM9/5/08
to bluecov...@googlegroups.com
http://code.google.com/p/bluecove/wiki/stacks

On Fri, Sep 5, 2008 at 4:16 PM, Felipe Somolinos
--
Vlad

Vlad Skarzhevskyy

unread,
Sep 5, 2008, 4:22:13 PM9/5/08
to bluecov...@googlegroups.com
Also I'm very bad at wring the documentation! Suggest improvements
corrections and so on...

And There is public Wiki http://bluecove.wiki.sourceforge.net/ So
anybody can contribute his knowledge.

Felipe Somolinos

unread,
Sep 5, 2008, 4:51:37 PM9/5/08
to bluecov...@googlegroups.com
Excelent Vlad! I´ll go there.

But I leave here my suggestion of a highlight to this stacks question.

Even with the bluecove wiki on sourceforge, the documentation at the project site is the main source of information to the users. And I didn´t know about this sourceforge wiki. You could link it on the official documentation with a link like "Community Documentation". I think it would be much more useful.

Thanks for your attention.

Vlad Skarzhevskyy

unread,
Sep 5, 2008, 4:55:29 PM9/5/08
to bluecov...@googlegroups.com
There are already link from http://code.google.com/p/bluecove/ in Links
I should update the http://www.bluecove.org/ as well... But there are
so many stuff TODO.

Anyway I'm living for 3 weeks vacation. So don't expect any answers
from me until October.
--
Vlad

Felipe Somolinos

unread,
Sep 6, 2008, 6:56:21 AM9/6/08
to bluecov...@googlegroups.com
The IVT dongle doesn´t work with BlueSoleil stack version 3.2.2.8 as assigned at Bluecove documentation. It only worked with version 2.3.
I had to downgrade from stack 6.* to 2.3 testing each one of the BlueSoleil stack´s versions. I think that it would be excelent if this was updated on the documentation.

Thanks.

Vlad Skarzhevskyy

unread,
Sep 29, 2008, 7:45:00 AM9/29/08
to bluecov...@googlegroups.com
The problem is that is was working for me! And I tested the code on
version 3 of IVT stack!
Vlad
Reply all
Reply to author
Forward
0 new messages