Hacking a Laser

The Synrad Firestar i401 is a 400 watt CO2 laser commonly used for marking, cutting, and engraving. It's a seriously powerful laser which can vaporize a chicken wing in a matter of seconds.

The laser is easily operated with a 0-10V DC control signal (corresponding to 0-100% laser power) through a 15-pin D-sub connector which provides a few other basic controls. There is also a static IP Ethernet interface, but unfortunately it is limited in its capabilities. The default IP address is (which can be changed). By visiting and an experienced operator can access status info, warning and error messages, and historical data in a web browser. Unfortunately, Synrad doesn't offer an easy way to pull data off of these pages and they just aren't useful for a typical user.

But the data is there, so there has to be a way to access it, right? Diving into the source code for the two status pages seemed like a dead end. These pages just set up the layout and define some <div> blocks; it felt like a cold case. But then I noticed the subtle and ambiguous javascript calls at the bottom of the two pages: /js/main_noimage.js and /js/service.js. After setting up a bunch of pointers to the established <div> tags, each script respectively calls /cmd/getalldata and /cmd/getservicedata which return comma-separated lists of data which are then parsed and used to update the web interface. Naively, I thought I'd just point my browser toward http:/, but that gave me a 404 error. I was again feeling stuck and out of ideas.

Playing around in LabVIEW (my target dev environment), I found that sending an HTTP Post request to http:/ returned the string of comma-separated numbers in the body of the response! Eureka! The final step was to read through the javascript files line by line to extract the meaning of each value. Fortunately, Synrad's developers well documented their code making this task much easier. Now I can parse all of this laser status data myself, record it in my format as needed, and best of all display only relevant data to my users in a consistent UI.

For anyone else working with this laser, I've posted the list of variable descriptions on Github. It was a fun challenge to extract this data and it was a great learning experience!