Are there any samples of a BLE Server implemented in C++ in a Linux environment? For context I have an NVIDIA Jetson TX2 board running Ubuntu and I'd like to have a BLE server in it that I can pair Android and iOS devices. The device will be broadcasting characteristics that the mobile app can subscribe to, and they can also send/receive messages preferably in JSON format. It currently has some Bluetooth codes but I think this only works in Classic mode:
...
int s = socket(AF_BLUETOOTH, SOCK_STREAM, BTPROTO_RFCOMM);
loc_addr.rc_family = AF_BLUETOOTH;
loc_addr.rc_bdaddr = *BDADDR_ANY_INITIALIZER;
loc_addr.rc_channel = (uint8_t) 22;
int b = bind(s, (struct sockaddr *)&loc_addr, sizeof(loc_addr));
...
I am still very new to C++, Linux and BLE development in general, so I'd like to get pointers to the right direction.