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

how to select Central and Peripheral Devices

hello, I know the ble device ,have central and peripheral and have some name(server/client and Observer/ Broadcaster).

The peripheral(server) has data that is needed by other devices. ; central (client) uses the information served up by peripherals to accomplish some particular task.

And almost device is peripheral, but i don't know what kind of service need be a central?and why(power consumption or other reason(app state) )? (for the nordic sdk sample,the alert notification service is client)

Parents
  • Hi Steven,

    The correctness of it is:

    There are 4 types of devices (Central, Observer, Peripheral, Broadcaster)

    Centrals can initiate connection to devices advertising, or scan for advertisements Observers scans for advertising packets (but never connects to anyone)

    Broadcasters advertise with non connectable advertising packets Peripherals can advertise with connectable advertising packets or nonconnectable advertising packets

    Central and Peripheral shall have an ATT Server, and they may act as an ATT Client. Typically the central have the role of the Client, and does not have many attributes in their Server database. The reason why all devices have to be a Server, is that they need to have the GAP Mandatory Attributes (Device name and Appearance). Other than that it is up to what profile/service you would like to implement.

    The Alert Notification Service is as the name says, a service in a Server. Alert Notification Profile is the client role.

    The best way to select if your peripheral should act as the client or as the server is by determining who owns the data. If you are taking measurements with your peripheral, then it would be natural if it should act as the server, because it is the peripheral that owns the data. But if it should do any actions when something happens on the peer, then it should act as a client. This way you would limit unnecessary "polling", like trying to ask if the peer have any new data available. Notifications is the preferred way of sending information to a peer, because you should only be able to do it if the peer is interested in the data. (Have enabled notifications/indications).

    I hope this clarifies a bit what you are looking for?

    -- Pål

Reply
  • Hi Steven,

    The correctness of it is:

    There are 4 types of devices (Central, Observer, Peripheral, Broadcaster)

    Centrals can initiate connection to devices advertising, or scan for advertisements Observers scans for advertising packets (but never connects to anyone)

    Broadcasters advertise with non connectable advertising packets Peripherals can advertise with connectable advertising packets or nonconnectable advertising packets

    Central and Peripheral shall have an ATT Server, and they may act as an ATT Client. Typically the central have the role of the Client, and does not have many attributes in their Server database. The reason why all devices have to be a Server, is that they need to have the GAP Mandatory Attributes (Device name and Appearance). Other than that it is up to what profile/service you would like to implement.

    The Alert Notification Service is as the name says, a service in a Server. Alert Notification Profile is the client role.

    The best way to select if your peripheral should act as the client or as the server is by determining who owns the data. If you are taking measurements with your peripheral, then it would be natural if it should act as the server, because it is the peripheral that owns the data. But if it should do any actions when something happens on the peer, then it should act as a client. This way you would limit unnecessary "polling", like trying to ask if the peer have any new data available. Notifications is the preferred way of sending information to a peer, because you should only be able to do it if the peer is interested in the data. (Have enabled notifications/indications).

    I hope this clarifies a bit what you are looking for?

    -- Pål

Children
No Data
Related