All cars sold in the US since 2008 use ISO 15765-4 OBD over CAN for emissions diagnosis, and almost all use ISO 14229 UDS for manufacturer/dealership diagnosis.
The intent of OBD-III is to use some kind of wireless mechanism to notify the state that your check engine light is on. In California, for instance, you have to pass a smog check every six months, so people driving four months with a failed emission control system are contributing a lot of emissions.
It's been hung up forever because of privacy concerns, fears about rent seeking (being forced to buy a cell phone plan for your car), etc.
These sort of applications
https://www.nhtsa.gov/technology-innovation/vehicle-vehicle-...
are also hung up indefinitely because the cell phone industry is pushing "secure" solutions that involve cellular infrastructure but not promising to invest enough in their network to cover all the places you might want them. That and the rent seeking, privacy, etc.
I live in California and you only have to do it every other year [0]. My car is almost 30 years old, not super well maintained, and it's never failed.
There is usually a window between when the car will report there is not enough data to pass the emissions test, and when the car reports a failure of the emissions test. Maybe try unplugging the battery every night for a week and you can get a good idea of when you can get it inspected and passed.
Wife's 2005 CR-V will around once per year set P0325 (knock sensor, bank 1). I've replaced the knock sensor [twice], rang out the wiring, and checked/cleaned all the connectors. It's a 17.5 year old car with ~225K miles on it that sets a code once a year. It's not going to get any more fixed than it already is.
Alternative option is to sell the car to someone in a state that does not require emissions testing.
Also, if someone steals your catalytic converter, and there is not much damage, it is possible to “straight pipe” it for cheap and just not put in a catalytic converter. Although, I would assume inspection stations have cameras or mirrors where they can see the bottom of the car, so this might only be worth it in states that do not do inspections.