federico.caselli
Posts: 11
Joined: Tue Mar 28, 2006 9:41 pm
Location: Italy

Both Microsoft and Broadcomm drv really?

Tue Mar 28, 2006 9:58 pm

Hi,

I've just noticed about this product, I still have to test it. I'm working on a desktop application for XP sp2.
Sorry if I bore you, but I'd need to make some question before I begin:

-can I really develop without worrying about the stack installed by the future user? All without buying the Broadcom/Widcomm dev tool? If yes, can BlueTools do everything Broadcom dev tool does? So there's no need to buy Broadcom dev tool at all?

-can I, for example, connect to a remote device (i'm using spp), creating a virtual comm and wait for the Received event in a secondary thread (a feature I'm already using through a simple RS232 API wrapper)? Or can I retrieve the number of virtual port created by BlueTools objects?

Not sure I've been clear enough... In this case please let me know!

Thank you very much.

Bye

User avatar
johan
GpsGate
Posts: 15407
Joined: Wed Aug 04, 2004 10:40 pm
Location: Sweden
Contact: Website

RE: Both Microsoft and Broadcomm drv really?

Tue Mar 28, 2006 10:35 pm

Yes, you can use BlueTools on a WidComm/BroadCom stack witout buying their SDK.

We have made an effort to make BlueTools appear exactly the same independent on if you run on Windows CE or Windows and independent on if you use the WidComm or MS stack.

Some featureas from the stacks are not made available by BlueTools, but the mainstream features are. You need to check the BlueTools reference manual if you have spcific requirements.

Using BlueTools you will access remote Bluetooth services using .NET Streams (you do not need virtual ports). If you insist on using virtual ports you can use SerialTools Pro for that.

And yes, you can sit and wait for an event in a separate thread and then take action if someone connects to your serial port Bluetooth service (implemented using BlueTools).

Regards,
Johan

Franson Support

federico.caselli
Posts: 11
Joined: Tue Mar 28, 2006 9:41 pm
Location: Italy

RE: Both Microsoft and Broadcomm drv really?

Wed Mar 29, 2006 1:29 pm

Ok, and, in order to use a comm wrapper, can I first retrieve the port number when I connect to an external device (which exposes spp) through BlueTools? I tried with another BT free wrapper (for MS stack only), but it doesn't allow this...

User avatar
johan
GpsGate
Posts: 15407
Joined: Wed Aug 04, 2004 10:40 pm
Location: Sweden
Contact: Website

RE: Both Microsoft and Broadcomm drv really?

Wed Mar 29, 2006 1:41 pm

As far as I know the Bluetooth serial port protocol doesn't say anythng about port numbers.

You can connect to a remote Bluetooth serial port service (but you do not know what virtual COM port that might be on the remote device - if any at all).

You can let your BlueTools client that has connected to a remote Bluetooth serial port service be linked to a virtual COM port, but you don't need to do that to receive and send data. It is easier to just skip the COM ports.

If you have a legacy application that needs the COM port, and your mission is to do the linking between a COM port and the Bluetooth world, then you can use virtual COM ports, but that is the only case when you should.

If it is your application that is sending and receiveing data from a Bluetooth serial port service, then you should stop thinking about COM ports.

Start experimanting with the samples you find in the SDK, to see what is possible and not using BlueTools.

It is much better to think of Bluetooth as TCP/IP sockets than COM ports, it fits the model much better.

Regards,
Johan

Franson Support

federico.caselli
Posts: 11
Joined: Tue Mar 28, 2006 9:41 pm
Location: Italy

RE: Both Microsoft and Broadcomm drv really?

Wed Mar 29, 2006 2:26 pm

I'll bore you a little more explaining my problem. I have an external device which sends an 'ok' two-bytes pack periodically. When my application receives this signal it has some milli-seconds to answer with the byte command (if the user selects one).

So, using the simple comm wrapper, my application can be notified in real time when the port receives the 'ok' bytes. All in a secondary thread, so it can answer to the remote device without sospend.

Also my free BT wrapper allowed using methods such as 'GetStream' and 'ReadByte' but it had no received events. So I tried to code a polling in a secondary trhead, but I've not been able to make my application as reactive as it was using the comm-wrapper. Maybe I did something wrong, I don't know...

Do you think I can solve these problems using BlueTools socket objects?

User avatar
johan
GpsGate
Posts: 15407
Joined: Wed Aug 04, 2004 10:40 pm
Location: Sweden
Contact: Website

RE: Both Microsoft and Broadcomm drv really?

Wed Mar 29, 2006 2:33 pm

Yes, you can. The Stream object you get in BlueTools supports Async callbacks when data is received. This is also demonstrated in the samples in the SDK if you take a look at them.

You can also read about this in the refrence manual. Take a look at the ServiceStream class and in particular ServiceStream.BeginRead() which include a short code snippet on how to do async reads.

The ServiceStream class supports three ways of reading:

1. Sync (blocking read). Use ServiceStream.Read()
2. Async (non blocking read with callback). Use ServiceStream.BeginRead()
3. Event notification. See ServiceStream.BeginRead() and IAsyncResult


Regards,
Johan

Franson Support

federico.caselli
Posts: 11
Joined: Tue Mar 28, 2006 9:41 pm
Location: Italy

RE: Both Microsoft and Broadcomm drv really?

Wed Mar 29, 2006 2:36 pm

Thank you very much.

I'll try as soon as possible.

federico.caselli
Posts: 11
Joined: Tue Mar 28, 2006 9:41 pm
Location: Italy

RE: Both Microsoft and Broadcomm drv really?

Wed Mar 29, 2006 10:11 pm

I've just begun using the FindAndConnectVB example and I have a BT dongle with Broadcomm stack. The first tests are encouraging. Now I'd like to set the BT pin at run-time, in order to avoid the Windows request to the user. Is there a method to do this?

Thanks.

User avatar
johan
GpsGate
Posts: 15407
Joined: Wed Aug 04, 2004 10:40 pm
Location: Sweden
Contact: Website

RE: Both Microsoft and Broadcomm drv really?

Wed Mar 29, 2006 10:14 pm

Yes, take a look at RemoteDevice.Bond() or RemoteDevice.BondAsync()

If you read the reference manual you will find a lot of valuable information there.

If you do not find the information there, please start a new topic in this forum when you a new type of question.



Regards,
Johan

Franson Support

federico.caselli
Posts: 11
Joined: Tue Mar 28, 2006 9:41 pm
Location: Italy

RE: Both Microsoft and Broadcomm drv really?

Wed Mar 29, 2006 10:19 pm

Ok.
Thanks.

Return to “BlueTools”