The Raspberry Pi 3 model B has inbuilt Bluetooth, using BlueZ stack. I want to know in which language the stack is written, Python or C?
The source code is written in C. Look at the BlueZ download site, and follow the links to the source code on github
Source code is also available in the GIT repositories at kernel.org.
Like @greenonline says, Bluez is written in C, but the newer code base allows for interactions with Bluez through their
DBus API. Much of the example code is written in
Python and is a bit more accessible than the C code.
If you look in the
test/ folder of the GIT Repo lots of the examples are written in Python (The executable files don't have the .py extension, but are just python scripts). Overall documentation is very sparse, but I've found that folder is a decent starting place for interacting with Bluez. Just keep in mind that you will need to run
bluetoothd with the
-E to use the DBus API as it's still experimental, you will also need to compile with the experimental code enabled.
Linux and GNU are both open source.
This means that the source code is freely available.
Go to the Raspbian repository and look at the source code for any package in which you are interested.