• 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: [BTLE] Sending data to a Peripheral
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [BTLE] Sending data to a Peripheral


  • Subject: Re: [BTLE] Sending data to a Peripheral
  • From: Christian Giordano <email@hidden>
  • Date: Thu, 22 Nov 2012 14:19:48 +0000

It turned out the problem was indeed in the permissions set to 0 instead of CBAttributePermissionsWriteable in the Peripheral characteristic.

I guess the only way to send a big chunk of data remains setting the characteristic value. I assume besides the usual @"EOM" at the end, I should start it with a @"BOM" at the beginning. The speed I get is roughly 300 bytes/sec.

Am I doing anything wrong? Is there any other way to have a faster transfer from Client to Peripheral?


Thanks a lot, chr


On Mon, Nov 19, 2012 at 4:02 PM, Christian Giordano <email@hidden> wrote:
I am building both Peripheral and Central, for the time being, in iOS. For my project I would like the Central to send some data to the Peripheral (I know this should be tiny because BTLE is not as fast as normal BT).
Anyways, in the Peripheral I advertise a service with 1 characteristics with CBCharacteristicPropertyWrite (permissions is 0).

In the Central I write value on the characteristic with type CBCharacteristicWriteWithResponse.

I get two problems:

1) when I try to advertise the service from the Peripheral I get this warning: CoreBluetooth[WARNING] The advertisement key 'Service Data' is not allowed

2) when the Central writes the values, it gets, in peripheral:didWriteValueForCharacteristic:error:, error: Error Domain=CBErrorDomain Code=1 "One or more parameters were invalid." UserInfo=0x1d0348c0 {NSLocalizedDescription=One or more parameters were invalid.}

I started from Khaos sample so I am just passing @"DA12312". Later I would like to pass much bigger data.


Thanks a lot for any advice, chr

 _______________________________________________
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

  • Follow-Ups:
    • Re: [BTLE] Sending data to a Peripheral
      • From: Khaos Tian <email@hidden>
References: 
 >[BTLE] Sending data to a Peripheral (From: Christian Giordano <email@hidden>)

  • Prev by Date: RE: iOS6 access to SMS, email, and call notifications using Bluetooth Smart / BLE
  • Next by Date: Re: [BTLE] Sending data to a Peripheral
  • Previous by thread: Re: [BTLE] Sending data to a Peripheral
  • Next by thread: Re: [BTLE] Sending data to a Peripheral
  • Index(es):
    • Date
    • Thread