Haltech CAN bus Communication don't work.

From Frankenstein to Proteus and everything in between
Post Reply
hugovw1976
Posts: 68
Joined: Fri Oct 16, 2020 3:10 pm
Github Username: hugovw1976

Haltech CAN bus Communication don't work.

Post by hugovw1976 »

Hi , I have a custom board base on Proteus running latest firmware ("rusEFI 2022.03.16.proteus_f4.1421086421"), I have a AIM MXL Pista dash and test Haltech dash and don't work, I also check with VAG and AIM and this work fine (can communication it's fine in board).
I check in Console and Haltech don't send any messages, I want the Haltech protocol because have more information, It's posible to check this error.
Thanks.

https://github.com/mck1117/proteus/issues/111
hugovw1976
Posts: 68
Joined: Fri Oct 16, 2020 3:10 pm
Github Username: hugovw1976

Re: Haltech CAN bus Communication don't work.

Post by hugovw1976 »

I check code apparently Haltech dash is not initiate:

Code: Select all

void canDashboardBMW(CanCycle cycle);
void canDashboardFiat(CanCycle cycle);
void canMazdaRX8(CanCycle cycle);
void canDashboardW202(CanCycle cycle);
void canDashboardBMWE90(CanCycle cycle);
void canDashboardVagMqb(CanCycle cycle);
void canDashboardNissanVQ(CanCycle cycle);
void canDashboardGenesisCoupe(CanCycle cycle);
void canDashboardAim(CanCycle cycle);

void updateDash(CanCycle cycle) {

	// Transmit dash data, if enabled
	switch (engineConfiguration->canNbcType) {
	case CAN_BUS_NBC_BMW:
		canDashboardBMW(cycle);
		break;
	case CAN_BUS_NBC_FIAT:
		canDashboardFiat(cycle);
		break;
	case CAN_BUS_NBC_VAG:
		canDashboardVAG(cycle);
		break;
	case CAN_BUS_MAZDA_RX8:
		canMazdaRX8(cycle);
		break;
	case CAN_BUS_W202_C180:
		canDashboardW202(cycle);
		break;
	case CAN_BUS_BMW_E90:
		canDashboardBMWE90(cycle);
		break;
	case CAN_BUS_MQB:
		canDashboardVagMqb(cycle);
		break;
	case CAN_BUS_NISSAN_VQ:
		canDashboardNissanVQ(cycle);
		break;
	case CAN_BUS_GENESIS_COUPE:
		canDashboardGenesisCoupe(cycle);
		break;
	case CAN_AIM_DASH:
		canDashboardAim(cycle);
	default:
		break;
	}
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Haltech CAN bus Communication don't work.

Post by AndreyB »

Nice just made this better https://github.com/rusefi/rusefi/commit/f490b499971f19e01e9f2dbe165309e1bc862d36 would be about 20 minutes to build snapshot

but that also shows that this code is totally untested and unproven :(
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
hugovw1976
Posts: 68
Joined: Fri Oct 16, 2020 3:10 pm
Github Username: hugovw1976

Re: Haltech CAN bus Communication don't work.

Post by hugovw1976 »

AndreyB wrote:Nice just made this better https://github.com/rusefi/rusefi/commit/f490b499971f19e01e9f2dbe165309e1bc862d36 would be about 20 minutes to build snapshot

but that also shows that this code is totally untested and unproven :(
Thanks Image

Enviado desde mi SM-G988U1 mediante Tapatalk

hugovw1976
Posts: 68
Joined: Fri Oct 16, 2020 3:10 pm
Github Username: hugovw1976

Re: Haltech CAN bus Communication don't work.

Post by hugovw1976 »

AndreyB wrote:
Wed Mar 23, 2022 2:54 pm
Nice just made this better https://github.com/rusefi/rusefi/commit/f490b499971f19e01e9f2dbe165309e1bc862d36 would be about 20 minutes to build snapshot

but that also shows that this code is totally untested and unproven :(
I compile firmware with the new lines on can_dash.cpp, and can confirm Haltech can communication works now, just need to check if all the channel are correct but I don't have time until the weekend.

Thanks.
hugovw1976
Posts: 68
Joined: Fri Oct 16, 2020 3:10 pm
Github Username: hugovw1976

Re: Haltech CAN bus Communication don't work.

Post by hugovw1976 »

Check all output channels and looks good, just the Intake temperature and fuel level is not declared in can_dash.cpp

Code: Select all

	/* 0x3E0 = 5Hz rate */
		{ 
			CanTxMessage msg(0x3E0, 8);
			/* Coolant temperature in K y = x/10 */
			tmp = ((Sensor::getOrZero(SensorType::Clt) + 273.15) * 10);
			msg[0] = (tmp >> 8);
			msg[1] = (tmp & 0x00ff);
			/* Air Temperature */
			msg[2] = 0x00;
			msg[3] = 0x00;
			/* Fuel Temperature */
			msg[4] = 0x00;
			msg[5] = 0x00;
			/* Oil Temperature */
			msg[6] = 0x00;
			msg[7] = 0x00;
		}
Air temperature is the intake air temperature. must be :

Code: Select all

	/* 0x3E0 = 5Hz rate */
		{ 
			CanTxMessage msg(0x3E0, 8);
			/* Coolant temperature in K y = x/10 */
			tmp = ((Sensor::getOrZero(SensorType::Clt) + 273.15) * 10);
			msg[0] = (tmp >> 8);
			msg[1] = (tmp & 0x00ff);
			/* Air Temperature */
			tmp = ((Sensor::getOrZero(SensorType::Iat) + 273.15) * 10);
			msg[2] = (tmp >> 8);
			msg[3] = (tmp & 0x00ff);
			/* Fuel Temperature */
			msg[4] = 0x00;
			msg[5] = 0x00;
			/* Oil Temperature */
			msg[6] = 0x00;
			msg[7] = 0x00;
		}
Fuel Level in code:

Code: Select all

/* 0x3E2 = 5Hz rate */
		{ 
			CanTxMessage msg(0x3E2, 2);
			/* Fuel Level in Liters */
			msg[0] = 0x00;
			msg[1] = 0x00;
		}
must be:

Code: Select all

/* 0x3E2 = 5Hz rate */
		{ 
			CanTxMessage msg(0x3E2, 2);
			/* Fuel Level in Liters */
			tmp = (Sensor::getOrZero(SensorType::FuelLevel)* 10);
			msg[0] = (tmp >> 8);
			msg[1] = (tmp & 0x00ff);
		}
Intake Air Temperature tested and working, Fuel Level not nested.
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Haltech CAN bus Communication don't work.

Post by AndreyB »

Please-please-please invest an hour of your time to properly fork https://github.com/rusefi/rusefi and push changed into your fork?

Reminder that worst case scenario you can edit files via the browser or upload files into your fork of https://github.com/rusefi/rusefi

You fix is valuable but please make it move valuable by going the proper GH route to reduce my efforts to accept your fix.
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
hugovw1976
Posts: 68
Joined: Fri Oct 16, 2020 3:10 pm
Github Username: hugovw1976

Re: Haltech CAN bus Communication don't work.

Post by hugovw1976 »

AndreyB wrote:Please-please-please invest an hour of your time to properly fork https://github.com/rusefi/rusefi and push changed into your fork?

Reminder that worst case scenario you can edit files via the browser or upload files into your fork of https://github.com/rusefi/rusefi

You fix is valuable but please make it move valuable by going the proper GH route to reduce my efforts to accept your fix.
Sorry I'm very new on this, is any guide to made fork.

Enviado desde mi SM-G988U1 mediante Tapatalk

User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Haltech CAN bus Communication don't work.

Post by AndreyB »

hugovw1976 wrote:
Wed Mar 30, 2022 5:15 pm
is any guide to made fork.
Please go over https://docs.github.com/en/get-started/quickstart/fork-a-repo

We are talking about one click in the right-top corner of https://github.com/rusefi/rusefi once you have a github account.
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Haltech CAN bus Communication don't work.

Post by AndreyB »

Also forum is not a chatting platform.

Slack is the chatting platform we should be using for chatting see https://rusefi.com/forum/viewtopic.php?f=13&t=1198
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
Post Reply