You Are Here:

Community: Developer Discussion Boards

#1 Old Phone - PC connection problem - 2008-11-11, 19:44

Join Date: Nov 2008
Posts: 5
antonio206
Offline
Registered User
hi,

i'm using a USB bluetoothfor my PC, a phone and java.

i'm trying to build a bluetooth server in my pc to accept all connections (for now), but i can't have the client (phone) connected. The problem is that i'm having the program wait for a connection but when i have the client connected, it connects to the windows "handler" for bluetooth and my program keeps on waiting.

I already tried to search for devices and i can find them, just can't get the client to connect my program instead of windows.


this might be a little confusing, let me know if you didn't understand. I really need to understand this problem.

Thks, antonio
Reply With Quote

#2 Old Re: Phone - PC connection problem - 2008-11-13, 00:02

Join Date: Nov 2008
Posts: 5
antonio206
Offline
Registered User
since noone replied i'm going to try to explain better myself.

i have this code:

Code:
LocalDevice localdevice = LocalDevice.getLocalDevice();
DiscoveryAgent agente = localdevice.getDiscoveryAgent();
localdevice.setDiscoverable(DiscoveryAgent.GIAC)

...
initiate a service
...

conn = notifier.acceptAndOpen();
As expected the program blocks in the acceptAndOpen(). I search for the pc through by phone and find it and connect it. I'm asked for a password and enter it, then windows prompts me for a pass for the Bluetooth connection and my program stays blocked waiting.

The question is: how can i make the program recieve the connection and not windows it self ?
Reply With Quote

#3 Old 2008-11-16, 17:38

Join Date: Mar 2003
Posts: 2,617
traud
Offline
Super Contributor
Which UUID are you using? Is that UUID offered by another application on your computer already?
Reply With Quote

#4 Old Re: Phone - PC connection problem - 2008-11-17, 01:22

Join Date: Nov 2008
Posts: 5
antonio206
Offline
Registered User
i'm using 1105 for the push object,

Object Push OBEXObjectPush 4357 0x1105


How can i tell which UUID my pc is using?
Should i create my own service for push object?
Reply With Quote

#5 Old Re: Phone - PC connection problem - 2008-11-17, 13:44

Join Date: Nov 2008
Posts: 5
antonio206
Offline
Registered User
i tried changing UUID:

new UUID(0x1106) - file transfer works, the phone can find it and use it.

new UUID(0x1105) - object push isn't even found by the phone

btgoep://localhost:0000110500001000800000805f9b34fb;authenticate=false;master=true;encrypt=false;name=ObexExample

i'm using this url for the service.
Reply With Quote

#6 Old Re: Phone - PC connection problem - 2008-11-18, 19:02

Join Date: Nov 2008
Posts: 5
antonio206
Offline
Registered User
Problem Solved.

The url was in fact not being done correctly.
Reply With Quote

#7 Old 2008-11-19, 13:27

Join Date: Mar 2003
Posts: 2,617
traud
Offline
Super Contributor
Additinonally, do not forget to set the service bit (ServiceRecord.setDeviceServiceClasses) and to modify your service record accorinding its profile specification (ServiceRecord.setAttributeValue); otherwise some devices will not use your service: Wiki-entry …
Reply With Quote

#8 Old Re: Phone - PC connection problem - 2009-04-10, 16:20

Join Date: Apr 2009
Posts: 1
manish4edu
Offline
Registered User
i m using UUID as : String serverUUID=new UUID("9106",true).toString();

i didn't understand about servicerecord.setDeviceServiceClasses() and
servicerecord.setAttributeValue() methods. Means what parameter i have to send in these methods.
i m using following string as my connection to the server:
"btspp://localhost:" + serverUUID + ";name=BTTP" :
serverUUID is a string from first line above.

my pc server is not receiving any data. Although my mobile is able to find the service's URL of pc and able to connect to it. acceptAndOpen() is the line where my pc server is stucked.

please help me its very urgent for me.
Reply With Quote

#9 Old 2009-04-14, 21:23

Join Date: Mar 2003
Posts: 2,617
traud
Offline
Super Contributor
manish4edu, where is your code executed: On your PC or phone?
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
Problem in makeing Phone Call in 2nd edition yogesh.bhople General Symbian C++ 4 2006-11-18 09:47
detecting the phone connection to pc verlycious PC Suite API and PC Connectivity SDK 6 2006-09-11 22:57
PC Connection Problem with 6310 Nokia_Archived PC Suite API and PC Connectivity SDK 4 2002-06-18 21:07

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