Welcome, Guest. Please login or register.

Login with username, password and session length
February 04, 2012, 10:24:26 PM
Pages: [1]
  Print  
Topic: Connetion without agent.startInquiry()  (Read 2078 times)
« on: September 09, 2008, 11:04:20 AM »
BelZi
Newbie

View Profile
*
Karma: +0/-0
Posts: 2



Hi all,

I wana to connect to a Bluetooth device without making an startInquiry() because i already know the addresse of the remote Device 00164188CD2B, so how can i instantiate this constructor knowing that it's a protected one.

protected RemoteDevice(java.lang.String address)

Regards
Ziad
Logged
« Reply #1 on: April 30, 2009, 04:18:43 PM »
cookdav
Newbie

View Profile
*
Karma: +0/-0
Posts: 5



[Yeah, this is old, but I just like answering anyway...maybe it'll
help someone...even me.]

I'd say that you haven't really looked at (studied) the APIs, based
on your question.  My take on the APIs is that they designed 'services'
to be connected to...you don't really 'want to' connect to the device...
rather you want to connect to one of probably MANY services.

If you do a 'browse' of a device such as your paired cellphone,
using Linux's 'sdptool', you're gonna see that the cellphone is
offering at least half-a-dozen different services, and it's ONE
of those services that you want to 'inquire' about and then connect
to.

And, consider a tool such as 'Bitpim', which knows what service type
it wants to connect to (I'm guessing it's using 'Object-push' or 'obex' svc
or maybe 'ftp' svc?) and then it can carry out various transactions which
transfer info from/to the cellphone.

You can use an inquiry (once) to get it to construct the service URL
that you need to use, and then just connect using that URL, which sounds
closest to what you are wanting to do.

Hope this helps...I'm just shooting from the hip a bit here.
Logged
« Reply #2 on: May 02, 2009, 01:16:38 AM »
itisravi
Newbie

View Profile
*
Karma: +0/-0
Posts: 4




My take on the APIs is that they designed 'services'
to be connected to...you don't really 'want to' connect to the device...
rather you want to connect to one of probably MANY services.
 

I have some doubts:
1.My mobile phone is already paired with my PC. I ran a SPP host service on my PC ("btspp://localhost:" + new UUID(1101) + ";name=PCServerCOMM").But when i scan for my PC's services using my mobile, it is not able to discover the above service.What could be the issue? However,  i ran a client service on another PC which was able to detect the server without any problem.

2.When we create a service, does it not need to be bound to a device? What i mean is when i create a SPP service, how come a virtual COM port is not created on my PC (as seen in WinXP's device manager)?

« Last Edit: May 02, 2009, 01:21:59 AM by itisravi » Logged
 
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC