Wireless Communication Library Support Forum

Frameworks => Bluetooth Framework => Topic started by: paijo_rx on August 10, 2009, 10:14:52 AM

Title: How to use the component
Post by: paijo_rx on August 10, 2009, 10:14:52 AM
i'm newbie
how the step to use the component?

i'm using my internal bluetooth on my laptop.

How to use the component so my laptop can connecting with my handphone?

thx
Title: Re: How to use the component
Post by: Mike Petrichenko on August 10, 2009, 10:23:54 AM
Hi,

WCL package includes lots of samples (demo codes). You can simple take a look on it. Or visit: help.btframework.com.

There is no step-by-step instaruction because there is no single task components solve. WCL can help you in a lot of tasks you want to solve with using Bluetooth/IrDA/Serial connections.
Title: Re: How to use the component
Post by: marko_shock on October 25, 2010, 01:58:43 PM
HI,
I need to write delphi CONSOLE APP for bluetooth pairing and some other BT features. Can I use WCL-VCL edition ??
If I can not use WCL-VCL is it possible to use some other WCL edition ??
I must use delphi and I must use it as Console APP
thanks
Title: Re: How to use the component
Post by: Mike Petrichenko on October 25, 2010, 02:59:39 PM
Hi,

Yes of course you can use WCL VCL Edition. Unfrotunately this edition does not include console demo. But you may take a look on console demo from WCL C++ edition.
Title: Re: How to use the component
Post by: marko_shock on October 25, 2010, 03:34:28 PM
I will see it in some c++ example but it would be nice to see some console example for delphi at least for WCL API load/unload

I have tested WCL-VCL edition shortly and
with Nokia N78 works
with BackBarry works
but with Samsung GT-S3650 basic things such as pairing does not work.
Enviroment Windows XP SP3 fully updated, BT adapter Delock with Toshiba BT Stack 7.10.16 installed. on pairing attemp I got internal driver error.
same with phone explorer. Is it know bug for Samsung mobile phones ?
Title: Re: How to use the component
Post by: Mike Petrichenko on October 25, 2010, 03:38:54 PM
It may be toshiba issue. Can toshiba pair with device?

Unfortunately sich demo can be added only in next version.
Title: Re: How to use the component
Post by: marko_shock on October 25, 2010, 03:44:34 PM
Yes. Software which comes with 7.10.16 can pair normaly. also when I swith to other device (Lenovo T61 BCM2045B) and Microsoft Stack everything work fine. So I thing it is WCL bug.
BTW: Have you tested WCL with HTC phones ?
Title: Re: How to use the component
Post by: Mike Petrichenko on October 25, 2010, 04:12:33 PM
Not sure it is WCL issue as it works with other devices and with our Samsung E250 but we will check it. WCL has been tested with a lot of phones (http://www.btframework.com/devices.htm) but in fact Bluetooth communication does not depend on phone. Some BT profile support is depended but WCL does work with all BT enabled devices which have supported profiles.
Title: Re: How to use the component
Post by: marko_shock on October 27, 2010, 06:52:43 PM
Hi Mike I have another problem with component.
enviroment : WCL 6.8.0.0 , Win XP SP3, Toshiba Stack.
In my APP I trying to full-fill this scenario:
Create and open BT Virtual COM port (Via BT Client not Virtual COM...see have learned something  ;) )
Use this COM port to send AT commands modem (put it in 2G, get IMSI and so on...)
Start Dial-Up Networking service(by using WCL)
Start RAS connection(of course by My imeplementation not by WCL)

This scenario works quite fine with MS stack but with Toshiba it does not works. If I deaktivate SPP and try again I can make regular RAS connection.

So basicly speaking my question is: Is this limitation(first DUN/RAS then SPP and not first SPP then DUN/RAS... if I understand well...only one active profile at the time) know bug for Toshiba stack or WCL? I  gues toshiba but just to check with you as 100% expert for BT

Title: Re: How to use the component
Post by: Mike Petrichenko on October 27, 2010, 06:55:24 PM
Hi,

WCL was designed to be used without any vComs. I afraid I cann't help with vComs a it is absolutly wrong way.

Numbers of used profiles depends on target device.

Toshiba is one of worst stack ever.
Title: Re: How to use the component
Post by: marko_shock on October 27, 2010, 07:06:50 PM
I must admit that I am quite surprised with you thinking related to Toshiba stack. I friend was BT tester for 2 years and he prefers Toshiba... But i believe you... you are programmer he is tester.

My needs are :
Use DUN and SPP (via WCL btClient and setting it as bluetooth trasport with SerialPort UUID)
I do not prefer not be depended from some BT stack and
I prefer to cover at least 80% of BT devices(USB sticks, integrated devices for laptops and so on)
I prefer not to now BT technical detailes n order to implement my needs.

So do I need to go further from  WCL and MS stack in order to cover more then 80% of BT Devices ?

And many thanks for such fast answers
Title: Re: How to use the component
Post by: Mike Petrichenko on October 27, 2010, 07:14:06 PM
It depends on what you need from DUN/SPP. If jsut send AT commands (SMS/Phone Book) then yes, it is easy to do with wclClient (see BluetoothConnection demo). If you want to use your cell phone as GSM/GPRS modem and allow user to surf in internet then I afraid it is impossible with WCL and you have to use MS DUN API and user must confiure his phone manualy.
Title: Re: How to use the component
Post by: marko_shock on October 27, 2010, 07:26:48 PM
I need first SPP and after DUN and Internet connection. That's all... I gues nothing special

SPP is already implemented via WCL and wclClient
DUN is implemented via WCL and MS RAS API but it works only for MS BT Stack

My key problem is stack behavior after activating BT-DUN service with WCL. For MS Stack it actually do same thing like I do this manually(it creates new modem called "standard modem over bluetooth link" and I can see that modem in device manager). For Toshiba Stack same code(only selected radio is not 2- MS  but 3-Toshiba) does not do the same as for MS stack. I never got new modem in device manager. I suppose again it is some problem related to Toshiba BT API but again hers APP do this OK...

With SPP implemented via WCL and wclClient and DUN-Internet connection implemented via WCL and MS RAS API Can I cover 80% of devices ?



Title: Re: How to use the component
Post by: Mike Petrichenko on October 27, 2010, 07:31:55 PM
As I wrote it is impossible to do with WCL (DUN). WCL does not include such feature. The method you use may work for MS drivers only as other drivers have its own DUN API. Of course, use can manualy configure device, crreate vCOM and then you can use MS DUN, but WCL does not support such functions.

As WCL was not related to such function I can not promise something working or guaarantee working percents or something else. All I can guarantee and support is WCL related functions.

However, we do not recomend to use TwclVirtualCOMPortCreator as it is wrong way. And that component is not intended to create DUN connections. I afraid you can not do all what you want with WCL.

Of course if you need such functions (DUN connection in WCL) we can add it but it will cost money. If you want - contact us by e-mail and we discuss a development cost.
Title: Re: How to use the component
Post by: marko_shock on October 27, 2010, 07:51:54 PM
I think that we don't understand each other...

SPP is done by WCL and wclClient

in my APP from WCL I expects only to start DUN service again via wclClient nothing more. If DUN service is started properly on win XP I must got new modem installed by BT Stack implementation..... this is must be true simply windows works like this.

If got new modem installed I already have code to communicate with whatever modem and create internet connection.

My problem related to DUN and non-MS BT Stack is that after starting DUN service via wclClient I don't get modem installed... nothing more nothing less
I have only MS and Toshiba Stack devices and this works with MS stack but not for Toshiba.

Again is this starting of service and not having locally installed modem WCL known bug or Toshiba Stack bug??
If I start DUN service manually from Toshiba SW I always got locally installed modem.

 
Title: Re: How to use the component
Post by: marko_shock on October 27, 2010, 07:53:19 PM
Please be honest .... I will by WCL for sure :)
Title: Re: How to use the component
Post by: marko_shock on October 27, 2010, 07:55:14 PM
And please be honest..... My test APP is working just fine (with MS Stack) and I will bay WCL for sure
Title: Re: How to use the component
Post by: Mike Petrichenko on October 27, 2010, 07:57:16 PM
You can not initiate DUN with wclClient. It is a "miracle" that ComPortCreator creates DUN on MS stack. EACH stack has its own DUN API. EACH of them. As I wrote WCL does not support such things. It is impossible to create/initiate DUN connection with WCL as you wanted.

You can connect to DUN as well but it DOES NOTT give you DUN internet connection.

And once again: it is just a "miracle" that it works with MS. The method you use will never work with any other BT driver as all of them have own DUN API.

It is possible to add such functions into WCL but this is not our main goal for now so it will cost money.
Title: Re: How to use the component
Post by: marko_shock on October 28, 2010, 05:45:39 PM
Mike I have tested other stacks and I must admit you was right... MS BT Stack is miracle....

At the moment I am working on cost estimation for my desired APP. I would like to contact you related to this topic but I suppose that public forum is not good place to do so. If you are interesting you can contact me via email in my profile and we can discuss details
Title: Re: How to use the component
Post by: Mike Petrichenko on October 28, 2010, 06:47:02 PM
Thank you.

Please, don't hesitate to contact me directly on mike@btframework.com or PM onthis forum so we can discuss all your needs.
Title: Re: How to use the component
Post by: mehis on November 16, 2010, 09:34:50 PM
i have looked demos, but i have not found if it is possible to query serial port number from detected bluetooth device?
It is needed for me because i need to detect bluetooth or usb device  and its serial port with delphi written user application to give it forward to a c++ developed dll what will communicate with detected device.
Title: Re: How to use the component
Post by: Mike Petrichenko on November 16, 2010, 09:38:00 PM
There is no way to know serial port number of a bluetooth connection because Bluetooth is wireless connection and has no any serial port. User wclClient instead. However there is TwclVirtualCOMPortCreator which may create virtual port for you but we do not give any warranty that this way will work good for you. Only wclClient with direct Bluetooth connect is the correct way to use WCL with Bluetooth devices. Of course, you can use wclClient with IrDA and phisical serial connection - that is the correct way to.
Title: Re: How to use the component
Post by: mehis on November 17, 2010, 08:25:08 PM
So if I have to use dll what only can communicate with device via serial port, then I can not use WCL in delphi applicatoin to detect bluetooth device spp service com port?
Title: Re: How to use the component
Post by: Mike Petrichenko on November 17, 2010, 08:37:35 PM
Sorry? Bluetooth is wireless connection and it has no any COM ports. I do not know who told you about COM ports for Bluetooth but you can fire that guy as he is wrong.

No one Bluetooth device know about any COM ports for any service. Use direct BT connection with wclClient. Of course, if you want to communicate with Serial device (wired one) you can use WCL too.

But do not use COM ports for Bluetooth as Bluetooth knows nothign about COM ports.

If you have third party DLL which uses Serial Port for BT connection (who desiged it? fire them) you may use TwclVirtualCOMPortCreator. But we can not give you any guarantee that iut will work good with all possible confugrations (as it is wrong way). And for threads - you must have Windows Message Loop in your thread to be able to use WCL in thread.
Title: Re: How to use the component
Post by: Mike Petrichenko on November 17, 2010, 08:40:12 PM
That's absolutely Ok for stacks other than MS. As mot of them does not support multi connection. So you must disconnect from device to be able to connect to other service/device.