1

I have a http://redbearlab.com/bleshield/.

I successfully tested the Chat example and i have sent a message from iPhone to Arduino.

Now i want to test the ANCS functionality. From what i heard, the iPhone must be the Peripheral and BLE Shield must connect to ANCS service and then it will receive notifications.

Is it possible to discover and connect to bluetooth devices using BLE Shield? How?

Thank you!

1 Answer 1

3

Is it possible to discover and connect to bluetooth devices using BLE Shield?

yes it is possible! I'm currently writing an article and I'm also about to publish a library that handles ANCS notifications. It's way more complicated than only running the Chat example, though.

How?

To access the ANCS, here are the key things to do:

  • open nRFGoStudio
    • add the ANCS services into the pipe definition
    • force bonding to access the services
    • and generate the new services.h
  • in your code
    • when bonding is done shutdown and restart the BLE radio
    • wait until the ANCS pipes are opened
    • when they all are opened, subscribe to the ANCS Notification Source

to get more details, and a working library, please have a look at the following article I wrote:

and the library:

HTH

12
  • 1
    hope you'll like the article :-)
    – zmo
    Apr 7, 2014 at 14:03
  • Cool, man! But I have a few questions. Did you start from a template? Which one? Did you use the proximity template? Because your Nrfgo screenshot shows different services that the proximity templates has. Do you must have an iOS App or you have to connect from Settings or it will just connect? In NRFgo in Gap Settings what did you check and what didn't you check? Apr 7, 2014 at 18:17
  • I did indeed start with the proximity template (it's written in the article). The GAP settings are mostly the same as Proximity's defaults, and you can use my .xml profile here, but honestly, the GAP settings are mostly try and err to build.
    – zmo
    Apr 8, 2014 at 12:21
  • I've done all my BLE projects using an iOS app, lightblue or custom made, and having the iOS App trying to connect to one characteristic of the device to force the bonding. I guess it could be possible to start the bonding from the device by accessing a publicly advertised characteristic on iOS side, but I'm not sure if that'd work.
    – zmo
    Apr 8, 2014 at 12:22
  • 1
    uhuh... the guy says you can use a specific payload but does not tell about it, or give a link to the forum.
    – zmo
    Apr 8, 2014 at 13:04

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.