Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Customize MTU #407

Open
Yuuuuu opened this issue Apr 20, 2021 · 5 comments
Open

Customize MTU #407

Yuuuuu opened this issue Apr 20, 2021 · 5 comments

Comments

@Yuuuuu
Copy link

Yuuuuu commented Apr 20, 2021

The packetSize is automatically set to use the maximumWriteValueLength. Is it possible to set the MTU to a lower value? similar to this method on Android.

@philips77
Copy link
Member

I can add it in the next release of you need it. May I ask why do you need it?

@Yuuuuu
Copy link
Author

Yuuuuu commented Apr 27, 2021

I'm not sure the exact root cause, think it is a similar issue described here.

@philips77
Copy link
Member

As suggested there, it may be enough to set PRN. On iOS you need to set this:
https://github.com/NordicSemiconductor/IOS-Pods-DFU-Library/blob/d4a1da27fbf195b325cea3036235a4939a8f4efa/iOSDFULibrary/Classes/Implementation/DFUServiceInitiator.swift#L115
which by default is set to 12. In theory, since iOS 11 this can be set to 0 (disabled):
https://github.com/NordicSemiconductor/IOS-Pods-DFU-Library/blob/d4a1da27fbf195b325cea3036235a4939a8f4efa/Example/iOSDFULibrary/View%20Controllers/DFUViewController.swift#L233-L235
but as you can see, some implementations need it.

I'll release 4.10 without requested feature, but if you find it necessary and test it, we'll think about it.

@Yuuuuu
Copy link
Author

Yuuuuu commented Apr 29, 2021

I tried setting a different value for the packetReceiptNotificationParameter but still experienced the same issue.

Do you think it is still valuable to have the ability to set a different MTU independent of the packetReceiptNotificationParameter?

@philips77
Copy link
Member

Well.. you may limit the MTU on the bootloader side. All bootloader capabilities should be calculated and tailored so it is possible to do DFU with maximum values without problems. If the flash requires some time to be written to, perhaps the PRN notifications should be used to sync transmitter and receiver. But if even a single packet is too long, or comes too fast with high MTU and DLE enabled, perhaps MTU could be lowered, of DLE disabled. You know what I mean. It should be the device responsibility to support all parameters it says it supports, not phone's to find out lower.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants