BLE Shield used for ANCS iPhone - ios

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!

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:
http://i.got.nothing.to/code/on/avr-for-ble-and-ios
and the library:
https://github.com/guyzmo/avr_nrf_ancs_library
HTH

Related

Pair and Connecting to Bluetooth Classic Speaker iOS

I realise most of the searches are quite old on this topic and not after Core Bluetooth now supports more than just BLE connections (https://developer.apple.com/videos/play/wwdc2019/901?time=556).
Simply by running the RxBluetoothKit example app I am able to discover my speaker and inspect its services. However I am unsure how to actually get the speaker to pair with the phone, after a while the speaker disconnects. I am struggling to get information on the protocol and/or how to proceed.
Or is this still not possible: "And so if you're calling connect on a BR/EDR device, if your app is in foreground, then we'll try to make a connection out to that device for you." - it seems like querying and communication with an already paired device is what they were getting at in the talk.
Thanks in advance.

PunchThrough LightBlue how do you make a virtual device send a notification?

I'm developing an Android app that is a BLE central. I don't yet have access to the peripheral device. This would be a typical scenario for a virtual device simulator like LightBlue. I can scan and connect client-peri and I can enable notifications by writing the CCCD. If I use LightBlue's Time profile I can get Current Time characteristic notifications once per second. What I need to do is to add a custom characteristic and make that send notifications either at a specified interval or preferrably when pressing a button. How do I do that?
I'm also all ears for other methods or apps that can help me. I can't program my own peripheral app because I only have an iPhone and I don't have access to a development environment for iOS at the moment.
Hoping for insights!
thanks!

How to clone BLE device (configurations,charcterstics etc)and share it with other

I am working on an app that gets data from the BLE device, I am able to code to get the app to connect with the BLE device. But further characteristics read is an issue as I don't physically have the device
i came across an app named nRF Connect for Mobile . It has the functionality to clone BLE if paired. the video for a BLE clone is shown here but export and import is not avaible
Is there any way I can get the BLE cloned say some configuration file, which then imported in certain app create then same BLE device .i can use to read all the characteristics and other properties
Why don't you just connect to the device in for example nRF Connect, write down the services, characteristics and descriptors you see (usually isn't that many). Then just set up a local GATT server with the same content.
If I understood your question and your video correctly, you would like to copy the advertisement data of a BLE peripheral and use it to advertise on an iOS device yourself.
Maybe CBPeripheralManager can help you do that.
You can call startAdvertising([String:Any]?) and advertise a BLE peripheral.
But iOS limits on a system level which keys you can advertise.
From a short look in the documentation, it seems only the keys
CBAdvertisementDataLocalNameKey
CBAdvertisementDataServiceUUIDsKey
are supported.
But if you'd want to include more information about your peripheral, you could still create an own CBMutableService "deviceInfo" and send information within a characteristic after having established a connection.

Sending data from computer to iOS using Core Bluetooth

Is it possible to send data from any computer the supports BLE (Windows or Mac) to an iOS app's CBCentralManager?
The data I want to send is purely text based. I'm searching for it but I am not being able to find if it is possible or a tutorial of how to do it.
Any help would be greatly appreciated.
Yes, normally you can do that. What you have to do is:
From the peripheral device (transmitter), advertise an CBService
(iOS) with a CBCharacteristic that support write value.
From the receiver, you create a CBCentralManager to search for the service created by the transmitter, then discover the right CBCharacteristic. Once the CBCharacteristic discovered, you can try to write value to that characteristic.
The processus look simple, but you have to do step by step on the receiver's side:
first, look for device
if device found, try to connect
then once connected to that device, try to discover the service
then once the service discovered, try to discover the characteristic
then once the characteristic is discovered, try to send
then you will receive the result of sending (ok or failed)
Take a look at my project in github, it's not complete but it show you how to exchange data between 2 BLE devices. The application is for iOS, but I'm pretty sure that you have the same code in Mac OS. I don't know how it works on PC.

Alerting from a ble device

Do the likes of flic, tile and pebblebee implement their own ble services/characteristics ? Or are they using standard ble profiles ?
I'm building a ble device and would like to make the phone alert/ring when a button is pressed on the device and googling doesn't suggest a standard.
The simple answer, both devices have to have a immediate alert service exposed in order to have 2 way alerting.
I'm using a microchip rn4020 which wasn't scanning the central device for services, once I corrected that i could see the phone app was presenting the immediate alert service.

Resources