Skip to contentSkip to conversation

"complex" Bluetooth handling

DISCUSSION Marco Trapanese 3 participants 5 messages Jun 15, 2016 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

Hello,

I'm working on an unattended machine (i.e. with no direct user interaction) which should handle the following Bluetooth features:

- A2DP
- AVRCP
- HFP
- GATT server
- ANCS consumer

all at the same time. I mean, the user might listen to a song and answer to incoming calls, while he's receiving the ANCS notifications and exchanging data through a custom GATT profile.

I have a USB / BT,BLE dongle and I'm using Raspbian Jessie with bluez 5.40.
Right now I'm just trying to make the things work before write a C++ application which manages all the stuff.

First question:

1. I mainly find Python scripts, but I'm interested into Qt5/C++ libraries. Is there something out there? Before write a new one from scratch....

2. Do you know any working example to subscribe to ANCS push notifications?

3. Do you have any suggestion about how to handle all those profile together?

Thanks!
Marco

#1 lore raw

Hi,

For BLE there is a library called TinyB which is pure c++ https://github.com/intel-iot-devkit/tinyb
Although I'm not sure it support classic BL profiles but I guess you can start with that.

Good Luck,

Shiran Ben-Melech
SW Engineer @ Flex Services | Intel Corporation
iNet: 8-465-3851 | Cellular: 054-6662594
Website: http://flexservices.intel.com

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Marco Trapanese
Sent: Wednesday, June 15, 2016 08:11
To: [email protected]
Subject: "complex" Bluetooth handling

Hello,

I'm working on an unattended machine (i.e. with no direct user interaction) which should handle the following Bluetooth features:

- A2DP
- AVRCP
- HFP
- GATT server
- ANCS consumer

all at the same time. I mean, the user might listen to a song and answer to incoming calls, while he's receiving the ANCS notifications and exchanging data through a custom GATT profile.

I have a USB / BT,BLE dongle and I'm using Raspbian Jessie with bluez 5.40.
Right now I'm just trying to make the things work before write a C++ application which manages all the stuff.

First question:

1. I mainly find Python scripts, but I'm interested into Qt5/C++ libraries. Is there something out there? Before write a new one from scratch....

2. Do you know any working example to subscribe to ANCS push notifications?

3. Do you have any suggestion about how to handle all those profile together?

Thanks!
Marco

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
---------------------------------------------------------------------
Intel Electronics Ltd.

This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.

#2 lore raw

Il 15/06/2016 08:54, Ben-melech, Shiran ha scritto:

Quoted 2 lines

For BLE there is a library called TinyB which is pure c++ https://github.com/intel-iot-devkit/tinyb
Although I'm not sure it support classic BL profiles but I guess you can start with that.

Thanks, it's interesting but I think it's just a guide to make my own library because it doesn't support GATT server yet:

Quoted 1 line

At this time it is not possible to create a BLE server

(from https://github.com/intel-iot-devkit/tinyb/issues/16)

I found an example in Qt5:

https://doc-snapshots.qt.io/qt5-dev/qtbluetooth-heartrate-server-example.html

I will try it as soon as possible.
If it works only ANCS is still uncovered.

Best regards
Marco

#3 lore raw

Hi Marco,

Quoted 14 lines · Marco Trapanese

Il 15/06/2016 08:54, Ben-melech, Shiran ha scritto:

Quoted 5 lines

For BLE there is a library called TinyB which is pure c++
https://github.com/intel-iot-devkit/tinyb
Although I'm not sure it support classic BL profiles but I guess you can start with that.

Thanks, it's interesting but I think it's just a guide to make my own library because it doesn't support GATT server yet:

Quoted 1 line

At this time it is not possible to create a BLE server

Quoted 8 lines

(from https://github.com/intel-iot-devkit/tinyb/issues/16)

I found an example in Qt5:

https://doc-snapshots.qt.io/qt5-dev/qtbluetooth-heartrate-server-example.html

I will try it as soon as possible.
If it works only ANCS is still uncovered.

I guess you don't want a mixed topology with both LE/BR, in that case you will probably need to work in support GATT over BR/EDR properly since the focus was on LE link. For audio, and media in general, that have been a lot of work around car IVI systems, so provided you use the same components (e.g. PulseAudio, oFono) this should work out of the box.

Signature · 1 line
Luiz Augusto von Dentz
#4 lore raw

Il 15/06/2016 09:53, Luiz Augusto von Dentz ha scritto:

Quoted 7 lines

I guess you don't want a mixed topology with both LE/BR, in that case you will probably need to work in support GATT over BR/EDR properly since the focus was on LE link. For audio, and media in general, that have been a lot of work around car IVI systems, so provided you use the same components (e.g. PulseAudio, oFono) this should work out of the box.

Yes, PulseAudio and oFono "work out of the box" after fixing a looooot of issues :)
But I still need a library to handle them for example to enable them or manage connections, pairing, trusting, etc.. from my application.

About LE it's the only topology I need to exchange data, i.e. no need for "old" RFCOMM.
But still I need to have both a GATT server and an ANCS consumer (which should be a GATT client acting as a Central as far as I understand) working at the same time.

Thanks
Marco