0

I know this questions has been asked multiple times, But My case is slightly different from others. I am successfully able to connect and receive values from a heart rate device within my app (iPhone 5, iPhone 4S, iPad 3) with different ios versions. But in client end, Its not working at all, dont know why.

Also i debug the code again today and its working fine with iPhone 5,5C and iPAd 3 but in iPhone 4S with iOS 6.1.3, I got CBCentralManager.state = 2 ( is not powered on) May be this is the issue in client ends too?.

Can someone explains me what is happening? If same code runs fine on iPhone5,5c,iPAd 3 then why not in clients end as well as now mine 4S ? Can someone point me what is happening as now i am totally frustrated with this. Any guidance will be really appreciable. Thanks

york
  • 149
  • 1
  • 11
  • Is their Bluetooth On? When do you check for CBCentralManager state? – Larme Dec 18 '13 at 15:26
  • Yes, bluetooth is on, They are trying with some another app at that time too simultaneously, In that app, its working fine. What is reason for state 2? Every post keep saying that we should wait until - (BOOL) isLECapableHardware to get the state on first and then if its on we should use the uuid and further actions. I have done this in same manner. But still it is returning state 2 for my iPhone 4S with version 6.1.3. Even i ran the apple sample code (HRM) today, Its also retuning me state 2 in 4S. – york Dec 19 '13 at 05:54

1 Answers1

-2

iPhone 4S does not support BLE. And central/peripheral manager state == 2 actually means 'Unsupported'. 'Not powered on' state is 4. Take a look at apple core bluetooth reference: https://developer.apple.com/Library/ios/documentation/CoreBluetooth/Reference/CBCentralManager_Class/translated_content/CBCentralManager.html#//apple_ref/c/econst/CBCentralManagerStateUnknown