nRF52832
www.szrfstar.com V1.3 - Sep., 2020
Shenzhen RF-star Technology Co., Ltd. Page 48 of 58
*/
- (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 to.
* @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.
About the details of scanning, connecting, and other communication operations, please refer to the test APP source
code (BLE Transmit Module v1.29) for transparent transmission in iOS, in which it realizes, for FFE9 and FFE4, the
operations of data transmit from BLE to serial port and from serial port to BLE characteristics (notify and write). Other