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

Multilink peripheral error 0x00003401 when connecting with MCP

I've been playing around with the multi-central central/peripheral examples and I thought I would modify the peripheral to instead use a service I had written for another application, but simply notifies with one byte as the example does.

I copied over the service and characteristic initialisation from main.c and used it in place of my original in core_service.c where my service and service functions reside.

In testing I get some very variable results however...

If I have the central running, and program the peripheral it connects just fine.

If I have the peripheral running first, and try to connect with the MCP app, it throws a 0x00003401 error. I then have to reprogram the device if I want it to work correctly with the central; power cycling isn't enough.

From my reading of other posts I understand this error is related to the status of the CCCD.

So is the Central set up to expect the notification from the peripheral to already be enabled? How can I make this more robust so that the peripheral isn't totally locked out after a 0x00003401 error?

Project attached. I should mention it's being used on custom hardware with TWI communication. ble_app_multilink_peripheral.zip

Related