Central connection to peripheral and dynamic characteristics
Central connection to peripheral and dynamic characteristics
- Subject: Central connection to peripheral and dynamic characteristics
- From: Andras Kovi <email@hidden>
- Date: Fri, 03 Aug 2012 00:56:02 +0200
Hi all,
I'm experimenting with the Bluetooth Core APIs and encountered some problems. I'd be grateful if someone could give me a hint of what I am doing wrong. I am using the HeartRateMonitor example application as client and implement the peripheral role on the iPhone 4S.
1. I never get the centralDidConnect callback even though the connection between the devices is established. Or at least the service and characteristic discoveries are successful and static characteristic readings are logged by the HeartRateMonitor application.
2. I receive the didSubscribeToCharacteristic callback but I cannot use the CBCentral received as argument as it raises an exception: 2012-08-03 00:44:45.502 HeartRateServer[489:907] Did subscribe to characteristic central:<CFUUID 0x1ed25740> 00000000-0000-0000-BBDA-427179445E7B characteristic:Unknown (<2a37>) 2012-08-03 00:44:45.505 HeartRateServer[489:907] *** Terminating app due to uncaught exception 'Invalid Object', reason: 'Argument <CBCentral: 0x1ed0d9a0 UUID = <CFUUID 0x1ed25740> 00000000-0000-0000-BBDA-427179445E7B> is invalid'
char heartRateData[2]; heartRateData[0] = 0; heartRateData[1] = 60;
[peripheralManager updateValue:[NSData dataWithBytesNoCopy:&heartRateData length:2] forCharacteristic:heartRateSensorHeartRateCharacteristic onSubscribedCentrals:[NSArray arrayWithObjects:subCentral, nil]]; <<<< EXCEPTION HERE
Best regards, Andras |
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Bluetooth-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden