Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not Working for Honda #3

Open
sabsteef opened this issue Jun 8, 2019 · 12 comments
Open

Not Working for Honda #3

sabsteef opened this issue Jun 8, 2019 · 12 comments

Comments

@sabsteef
Copy link

sabsteef commented Jun 8, 2019

Hi,
I'm trying to getting this code working. I started to define Honda. but i get an error that i can't build the solution. You described that Honda is the same as Yamaha. so i tried that.
The build works, but i can't get connected.

so i looked what's differents between Honda and Yamaha.

I've seen that there are typo's in YAMAHA and it sometimes spells YAMAYA.
so for Yamaha it doe not get in the:

`#elif defined(YAMAHA)

handleRequest(request_sens, LEN(request_sens));`

And there is (i think) a problem. Request_sens is not declared. and when i declared it:

`#if defined(HONDA)
#if defined(BIKE_CHOOSED)
#error "two or more bikes choosed, please see src/PIDs.h"
#else
#define BIKE_CHOOSED
#endif // BIKE_CHOOSED
// see above
#endif // HONDA

const uint8_t request_sens[] = {0x80,0x02}
`
everything els fails to build the solution.

i got it connected correctly with some test scripts. And get some of a response.
can you help me out?
tnx stefan

@aster94
Copy link
Owner

aster94 commented Jun 8, 2019

Hi Stefan,

unfortunately I had only a suzuki, to make this lib working on it I googled a lot in the past months to discover which codes my bike needed to receive.
To use it on Honda, yamaha, kawasaki you will need to find what your motorbikes "needs to listen". This is for example what suzuki needs to hear from us:

const uint8_t request_sens[] = {0x21, 0x08};

but i never googled for what the other brands needs. The error in compiling you see are due to this.

Since i don't have these bikes and even if i wrote the code i wouldn't be able to test the lib i didn't spent too much time with honda, kawasaki, yamaha, this is why there are typos

The "hand brake" between all the brands is the same, only a few values need to be changed inside the PID.h file. If you want i will be happy to help you, but before july i don't have a lot of free time ☹

@sabsteef
Copy link
Author

sabsteef commented Jun 8, 2019

Hi,

thank for the reply. im gonna try to look if i'm capable to make the work. i'm not that greate with this type of coding.
otherwise il wait until july.
tnx again,
Stefan

@aster94
Copy link
Owner

aster94 commented Jun 9, 2019

If you have any question and you need any aid let me know, i will try to help
Otherwise i will start "working" again on it in the first half of july because i brought a few months ago a kawasaki versys 😃

@sabsteef
Copy link
Author

sabsteef commented Jun 13, 2019 via email

@aster94
Copy link
Owner

aster94 commented Jun 13, 2019

Before starting which bike do you have? Are you ABSOLUTELY sure your bike uses the KWP2000? Can you post a schematics of your setup?

@sabsteef
Copy link
Author

sabsteef commented Jun 13, 2019

hi,
i got a honda VFR 1200. As far as i know it uses k-line.
i connected the L9637 chip like your diagram.
see images.
IMG_6534
i uses an AD mega. and use serial for debugging. and serial1 for connection to the Kline interface.
IMG_6556
i can make the honda talk. but its ramdom jebber.

the code that tried is:
`#define debug Serial
#define bike Serial1
#define TX_PIN 18
byte message0[] = {0xFE, 0x04, 0x72, 0x8c}; //FE 04 FF FF wakeup
byte message1[] = {0x72, 0x05, 0x00, 0xF0, 0x99}; //'72 05 00 F0 99' # initialise communications
byte message2[] = {0x72, 0x07, 0x72, 0x11, 0x00, 0x14, 0xF0}; //'72 07 72 11 00 14 F0' # request all of table 11 data

void setup()
{
debug.begin(115200);
}

void loop()
{
char incomingCommand = 0;
while (debug.available() > 0)
{
incomingCommand = debug.read();
debug.print("\nCommand: ");
debug.println(incomingCommand);
}

if (incomingCommand == 'S')
{
initHonda();
}
checkResponse();
}

void checkResponse()
{
while (bike.available() > 0)
{
byte incomingByte = bike.read();
debug.print(incomingByte, HEX);
debug.print(' ');
}
}

void initHonda()
{
debug.println("Starting sequence");
bike.end();
digitalWrite(TX_PIN, HIGH); // this is not an error, it has to came before the pinMode
pinMode(TX_PIN, OUTPUT);
delay(70);

digitalWrite(TX_PIN, LOW);
delay(200);

bike.begin(10400);

bike.write(message0, sizeof(message0)); // the kwp2000 needs 10ms between two bytes, here we are sending them all together
bike.flush(); // wait to send all
// No response is expected

// wait 200ms and avoid echo
debug.print("Echo: ");
uint32_t start_time = millis();
while (start_time + 200 > millis())
{
checkResponse();
}

bike.write(message1, sizeof(message1)); // same here
// respond: 02 04 00 FA
debug.println("\nWaiting response 1");
delay(400);
{
checkResponse();
}`
if i use a computer and a kkl cable i can communicate ( like reading the error codes)

@aster94
Copy link
Owner

aster94 commented Jun 13, 2019

Stefan, even if i would like to help i can't because i have a public tender in a few weeks and i really need to focus on that 😔

@aster94
Copy link
Owner

aster94 commented Apr 5, 2020

hi @sabsteef I just released a new version compatible with kawasaki motorbikes along with a lot more improvements. Do you wish to test some code for honda/yamaha?

@sabsteef
Copy link
Author

sabsteef commented Apr 5, 2020 via email

@vaz83
Copy link

vaz83 commented Aug 4, 2020

Hello, I am also trying to comunicate with a Yamaha YXZ 1000R ECU to read gear indicator, speed, rpm, temps, etc. Can you help me? I will have all the hardware tomorrow. I am working on a telemetry project and trying to read the data from the ECU. Regards from Portugal

@vaz83
Copy link

vaz83 commented Aug 7, 2020

Hello?

@aster94
Copy link
Owner

aster94 commented Aug 11, 2020

@vaz83 you already opened an issue, please write only there and leave this only for honda

@aster94 aster94 changed the title Not Working for Honda / Yamaha Not Working for Honda Aug 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants