Re: AW: BLE central device as GATT server
Re: AW: BLE central device as GATT server
- Subject: Re: AW: BLE central device as GATT server
- From: Jacky Tsoi <email@hidden>
- Date: Tue, 12 Nov 2013 00:49:23 +0800
Hello Stephan,
iOS app can be BLE central or peripheral. But you are right that, while it is the central, it can only be GATT client, and while it is peripheral, it is the GATT server.
There's one exception -- the new ANCS in iOS 7. The ANCS is provided by the iOS itself, and no matter iOS device is in central or peripheral, the ANCS is always the "GATT server".
--
Jacky @iPhone
> On 11 Nov, 2013, at 23:15, Walter Stephan <email@hidden> wrote:
>
> András, thanks for being patient and explaining this to me!
>
> So the answer to my original question is that iOS cannot act as a (proprietary) GATT server while in a Central role.
> (I was confused because from the nRF8001, I was able to connect to the Time Service published by iOS.)
>
> You are right that the nRF8001 cannot scan or initiate a connection.
>
> In conclusion, I will have to implement my functionality as a service on the accessory.
>
> Best regards,
> --Stephan Walter
>
>
>> Even thought the specification may allow you to create a GATT server on
>> the central side (as I understood it from the specifiaction), the iOS
>> Core Bluetooth does not provide this functionality. The DB is tied to
>> the CBPeripheraManager which is the peripheral role. At the same time
>> "The nRF8001 is a pure BLE Peripheral device, and it can not be used as
>> a Central." (https://devzone.nordicsemi.com/index.php/can-the-nrf8001-
>> be-used-as-a-central) So I suppose the nRF8001 cannot scan for devices
>> or start a connection. As a consequence, it is not able to connect to
>> the GATT server implemented by the CBPeripheralManager.
>>
>> So what you can do:
>> - the mRF8001 must advertise
>> - the iOS device must scan for the nRF8001
>> - the iOS device must connect the nRF8001 and discover its services.
>>
>> At this point it's up to you how you implement the communication. It is
>> possible to have a single service with a single characteristic on the
>> nRF8001 side and implement a higher level protocol that implements a
>> database in a GATT serverish way. This is not preferred for several
>> reasons (this is not the usual way of doing things and you lose most of
>> the optimizations provided by the underlying stacks) but it's your
>> choice.
>
> _______________________________________________
> 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
_______________________________________________
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