Advertisement
Guest User

Untitled

a guest
Apr 26th, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. -(void) bleAction1
  2. {
  3. for(CBService *service in peripheral.services)
  4. {
  5. if([service.UUID isEqual:[CBUUID UUIDWithString:@"07CD3295-E29F-4EEA-A0EC-617DA6921626"]])
  6. {
  7. for(CBCharacteristic *characteristic in service.characteristics)
  8. {
  9. if([characteristic.UUID isEqual:[CBUUID UUIDWithString:@"98EE2679-917C-4E39-A587-20E31E0BA519"]])
  10. {
  11. [peripheral readValueForCharacteristic:characteristic];
  12. return;
  13. }
  14. }
  15. }
  16. }
  17. }
  18.  
  19. -(void) bleAction2
  20. {
  21. for(CBService *service in peripheral.services)
  22. {
  23. if([service.UUID isEqual:[CBUUID UUIDWithString:@"2FD8921C-9F28-4257-A1EB-61E6476FD2FF"]])
  24. {
  25. for(CBCharacteristic *characteristic in service.characteristics)
  26. {
  27. if([characteristic.UUID isEqual:[CBUUID UUIDWithString:@"C9D1BE56-9027-4AE3-BE66-9E8BED3A1FC3"]])
  28. {
  29. [peripheral readValueForCharacteristic:characteristic];
  30. return;
  31. }
  32. }
  33. }
  34. }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement