By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,106 Members | 2,474 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,106 IT Pros & Developers. It's quick & easy.

polling serial port data through javascript

P: n/a
How can I poll for serial port data using javascript ?
Jan 7 '08 #1
Share this Question
Share on Google+
3 Replies


P: n/a
On Sun, 06 Jan 2008 20:43:06 -0800, Ajinkya wrote:
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?
Jan 7 '08 #2

P: n/a
Jeremy J Starcher wrote:
On Sun, 06 Jan 2008 20:43:06 -0800, Ajinkya wrote:
>How can I poll for serial port data using javascript ?

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
--
Prototype.js was written by people who don't know javascript for people
who don't know javascript. People who don't know javascript are not
the best source of advice on designing systems that use javascript.
-- Richard Cornford, cljs, <f8*******************@news.demon.co.uk>
Jan 7 '08 #3

P: n/a
Ajinkya wrote:
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.
Jan 7 '08 #4

This discussion thread is closed

Replies have been disabled for this discussion.