Click here to Skip to main content
15,867,594 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
An inspection device measures dimensions of a product, connected to my PC via USB cable, PuTTY reads received data values.
What's the code that I need to use to transfer this data to appear in a web page so I could store it when I click Submit in a database table?

What I have tried:

I think JavaScript can do that, and I know how to use PHP to store the received data afterwards!
Posted
Updated 21-Jan-23 20:05pm
v2
Comments
Richard MacCutchan 22-Jan-23 4:15am    
If PuTTY can read it on your PC then you should capture the output and pass that to your web page. Alternatively you need a program that reads the serial port directly and passes the data to some other process.

1 solution

We can't help you - we have no idea which PC the device is connected to, or how the "measuring device" communicates with the connected PC. I can assume it's via serial data, but that's not guaranteed. So start by looking at the device manufacturers website, and find out how the PC needs to talk with it or listen to it. Get that working first!

If it's the Server, then which of the Clients do you want to talk to? Why that one? You would need to think carefully about exactly what you are trying to achieve, and then start here: PHP serial data - Google Search[^]

If it's the Client, then you can't: security will not allow Javascript code running in a browser to have any direct access to client resources, which includes any USB devices it is connected to.
 
Share this answer
 
Comments
Member 14819235 23-Jan-23 13:24pm    
It's a serial port, Zumbach measuring device sends a string (DA3.555 DC4.888 DA3.8547) via the serial port to the computer, my question is how to read this string using any of web page languages?
Thank you

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900