1

I'd like to know if my idea is even possible, but based on everything I've searched for so far, it seems like it's not possible. I would love to hear what the experts think.

Goal: Interface with laboratory equipment via TCP/IP sockets using HTML/Javascript.

One problem is that I have no control to program the server. Therefore, I can't use HTML5 websockets. The vendor has not implemented websockets. The equipment server waits for a socket connection, and then communicates via API.

Because HTML5 and Javascript are relatively OS-independent and are 'built' for user display, I'd like to create a browser-based program. I've found related questions and answers on SO, but they are older now, so I'm wondering what is the current technology.

Thanks in advance, and please let me know if you have any questions.

2
  • 1
    You cannot establish a TCP connection to an arbitrary server via a web browser and javascript. You would need to use either client-side java, flash, or some other plugin. Commented Aug 5, 2013 at 4:59
  • 3 years later, any news on this topic? Socket connection through HTML5 (js) Commented Dec 6, 2016 at 11:52

3 Answers 3

4

The W3C published a first draft for a 'Raw Socket' standard:
http://www.w3.org/TR/raw-sockets/

I think this might be what you're looking for, but I wouldn't count on it being implemented by vendors in the near future, since it's only a first draft.

Another thing I found out while searching, is that chrome apparently enables tcp/ip communications in extensions (did not check this myself, so can't gurantee):
http://developer.chrome.com/apps/app_network.html

If possible, you might consider writing a chrome extension (though it's not really "HTML5").

Sign up to request clarification or add additional context in comments.

Comments

1

I read this as needing essentially a telnet session to your equipment.

Currently, there's no way to do this from the browser without a plugin.

This question has some similar discussion: Best way to display high-speed data from a telnet interface on a web view?

Comments

1

Why not use the server where the HTML5/Javascript code is created. To create to connection to the device and convert this to something you can use, like websockets.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.