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

Running multiple Server instances or Just add more characteristics

Hi there,

I am facing a situation where I require my BLE Peripheral runs multiple GATT servers instances or add new characteristics to my peripheral  to be able to connect to a different kind of clients, don't sure yet which fit better to my development

Background: I am using a BLE Peripheral as a gateway to communicate with multiple central I used this configuration because the clients (central) are not emitting any RF until they detect a peripheral after filtering the Adv data then they connect,  then I meet a new scenario where I have a different kind of client device(developed for others), which is using a different Adv filtering (not sure what they are filtering yet) and they are using their own UUID for each characteristics, then I have to be able to connect to they using my current peripheral 

my questions are:

  1. Is possible to run multiple GATT server instances?
  2. if the above is true how?

nRF52832, SDK 13 and SDK 14.2 

Regards

Arepa

  • 1: No. Only one instance.

    2: I am not sure if I understand.

    Is your device a peripheral or a central?

    What you describe:

    You have a central scanning advertising packets, and connecting if it finds a peripheral of interrest, right?

    Then what do you want to do after connecting?

    BR,

    Edvin

  • Hi Ed, my main device is a peripheral and I have multiple central devices filtering the peripheral of interest (my main peripheral) then they are able to connect send data from sensors and go to sleep again. but now enters in the game a new kind central devices (which were developed by a 3rd party using different UUIDs and attribute table) and I need to connect them to my current peripheral and receive their sensors data, that is why I was asking for multiple GATT server instances, but it seems like is not possible, from my understanding my path to take is adding new characteristics to my peripheral to be able to connect to the new central devices, is it right?

  • Hello,

    I understand.

    As you may know, it is the peripheral that advertises, and the central that scans. It is also the central that decides whether or not to connect to a specific peripheral. It may be a bit difficult to figure out what the central will connect to, as it doesn't do any advertisements. Are you sure that your new sensor is a central, and not a peripheral? Does it advertise BLE packets?

    If it is actually a central, you need to figure out what the central is scanning for. It could be a particular UUID, a specific advertising name, or something custom. It is up to the central really, to figure out whether or not to connect to a peripheral based on it's advertising packet, and there are several ways of designing an advertising packet.

    BR,

    Edvin.

  • Yes, it is a central

    then path I should have to follow is.. replicate the advertising packet that the central is waiting for. And add the services with their UUIDs on my peripheral wheres the centra will write the sensors data.

    Ed Thanks for clarifying it solve all my questions regading this topic

    Cheers

Related