polling serial port data through javascript

J

Jeremy J Starcher

How can I poll for serial port data using javascript ?

Within the web browser, you can't.

Under Windows, there may be access to a scripting object that can access
the serial ports. I would ask in microsoft.public.scripting.wsh

If this MUST be done in a web browser, the best option is to run a
separate program to read in the serial data and write it to a text file.
The web browser can use HttpXMLRequest to re-read the file as needed.

Might I ask why you need to do this?
 
T

Thomas 'PointedEars' Lahn

Jeremy said:
Within the web browser, you can't.

Yes, you can. What is required is only a fitting API that provides language
binding for (the) ECMAScript implementation(s).
Under Windows, there may be access to a scripting object that can access
the serial ports. I would ask in microsoft.public.scripting.wsh

And there is no reason why you could not use that "scripting object"
(actually an ActiveX/COM object) from within MSHTML, may it be Internet
Explorer or an HTA. There is also XUL to consider for Gecko-based UAs.


PointedEars
 
T

The Magpie

Ajinkya said:
How can I poll for serial port data using javascript ?
Yes you can, but you need an API to call. I can't give more details,
but I know a man who can - he did it to poll a serial printer port.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top