Serial communication from JavaScript?

前端 未结 7 2051
感情败类
感情败类 2020-12-28 19:46

Is it possible to communicate over a machine\'s serial port through JavaScript?

I have to write a short program that sends data to a microcontroller over the serial

7条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-28 20:17

    Yes, it's possible using an ActiveX(I did it). You can make an activeX and use JavaScript to invoke it. If you prefer, you can make a .net dll and register it using regasm. Take a look at this link

    You also can write an activeX using VB6 and register it. Both works fine. Ps.: if you are using ActiveX, the JavaScript code will run just on IE.

提交回复
热议问题