Site interacting with the local system

2

I have a WEB application running on an internal server, to be accessed only via internal network, through a browser on Ubuntu machines.

My real need is to send a signal to the ports (either parallel, serial or USB) of the computers that are accessing the application through the browser controlled by this WEB application. I think of doing this by sending commands directly from the browser to Linux to run the applications responsible for this interaction with the hardware.

If there is not a direct way to do this, I could create an application that would be reading a database or a TXT file generated by the WEB application and when there was change, take the appropriate measures at the hardware level. >

What would be the best way for me to solve this problem?

    
asked by anonymous 08.01.2016 / 01:32

1 answer

1

Some browsers implement specific mechanisms for accessing hardware.

In the case of Chrome, there is a API to access USB and other devices. Then you could write an extension to perform the operations you need on the hardware.

With the extension running and installed, your web page can communicate with it by sending messages, for example, through personalized events .

It works more or less like this. If the page needs to access the hardware, it triggers a particular event, which is captured by the extension which in turn accesses the hardware via USB and returns the event to the page.

    
08.01.2016 / 01:57