Skip to content

Bug-fix: Repeated command by [CR] and overflow detection#8

Open
Nakakiyo092 wants to merge 9 commits intonormaldotcom:mainfrom
Nakakiyo092:bugfix
Open

Bug-fix: Repeated command by [CR] and overflow detection#8
Nakakiyo092 wants to merge 9 commits intonormaldotcom:mainfrom
Nakakiyo092:bugfix

Conversation

@Nakakiyo092
Copy link
Copy Markdown

This pull request fixes two bugs.

Close #4
With this fix, CANable will just ignore [CR] without any character, instead of repeating the previous command.

Close #6
With this fix, CANable will always detect USB Tx buffer overflow .

This pull request also includes a fix for some minor typo in the README.

With this fix, CANable will just ignore [CR] without any character, instead of repeating the previous command.
The return will leave the system interrupt disabled.
If the data just fits. It's OK.
@Elmue
Copy link
Copy Markdown

Elmue commented Aug 17, 2025

Hello

It is great that you improved the code.
But Normaldotcom is a dead project.
Nobody is caring about the obvious issues there.
Can you please upload a new binary with your modifications?
Most people who own a CANable (e.g. from MKS Makerbase) will not be able to compile this on their own.
So I would say a bugfix or a new feature is quite useless if there is no compiled binary.

I just posted a new issue on Normaldotcom but I'am sure nobody will ever care, although this can be fixed in 5 minutes.
It would be great if there would be a follow-up project for the dead normaldotocom

@Nakakiyo092
Copy link
Copy Markdown
Author

Hello @Elmue ,

Unfortunately, I would refrain from sharing the binary, as it's unclear for me whether the license permits it.

In my fork, I'm trying to switch to a more permissive library.
I might share my binary once it's ready.

By the way, my fork already includes an adjustable sampling point, which you discussed in #1 .
My implementation uses s and y instead of p, though.

Regards.

@Elmue
Copy link
Copy Markdown

Elmue commented Aug 19, 2025

Hello

my fork already includes an adjustable sampling point,

That is great.
But if you do not make the effort to document this, your work is completely useless.

You write:
sddxxyyzz - Set nominal bitrate and bittiming
yddxxyyzz - Set data bitrate and bittiming

I have not the slightest idea what that means.
What is dd ?
What is xxyyzz ?
And what does bitrate AND bittiming mean ??
How are they set both in one command ?
Nobody except you will ever use this feature without a documentation.


as it's unclear for me whether the license permits it.

You mean that a license exists that allows to publish source code but prohibits to compile it ?
I have never heard of such a strange thing.

Did you change the license ?
I see that there are already binaries, so the license does not seem to be a problem:
https://github.com/makerbase-mks/CANable-MKS/tree/main/Firmware/CANable%20V2.0

@Nakakiyo092
Copy link
Copy Markdown
Author

Hello @Elmue ,

What is dd ? What is xxyyzz ?

Please find detailed information here and here.
I would welcome any feedback on my folk via the fork’s issue page!


You mean that a license exists that allows to publish source code but prohibits to compile it ?

The problem is ST Micro's Liberty V2 License for the STM32 USB Library.
That license is said to be incompatible with the GNU GPL v3 for the CANable2 firmware.
I will not provide those components in a combined form to avoid any risk of violating the licenses.
Here, I'm not a legal expert and not making a comment on someone else's actions.

Regards.

@Elmue
Copy link
Copy Markdown

Elmue commented Aug 20, 2025

Hello

OK I tell you that I managed to compile the code and I'am already working on a new version.

Your commands sddxxyyzz and yddxxyyzz are a better solution than my idea with commas because it is easier to parse.
However in your wiki is missing the information if this ddxxyyzz must be sent as decimal or hexadecimal value.

@Nakakiyo092
Copy link
Copy Markdown
Author

Hello,

OK I tell you that I managed to compile the code and I'am already working on a new version.

Good to hear that.

However in your wiki is missing the information if this ddxxyyzz must be sent as decimal or hexadecimal value.

As indicated by 'hex values', they should be in hexadecimal format.

Regards.

@Elmue
Copy link
Copy Markdown

Elmue commented Oct 10, 2025

You can now download the new CANable 2.5 firmware with many new features and bugfixes and speed optimizations here:

https://netcult.ch/elmue/CANable%20Firmware%20Update

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

Successfully merging this pull request may close these issues.

USB Tx buffer overflow undetected Sending a [CR] will repeat the previous command

2 participants