-
iOS will automatically set MTU to 185 bytes. I think max. 200 bytes is a good size. This would be very handy if we are using the HTTP Proxy example.
Apart from that, is it correct that we would have to switch SDK to a newer version to support bigger MTU sizes? I feel like Espruino still runs on SDK 12.
-
is it correct that we would have to switch SDK to a newer version to support bigger MTU sizes? I feel like Espruino still runs on SDK 12.
SoftDevice 3.0 used with SDK12 should support larger MTUs
https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/s132-v30-production-version-now-available-from-nor
Nice - I'd be interested to find out if there's anything else that uses the long writes? I'm not sure I'd want to merge that exactly as-is, but I reckon it could be tweaked such that the memory buffer would be allocated on demand out of JsVars.
The malloc thing should really be allocated on the stack I guess (since I don't really support malloc in Espruino - I'm amazed that worked). Although honestly I don't think that's even needed - the event could be posted and then the data read directly out of the buffer outside of the IRQ.
I had a quick play with the MTU stuff and did this: https://github.com/espruino/Espruino/tree/increased_mtu
But it takes a huge chunk out of available RAM. Perhaps an increased (but not huge) MTU would still be an idea?
I haven't had a chance to test it out properly, but my hope is that I can enable it for the bootloader to try and improve the speed of flashing (but then the flasher will have to know about the MTU).