Is it possible to write data to a BLE broadcasting device? - bluetooth

My current understanding of the BLE gap role "broadcast" is that it broadcasts data packets with no option to connect to that device.
My question is therefore: is it possible to combine the gap broadcaster with a gatt server that contains a writable characteristic, so that gatt clients still have the option to write to the gatt server?

Yes, you can combine the Broadcaster role with the Peripheral role, to achieve what you want.

Related

BLE broadcaster device

I would like my BLE device (running on Linux) to be a broadcaster (broadcast data) - no connection is to be allowed. Following are the questions I have:
Which BLE profile would be most suitable for this requirement?
I understand that GATT is mandatory - does it mean I should use GATT and advertise my data in beacon and disallow any connection?
I have seen that Windows doesn't scan a BLE device which is simply a broadcaster i.e doesn't allow connection. Why so and what should I do for Windows to detect my broadcaster device?
Regards

Is it possible to scan a bluetooth device to find it's capabilities

I am looking for a way to scan a device I own and discover "what it can do".
In other words, I'd like to know if a device is able to describe the way you have to communicate with it in order to build some application around it.
In my case it is a simple Christmas light that I'd like to play with but this could be used in different situations.
For classic bluetooth (BR/EDR):
When scanning for bluetooth devices (Inquiry), the bluetooth device will send an inquiry response (if it wants to be discovered) and maybe also an extended inquiry response (EIR). This EIR may already contain a list of services, the devices supports. This is a very fast way to get a picture of a remote device.
Moreover, the service discovery protocol (SDP) gives more information on a device. This takes some more steps. In SDP two devices can exchange their capabilites in kind of ping pong process.
For BLE:
After connecting a BLE device usually a service discovery takes place. The BLE peripheral (e.g. headset or a light) reports its capabilities to the central (e.g. smart phone). Some of these services have predefines functionalities. Additionally, it is free to the manufacturer to add custom services.

Can I read data using only GATT characteristics or do I need a GATT service too?

Is it possible to just add a single GATT characteristic to a BLE device and read from a bluetooth receiver, or do I need to add a GATT service to the BLE device to be able to read from the device? Would I need a GATT service apart from the Analog Output GATT characteristic to simply read analog output? In the end I simply want to read 16-bit bytes from a buffer on an arduino uno and send them over bluetooth.
Of course you need a service too. Service is a container for the characteristics.
The Generic Attributes (GATT) define a hierarchical data structure that is exposed to connected Bluetooth Low Energy (LE) devices.
The GATT profiles describe a use case, roles and general behaviors based on the GATT functionality. Services are collections of characteristics and relationships to other services that encapsulate the behavior of part of a device. This also includes hierarchy of services, characteristics and attributes used in the attribute server.
On top of the GATT hierarchy is a profile, which is composed of one or more services necessary to fulfill a use case. A service is composed of characteristics or references to other services. A characteristic consists of a type (represented by a UUID), a value, a set of properties indicating the operations the characteristic supports and a set of permissions relating to security. It may also include one or more descriptors—metadata or configuration flags relating to the owning characteristic.
GATT defines client (BLE Central) and server (BLE Peripheral) roles. The GATT server stores the data transported over the air to the GATT client and accepts requests, commands and confirmations from the GATT client. The GATT server sends responses to requests and sends indications and notifications asynchronously to the GATT client when specified events occur on the GATT server. GATT also specifies the format of data contained on the GATT server.

Control multiple BLE peripherals with one central

I am pretty new to IoT and BLE. What I want to achieve is to write on GATT characteristic of at least 100 peripheral devices simultaneously or in a very short period of time(i.e. less than 100ms). Currently my peripherals are Ble nano (nRF51822) with custom GATT service running on them. I am using my Mac as central BLE. I am using Node.js and noble to implement the central. I want to know if such thing is possible at all and if possible, please link me to an example code. :)
You should note that Bluetooth chips for computers are usually (quite arbitrarily) limited to only a few simultaneous connections. Common values are between 3 and 14. Even if you connect a few at a time, send the characteristic value, disconnect and then connect next devices it would be impossible to do this within 100 ms. If you want to send the same data to everyone you should instead let your computer advertise and the nrf devices scan. That way you broadcast the data instead.

How to connect to multiple bluetooth sensors to a device

I have multiple bluetooth sensors (20+) that I need to connect to whatever central device(PC, Phone, ...) via Bluetooth to collect the transmitted data.
I need to keep the connections active with the sensors because it is broadcasting data 20 times/second.
I already thought about using RaspberryPi to setup a Master-Slave pattern and enable multi Bluetooth connections, but I was wondering if there is a more elegant and simple way to do this.
The only objective is to collect the data simultaneously from the sensors. I have a no limitation for the "collector device" for the technology.
Thanks

Resources