Bluetooth LE on iOS cannot work with many services and characteristics

I develop a BLE application, using Core Bluetooth in my iPhone app. My iPhone communicates with linux with bleno launched. The problem is that it cannot work with more than one characteristic or service, though just one characteristic works nice. Here is my code for iOS and .js code for Node.js:

http://pastebin.com/k5pUrbLt http://pastebin.com/biCWLmJ3

Thank you!

P.S. That's what i get in console:


2014-07-24 13:18:02.819 lexy[142:60b] didDiscoverPeripheral
2014-07-24 13:18:04.503 lexy[142:60b] didDiscoverServices
2014-07-24 13:18:04.506 lexy[142:60b] D61191C0-FCE8-4F5A-912C-15EE39D927B4

I.e. I successfully discover and connect to the peripheral, but I do not find any characteristics. In that case I have one service with many characteristics.

iOS can work with multiple characteristics and multiple services on a remote device.

Your ObjC code seems okay (1 service with 2 characteristics).

Console output suggests that you send a discoverCharacteristics request but that it hangs and never returns. You could add logging to the didDisconnectPeripheral delegate method to see if there is a disconnect happening.

What you could also do is to look at the logs of the Bluetooth stack and to compare them to how the logs look like if you access a TI Sensor Tag (those tags are the hello world of BLE).

iOS 7.1 instructions for Bluetooth logs are located here, for iOS 8 you'll have to resort to Apple's official way to get the logs (installation of a configuration profile) but their logs contain less information than the ones by BluetoothCompanion.

Apparently, it works on Ubuntu 14.04, but doesn't work on OpenSuse 13.1.