Page 1 of 1

Bluetooth Problem Symbian s60 9.1 Edge_SDK_2_80

PostPosted: Oct 23, 2006 @ 1:08pm
by mimispa
Hello All

I’m trying to setup a listening server using Bluetooth on Symbian s60 9.1 (device Nokia N71).

The problem is that the client devices when they connecting to server (Nokia N71), they disconnecting immediately.

I tried two different devices as client, a)PC b)GPS
When I’m looking for Bluetooth services from the PC, I’m seeing Edge Serial Port (probably means that server is OK), but when I connect throw that service, the PC show me that is connecting and then immediately disconnect.

I read the tutorial from Edge (Connections and protocols) and I’m using the same code.
if (ecd.net[0]->Init(ECONN_BLUETOOTH, this) == E_OK)
{
if (!ecd.net[0]->SearchHost(NULL, 4))
return(false);
}
else
return(false);

I know from debugger that (ecd.net[0]->Init(ECONN_BLUETOOTH, this) == E_OK) return true and ecd.net[0]->SearchHost(NULL, 4) return true

Tutorial says that “When the server has been set up, a message is posted to the network message callback function” but I never take that message (ENET_RUNNINGSERVER)

Bluetooth is very important for me and my company because the project uses it. Please Help!
Thanks!

PostPosted: Oct 23, 2006 @ 1:25pm
by edge
Hi Mimispa,

The upcoming Edge 2.90 release will contain a number of enhancements and fixes in the Bluetooth API, including the fix of a problem when connecting with a Symbian 9.1 host. The upcoming release will also implement service searching, it will find other devices running an Edge server with the same application UID.

The release is scheduled for later this month.

PostPosted: Oct 23, 2006 @ 1:57pm
by mimispa
Thank you for your prompt reaction.
Once more I would like to underline the criticality of this feature for the completion of our project, so I would be grateful if there will be a solution as soon as possible.

PostPosted: Nov 6, 2006 @ 2:37pm
by edge

PostPosted: Nov 9, 2006 @ 11:44am
by mimispa
Hi Edge,

Sory, but the problem still excist!

Now with Edge 2.9 the bluetooth device is connecting to server (Nokia N71) but the event OnNetMessage never fire.

It's very strange but, all seems to be ok, except that event OnNetMessage never fire, so i can't control and read the bluetooth devices.

It's better than 2.8 but still can't read the bluetooth device. I don't know why!

I'm posting sample of the code, if you can help me please!

void ClassMain::openserver()
{
myserver.flag_server_running=false;
if (ecd.net[0]->Init(ECONN_BLUETOOTH, this) == E_OK)
{
myserver.flag_server_running=ecd.net[0]->SearchHost(NULL, 4);//I try with other doors (not only 4) but nothing happens
}
//Now flag_server_running is true
}

void ClassMain::OnNetMessage(long id, long msg, long bufsize, unsigned char *buffer)
{
//****** Never comes here, so myserver.flag_onnet_message always false
myserver.flag_onnet_message=true;
switch (msg){
case ENET_RUNNINGSERVER: //The server is running, accept clients
break;
case ENET_ADDCLIENT: //A client has been added, accept and add this client or refuse if there are too many
if (id == 0 || id > MAX_CLIENTS)
{ecd.net[0]->Disconnect((unsigned char)id);}
else
{myserver.clientscount++;}
break;
case ENET_CLOSEDSOCKET: //The connection has been terminated
myserver.clientscount--;
break;
case ENET_RECEIVEDATA: //Data is received, add the data to a stack and interpret messages
break;
}
}

Thanks!

PostPosted: Nov 9, 2006 @ 1:17pm
by edge
Hi mimispa,

The event isn't triggered because the virtual function isn't correctly overloaded. It needs an extra parameter see:
http://www.edgelib.com/index.php?node=169

You can also check the connect sample in the 2.90 SDK.

Let me know if this solved the problem.

PostPosted: Nov 9, 2006 @ 1:34pm
by mimispa
Upss,
Sorry I didn't see that!

I'll try it!

Sorry again!

PostPosted: Nov 10, 2006 @ 9:46am
by edge

PostPosted: Nov 10, 2006 @ 11:20am
by mimispa

PostPosted: Nov 13, 2006 @ 11:31am
by edge

PostPosted: Nov 13, 2006 @ 5:56pm
by mimispa
Hi Edge,

Sure, as soon as my work is over I would be glad to present it to you.

Currently I have finished the development for the Pocket PC, and soon (with your valuable help) I will be able to finish the Symbian S60 project.

When this is done, and have also developed the multilanguage functionality (because currently the menus are in Greek), I could send you also a demo of the navigation system.

I would appreciate a developer's "eye", and of course your opinion on the final project.

It is a privilige to work with a company that has such a good support like yours.

Thank you once again!

PostPosted: Nov 13, 2006 @ 7:42pm
by edge