What is the sequence about bluez ble mesh interface as a provisioner? - bluetooth-lowenergy

The latest bluez supports ble mesh interfaces (APIs). But, I don't know exactly what is the sequence that I should call by using these interfaces as a provisioner.
First, I can start to call UnprovisionedScan() and CreateNetwork and AddNode... and some authentication and provisioning interfaces. Could you guide me to the correct method calling sequence?

Related

BLE device not disconnecting

I am working with BLE devices. and using nrf controller with bluez 5.4 code.
I am customizing gatttool source code so that multiple devices can connect and disconnect.
My focus part for now is how to disconnect ble device using gatttool apis.
I had found one solution in code that we can use:
g_io_channel_shutdown();
g_io_channel_unref();
These 2 APIs are use to disconnect ble device.
I am using nrf connect application in my mobile to connect generate dummy ble device so that I can perform operations.
When I use this for disconnecting device any other formalities are needed in between or only these APIs are ok?
I am not able to disconnect using these APIs.Some time it is give effect and some time it is not working.
If any one have idea abut this please respond.
Thanks in advance.
Do you mean Bluez 5.4 or Bluez 5.40? Either way, they are quite old releases.
gatttool is one of the BlueZ tools that has been deprecated in BlueZ.
Ideally you would be using the BlueZ DBus API to interact with BlueZ.
Not sure if you are creating a GATT Server (peripheral device) or GATT client (Central Device) but there are examples of both in the BlueZ source:
https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/test/example-gatt-server
https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/test/example-gatt-client
These examples are in Python, but most languages have DBus libraries to help access the API which are documented at:
https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/doc/adapter-api.txt
https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/doc/device-api.txt
https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/doc/gatt-api.txt

Raspberry Pi3 BLE only accepts a single connection

I have created a BLE peripheral that exposes a GATT service. It uses BlueZ 5.50, but it seems that only one device can connect to the GATT service. When the device is connected, then other devices can't see it anymore. It's not showing up in a scan anymore and if it was already scanned, then I can't connect to it anymore.
It seems to be a limitation or configuration issue in BlueZ, because when using the Paypal GATT library it can handle multiple connections. As far as I know, the RPi3 BLE chip should be able to handle up to 10 connections.
Does anyone know if this can be done using BlueZ?
The Paypal GATT library directly connects to the HCI device and bypasses most of the kernel stuff. BlueZ depends on kernel drivers and user-space applications and is capable if the driver reports that the controller allows multiple connections. You need a decent BLE controller and a recent kernel to make it work.
More information can be found in https://github.com/bluez/bluez/issues/12.

Movesense direct access to GATT endpoints

I am trying to read ECG real-time data from a movesense sensor by using another generic BT-LE module.
GATT characteristics can be used for Heart Rate (read or notify) or other predefined services : we simply send a raw command to an endpoint, for example a 0x0100 (START_NOTIFY) on the corresponding UUID for a heart rate notification streaming.
The problem is that with a micro controller and a BT LE module we can not use any of the C, Java, React... libraries since all of the underlying code is not open source ( the movesense device-lib and community-lib do define how to use and program the services, but we can not discover what to send on one of the 2 other services that are defined, the UART service or the Unknown Service, which are probably used by the movesense library to send all of the URL requests).
As a footnote, we access our generic BT-LE module with AT UART commands to communicate to the movesense platform.
Thanks for any help or guidance,
FS
Have you looked https://bitbucket.org/suunto/movesense-device-lib/src/master/samples/ble_std_services/CustomBleController.cpp
void CustomBleController::OnUartData(uint8_t * p_data, uint16_t length)
for receiving and
send_ble_nus_data(buffer, BUFFER_LENGTH);
to send using NUS (Nordic UART service).
It is possible to do your own GATT service on Movesense sensor (since v. 1.6.0) using the CustomGATTService module. Please look into latest movesense-device-lib and the sample "custom_gattsvc_app" (and with 2.0, the "gatt_sensordata_app")
Full Disclaimer: I work for the Movesense team

Raspberryy pi 3 BLE Devices

I am new to android.I have Raspberry pi 3 device.I can connect mobile device to Raspberry pi 3 over classic Bluetooth.now i am confused about Raspberry how to connect mobile device to Raspberry over bluetooth low energy.we can connect BLE device to android device and get Characteristics and can write Characteristics.now i want to do same thing in Raspberry pi 3 like (heart rate monitor,MI band 2)
Do it using a program
You can do it programmatically using DBus Calls. DBus is an interprocess Communication method used in linux. You can use DBus bindings for different languages such as python or C to make the DBus calls and do the operations.
A few links to help you get started :
DBus tutorial - https://dbus.freedesktop.org/doc/dbus-tutorial.html
BLE DBus API - https://elinux.org/images/3/32/Doing_Bluetooth_Low_Energy_on_Linux.pdf
Using Gatttool from terminal
Gatttool is a terminal tool just like hcitool. You can use the following commands to get the thing working:
hcitool lescan Gives you the list of nearby Low Energy Devices
gatttool -b mac_adress_of_le_device -I gives you an interactive session with the mentioned LE device
From the interactive session give connect to connect to the device
primary to get the primary services.
From this result, you can use the handle values to get the list of characteristics of a specific service. characteristics handle
To get the value of a characteristic use char-read-hnd handle
To get the characteristic descriptor, use char-desc handle
to write to a characteristic char-write-req handle value
Hope This helps!

When Talking to a sensor IoT device from Bluemix Node-RED, what is the reasoning for connecting to IoT Foundation?

I see in the recipes for Bluemix that when I connect my Arduino Uno up with a sensor, that it's asking me to use the catalog boiler plate for IoT foundation (IoTF) rather than just the Node-Red boilerplate. What is the reasoning for this? What more is IoTF providing? Is IoTF providing the MQTT broker? Anything else? (note: I don't want to store any data, so don't want to pay for that)
The difference between the two boiler plates is that the IoTF boiler plate comes with a example flow already deployed, and an instance of the IoTF service bound.
The IoTF service provides a shared MQTT broker and specifies topics to use so you do not clash with other users

Resources