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

GMLAN 33.3kbps ? #11

Open
vkfkbr2 opened this issue May 20, 2018 · 5 comments
Open

GMLAN 33.3kbps ? #11

vkfkbr2 opened this issue May 20, 2018 · 5 comments

Comments

@vkfkbr2
Copy link

vkfkbr2 commented May 20, 2018

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?

@autowp
Copy link
Owner

autowp commented May 20, 2018

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

@vkfkbr2
Copy link
Author

vkfkbr2 commented May 20, 2018

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

thanks for quick reply.

@autowp
Copy link
Owner

autowp commented May 20, 2018

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

@vkfkbr2
Copy link
Author

vkfkbr2 commented May 20, 2018

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 ?

@kirya-dev
Copy link

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

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