Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(sState==NSETSERVICESTATE){
- Serial.println("Going to locate service");
- sState=DISCOVERINGSERVICE;
- ble.gattClient().launchServiceDiscovery(chandle.connHandle, ServiceCallBack, CharacteristicCallBack, service1_uuid,chars_uuid1);
- }else if(sState==FOUNDSERVICE && !ble.gattClient().isServiceDiscoveryActive()){
- Serial.println(" Discovering Chars");
- // if(charB1.cs==NSETCHARSTATE)
- // {
- // Serial.println("Searching CharB1.");
- // charB1.cs=DISCOVERINGCHAR;
- // ble.gattClient().launchServiceDiscovery(chandle.connHandle, ServiceCallBack, CharacteristicCallBack, service1_uuid,chars_uuid1);
- // }else
- if(charB2.cs==NSETCHARSTATE && charB1.cs==CHARFOUND && notifyset)
- {
- notifyset=false;
- printchar(chars1);
- delay(1000);
- Serial.println("Searching CharB2.");
- charB2.cs=DISCOVERINGCHAR;
- ble.gattClient().launchServiceDiscovery(chandle.connHandle, ServiceCallBack2, CharacteristicCallBack2, service1_uuid,chars_uuid2);
- }else if(charB3.cs==NSETCHARSTATE && charB2.cs==CHARFOUND)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement