ComSonics, a tech firm from Virginia, is working on a new device that's similar to the radar gun used by law enforcers, Hampton Roads reported.

But instead of catching speeding drivers, ComSonics' device is designed to detect if the one behind the wheel is texting.

The device works by detecting the radio frequencies emitted by mobile devices inside vehicles. A cellular phone produces different kinds of frequencies when used for calling, texting or sending data.

With this device, law enforcers can catch texting drivers by zeroing in on the specific frequency used when sending text messages.  

According to Malcolm McIntyre of ComSonics, their invention is perfect for states such as Virginia where texting while driving is considered illegal. Talking on the phone, however, is legal as long as the driver is an adult, according to CBS.

McIntyre explained that the technology from the device was originally used by cable repairmen. They use it to detect damages in a cable by tracking down leaking frequencies. The company decided to turn it into a tool to enforce traffic safety to reduce the number of accidents caused by texting drivers.

Based on a report released by the Department of Health and Human Services of the Center for Disease Control (CDC), drivers between the ages of 18 to 34 are more prone to use their mobile devices to send email or text messages as compared to those aged 45 to 64, Tech Times reported.

This increases their chances of getting distracted while driving which could lead to serious vehicular accidents.

"The cell phone can be a fatal distraction for those who use it while they drive," Dr. Tom Frieden, director of the CDC said. "Driving and dialing or texting don't mix. If you are driving, pull over to a safe place and stop before you use your cell phone."