You Are Here:

Community: Developer Discussion Boards

#1 Old 6230, I close the connector next time midlet is started device not found anymore - 2006-09-19, 17:21

Join Date: Sep 2006
Posts: 3
olepogam
Offline
Registered User
Hi,

I have a weird problem !

My MIDlet does a device / service inquiry. I can exit / run the midlet several times the device / service search still works fine (my devices are found, and the service I expose too).

However, once I have made a connection to the server in my midlet (a linux BlueZ one), closed both data streams (datainput / dataoutput) and closed the connector itself, if I exit the midlet and restart it, the device I was connected to does not appear in the list of devices anymore (even in CACHED and PREKNOWN).

Do you think it's a problem when reading the CACHED, or the connection still active even if closed all ? (I've noticed that restarting my Linux box solves the issue, next time I start the MIDlet I can see the device again)

Can anybody help me ? If you need more details I will provide you with some code.

Thanks a lot,
Oli
Reply With Quote

#2 Old Re: 6230, I close the connector next time midlet is started device not found anymore - 2006-09-25, 18:25

Join Date: May 2006
Posts: 6
edazcnokia
Offline
Registered User
Hi.
Your problem is obviously outside your midlet. If you fix it restarting the server application then you could try restarting the service instead. I mean close streams and connection in the server, then call Connector.Open and AcceptAndOpen again. This should work.

With BlueZ I had a similar problem (only one connection was possible) that was suppossed to be fixed by closing everything and calling AcceptAndOpen again (this is, publishing the service in the SDDB again), but not... I had to re-create the service for every new connection needed using Connector.Open function.

Edazc
Reply With Quote

#3 Old Re: 6230, I close the connector next time midlet is started device not found anymore - 2006-09-26, 16:59

Join Date: Sep 2006
Posts: 3
olepogam
Offline
Registered User
Hi,

Thanks a lot for your answer. So in your opinion, the problem is in my BlueZ server linux box which is not stopping the connection even when the MIDlet is closed ?

I have tried :
- To kill the server GNU C server and to restart it
- To kill the server, remove the service with sdptool and relaunch the server

Both have not worked.

It has only worked (if I remember correctly) when I have stopped / restarted the device (the bluetooth key) using hciconfig ... This is a worrying solution !!

Could you please tell me how you managed this ??

Thanks a lot,
Oli
Reply With Quote

#4 Old Unhappy Re: 6230, I close the connector next time midlet is started device not found anymore - 2006-10-03, 22:54

Join Date: May 2006
Posts: 6
edazcnokia
Offline
Registered User
Hello. I forgot to tell u that I'm not working directly with BlueZ, but with Avetana JSR-82 libraries which in turn call BlueZ functions. So I speak Java :-).

Quote:
Originally Posted by olepogam
So in your opinion, the problem is in my BlueZ server linux box which is not stopping the connection even when the MIDlet is closed ?
Yes.


Quote:
Originally Posted by olepogam
I have tried :
- To kill the server GNU C server and to restart it
- To kill the server, remove the service with sdptool and relaunch the server
I would expect the second option works, since it is equivalent to my solution in Java, when I re-create the notifier using connector.open().

Restarting the device is not a good solution for me either, since this would not allow for concurrent connections, there must be something else. I suggest you to provide some source code of your server, this perhaps helps me or some of our friends in this forum find the solution to the only-one-connection problem.
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump
Similar Threads
Thread Thread Starter Forum Replies Last Post
FAQ (General issues) for Java discussion boards - read this before posting hartti Mobile Java General 2 2007-02-06 16:16
Bluetooth Security: What exactly is an untrusted device? rahulmcs Bluetooth Technology 1 2005-12-02 07:26
Installed MIDlet is disabled on 6230i, but enabled on 6230 ieising Mobile Java Tools & SDKs 2 2005-08-23 19:27
Is it possible to make a MIDlet close faster? Krunoi Mobile Java General 0 2003-10-12 20:32
can not successfully link any sample using .NET lobotomat Symbian Tools & SDKs 2 2002-08-20 01:29

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia