PostValue Method

Write the value of a characteristic without expecting a response.

Syntax

public void PostValue(string serviceId, string characteristicId, byte[] value);
Public Sub PostValue(ByVal ServiceId As String, ByVal CharacteristicId As String, ByVal Value As String)

Remarks

This method is used to write the value of a characteristic, but unlike WriteValue it instructs the server not to send a response, even if the write request fails. This method will return immediately after the request is sent, regardless of the current Timeout value.

If your use-case doesn't require confirmation of characteristic value writes, this method is preferred; it allows both devices (but especially the server) to save power by keeping the BLE radio hardware turned off.

If you do require confirmation of characteristic value writes, or need to write a descriptor's value, use the WriteValue method.

Posting Values

// The CC2650STK TI SensorTag doesn't have any characteristics which support
// write without response, so this is just an example.
bleclient1.PostValue("00AA00000000", "00AA00BB0000", new byte[] { 0x1, 0x2, 0x3 });

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks BLE 2020 .NET Edition - Version 20.0 [Build 8158]