canable2-fw icon indicating copy to clipboard operation
canable2-fw copied to clipboard

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

Open Nakakiyo092 opened this issue 1 year ago • 7 comments

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.

Nakakiyo092 avatar Dec 25 '24 10:12 Nakakiyo092

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

Elmue avatar Aug 17 '25 18:08 Elmue

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.

Nakakiyo092 avatar Aug 19 '25 15:08 Nakakiyo092

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

Elmue avatar Aug 19 '25 20:08 Elmue

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.

Nakakiyo092 avatar Aug 20 '25 14:08 Nakakiyo092

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.

Elmue avatar Aug 20 '25 17:08 Elmue

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.

Nakakiyo092 avatar Aug 21 '25 10:08 Nakakiyo092

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

Elmue avatar Oct 10 '25 19:10 Elmue