Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

BLE connection

Hello,

       We wish to use nRF52832 IC in our design. We will design an equipment which can connect to another device via BLE and can send some measurement data. Our equipment will be the BLE client. 

      In the nRF5_SDK there are many examples such as uart example. However this is example is not suitable for our needs. In this example nRF52832 acts like a server. We need a client example. For this purpose, Which example do I need to use ?

Best Regards

Parents Reply Children
  • Hi,

    BLE does not have a concept of client and server, in the way many other protocols have.

    In a BLE connection, you have one device which uses very little power (peripheral) and one device which usually uses more power (central). Data can be sent in any direction between the two, and in that sense both can act in a way that you can describe as being a kind of "client" and a kind of "server".

    You probably want to let your device be the peripheral. If you only need a connection once in a while, then the peripheral can start advertising when it needs a connection. The PC or tablet, acting as central, must scan all the time, and when it receives an advertisement from the peripheral it can connect and receive data from the peripheral over the connection.

    Alternatively you can do this without using a connection, if your device is a broadcaster (beacon) that advertises and has put the data directly in the advertising packet. The PC or tablet in this case acts as observer, and data can only go from the beacon to the observer (no data the other way, for that you would need a connection.)

    Regards,
    Terje

Related