Re: CBPeripheralManager state unsupported Mac OS 10.12.6

2018-02-06 Thread Saagar Jha
Wait, is it returning “unknown” or “unsupported”?

Saagar Jha

> On Feb 5, 2018, at 21:20, Devarshi Kulshreshtha  
> wrote:
> 
> My macbook is - MacBook Pro (13-inch, 2017)
> System Information shows -
> Bluetooth Low Energy Supported:   Yes
> LMP Version: 4.2 (0x8)
> 
> I know that if it shows a version of '0x6' or greater, BT 4.0 is supported. 
> However for some reasons I am getting state as unknown in the delegate.
> 
> 
> On Tue, Feb 6, 2018 at 2:07 AM, Saagar Jha  > wrote:
> What Mac are you using? Are you sure your Mac supports Bluetooth LE (I’m sure 
> you already know this, but I just wanted to make sure)?
> 
> Saagar Jha
> 
>> On Feb 5, 2018, at 05:25, Devarshi Kulshreshtha > > wrote:
>> 
>> I am trying to turn my macbook into BLE by using below code:
>> 
>> var peripheralManager: CBPeripheralManager!
>> let uuid = "A6C4C5FA-A8DD-4BA1-B9A8-A240584F02D3"
>> 
>> let options = [CBCentralManagerOptionShowPowerAlertKey:0]
>> manager = CBPeripheralManager(delegate: self, queue: nil, options: options)
>> 
>> For some reasons peripheral state being received in below delegate is
>> unsupported :
>> 
>> func peripheralManagerDidUpdateState(_ peripheral: CBPeripheralManager) {
>>if peripheral.state == .poweredOn {
>>let dataToBeAdvertised:[String: [AnyObject]] =
>> [CBAdvertisementDataServiceUUIDsKey : [CBUUID(string: uuid)]]
>>peripheralManager.startAdvertising(dataToBeAdvertised)
>>}
>> }
>> 
>> Any ideas on what could be the issue?
>> 
>> -- 
>> Thanks,
>> 
>> Devarshi
>> ___
>> 
>> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com 
>> )
>> 
>> Please do not post admin requests or moderator comments to the list.
>> Contact the moderators at cocoa-dev-admins(at)lists.apple.com 
>> 
>> 
>> Help/Unsubscribe/Update your Subscription:
>> https://lists.apple.com/mailman/options/cocoa-dev/saagar%40saagarjha.com 
>> 
>> 
>> This email sent to saa...@saagarjha.com 
> 
> 
> 
> 
> -- 
> Thanks,
> 
> Devarshi

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: CBPeripheralManager state unsupported Mac OS 10.12.6

2018-02-05 Thread Devarshi Kulshreshtha
My macbook is - MacBook Pro (13-inch, 2017)
System Information shows -
Bluetooth Low Energy Supported: Yes
LMP Version: 4.2 (0x8)

I know that if it shows a version of '0x6' or greater, BT 4.0 is supported.
However for some reasons I am getting state as unknown in the delegate.


On Tue, Feb 6, 2018 at 2:07 AM, Saagar Jha  wrote:

> What Mac are you using? Are you sure your Mac supports Bluetooth LE (I’m
> sure you already know this, but I just wanted to make sure)?
>
> Saagar Jha
>
> On Feb 5, 2018, at 05:25, Devarshi Kulshreshtha <
> devarshi.bluec...@gmail.com> wrote:
>
> I am trying to turn my macbook into BLE by using below code:
>
> var peripheralManager: CBPeripheralManager!
> let uuid = "A6C4C5FA-A8DD-4BA1-B9A8-A240584F02D3"
>
> let options = [CBCentralManagerOptionShowPowerAlertKey:0]
> manager = CBPeripheralManager(delegate: self, queue: nil, options: options)
>
> For some reasons peripheral state being received in below delegate is
> unsupported :
>
> func peripheralManagerDidUpdateState(_ peripheral: CBPeripheralManager) {
>if peripheral.state == .poweredOn {
>let dataToBeAdvertised:[String: [AnyObject]] =
> [CBAdvertisementDataServiceUUIDsKey : [CBUUID(string: uuid)]]
>peripheralManager.startAdvertising(dataToBeAdvertised)
>}
> }
>
> Any ideas on what could be the issue?
>
> --
> Thanks,
>
> Devarshi
> ___
>
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/saagar%40saagarjha.com
>
> This email sent to saa...@saagarjha.com
>
>
>


-- 
Thanks,

Devarshi
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: CBPeripheralManager state unsupported Mac OS 10.12.6

2018-02-05 Thread Saagar Jha
What Mac are you using? Are you sure your Mac supports Bluetooth LE (I’m sure 
you already know this, but I just wanted to make sure)?

Saagar Jha

> On Feb 5, 2018, at 05:25, Devarshi Kulshreshtha  
> wrote:
> 
> I am trying to turn my macbook into BLE by using below code:
> 
> var peripheralManager: CBPeripheralManager!
> let uuid = "A6C4C5FA-A8DD-4BA1-B9A8-A240584F02D3"
> 
> let options = [CBCentralManagerOptionShowPowerAlertKey:0]
> manager = CBPeripheralManager(delegate: self, queue: nil, options: options)
> 
> For some reasons peripheral state being received in below delegate is
> unsupported :
> 
> func peripheralManagerDidUpdateState(_ peripheral: CBPeripheralManager) {
>if peripheral.state == .poweredOn {
>let dataToBeAdvertised:[String: [AnyObject]] =
> [CBAdvertisementDataServiceUUIDsKey : [CBUUID(string: uuid)]]
>peripheralManager.startAdvertising(dataToBeAdvertised)
>}
> }
> 
> Any ideas on what could be the issue?
> 
> -- 
> Thanks,
> 
> Devarshi
> ___
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> 
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/saagar%40saagarjha.com
> 
> This email sent to saa...@saagarjha.com

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


CBPeripheralManager state unsupported Mac OS 10.12.6

2018-02-05 Thread Devarshi Kulshreshtha
I am trying to turn my macbook into BLE by using below code:

var peripheralManager: CBPeripheralManager!
let uuid = "A6C4C5FA-A8DD-4BA1-B9A8-A240584F02D3"

let options = [CBCentralManagerOptionShowPowerAlertKey:0]
manager = CBPeripheralManager(delegate: self, queue: nil, options: options)

For some reasons peripheral state being received in below delegate is
unsupported :

func peripheralManagerDidUpdateState(_ peripheral: CBPeripheralManager) {
if peripheral.state == .poweredOn {
let dataToBeAdvertised:[String: [AnyObject]] =
[CBAdvertisementDataServiceUUIDsKey : [CBUUID(string: uuid)]]
peripheralManager.startAdvertising(dataToBeAdvertised)
}
}

Any ideas on what could be the issue?

-- 
Thanks,

Devarshi
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com