This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Using bluez for a client to connect with nRF51822?

I have a nRF51822 mkit board which I would like to use as a BLE peripheral to connect to my linux computer with BlueZ. I would like to be able to have a simple GATT connection. The computer should scan for the device, connect to it, and they should each read from the other's GATT attributes.

An example like this would be simple enough: The board stores an int and if it's even, LED1 is on, if it's odd, LED2 is on. It connects to the computer. The computer reads the int from a GATT attribute, does some calculation (maybe adds 1 to it). The board reads this new int from the computer, and updates its local version (and the LED which is on changes accordingly). Then they disconnect, and ten seconds later they do it again. Maybe in the meantime the computer does the same thing with another identical board.

I think can handle writing the program for the board to run, but can anyone give me any guidance on how to get the client side working with BlueZ? I am finding very little documentation for this, and most of what I do find is just peripheral behaviour.

Related