STK500 implementation in javascript.