adamtheone / canDrive

Tools for hacking your car
https://www.youtube.com/playlist?list=PLNiFaO8hU1z0o_6DSxk-jcVAM3UCUR-pY
MIT License
539 stars 147 forks source link

Lexus gs450h canbus received but cant send #24

Open aljini opened 2 years ago

aljini commented 2 years ago

Hi there i have used your code and the interface I can receive canbus but when i send some back nothing happens Close the interface i can see on pycharm teminal ( wrong packet!can RX TX started ) And when this message come the can sniffing stops and i should restart the interface to start snifing again I dont know whats the issue here

aljini commented 2 years ago

16460049875668623075985759149584

aljini commented 2 years ago

1646005215468472967837503308132

SubhranshuSharma commented 2 years ago

16462197524707691360950157312861 Same

aljini commented 2 years ago

So its not working with you either did you try to send some messages back ?

SubhranshuSharma commented 2 years ago

If you mean sending packets into can bus, then still not successful

adamtheone commented 2 years ago

Hello. We'll need more information to debug this. The worked for several other people, so I suspect either a hardware problem or something else. First, I highly recommend to try out the CAN examples codes just with the arduino. With that, you can make sure that your connection are fine and bus is working properly. Then, take a look at the ardunio raw serial output and see if that looks correct or not. Only try to debug the GUI as the last step, as the issue is somewhere before that, probably.

aljini commented 2 years ago

Everything seems fine in examples can recovering and sending and also i get rpm readings from the car so on the Arduino side everything is fine But i suspect that there is a problem (can drivers) (Or in the GUi ) i dont know how to debug these I really need it to work because i am converting my car to electric and this is process is needed in the conversion

So please help me fix that I have attached some photos of what errors i am getting these errors come when i try to send only i can receive data and also decided some codes but when sending the decoded messages back i get these errors and the gui stops running

IMG_20220307_231824

IMG_20220307_234137

IMG_20220307_234140

IMG_20220307_234154

IMG_20220307_234533

aljini commented 2 years ago

Today i found out that i can send some codes and the car recives it but the terminal says wrong paket and the sniffing stops it gives the command and the car recives it and it opens the door lock after that the sniffing stops and i cant recive or send anything to the car unless i disconnect it and connect it again

Somehow i only got the door lock runing but the gui stops working i dont know why

adamtheone commented 2 years ago

The arduino serial output proves that it is not a GUI issue, because the packets are already corrupted when they exit the arduino. Are you sure that you are using the correct CAN bus speed?

SubhranshuSharma commented 2 years ago

The arduino serial output proves that it is not a GUI issue, because the packets are already corrupted when they exit the arduino. Are you sure that you are using the correct CAN bus speed?

yes the can speed is 500e3 i know that as the engine rpm example works fine for me, is it possible that the car(i10 2013 in my case) doesnt have the can bus responsible for core functionality in the obd2 plug, is it possible that the cars brakes/stearing cant be controlled by the can bus on obd2 plug, another possibility is that the 500000 baud rate is not enough for 500e3 can speed so during python and arduino communication some packets are missing, hence wrong package error.

adamtheone commented 2 years ago

I have no issues with 500mbaud, so I don't think that it is a bug in my code. It's absolutely possible that you cannot access certain modules in your car, a lot of newer vehicles have "firewalls" on the can bus to protect those devices from attackers. I'm not sure if this is the case in your situation.