8 years, 2 months ago.

Central role troubleshooting help

Hi, I'm experimenting with using the BLE Nano as a Central. Starting with the example code, I was eventually able to discover and connect to a BLE lightbulb and control its color! Very cool. But there were a few strange things in the process that would like some insight into:

1) It would not connect until I changed Gap::ADDR_TYPE_RANDOM_STATIC to Gap::ADDR_TYPE_PUBLIC. Can someone explain what this means and why the examples all use ADDR_TYPE_RANDOM_STATIC?

2) When my connectionCallBack is called, params->handle is always null. I was still able to successfully call ble.gattClient().launchServiceDiscovery but I'm just curious why that handle is null.

3) I'm now trying to interact with a LightBlue Bean. I can discover it, and connect to it, but my Service of Characteristic callbacks are never called, even when using Wildcard. Can someone suggest a way to troubleshoot this?

Thanks! -Ken

Ken, can you share your code, please ?

posted by Domenico Luciani 27 Apr 2016

Hi Domenico. This code is from two months ago so I don't remember exactly how I left it! https://www.dropbox.com/s/gb9el0tioqey5yl/ble%20tests.zip

posted by Ken Aspeslagh 27 Apr 2016

For the bulb, since I could not successfully discover the characteristic, this code writes directly to the handle.

posted by Ken Aspeslagh 27 Apr 2016

Thank you very much! When I found a characteristic how can I write into it ? I want to write a simple one only way application: " Server: Advertising -> Accept connect request -> Send "Hello World" Client: Scan -> find a device -> Send connect request -> print string received by the server ("Hello World)

Can you help me how do this ? Thanks!

posted by Domenico Luciani 13 May 2016
Be the first to answer this question.