EFR32BG22
Shenzhen RF-star Technology Co., Ltd.
Page 78 of 93
*/
- (void)readValueForCharacteristic:(CBCharacteristic *)characteristic;
Note: to read a characteristic
[p readValueForCharacteristic:c];
/*!
* @method setNotifyValue:forCharacteristic:
* @param notifyValue The value to set the client configuration descriptor.
* @param characteristic The characteristic containing the client configuration.
* @discussion Ask to start/stop receiving notifications for a characteristic.
* The relevant delegate callback will then be invoked with the status of the request.
* @see peripheral:didUpdateNotificationStateForCharacteristic:error:
*/
- (void)setNotifyValue:(BOOL)notifyValue forCharacteristic:(CBCharacteristic *)characteristic;
Note: to open a characteristic notify enable switch.
[self setNotifyValue:YES forCharacteristic:c];//open notify enable switch.
[self setNotifyValue:NO forCharacteristic:c]; //close notify enable switch.
/*
* @method didUpdateValueForCharacteristic
* @param peripheral Pheripheral that got updated
* @param characteristic Characteristic that got updated
* @error error Error message if something went wrong
* @discussion didUpdateValueForCharacteristic is called when CoreBluetooth has updated a
* characteristic for a peripheral. All reads and notifications come here to be processed.
*
*/
-(void)peripheral:(CBPeripheral*)peripheral
didUpdateValueForCharacteristic:(CBCharacteristic
*)characteristic
error:(NSError *)error
Note: after each reading operation, this callback function will be performed. The application layer saves the
data that is read in this function.
Summary of Contents for EFR32BG22
Page 71: ...EFR32BG22 www szrfstar com V1 6 Jun 2022 Shenzhen RF star Technology Co Ltd Page 70 of 93...
Page 75: ...EFR32BG22 www szrfstar com V1 6 Jun 2022 Shenzhen RF star Technology Co Ltd Page 74 of 93...
Page 76: ...EFR32BG22 www szrfstar com V1 6 Jun 2022 Shenzhen RF star Technology Co Ltd Page 75 of 93...
Page 77: ...EFR32BG22 www szrfstar com V1 6 Jun 2022 Shenzhen RF star Technology Co Ltd Page 76 of 93...
Page 91: ...EFR32BG22 www szrfstar com V1 6 Jun 2022 Shenzhen RF star Technology Co Ltd Page 90 of 93 CE...