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

discover pipes without SetupAddService

I'm writing a PC utility in Visual Studio to connect to BLE devices. I'm using the PCA10000 and MasterEmulator.dll. I'm able to discover the services and characteristics of a device with MasterEmulator.DiscoverServices(). Is there a way to have all of the pipes created automatically without having to manually call SetupAddService, SetupAddCharacteristicDefinition and SetupAssignPipe? How does Master Control Panel do this?

  • Hi Dean,

    For creating generic purpose central device, I would suggest you to try the BLE-Driver that directly uses S120 stack instead of using the MasterEmulator.dll. You can access low level GATT API to discovery services and read/write a attribute.

    If you want to stick with MasterEmulator, what you can try is to

    1. connect and do a DiscoverServices()

    2. call Close()

    3. call Open()

    4. call the required pipesetup commands based on parsing the DiscoverServices output

    5. Call Run() again

    Note that I haven't tried this and DiscoverServices() is not made for this purpose.

Related