Multiple BLE profiles - bluetooth-lowenergy

Is it possible to setup multiple BLE profiles using Bluez, for use in a single connection?
For example to allow a device to support a GATT profile and also use a PAN network access profile simultaneously.
Thanks
Update:
Thanks for the comment.
What I'm trying to achieve is an embedded device which connects to a phone app over BLE.
This connection will support a GATT protocol for accessing attributes on the device, but also BLE tethering so that the device has a direct internet connection through the phone. And both will work simultaneously.

Its possible. PAN profile and GATT are not depend on each other.

Related

Why use mqtt server for BLE gateway?

I have a BLE temperature sensor, which should send measurements to an ESP32 via a BLE connection and my plan was that the ESP32 could send the measurements via WiFi to my database (Firebase Realtime Database). However, I have seen from a few tutorials that a mqtt server would be neccesary (see the screenshot below - link to the video: https://www.youtube.com/watch?v=PBYCG-ypvRY). Could someone please explain to me why the mqtt component is neccesary? Currently I am measuring temperatures using my ESP32 (without the BLE temperautre sensors) and sending them directly to the database, so I am confused as to why with BLE I would need a mqtt server.
Thanks for your help in advance!
You don't need MQTT. It's just one of the IoT-friendly protocol alternatives (like HTTPS, AMQP, CoAP, homebrew, etc) available to you for device-to-server communication. There are pros and cons to each one. It's up to you to choose whatever solution is relevant to your system.
If you've already implemented the Firebase HTTPS interface and it does the job, you're done.
If you are having problems, note that the Google IoT Core also prescribes MQTT (or, alternatively HTTPS) as an underlying messaging protocol - used together with the Device SDK for Embedded C. But this is for people who want to have a large-scale authentication and management solution for their devices. By all means, stick to your existing solution if it works.

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.

How to manage bluetooth beacons through web?

What I want to do is have a complete control on beacon remotely through web/mobile app (RestApi). I already gone through following sites,
1)https://nectarkast.com/index.html
2)https://kontakt.io/products-and-solutions/beacon-software/
How do these site working? Are they using some custom beacons that has Wifi or network connecting functionality, any help would be really appreciable.
You need (a) a beacon with internet access or (b) a base station near those beacons with internet access and the ability to connect to them via Bluetooth to configure them.
It is also possible to build beacons using Lora, SigFox, or other IoT radio technologies that effectively gives a very low power internet connection that uses little battery.

Mobile to controller secure bluetooth ble communication

We seek your help in implementing bluetooth on our smart home controller. Our current scenarios is described below:
We want secure communication between our embedded linux controller(our smart home hub) and user's mobile phones running android/iOS.Our system is in home automation.
The hub in turn communicates with home devices that support a different protocol - we need to make communication between hub and mobile devices using bluetooth.
Currently there is not direct communication between our hub and mobile phone except through the internet.
We will use Bluetooth 4.x, not 5 for hardware support on the controller.
We are using nodejs on our controller and standard bluethooth OS libraries on android/iOS. We are open to suggestions.
Our main concern is to establish secure communication between phone and the hub. With this regard we are looking for implementation guidance on pairing and communicating securely. We have been able to establish unsecure communication - exposing characteristics and services on the hub. Our understanding of the bluetooth protocol is limited and we have only used libraries available for users.
Please provide specific pointers as to what we should do and what is possible.

Programming a BLE Beacon to connect with server

I am developing a solution where, Fixed BLE beacon detects a moving BLE device and sends the relevant data to the server using wifi/ethernet/etc. All the examples I have found have BLE beacons talking to the mobile phone which in my case isnt true. AFIK an embedded systems engineer can configure the fixed beacon to send data to server. BUT is there any ready to use solution that lets the beacon connect to backend? Thanks.
You mention having a "[f]ixed BLE beacon [detect] a moving BLE device". Understand that this is very different from the way an Apple-style BLE iBeacon works, which is a transmit only device. (I mention this because the question is tagged with ibeacon.)
What you are describing is probably better described as either a beacon scanner or a BLE scanner. My company has a Raspberry Pi-based product that can scan for beacons and take programmatic action based on detections. We have a blog post about how to make a beacon turn on a lamp using this device, but you could just as easily make it contact a server when a BLE device is detected.

Resources