polling serial port data through javascript

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ajinkya

    polling serial port data through javascript

    How can I poll for serial port data using javascript ?
  • Jeremy J Starcher

    #2
    Re: polling serial port data through javascript

    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.publi c.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?

    Comment

    • Thomas 'PointedEars' Lahn

      #3
      Re: polling serial port data through javascript

      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.publi c.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, <f806at$ail$1$8 300dec7@news.de mon.co.uk>

      Comment

      • The Magpie

        #4
        Re: polling serial port data through javascript

        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.

        Comment

        Working...