autowp/arduino-canhacker

GMLAN 33.3kbps ?

vkfkbr2 opened this issue · 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?

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

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

thanks for quick reply.

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

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 ?

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);