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

Multi-Central question

I would like my BLE device to communicate with Desktop using HID service & with a phone using custom gatt service. I know its just adding one more service but is it possible to do it in one firmware image? Also how can the BLE device (in peripheral role) know whether the central is a Desktop or a phone? What should I include in the app running on Desktop/Phone?

Parents Reply Children
  • In order for the peripheral to send data to a central (computer or a phone), the central has to subscribe to notifications for a characteristic.

    On the central side, the device has subscribe to notifications for a characteristics by writing 1 to the corresponding CCCD (E.g. the computer subscribes to the characteristics in the HID service)

    On the peripheral side, you are then able to send data to the correct device by checking the CCCD value.

    Best regards,

    Simon

Related