Skip to content

Some data is being skipped when running WriteToCharacteristic per frame. #74

@Darpaler

Description

@Darpaler

Hello,

I'm currently getting an issue when sending data per frame, the last thing sent sometimes doesn't appear on the device.

For example, I have this in Update:

        void Update()
        {
            dataPacket = Time.time.ToString();

            Debug.Log($"Sending data packet {dataPacket}.");

            _writeCharacteristic = new WriteToCharacteristic(uuid, serviceUUID, characteristicUUID, Encoding.ASCII.GetBytes(dataPacket), true);
            _writeCharacteristic.Start();
        }

In the Logcat, I see this:

Image

But in the Arduino Serial Monitor I see this:

Image

A new WriteToCharacteristic is getting created and started per frame, but not all of them are being received. It's not terribly important that every single one makes it through, but it is important that the last one is received immediately as it's created and overwrites the current one/anything before it.

Do you have any advice on how I can set it up so that the last _writeCharacteristic takes priority? Thanks again for all the help, it is greatly appreciated!

Thanks,
Darin

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions