• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Central connection to peripheral and dynamic characteristics
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Central connection to peripheral and dynamic characteristics


  • Subject: Re: Central connection to peripheral and dynamic characteristics
  • From: András Kövi <email@hidden>
  • Date: Fri, 03 Aug 2012 10:26:22 +0200

Hi all,

*** updateValue issue:

I partly solved the updateValue issue. It seems the
CBPeripheralManager::updateValue behaves differently than it is
expected. Either the documentation is not appropriate or the
implementation is inconsistent.

The documentation sais: onSubscribedCentrals is an array of CBCentrals
The real experience is: onSubscribedCentrals is accepted if it is an
array of the UUIDs of the CBCentrals.

The update happens on the remote central but then I receive a memory
deallocation exception. Something wants to free a pointer that was not
allocated by malloc. I'll try to malloc_error_break debug this.

*** centralDidConnect issue:

The centralDidConnect callback has never been invoked by the
framework. Even if connection was set up.

Best regards,
Andras

2012/8/3 Andras Kovi <email@hidden>:
> 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

References: 
 >Central connection to peripheral and dynamic characteristics (From: Andras Kovi <email@hidden>)

  • Prev by Date: Re: Use Built-In Bluetooth Bluetooth for iOS Simulator?
  • Next by Date: Central manager behaves inconsistently on Mac issue
  • Previous by thread: Central connection to peripheral and dynamic characteristics
  • Next by thread: Use Built-In Bluetooth Bluetooth for iOS Simulator?
  • Index(es):
    • Date
    • Thread