Accu-Chek Aviva Connect에서 데이터를 수집 할 iOS 응용 프로그램을 만들려고합니다."Accu-Chek Aviva Connect"BG 측정기에서 데이터를 수집하는 iOS 앱입니다. (블루투스 저에너지)
- (void)peripheral:(CBPeripheral *)aPeripheral didDiscoverCharacteristicsForService:(CBService *)service error:(NSError *)error {
if ([service.UUID isEqual:[CBUUID UUIDWithString:@"1808"]]) {
for (CBCharacteristic *aChar in service.characteristics) {
// Read Glucose Measurement...
// Read Glucose Measurement Context...
// Read Glucose Feature...
// Read Date Time...
// Read Record Access Control Point
if ([aChar.UUID isEqual:[CBUUID UUIDWithString:@"2A52"]]) {
[aPeripheral readValueForCharacteristic:aChar];
[aPeripheral setNotifyValue:YES forCharacteristic:aChar];
uint8_t bytes[] = {0x04, 0x01, 0x00};
NSData *data = [NSData dataWithBytes:(void*)&bytes length:sizeof(bytes)];
[aPeripheral writeValue:data forCharacteristic:aChar type:CBCharacteristicWriteWithResponse];
}
}
}
}
을 그리고 아이폰에 내가 보안 코드를 입력 할 수있는 필드와 UIAlert를 참조하십시오
내가 특성 기록 액세스 제어 지점에 쓰기 요청을 보낼 BG 미터 페어링합니다. 그리고 iPhone을 Accu-Chek Aviva Connect과 페어링 할 수 있습니다. 하지만 다음에 쓰기 요청을 에 보내면 (기기를 연결 해제 한 후) "오류 : 인증이 충분하지 않습니다."과 iPhone의 UIAlert가 없습니다.나는 모든 일을 잘못한다고 생각합니다.
블루투스 기기의 로그에서 기록을 읽고 싶습니다. AFAIU 읽기 레코드 액세스 제어 지점 ([aPeripheral writeValue:data forCharacteristic:aChar type:CBCharacteristicWriteWithResponse];
)에 바이트를 쓰고 대답은 peripheral:didWriteValueForCharacteristic:error:
입니다. 그러나 "오류 : 인증이 충분하지 않습니다"이 내 방식에 서기 때문에 나는 그것을 할 수 없습니다!
"인증이 충분하지 않습니다"라는 오류 코드를 게시해야합니다. iOS 또는 기기 자체에서 발생하는지 궁금합니다. 또한 Aviva Connect API는 어디에 설명되어 있습니까? 쉽게 Google 기능을 사용할 수 없습니다 ... –
Accu-Chek에 대한 공식 문서가 없습니다. 하지만 공식 Bluetooth Glucose Service를 사용합니다 : https://www.bluetooth.com/specifications/gatt/viewer?attributeXmlFile=org.bluetooth.service.glucose.xml – MarK