This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

DataReceived Not Firing

I'm trying to use MasterEmulator with the service from BLE Characteristics, a beginner's tutorial and am not able to get the temperature data because the Datareceived event does not fire. Here is how I have the pipe setup:

    public void PerformPipeSetup()
    {
        BtUuid BtleUuid = new BtUuid("23d113ef5f782315deef12120df00000");
        masterEmulator.SetupAddService(BtleUuid, PipeStore.Remote);

        //BtUuid notifyUuid = new BtUuid("23d113ef5f782315deef1212efbe0000");
        BtUuid notifyUuid = new BtUuid("BEEF");
        int notifyMaxLength = 20;
        byte[] notifyData = null;
        masterEmulator.SetupAddCharacteristicDefinition(notifyUuid, notifyMaxLength, notifyData);
   
        pipe1 = masterEmulator.SetupAssignPipe(PipeType.Receive);
        //pipe2 = masterEmulator.SetupAssignPipe(PipeType.ReceiveRequest);
    }

and here is what I see in nRFConnect

image description

I noticed that I have to toggle notifications in nRFConnect to get notified. Do I have to do something similar to get this working with MasterEmulator? Do I need to use SetupAssignPipe for the Read and Write?

Thanks

Parents
  • Have you called OpenRemotePipe or OpenAllRemotePipes after you get connected ?

    The Receive pipe need to be "open" to be able to receive notification. Open here means to toggle CCCD/notification.

    Also you have to make sure you have your characerteristic UUID match with "BEEF" UUID you used. It's not a standard Bluetooth SIG 16Bit UUID, but you can use for testing purpose.

    I assume when you test your application on the chip with the nRFConnect application it works fine ?

    Have you tried to test the Master Emulator example (nRFUART) with the ble_app_uart firmware in the SDK ?

  • Hi Jim,

    Could you confirm you managed to fix the issue ?

    Note that the 0xBEEF UUID in the tutorial is 128 bit UUID with the base UUID = BLE_UUID_OUR_BASE_UUID, it's not the 16bit UUID like you are using now. You should check the UUID when you use nRFConnect or Master Control Panel.

Reply
  • Hi Jim,

    Could you confirm you managed to fix the issue ?

    Note that the 0xBEEF UUID in the tutorial is 128 bit UUID with the base UUID = BLE_UUID_OUR_BASE_UUID, it's not the 16bit UUID like you are using now. You should check the UUID when you use nRFConnect or Master Control Panel.

Children
No Data
Related