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

Responding to MTU Requests

Hello,

What's the correct way to respond to MTU requests with pc-ble-driver-js library? on a pair of nRF52840 USB Dongles, using nRF Connect for Desktop, project based on pc-nrfconnect-boilerplate

Calling requestAttMtu() on one device starts the request but how to send the ATT request and MTU Exchange? Is there a function or shouldn't the API handle this semi-autonomously? 

adapterToUse.on('attMtuRequest', (device, mtu) => {
    console.log(`attMtuRequest: Connected device ${device.instanceId} has requested MTU: ${mtu}`);

    // How to set this MTU correctly? and respond to MTU request?
    adapterToUse._attMtuMap[device.instanceId] = mtu // obviously not correct way
});
Thanks
Related