can we make custom service without using UART for sending and receiving data and also how to receive the data in central side and for sending data?
can we make custom service without using UART for sending and receiving data and also how to receive the data in central side and for sending data?
Sure you can. Simply use GATTS API functions to provision your custom UUID base, GATT Service, Characteristic(s) and you are ready to use any GATT method on top of them to transfer data (you need to define your protocol and flow of course).
On the other side you will use GATTC API to discover services on the server and again use GATT methods on top of them to transfer data (according to protocol and flow you design).
Why people promote Nordic BLE UART Service is because they have complete set of examples (both Central/Peripheral roles for all nRF5x chips and also mobile app examples) and they do basically what you describe (and most of people need). Changing UUIDs to make it "custom" is then trivial job. However if you want to go harder way then you can build all that from API manually in your custom project (and e.g. use NUS examples only as inspiration).
Sure you can. Simply use GATTS API functions to provision your custom UUID base, GATT Service, Characteristic(s) and you are ready to use any GATT method on top of them to transfer data (you need to define your protocol and flow of course).
On the other side you will use GATTC API to discover services on the server and again use GATT methods on top of them to transfer data (according to protocol and flow you design).
Why people promote Nordic BLE UART Service is because they have complete set of examples (both Central/Peripheral roles for all nRF5x chips and also mobile app examples) and they do basically what you describe (and most of people need). Changing UUIDs to make it "custom" is then trivial job. However if you want to go harder way then you can build all that from API manually in your custom project (and e.g. use NUS examples only as inspiration).
@endnode can you please suggest the example program for both central and peripheral
Sorry, I still suggest Nordic BLE UART Service;) Alternatively you can use template project showing how to use all usual Nordic SDK libs (examples\ble_peripheral\ble_app_template
) but that's for GAP Peripheral side only also beacon example examples\ble_peripheral\ble_app_beacon
can be used as GAP Peripheral baseline. On central side you will need to go through SDK examples in examples\ble_central
and simply choose which one has the most parts you like. In a nutt shell there is no shortcut from my perspective: either you don't know how to do embedded FWs in C (or you don't want to go that way) and than take NUS examples or you know what to do and then you understand it takes several weeks or even months to get into new SDK and MCU specifics, choose your favorite build-chain and IDE and get your hands dirty.