JavaScript Serial Applet

A couple of weeks ago I put together a process for allowing access to a hardware serial port from JavaScript. I thought I would point to the documentation page here and allow the comments section of this post to be a place where questions could be answered and so on.

Without further ado, here it is:
JavaScript Serial

Update: I can no longer maintain or provide any kind of support on this software.

8 thoughts on “JavaScript Serial Applet”

  1. hi, thanks for the nice piece of software!
    is it possible to change the baudrate via javascript?

    keep up the good work!

  2. Hello,

    I was trying your serial COM application at

    When I click ListPorts it tells me: 0:COM1, so in some way it is recognizing that there is a COM port.

    Then I clicked in Examples:

    Start Loop : the text ‘Nothing Yet’ disappears but when I scan from the COM barcode nothing happens.

    I have ensured that the scanner is returning data by using another testing application.

    …am I doing something wrong?

  3. Hi Clinton,

    Not much I can tell you other than you’ll have to program an application that uses the JSSerial applet to work with the barcode scanner you are trying to use. I am sure it won’t work out of the box for that.


  4. Hi Shawn,

    I would like to add the data rate control as well: I saw from your note that the serial.jar file is required, but I am not clear on how that is included – is there an additional ‘import’ required in ?



  5. Hi Shawn,

    Thanks for the applet, I am currently using it. However I’d like to know whether you came across an issue where somtimes, when you scan long barcodes, only part of the barcode is returned by the applet. For example, when scanning barcode with value 10060130554, only 554 is returned from the applet. Have any suggestions regarding this?

    Thanks and regards

  6. Hi Clinton,

    Sorry, have never tried to use this with a barcode scanner. I imagine that the source would have to be modified to work in the manner that the barcode scanner is sending out the data.


  7. Hello,

    Now I’d like to connect to COM1 port through Javascript and your script helps a lot. I would like to know is there any way to set the handshake information? I check the data traffic from/to my COM1 and I found that data sent to the port when setting handshake information is not correct and it caused my web application to fail connecting to the port. Please advice and thank you very much for sharing your script and knowledge :D

Leave a Reply

Your email address will not be published. Required fields are marked *