GoogleChromeLabs / serial-terminal

Demo application for the Web Serial API.
https://googlechromelabs.github.io/serial-terminal/
Apache License 2.0
232 stars 73 forks source link

Web-serial-polyfill on Android #63

Open karelv opened 11 months ago

karelv commented 11 months ago

My use-case requires a lot of data is sent over the serial port. In order to test-case it, I made a small Arduino sketch that send every 100ms a 1kByte message. https://github.com/karelv/web-serial-example/tree/main/dumper-arduino

I found that:

  1. When terminal(xterm) gets more and more data in it, it becomes slower and slower, and finally the webpage crashes.
  2. The API polyfill mode on Android get out of memory and the interface on the page stops working.

The first item yields me this page: image

Therefore I forked that repo, and I cleared the terminal every second. https://github.com/GoogleChromeLabs/serial-terminal/compare/main...karelv:serial-terminal:main I don't intend to PR it, as it is pretty annoying for use, but now I don't get the above 'Snap' page, and instead I got the same error as I previously observed with my own html/javascript implementation using the web-serial-polyfill lib. As you can see in less than 3 minutes the error appears, as seen from the chrome://device-log. image

karelv commented 11 months ago

See also https://github.com/google/web-serial-polyfill/issues/59#issuecomment-1839279741

karelv commented 11 months ago

Using Samsung Galaxy S21 5G (SM-G991U)