I'M WORKING IN GEAR SHIFT INDICATOR

My doubt Is simple
Whether can we use 2 wires to connect CAN-H and CAN-L to the sparkfun can bus shield or
Compulsory we have to use OBD2 to Db9 Cable??
If possible do we need to change any coding part or it is all same?? :o