我正在尝试将项目blueToothMe转换为我自己的用途。我已经更改了代码中的UUID
NSArray *characteristics = [NSArray arrayWithObjects:[CBUUID UUIDWithString:@"2A1E"],
[CBUUID UUIDWithString:@"2A1C"],
[CBUUID UUIDWithString:@"2A21"], nil];
到
NSArray *characteristics = [NSArray arrayWithObjects:[CBUUID UUIDWithString:@"2A04"],
[CBUUID UUIDWithString:@"2A03"],
[CBUUID UUIDWithString:@"2A19"], nil];
我可以从cc2540获得连接,但我无法获得任何特性服务。
我知道电池服务UUID并希望使用它们来让用户达到电池电量。
我试图替换:
[instance setCharacteristics:characteristics forServiceCBUUID:@"1809"];
[instance setLetWriteDataCBUUID:[NSArray arrayWithObject:@"1809"]];
characteristics = [NSArray arrayWithObject:[CBUUID UUIDWithString:@"2A29"]];
[instance setCharacteristics:characteristics forServiceCBUUID:@"180A"];
与
[instance setCharacteristics:characteristics forServiceCBUUID:@"2803"];
[instance setLetWriteDataCBUUID:[NSArray arrayWithObject:@"2803"]];
characteristics = [NSArray arrayWithObject:[CBUUID UUIDWithString:@"2A19"]];
[instance setCharacteristics:characteristics forServiceCBUUID:@"180F"];
有没有人与此合作并有任何想法?
由于