arduino / ArduinoCore-arc32

GNU Lesser General Public License v2.1
329 stars 284 forks source link

Cannot discover attributes #589

Open jarne14 opened 6 years ago

jarne14 commented 6 years ago

Hi, Working with CurieBLE (version 2.0.0) on my Intel Curie Nano Board (version 2.0.2), I'm trying to use SensortagButton from "CurieBLE->Central" samples on Arduino IDE 1.8.5. I managed to scan my device, print advertised service, connect, but when it comes to discover attributes it fails.

Discovered a peripheral
Address: F5:E2:ED:45:19:33
Service UUID's: d5060001-a904-deb9-4748-2c7f4a124842 
RSSI: -69
Device connected 
Attribute discovery failed!
Device disconnected

In rare cases, discoverAttributes() returns true, but no service is found, no characteristic either. Curiously, i manage to list every services and characteristics using a BLE Scanner app on my android phone.

Any clue ?

AnthonyFaubert commented 6 years ago

I'm having a very similar issue. I'm trying to connect to Vector 3 cycling power pedals, but it's never able to discover attributes. Output from PeripheralExplorer example that was modified to not check the localName:

Found EF:76:B5:CC:36:A0 'V3 BLE:0324108' 1818
Connecting ...
Connected
Discovering attributes ...
Attribute discovery failed!

I've heard that the CurieBLE library can only handle devices with about 8 characteristics total. Checking with nRF app, this device has a total of 18 characteristics. Doing some debugging of the libraries, I found that if (ENOMEM == errno) was evaluating to true (in CurieBLE > src > internal > BLEProfileManager.cpp), which seems to indicate a memory error. Is there any way to work around this limit? My Curie Nano is completely useless to me until I can find a way around this.