Author Topic: Hardware Flow Control  (Read 3653 times)

Offline aurelien_a

  • Newbie
  • *
  • Posts: 6
  • Karma: 0
Hardware Flow Control
« on: February 01, 2008, 04:31:54 PM »
Dear Sir,

I'm using bluetooth framework in my software on Windows XP and on Windows Vista. I'm using the SPP profile to communicate with a Free2move Bluetooth device which is using also the SPP profile. My problem is the following : my module Free2move is not enough fast to receive the data. I would like to use the Hardware Flow Control with the RTS and the CTS lines. My Free2move module is able to use it, I've succeeded without using the SPP profile with a serial port configured with the hardware flow control. The problem is that Microsoft Windows Vista doesn't works with the serial port in this configuration.
That's why I would like to use the bluetooth framework with hardware flow control. I've succeeded to transfer file with the SPP profile with Bluetooth Framework but if the file is too big, my module Free2move can't follow this rate.
Have you an idea to activate the Hardware Flow Control on Bluetooth Framework ?

Thanks by advance.

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2491
  • Karma: 1000
    • Wireless Communication Library
Re: Hardware Flow Control
« Reply #1 on: February 01, 2008, 06:12:25 PM »
Good day!

Thank you for your e-mail. What is the bluetooth drivers you are using?
WCL - Wireless Communication Library
TextBlue - Bluetooth Proximity Marketing Software
WCL Phone Explorer - Free Phone Content Manager

Offline aurelien_a

  • Newbie
  • *
  • Posts: 6
  • Karma: 0
Re: Hardware Flow Control
« Reply #2 on: February 04, 2008, 10:51:52 AM »
I think I'm using the Microsoft Bluetooth API and BF Client with the Service Serial Port.

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2491
  • Karma: 1000
    • Wireless Communication Library
Re: Hardware Flow Control
« Reply #3 on: February 04, 2008, 11:43:32 AM »
Good day!

I am looking for what I can do for you. I'll let you know the solution.
WCL - Wireless Communication Library
TextBlue - Bluetooth Proximity Marketing Software
WCL Phone Explorer - Free Phone Content Manager

Offline aurelien_a

  • Newbie
  • *
  • Posts: 6
  • Karma: 0
Re: Hardware Flow Control
« Reply #4 on: February 08, 2008, 01:23:21 PM »
Hi,

What's up ? Just to know if you think it would be possible ?

Thanks.

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2491
  • Karma: 1000
    • Wireless Communication Library
Re: Hardware Flow Control
« Reply #5 on: February 08, 2008, 02:38:29 PM »
Good day!

I think it is possible. But I didn't find the solution. Just checked it. Will work on it on next week.
WCL - Wireless Communication Library
TextBlue - Bluetooth Proximity Marketing Software
WCL Phone Explorer - Free Phone Content Manager

Offline aurelien_a

  • Newbie
  • *
  • Posts: 6
  • Karma: 0
Re: Hardware Flow Control
« Reply #6 on: February 11, 2008, 10:58:05 AM »
Good day,

That's really a very good news for me if it would be possible and maybe the next week !

Thanks for your research.

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2491
  • Karma: 1000
    • Wireless Communication Library
Re: Hardware Flow Control
« Reply #7 on: February 11, 2008, 11:08:33 AM »
Good day!

I'll try to do so
WCL - Wireless Communication Library
TextBlue - Bluetooth Proximity Marketing Software
WCL Phone Explorer - Free Phone Content Manager

Offline aurelien_a

  • Newbie
  • *
  • Posts: 6
  • Karma: 0
Re: Hardware Flow Control
« Reply #8 on: February 18, 2008, 12:40:45 PM »
Hi,

Have you some good news ?

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2491
  • Karma: 1000
    • Wireless Communication Library
Re: Hardware Flow Control
« Reply #9 on: February 18, 2008, 01:07:27 PM »
Good day!

Yes and no :) I'll try to implement such functional in BTF 6 but I am not sure it will work with all APIs.
WCL - Wireless Communication Library
TextBlue - Bluetooth Proximity Marketing Software
WCL Phone Explorer - Free Phone Content Manager

Offline aurelien_a

  • Newbie
  • *
  • Posts: 6
  • Karma: 0
Re: Hardware Flow Control
« Reply #10 on: February 29, 2008, 11:09:13 AM »
Hi,

Have you found something or it's more difficult than you thought ?

Thanks.

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2491
  • Karma: 1000
    • Wireless Communication Library
Re: Hardware Flow Control
« Reply #11 on: February 29, 2008, 11:11:46 AM »
Good day!

Yes. I found sme solution but didn't work on it yet becasue not all drivers allows to do so.
WCL - Wireless Communication Library
TextBlue - Bluetooth Proximity Marketing Software
WCL Phone Explorer - Free Phone Content Manager

Ben

  • Guest
Re: Hardware Flow Control
« Reply #12 on: October 06, 2008, 10:49:12 PM »
Hello,

Has anything else been found about HW flow control since the last post on this thread?

I am working on developing a BT application to talk to hardware that my company makes.  The problem we've run into is that it appears the client application on the desktop is sending data faster than the device can process. What the hardware expects is for the client to use Ready-To-Send (RTS) to control data transfer, but I cannot find anything in the WCL for specifying the baud rate or flow control settings.

Any help would be appreciated!

Thanks,
Ben

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2491
  • Karma: 1000
    • Wireless Communication Library
Re: Hardware Flow Control
« Reply #13 on: October 06, 2008, 11:05:18 PM »
Good day!

If you use direct bluetooth connection with WCL then you do not need to think about baud rate. If you use Serial connection you can manage the baud rate.

The main problem with baud rate control for BT connection is that no one (in common case, there is some "durty" way exists) driver allows to control the baud rate of the direct bluetooth connection.
WCL - Wireless Communication Library
TextBlue - Bluetooth Proximity Marketing Software
WCL Phone Explorer - Free Phone Content Manager

Ben

  • Guest
Re: Hardware Flow Control
« Reply #14 on: October 08, 2008, 03:25:04 AM »
Thanks Mike,

I don't think that Baud rate is really the problem any more (we set it down to 9600 and that didn't help). What really appears to be the problem is that the device has a tiny 4 byte message buffer and we are overwriting before the device has a chance to read out of the buffer.

What I've done is after I discover the device I create a wclClient:
Code: [Select]
            _client = new wclClient();
            _client.ClientTransport = wclClientTransport.ctBluetooth;
            _client.BluetoothParams.Address = Address;
            _client.BluetoothParams.Radio = Radio;
            _client.BluetoothParams.Service = wclUUIDs.SerialPortServiceClass_UUID;
            _client.Connect += new OnConnect(OnConnected);
            _client.Data += new OnData(OnReceived);
            _client.Disconnect += new OnDisconnect(OnDisconnected);
            _client.SerialParams.BaudRate = wclBaudRate.br9600;
            _client.Open();
When "OnConnected" is called it calls "Write" on the wclClient to send data.

What I am looking for is a way to use "Ready-To-Send" to control data flow. If I use the SerialPort class in System.IO.Ports I can set RtsEnable to true and I should be golden. Is there an equivalent setting in wclClient?

Alternatively if I pair the device how can I get a COM port assigned? I've tried wclDevice.Pair(...), which succeeds. Then I've tried using either wclSerialPort or wclBluetoothComCreator, but I can't seem to get either one to work.

Thanks again!

Ben