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

can we make custom service without using UART sending and receiving 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?

Parents
  • 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).

Reply
  • 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).

Children
Related