Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

BT RFCOMM question.

10 views
Skip to first unread message

Frank Vicious

unread,
Jan 24, 2005, 7:27:18 PM1/24/05
to
Hello everyone.

I am working on a BT project for my PDA that involves a custom BT service
that will allow connections to the PDA. I allocate the RFCOMM channel,
create the server COM port, and register the service, and open this COM port
to start waiting for connections. I then have a while loop that tests to
see if any data is availabe on the COM port. It just sits and waits if no
data is present.

I am using the Drakar BT API with my socket SD card. Here at my steps.

- I call DkAllocateRfcommChannel() that is called to assign the RFCOMM
channel identificaiton number that will be associated with the service
specificed by the GUID number.

- I then call DkCreateServerComPort() that creates a server-mode Bluetooth
virtual COM port.

- Then called DkRegisterSerivce() this function registers a custom RFCOMM
oriented service with the local SDP server. The GUID number of the service
is used to register the service. The RFCOMM channel number and handle to
the service are returned.

I start my application by creating this service and the device connects to
my PDA. The Bluetooth Device manager kicks in (putting my applications in
the background?) asking for the pin code and if I would like to save the
device and keep the bonding information. I try to click on the YES button
but nothing happens. The device manager screen just sits there and does not
not allow me to click and return to my program. I was expecting to be able
to return from this screen and continue with my application reading data
from the device. I have had problems in the past with MessageBoxs freezing
up and not
acting as expected. Is there some issues I am missing here?

It seems to be that I need to have my application running first before the
connection is made to be sure the right resources are used. (COM PORT,
RFCOMM channel, etc.) But if I do the pairing with the PDA device manager
with my application unloaded I am able to click through all the screens no
problem and save the device. This would be the best case to use a cached
connection for my service. But if I do it this way it won't sync up with
the resources that my applications will use? Or will it?

Examing the cached BT connection I can't seem to find the RFCOMM channel
that it is using. And if I use the cached connection has there been an
RFCOMM channel allocated for it yet?

Thanks for any info!

-Frank!


tharunm...@gmail.com

unread,
Mar 19, 2014, 10:45:16 AM3/19/14
to
Have you found soln to this ?
0 new messages