PDA

View Full Version : Hardware Acess through Web Technologies




vorbb
Oct 15, 2010, 09:31 PM
Does anyone know if there's any API's or methods in any web development language that can access local hardware?

Specifically, hard drive (this is more likely) and USB (I expect this is a little far fetched).



vocaro
Oct 16, 2010, 01:16 AM
Does anyone know if there's any API's or methods in any web development language that can access local hardware?

The security restrictions on web browsers do not allow access to local hardware.

robvas
Oct 17, 2010, 01:38 PM
The security restrictions on web browsers do not allow access to local hardware.

It can be done. Everything has a web interface on it these days. Cameras, printers, even our security system.

I would imagine you would allow the website to call scripts on your the machine that interacted with hardware. You would have to set the permissions correctly in your browser, however.

holmesf
Oct 17, 2010, 03:57 PM
It can be done. Everything has a web interface on it these days. Cameras, printers, even our security system.

I would imagine you would allow the website to call scripts on your the machine that interacted with hardware. You would have to set the permissions correctly in your browser, however.

No, that most certainly cannot be done. The exception is through plug-ins like 'flash' and 'java', but I hesitate to calls those web technologies.

foidulus
Oct 17, 2010, 09:26 PM
It can be done. Everything has a web interface on it these days. Cameras, printers, even our security system.

I would imagine you would allow the website to call scripts on your the machine that interacted with hardware. You would have to set the permissions correctly in your browser, however.

You seem to be mixing up the roles of client and server. Your camera has a web interface that can access the local hardware because it has a web SERVER running on the camera, the web server can be configured to access whatever resources the admin has allowed it to. In this case your computer is the client and is accessing resources on the server.

The OP was basically asking if the reverse is possible, ie is it possible for a web server to access resources on a client. The short answer as others have stated is no, there are just too many trust issues involved. The long answer is that it depends on what the OP means by "access". For instance it's certainly possible for a user to upload files from the hard drive to the server, but the web server can only see what the user has allowed it to see. It cannot for instance list a bunch of files and then select the file it wants without user interaction.

robvas
Oct 18, 2010, 07:09 AM
Anything is possible. Dell has a section on their website that allows their web page to read your express service code and then shows you the support options available for your particular model computer.

That's just one example.

vocaro
Oct 18, 2010, 11:18 PM
Dell has a section on their website that allows their web page to read your express service code and then shows you the support options available for your particular model computer.

That is only possible because Dell's site uses an ActiveX control, so it only works on Internet Explorer under Windows. The user must also explicitly grant permission to the ActiveX control before it can access any hardware.