Thanks! Ok, so that's one for Mediatek. @parasquid it'd be amazingly helpful if you could try the other adaptor - that would rule out a great deal of things!
And that function does trigger a disconnect - so it is possible that we could trap the error there, and then split the write up into 20 byte chunks.
It could maybe even set setMaxPacketLength(NORDIC_DEFAULT_TX_LENGTH) and change where setMaxPacketLength is called above to ensure it never tries to send >20 byte packets.
... but I'm hesitant to make changes here as I can't reproduce it. If you were willing to give it a try a PR would be awesome though.
If you were willing to give it a try a PR would be awesome though.
If you're also able to deploy this to a test URL (so something like espruino.com/ide-mtu-test for example) I can try it out and see if it works without any configuration on my part.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Thanks! Ok, so that's one for Mediatek. @parasquid it'd be amazingly helpful if you could try the other adaptor - that would rule out a great deal of things!
@fanoush as far as I can tell from the initial post on https://forum.espruino.com/conversations/387281/ we get a
NotSupportedError: GATT operation failed for unknown reason.
from https://github.com/espruino/EspruinoTools/blob/master/core/serial_web_bluetooth.js#L226And that function does trigger a disconnect - so it is possible that we could trap the error there, and then split the write up into 20 byte chunks.
It could maybe even set
setMaxPacketLength(NORDIC_DEFAULT_TX_LENGTH)
and change where setMaxPacketLength is called above to ensure it never tries to send >20 byte packets.... but I'm hesitant to make changes here as I can't reproduce it. If you were willing to give it a try a PR would be awesome though.