Wireless Communication Library Support Forum

Frameworks => Bluetooth Framework => Topic started by: printrmd on May 17, 2013, 07:44:39 PM

Title: No Data coming in.
Post by: printrmd on May 17, 2013, 07:44:39 PM
Hi

I had two  Widcomm 5.0.1.801 and BlueSoleil 10.0.417.0. Dongles on my computer.
I decided to remove the Widcomm Dongle. But now I have a problem- no data coming in. The connection is alright, but there are no triggers for wclClient_OnData. For example, when i'm using the VirtualPort demo and discovering my devices and choosing GPS reciever, creating a port, then connecting I get a "Connected" message but no data is coming in. This problem also happen in other demos when i'm using SPP communication. With the Widcomm Dongle it worked.

Best Regards.
Title: Re: No Data coming in.
Post by: Mike Petrichenko on May 17, 2013, 08:32:46 PM
Hi

As I could understand you use BlueSoleil driver on your computer now. If so try to reinstall driver (also make sure that there is only one dongle). Probably the drivers were mixed.
Title: Re: No Data coming in.
Post by: Mike Petrichenko on May 17, 2013, 08:47:32 PM
By the way, what OS do you use? Also do you use 32 or 64 bit WCL?
Title: Re: No Data coming in.
Post by: printrmd on May 17, 2013, 08:58:41 PM
Hi

I have One  BlueSoleil Dongle and I order from than. I try to reinstall more then one.
If I using old BlueSoleil ver like 2.4. I can connect with BlueSoleil manager to my GPS reciever and get Data in the new ver not working.
did WCL API working on old BlueSoleil Ver.
Title: Re: No Data coming in.
Post by: printrmd on May 17, 2013, 08:59:58 PM
Hi

I using XP  32Bit.
Title: Re: No Data coming in.
Post by: Mike Petrichenko on May 17, 2013, 09:02:30 PM
Ok, then: Can BlueSoleil connect to your GPS receiver and receive data itself: connect to your GPS from BlueSoleil manager and then try use created COM in Teminal?

P.S: WCL supports BlueSoleil 1.6 and above.
Title: Re: No Data coming in.
Post by: printrmd on May 17, 2013, 09:17:35 PM
Hi

No no data coming in I can see the connection but no data. and with the old ver 2.X it working
Title: Re: No Data coming in.
Post by: Mike Petrichenko on May 17, 2013, 09:21:38 PM
So it does not work without WCL too? I mean when you use Hyper Terminal or something and BlueSoleil manager (without WCL) it does not work as well?
Title: Re: No Data coming in.
Post by: printrmd on May 17, 2013, 09:31:35 PM
Hi

yes I using Franson GpsGate.

If I looking  on bluetooth serial port(COM7) Status i can see received data but where it is.
Title: Re: No Data coming in.
Post by: Mike Petrichenko on May 17, 2013, 09:37:14 PM
Well, then its something with BlueSoleil driver. Possible: vCOM numeration issue in Windows. You can try to uninstall BlueSoleil, remove all vCOMs from Registry and reset vCOM counter. It may help.
Title: Re: No Data coming in.
Post by: printrmd on May 17, 2013, 09:45:20 PM
Hi

I will try but can you help me where i can find the vCOMs Registry and to reset the counter.
Title: Re: No Data coming in.
Post by: Mike Petrichenko on May 17, 2013, 09:47:50 PM
Unfortunately I do not remember registry keys for vCOMs but I am sure it can be found in internet.
Title: Re: No Data coming in.
Post by: Mike Petrichenko on May 17, 2013, 11:11:54 PM
To reset vCOM counter:

1. Uninstall BlueSoleil.
2. Delete all vCOMs (if your PC has not hardware COM ports you must have no COM ports in device manager)
3. Open RegEdit
4. Find this key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\COM Name Arbiter
5. Set first byte of ComDB param to 00.
Title: Re: No Data coming in.
Post by: printrmd on May 24, 2013, 11:25:27 AM
Hi Mike

Sorry took me a week to answer.
I don't know how others managing with BlueSoleil .
when installing BlueSoleil App is creates two Bluetooth Serial Port (COM3,COM4).
when I use the VirtualPort demo and try to create a com i get message from BlueSoleil manager create a COM
and get error message from my App this occur twice. The third time I get the create com.
but we cannot get data. if we check the COMS in the system we have two COM3 two COM4 and one COM5. I need to rename the double COMS but it must be on the correct order if not I need to do all over again.i need to check on the registry file that the com is OK. Now everything works.  "BUT"
If trying to create a com i get message Internal driver error i need to try Number of time to get the created COM.
then it working and get data.

Is there another way I don't believe that people are doing it.

Sorry about the long story


Title: Re: No Data coming in.
Post by: Mike Petrichenko on May 24, 2013, 11:28:54 AM
Hi

It is known BlueSoleil bug when it creates identical vCOM ports (vCOMs with identical numbers). Do the steps I posted early to remove all vCOMs from your system and reset vCOMs counter and then it will work correct.
Title: Re: No Data coming in.
Post by: printrmd on May 24, 2013, 12:52:15 PM
Hi

i delete the Vcoms  param but it was the same.
but now my COMS are ok and i have problem to create port.
 There is no option to choose which port to create.


[attachment deleted by admin]
Title: Re: No Data coming in.
Post by: Mike Petrichenko on May 24, 2013, 01:15:24 PM
Hi

It looks you have too many ports and BlueSoleil mixed them up. Unfortunately this is no WCL bug but BlueSoleil bug and the only way to fix it completly delete BS, remove all vCOMs, reset its counter and install BS once again. Just installed BS creates 2 or 3 vCOMs.

"Service not found" means that your device does not have DUN service.

P.S.: On your screenshort I can see two identical ports with number 8 and two COMs with number 3
Title: Re: No Data coming in.
Post by: printrmd on May 24, 2013, 01:52:12 PM
hi

i have two type of Vcom
1.\Device\Serial2 is BlueSoleil port
2. device\VCom11    I delete all the port and after  reboot the comeing  back.
do you know who create than.
and COM3 one is disable.
and "Service not found" i using wcl.wclUUIDs.SerialPortServiceClass_UUID;
 Can i choose what port to open.
Title: Re: No Data coming in.
Post by: Mike Petrichenko on May 24, 2013, 01:57:37 PM
Hi

As I told you must unpair all devices, uninstall BlueSoleil. Better to remove all USB vCOM device. Delete all vCOMs from system (Device manager). Reset vCOMs counter to initial value. You can set first byt to 03 so vCOMs numeration starts from 3. Then install BlueSoleil.

There is no way to select vCOM to connect to when you use Bluetooth connection.

If you device supports SPP and your code is correct then connection shoudl be established. "Service not found" means that the service you are trying to connect to is not supported by your device.
Title: Re: No Data coming in.
Post by: printrmd on May 24, 2013, 02:07:43 PM
hi.
 I will try one more like you siad.

what is USB vCOM device i have one Dongle  for Bluetooth.
Title: Re: No Data coming in.
Post by: Mike Petrichenko on May 24, 2013, 02:09:24 PM
USB vCOM -> may be you have USB -> COM cables or something: I do not know what hardware do you have but your screenshot shows that there are too many vCOMs/COMs in your system what is not normal.

If you have TeamViewer I can take a look on your system: there is definetly something wrong.
Title: Re: No Data coming in.
Post by: printrmd on May 26, 2013, 09:31:17 PM
Hi Mike

I found the the driver that create the VCom XPvcom. i uninstall BlueSoleil in my Registry file i have one  com1.
install BlueSoleil back have more two com com3 ,com4 whan i create VirtualPort i have new port com5 rum one more wcl app with SPP create one more Port Com6 (There is no double port.) but If trying to create a com i get message Internal driver error i need to try Number of time to get the created COM.
Is there a way that the error no appear and I will continue to try to create until i get create com
Title: Re: No Data coming in.
Post by: Mike Petrichenko on May 27, 2013, 06:24:18 AM
All WCL function returns error code. So check this error code and do what you need then.
Title: Re: No Data coming in.
Post by: printrmd on May 27, 2013, 06:42:37 PM
Hi

this a demo app the error is "2" WCL_E_INTERNAL Low-level driver internal error  this is no error in the App and
This happens 80% times not 100%.
when you  test my computer this happened also to you.
Title: Re: No Data coming in.
Post by: Mike Petrichenko on May 28, 2013, 04:08:35 AM
Quote
Is there a way that the error no appear and I will continue to try to create until i get create com.

while (vCOM.Open() != WCL_E_SUCCESS) {}

By the way, WCL_E_INTERNAL on BlueSoleil usually means that device did not paired
Title: Re: No Data coming in.
Post by: printrmd on May 28, 2013, 06:21:54 PM
Hi

The While loop is not helping  the message appear and i don't have control on the message box and I need to push the OK button. when I create port the message appear  three times in one create way??.
and the device is paired I check before the create.
I must to find a solution the rest of my App depends on that.
Title: Re: No Data coming in.
Post by: Mike Petrichenko on May 29, 2013, 06:12:16 AM
What message appears?
Title: Re: No Data coming in.
Post by: printrmd on May 29, 2013, 07:16:52 AM
Hi

This message

[attachment deleted by admin]
Title: Re: No Data coming in.
Post by: Mike Petrichenko on May 29, 2013, 07:25:52 AM
I guess that you did not modify WCL vCOM demo code. So AfterOpen even has wclShowError funtion which generates this message.
Title: Re: No Data coming in.
Post by: printrmd on May 29, 2013, 07:35:39 AM
Hi
I Modify The demo that I only using SPP Without DUP, add I have Static Device Add  GPS receiver.  not using the Discover.
The com.Open()   and the   AfterOpen even is the same
Title: Re: No Data coming in.
Post by: Mike Petrichenko on May 29, 2013, 07:42:27 AM
Send me your code to mike@btframework.com. I'll modify it here and send you back.
Title: Re: No Data coming in.
Post by: printrmd on May 29, 2013, 07:48:55 AM
Hi
This will be later .

thanks
Title: Re: No Data coming in.
Post by: printrmd on May 29, 2013, 02:26:37 PM
Hi

i send the zip file and main.cs

[attachment deleted by admin]
Title: Re: No Data coming in.
Post by: Mike Petrichenko on May 29, 2013, 02:55:34 PM
after

private void btDestroy_Click(object sender, EventArgs e)

add

private int iPort = 0;
private bool fCreated = false;


change

private void btCreate_Click(object sender, EventArgs e)

as below

private void btCreate_Click(object sender, EventArgs e)
        {
         
                wcl.wclBluetoothRadio Radio = GetSelectedRadio();
                if (Radio != null)
                {
                    string Address = "(00:1B:C1:04:DF:96)";
                    wclVirtualCOMPort.Address = Address;
                    wclVirtualCOMPort.Radio = Radio;
                    wclVirtualCOMPort.Service = wcl.wclUUIDs.SerialPortServiceClass_UUID;
                   
                    fCreate = false;
                    iPort = 0;
                    while (!fCreated)
                    {
                       wclVirtualCOMPort.Open();
                       Application.DoEvents();
                     }
                     MessageBox.Show("Port: " + iPort.Tostring());
                }
        }


change

private void wclVirtualCOMPort_AfterOpen

as below

private void wclVirtualCOMPort_AfterOpen(object sender, wcl.wclVirtualPortCreatedEventArgs e)
        {
           
            if (e.Error == wcl.wclErrors.WCL_E_SUCCESS)
            {
               iPort = e.Port;
               fCreated = true;
             }
        }


as I told you had to delete wclShowError() call from your code to disable message showing. It is always bad idea to use WCL samples code instead of developing your own application with your own code.
Title: Re: No Data coming in.
Post by: printrmd on May 29, 2013, 04:05:20 PM
hi

First thing Thank you very much It works.
I understand there is a problem between WCL and BS.
this problem Doesn't happen Widcomm.

I have Another App  that I have a problem with wcl.wclErrors.wclShowError(wclClient.Connect()); open client with
Samsung S3 with widcomm is working, with BS not
If I open communication I am receiving  error 2.
But something amazing if  I create Port  with the first App than  there is no problem to open the communications.??
I will try to use with the same way like you show me.
Title: Re: No Data coming in.
Post by: Mike Petrichenko on May 29, 2013, 05:31:23 PM
In fact it is problem in BlueSoleil as there is nothing between WCL and BS except few functions call.