Skip to Main Content

Embedded Technologies

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

J2ME Bluetooth problem.

843849Apr 24 2004 — edited Apr 25 2004
This piece of code will not do what I want it to do when running the Nokias Developer Suit emulator (or rather the last few lines won't). I have a client that is connected to this server. The client starts an OutputStream and runs a out.write(/*some data*/). There after the client camly continues to do something else but the the server code here just stops at in.read().

Can someone please tell me what I am doing wrong? I'm pretty desperate for help...

try
{
local.setDiscoverable(DiscoveryAgent.GIAC);

server = (StreamConnectionNotifier)Connector.open("btspp://localhost:0000ab234f234eef1243a123a098a745");


conn = server.acceptAndOpen();


}
catch(BluetoothStateException e)
{
}

try
{
InputStream is = conn.openInputStream();
int ch;
byte b[] = new byte[100]
ch = is.read(b);
}
catch(IOException e)
{
}
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 23 2004
Added on Apr 24 2004
1 comment
110 views