D
D
dmitriy_domaskin2019-07-10 09:50:17
Bluetooth
dmitriy_domaskin, 2019-07-10 09:50:17

How to increase data transfer speed over BLE?

Good day. I have a firmware hex file about 60kb in size, which I feed to my device via BLE. In fact, the file was completely transferred in 5 minutes, which is a lot. I act in the following way. Transmission of each specific message

public class BluetoothConnector 
{
///
        public GattCharacteristic WriteCaracteristic { get; private set; }
///...

    public async void SendMessageAsync(byte[] byteMessage)
    {
        var characteristic = WriteCaracteristic;

        if (characteristic == null)
        {
            return;
        }

        var writer = new DataWriter();
        writer.WriteBytes(byteMessage);
        var result = await characteristic.WriteValueAsync(writer.DetachBuffer());
    }
///...
}

Firmware Transfer
public class MessageManager
{
    ///...
    public BluetoothConnector Connector { get; set; }
    ///...
    public void StartProgramming(List<byte[]> programm)
    {
        foreach (var message in programm)
        {
            Connector.SendMessageAsync(message);
        }         
    }
///...
}

The List program has a length of about 1000. And in fact, the foreach loop completes in a couple of seconds, but the data takes a very long time to reach the device. I use the standard uwp library to work with BLE. I did not find anything about adjusting the data transfer rate. Can something be done about it?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question