Author Topic: Multiple Connection  (Read 34883 times)

Raj

  • Guest
Multiple Connection
« on: June 10, 2008, 11:04:20 AM »
Hi

I have to make multiple connection from my bluetooth application.

At the same time I want to send data to two different phones.
I am using Bluesoleil driver.

Can it will be possible?



Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3675
  • Karma: 1000
    • Wireless Communication Libraries
Re: Multiple Connection
« Reply #1 on: June 10, 2008, 11:49:16 AM »
Yes, of course, it is possible. But for BlueSoleil you must connect to the target devices one by one. I.e. BlueSoleil does not support multy connection establishment at the same time. After all devices connected you can send to all of them at the same time.

conatwill

  • Guest
Re: Multiple Connection
« Reply #2 on: September 26, 2008, 12:45:53 PM »
oh, I meet the same question!

I modify function btAPILoad_Click  of the demo project as follows:

        private void btAPILoad_Click(object sender, EventArgs e)
        {
            wclAPI.Load();

            fmMain fm = new fmMain();
            fm.Show();
        }

I load the wclapi only once, and try to connect to the remote 2 devices throught two form, but it failed, which is similar to what I have posted in another article in this forum, one form is died and the cpu ocuupancy up to 100%, why? Doesn't wcl support the multiple-connections?

I'm testing the demo of wcl, maybe I have some problems, thanks for reply!


Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3675
  • Karma: 1000
    • Wireless Communication Libraries
Re: Multiple Connection
« Reply #3 on: September 26, 2008, 03:30:01 PM »
WCL supports multiple connections. The code you provided is not enough to understand where is the problem. Attchecd file shows how to use WCL in multiple and it works.

[attachment deleted by admin]

conatwill

  • Guest
Re: Multiple Connection
« Reply #4 on: September 27, 2008, 04:30:27 AM »
Thanks for your code, but please implement the multiconntections in two forms, and each form create a new wclftpclient, and then you will see the result which I have reported in the posted article.

Best Regards!

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3675
  • Karma: 1000
    • Wireless Communication Libraries
Re: Multiple Connection
« Reply #5 on: September 27, 2008, 11:01:36 AM »
I know the result, I did it lots of time for my customers. There is no differences do I use it in one form or in 2 or in 10.

conatwill

  • Guest
Re: Multiple Connection
« Reply #6 on: September 27, 2008, 11:16:12 AM »
ok, please modify function btAPILoad_Click  of the demo project as follows:

        private void btAPILoad_Click(object sender, EventArgs e)
        {
            wclAPI.Load();

            fmMain fm = new fmMain();
            fm.Show();
        }
and then connect the remote device in each form, and put file to the remote device in parrellel, I have gotten a result that one is running but the other died

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3675
  • Karma: 1000
    • Wireless Communication Libraries
Re: Multiple Connection
« Reply #7 on: September 27, 2008, 12:38:08 PM »
Why should I use wrong code and create MAIN form twice? Not good programming technic.

conatwill

  • Guest
Re: Multiple Connection
« Reply #8 on: September 27, 2008, 01:36:37 PM »
I have email you since here the zip file can't be attched!

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3675
  • Karma: 1000
    • Wireless Communication Libraries
Re: Multiple Connection
« Reply #9 on: September 27, 2008, 04:10:22 PM »
Man, this is the last free code for you. You actully MUST take some programming lessons or I will ask payments for fixing the bugs in your code.

[attachment deleted by admin]

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3675
  • Karma: 1000
    • Wireless Communication Libraries
Re: Multiple Connection
« Reply #10 on: September 27, 2008, 04:11:52 PM »
In the previous post was the fixed code. In this post is your originial code (for comparation).

[attachment deleted by admin]

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3675
  • Karma: 1000
    • Wireless Communication Libraries
Re: Multiple Connection
« Reply #11 on: September 27, 2008, 04:18:47 PM »
One more thing. I actully didn't want to post it here, but... But as I wrote in MSN personally, the WCL is bad for you, it is too hard in use and has too many bugs you found. I refunded your payment, you are not allowed to use registered version of the library (of course, you may use demo version). Please, do not use WCL or BTF. Please, use other library intead. Thank you for your understanding.

conatwill

  • Guest
Re: Multiple Connection
« Reply #12 on: September 27, 2008, 05:01:41 PM »
Sir, I 'm not the man you have faced. I test the demo for my company, and I meet some problems(such as the null file whose name is same as its folder and this multiforms), I think it's normal to consult the supporter here. In addition, I can't find any special code in your project(I think it's same whatever the wclftpclient and stream name is defined as) and I will test it tomorrow, and then, do you have tested it?

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3675
  • Karma: 1000
    • Wireless Communication Libraries
Re: Multiple Connection
« Reply #13 on: September 27, 2008, 05:46:18 PM »
It i svery good that you are not that guy, but your code looks the same, you did the same mistakes in coding, you asked me did I test it when I told I did, you wrote me from chins e-mail and so long. So I decided you are the same guy. I am sorry if I am wrong, but something tells me that I am right...

conatwill

  • Guest
Re: Multiple Connection
« Reply #14 on: September 28, 2008, 04:11:44 AM »
I'm not that guy, and I only try to complete the task that my company has assigned to me.
And I have tested your new project, it still give the same result : one is running and the other die when it is started to put in parrellel. Could you tell me what's the same mistake?

 

Sitemap 1 2 3 4 5 6 7