5.4.3.9 Write Local Characteristic Value for Multiuple Links (SHWM,<hex16>…)
Format: SHWM,<hex16>,<hex16>,<hex value>
Command SHWM
writes the content of the characteristic in GATT service to the local device by addressing its handle. This command takes three parameters. The first parameter is the 16-bit hex value of the specific connection handle, the second parameter is the 16-bit hex value of the handle, which corresponds to the characteristic of the server service, and the third parameter is the content to be written to the characteristic. This command is almost the same as SHW, the difference is, when writing to a characteristic with a CCCD enable, SHWM will start to notify/indicate the specific link by the specific connection handle, but SHW only notifies/indicates the latest link.
Example: | SHWM,0070,001A,64 | // Set local value of characteristic Battery Level with value handle 0x001A to 100%. // If notification service is started on Battery Level before, local device notifies the new value of 100% to the remote peer device that connection handle is 0x70. |
Response: | AOK | // Success |
Err | // Syntax error or invalid parameter | |
NFail | // Notification/Indication failure |