Cutehtml Serial Port

I have to re-implement an existing system from scratch.At one point, when the user navigates to a certain web page the server must read data from the user's serial port.Currently, the web page has an ActiveX control; when the page is loaded the ActiveX control calls into a COM DLL on the user's PC which reads data from the serial port.The system is 10 years old. Is there any 'better' way that I could implement this?For instance, technology has move on in the last ten years.

  1. Globalscape Support

And this solution seems only to work in MS IE, which now has a market share of about 26% (it had, in 2013, when I last updated this question. As of Feb 2107, MS IE has 3-4% and Edge has 1-2%. As Edge is also a MS product, it might support Active X - I have not tried. Otoh, since it is new from the ground up, there is a good chance that it does not).Did HTML 5 offer any new possibilities? What about products like?Are there any other possibilities?Could I add a Raspberry Pi to do the reading over serial port & and have the browser app communicate with that over a RESTful service?Update @ EuroMicelli said 'I'm going to assume that you have a very good reason to run your app from a web browser, instead of a native app'. I don't know as I wasn't around when the original project was planned (and the company which designed it is now defunct).Perhaps they didn't want the end user interfacing directly with the database?

Perhaps 'browser based' was a new buzzword back then? I, personally, have no problem with a desktop app (as I find them easier to implement), but maybe we should consider remaining browser based?

(besides, I can handle the desktop app myself; it's only browser based reading from the COM port that leads me to offer a bonus;-). Just to name another (more like 'web-of-things') option: external hardware.Depending on the use-case you COULD use an external low cost device like an arduino microcontroller or raspberry-pi embedded pc.It's not very difficult to build a simple serial to web-service bridge upon these kind of devices. You could use some projects like this e.g.:In such a scenario all the low level stuff is handled by the external hardware and is offered to you by a web-service like interface (via get/post).Further advantage is that the pc, where you application runs on, doesn't need a serial port (which becomes quite rare on some systems).From your browser application you could query the web-service on the embedded device with a simple ajax call. The browser wouldn't need any plugin at all, the solution works cross plattform and is generic and independent from the development of browser-technologies in the near future. One thing for sure, you will never be able to communicate with the local machine hardware without installing some special binaries (and run it with appropriate privileges) on the local machine. However, that doesn't mean you necessary need to use an ActiveX component and stay stuck with Internet Explorer.

Of course, you could also develop a component for every browser in the market.I suggest another approach:. Write a Windows Service (I assume your machine runs Windows), configure it with necessary privileges. You will have to install something on the machine anyway.

The service can be implemented in any language. Add HTTP(S) server capabilities to it.

You can use a lot of technologies here from WCF to WebAPI. Invent your own communication protocol over HTTP. You could use JSON, Ajax, WebSockets, SignalR, etc. Write a Javascript file that will be compatible with most browsers on the market - so you only have to write that once - that will become your Serial COM API. You can support all browsers with Javascript and Ajax capabilities , with only one code base.Here is how it would look like. That would work, but it would likely be quite difficult to implement. I'm not sure how challenging it is to write a Windows service, but installing it with the correct privileges will definitely require building a setup-program for it (there's tools for that, but you'd have to pick and learn one).

Also, to actually access your service, you will need to do cross-domain XmlHttpRequests, which aren't that easy to do right if you want it to be cross-browser. Especially since you can't set 'localhost' to the same document.domain as your server.

But it's definitely a creative idea!;)–Mar 6 '13 at 3:17. Reading all these comments, people seem to forget the legitimacy of using a web browser in order to access serial port hardware. In our case, I am searching for a very simplistic way to read data from a physical check scanner (MICR) in order to provide that data to an ecommerce store for order entry. Sure, I could create a windows forms app, but why would I when literally everything else is done within the web store interface? That's the beginning of fragmentation and confusion for employees doing the work. KISS = Keep It Simple, Stupid.–Jul 28 '14 at 17:03. @Chris: AFAIK Java Applets are much more widely supported than ActiveX, which is mostly a Microsoft (Internet Explorer) invention (see original question).

Also, writing and signing these applets is actually quite straight forward (I've done a few). But the MAJOR gain is when you try to call them from JavaScript. With a Java Applet, all you need to do is call it's public methods directly. It's as straight forward, as you can possibly make it. Whereas some of the other solutions proposed here that involve an external HTTP service will require cross-site-scripting, which can be a HUGE pain.–Mar 11 '13 at 23:16.

Agreed, the interaction between the java-applet and javascript is really straight forward and a lot more cross plattform then ActiveX. Just from my daily experience, the acceptance of java-applets is not on the rise. Due to widely discussed security problems, people tend do disable Java-Applets. I think it depends, if you desire an integrated plug-in like approach or a more pure web like approach. But +1 for the aspect of broader plattform support for java-applets in comparison to ActiveX–Mar 11 '13 at 23:23.

@Chris: Unfortunately you are right. Currently there is a bit of a push against Java because of the recent security problem (see '(for the most part)'-link above). But honestly, I don't really understand it. There are much worse problems in other software (like Windows) and fixes for Java are released at least as quickly via (semi-)automatic updates. So, I'm not sure the hate is justified. I personally find it extremely convenient, that I can code almost anything (websites, mobile apps, desktop apps.) in one language today.

Globalscape Support

It'd be a huge bummer if this went away due to random politics.–Mar 12 '13 at 0:02. Probably not.I'm going to assume that you have a very good reason to run your app from a web browser, instead of a native app. I can think of a couple of scenarios where I can see that being a justifiable business decision.Even today with all the modern advances, web browsers are still fancy interactive document viewers, not universal runtime environments. Even the most cutting-edge features like websockets were introduced to enable sophisticated client-server communications, and not because of some universal interest to one day being able to do everything from the browser.There might be some specialized environment where that is natively possible (does Chrome OS?), but it won't be a general solution. There is no existing or proposed standard I'm aware of to open serial ports via a browser tag or scripting. Labyrinth of lies лабиринт лжи скачать.

That means you will need some kind of fairly low-level plug-in technology like ActiveX. ActiveX is a really good solution if you are Ok with IE only support, particularly if it's already written and it works.Most people looking for serial port access from a browser are probably doing data acquisition from some proprietary hardware they specify (build/sell?) and control, such as lab equipment, bar code scanners, scientific instruments, etc. I think at that point it is also perfectly acceptable to specify the required browser as well. Specialized applications commonly do that.If you still want to look at wider browser support, try looking at the proposed solution for this question:. I don't have experience with this product, but if it works it ought to enable most browsers to do what you want to do with a single codebase, and that's as good as you can hope.Whatever you end-up doing, it will most certainly involve some form of third-party plug-in.

This is part of a series of blog posts on the Windows Subsystem for Linux (WSL). For background information you may want to read the, and blog posts.Posted on behalf of Stephen Hufnagel SummaryIn WSL now allows access to serial devices (COM ports).This blog post will describe how to use this feature and the work that was involved in exposing this functionality within WSL.On Windows, COM ports are named COM1 through COM256. On Linux, serial devices can have arbitrary names but are typically character devices with a major number of 4 and a minor number from 64 to 256 represented by /dev/ttyS0 through /dev/ttyS191. By default init will populate this mapping using the mknod system call. Alternate mknod mappings can be created at runtime if needed.In WSL, the lxcore driver maps COM ports to Linux devices by the COM port number so /dev/ttyS is tied to COM. More specifically, the mapping is on the minor number, so minor number 65 (/dev/ttyS1) is COM1, 66 (/dev/ttyS2) is COM2, and so forth. Since pty, tty, and ttyS share a terminal library code base, ttyS will behave similarly but also support the following termios settings which are simply mapped to Windows serial driver ioctls:.

Standard baud rates - B. Stop bits - CSTOPB. Word length - CSIZE. Parity checking - PARENB, PARODD, CMSPAR, INPCK. Software flow control - IXON, IXOFF. Hardware flow control - CRTSCTS, CLOCAL.

Control characters - VSTART, VSTOP, VEOFTo use your favorite serial toollibrary in WSL, just map from the COM port of the device using device manager or the SERIALCOMM registry key.Figure 1. This diagram shows the basic architecture of WSL exposes Windows COM ports as serial devices in WSL. ScenariosThe following scenarios were tested and confirmed to be working:.

Thanks!. Connecting to Raspberry Pi 2 serial terminal using the cu tool. Transferring data on various serial configurations:. Hyper-V virtual COM port. FTDI USB to serial converter.

Prolific USB to serial converter. Physical COM portPlease note that some serial drivers have known bugs. These issues exist on both native Windows and within WSL.The following areas are known to not work.

We are tracking updates to future Windows Insider builds to address them. Using legacy raw ioctls instead TCGETS or TCSETS. to configure and query the serial device. Screen and minicom depend on the above so they do not currently work as a serial terminal, but cu is an alternative.ExampleOn a Windows 10 machine where a Raspberry Pi is connected on COM5 connect using the following steps:.

sudo chmod 666 /dev/ttyS5 - This is required since cu changes it's uid which drops capabilities even when running as root. Not all serial programs have the same behavior. stty -F /dev/ttyS5 -a. Optionally check your current serial settings before updating. Set your serial settings, depending on your application this usually will be raw or sane. Either one seems to work fine with cu:.

stty -F /dev/ttyS5 sane 9600. stty -F /dev/ttyS5 raw 9600 -echo -echoe -echok -echoctl -echoke -iexten -onlcr cs8 crtscts. cu -l /dev/ttyS5 -s 9600. Hit enter to refresh the cu consoleFeedbackPlease let us know on our about the specific serial scenarios that you are trying.

Cutehtml Serial Port

Your feedback helps us prioritize what we should focus on next. This serial support is in current Insiders builds, and will be released broadly in Fall Creators Update starting mid October 2017.Sorry to hear you had issues with prior Insiders builds, but understand that when you install Insiders, you’re literally installing a weekly snapshot of Windows as it’s being built. Though we do our best to try and avoid releasing major bugs, there may well be the occasional breaking or undiscovered issue. This is why we recommend that you do not install Insiders (fast ring builds in particular) on your primary or only machine.

Comments are closed.