This site is no longer active and is available for archival purposes only. Registration and login is disabled.

Bluetooth Problem Symbian s60 9.1 Edge_SDK_2_80


Bluetooth Problem Symbian s60 9.1 Edge_SDK_2_80

Postby mimispa » Oct 23, 2006 @ 1:08pm

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!
mimispa
pm Member
 
Posts: 35
Joined: Sep 18, 2006 @ 11:20am
Location: Greece


Postby edge » Oct 23, 2006 @ 1:25pm

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.
EDGELIB: Cross-platform mobile development at your fingertips
http://www.edgelib.com
User avatar
edge
pm Member
 
Posts: 1180
Joined: Aug 22, 2005 @ 3:42pm
Location: The Netherlands


Postby mimispa » Oct 23, 2006 @ 1:57pm

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.
mimispa
pm Member
 
Posts: 35
Joined: Sep 18, 2006 @ 11:20am
Location: Greece


Postby edge » Nov 6, 2006 @ 2:37pm

EDGELIB: Cross-platform mobile development at your fingertips
http://www.edgelib.com
User avatar
edge
pm Member
 
Posts: 1180
Joined: Aug 22, 2005 @ 3:42pm
Location: The Netherlands


Postby mimispa » Nov 9, 2006 @ 11:44am

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!
mimispa
pm Member
 
Posts: 35
Joined: Sep 18, 2006 @ 11:20am
Location: Greece


Postby edge » Nov 9, 2006 @ 1:17pm

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.
EDGELIB: Cross-platform mobile development at your fingertips
http://www.edgelib.com
User avatar
edge
pm Member
 
Posts: 1180
Joined: Aug 22, 2005 @ 3:42pm
Location: The Netherlands


Postby mimispa » Nov 9, 2006 @ 1:34pm

Upss,
Sorry I didn't see that!

I'll try it!

Sorry again!
mimispa
pm Member
 
Posts: 35
Joined: Sep 18, 2006 @ 11:20am
Location: Greece


Postby edge » Nov 10, 2006 @ 9:46am

EDGELIB: Cross-platform mobile development at your fingertips
http://www.edgelib.com
User avatar
edge
pm Member
 
Posts: 1180
Joined: Aug 22, 2005 @ 3:42pm
Location: The Netherlands


Postby mimispa » Nov 10, 2006 @ 11:20am

mimispa
pm Member
 
Posts: 35
Joined: Sep 18, 2006 @ 11:20am
Location: Greece


Postby edge » Nov 13, 2006 @ 11:31am

EDGELIB: Cross-platform mobile development at your fingertips
http://www.edgelib.com
User avatar
edge
pm Member
 
Posts: 1180
Joined: Aug 22, 2005 @ 3:42pm
Location: The Netherlands


Postby mimispa » Nov 13, 2006 @ 5:56pm

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!
mimispa
pm Member
 
Posts: 35
Joined: Sep 18, 2006 @ 11:20am
Location: Greece


Postby edge » Nov 13, 2006 @ 7:42pm

EDGELIB: Cross-platform mobile development at your fingertips
http://www.edgelib.com
User avatar
edge
pm Member
 
Posts: 1180
Joined: Aug 22, 2005 @ 3:42pm
Location: The Netherlands


Return to EDGELIB


Sort


Forum Description

Powerful and affordable C++ middleware solution covering true multi-platform 2D, 3D and network features for Apple iPhone, Windows Mobile, Symbian S60, UIQ, Linux and Windows desktop.

Moderator:

edge

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

cron