Goal of my project is to transmit and reconstruct data from OBD2 port, creating a "wireless gateway" between car and diagnostics tool.
OBD2 is On Board Diagnostics port required on every car, it uses J1962 connector, there are multiple required protocols on port
- SAE J1850 PWM (Pulse Width Modulation at 41.6 Kbps, two wire differential)
- SAE J1850 VPW (Variable Pulse Width at 10.4/41.6 Kpbs, single wire)
- ISO 9141-2 (Asynchronous serial communication at 10.4 Kbaud)
- ISO 14230 KWP2000 (Asynchronous serial communication up to 10.4 Kbaud)
- ISO 15765 CAN (250kbit/sec or 500kbit/sec)
but, there are 7 other manufacturer-specific pins, and protocol varies depending on manufacturer and model of car. if I read raw bytes with an unknown protocol, to my knowledge, I need to know the protocol for writing data to unidirectional line (not sure if that's the correct term), since there's no way to know if the other device is done transmitting data on the bus.
Is there some technique that might make this possible? If not, I'd still like to proceed with mentioned known protocols, I'm thinking of AVR/ARM chip handling communication with OBD2 with help of CAN bus and K-line transceivers (other protocols don't require external hardware as far as I know) and sending it to PC over serial, software on PC communicating over IP to other side of connection.
Can delay cause some problems? What approach would you recommend?