0

I'm using serialport npm package under electron. It works, but the uart packages do not arrive at the same intervals. Eg. I send every 15ms ~70 bytes (checked with logic analyzer), but from serialport came data in variable interval (sometimes take 60ms, to receive next package, and after this I receive next 3-4 package under 1-2 ms).

I tested with less bytes, eg. 15-30 bytes in every 15ms and then this problem come not up.

I tested also with pure Node.js, without electron and there works great, the packages arriving correct, in the same interval.

Are ther any ideas to solve this problem? Thanks!

Scriba
  • 3
  • 2
  • That is just innate to the everything-runs-on-one-thread restriction. The less *other* things it has to do, the less jitter you'll observe. Electron has a lot of other things to do. – Hans Passant Nov 16 '17 at 11:38
  • I know this, but then why is better, if I send less data? My electron app has no other things to do (I know that in background there is something, but my app functionality is just to listen the serial-port). – Scriba Nov 16 '17 at 12:14

0 Answers0