arduino-canhacker icon indicating copy to clipboard operation
arduino-canhacker copied to clipboard

GMLAN 33.3kbps ?

Open vkfkbr2 opened this issue 6 years ago • 5 comments

I tried to connect to GMLAN (swcan 33.3kbps) but I couldn't. In CANHACKER's settings window there are 10kb 50kb etc but there is no 33.3kbps.

It wants btr0 and btr1 values.

How can I connect to GMLAN with 33.3kbps speed?

vkfkbr2 avatar May 20 '18 16:05 vkfkbr2

You can modify that line https://github.com/autowp/arduino-canhacker/blob/master/CanHacker.cpp#L62 to

MCP2515::ERROR error = mcp2515->setBitrate(CAN_50KBPS, canClock);

to always connect at 50kbps

autowp avatar May 20 '18 16:05 autowp

But I need 33.3kbps. if I change that line to "50kbps" will it connect to GMLAN with 33.3kbps?

thanks for quick reply.

vkfkbr2 avatar May 20 '18 16:05 vkfkbr2

Select any of available bitrates from CAN_5KBPS, CAN_10KBPS, CAN_20KBPS, CAN_31K25BPS, CAN_33KBPS, CAN_40KBPS, CAN_50KBPS, CAN_80KBPS, CAN_83K3BPS, CAN_95KBPS, CAN_100KBPS, CAN_125KBPS, CAN_200KBPS, CAN_250KBPS, CAN_500KBPS, CAN_1000KBPS

autowp avatar May 20 '18 16:05 autowp

Big thanks for your answers, i need to ask one last thing;

will choosing CAN_33KBPS connect to GMLAN or do i need to replace every 33kbps to 33k3bps ?

vkfkbr2 avatar May 20 '18 17:05 vkfkbr2

will choosing CAN_33KBPS connect to GMLAN or do i need to replace every 33kbps to 33k3bps ?

There naming problem. In real are same.

For working with SWCAN (GMLAN) 33.3kbps modify line 62 as:

MCP2515::ERROR error = mcp2515->setBitrate(CAN_33KBPS, MCP_16MHZ);

kirya-dev avatar Nov 23 '21 11:11 kirya-dev