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

Kusba 2.4 instalation process #27

Open
rastosk opened this issue Oct 28, 2023 · 27 comments
Open

Kusba 2.4 instalation process #27

rastosk opened this issue Oct 28, 2023 · 27 comments

Comments

@rastosk
Copy link

rastosk commented Oct 28, 2023

Hi i have received my kusba 2.4 from trianglelabs and i have to say what a beautiful work of art is this! When I was commissioning the accelerometer and following the guide:

  1. Build the firmware

make

  1. Find the storage location of the KUSBA. This will usually be sda1. Use this command one time with the KUSBA unplugged and one time with KUSBA plugged in (while holding down the button on the KUSBA) to verify.

ls /dev/

  1. Flash the firmware.

sudo mount /dev/sda1 /mnt
sudo cp out/klipper.uf2 /mnt
sudo umount /mnt

Step 7 didn't make any sense to me so what i have done just skipped that step. Does this mean that my adxl will not work properly? adxl is connected to my pi when i do querry i get error on 2nd time is all ok no error that is normal according to instructiuons. The dilemma is will this work fine or i have do do step 7 some how.
Thank you for your help!

@Will-wastelander
Copy link

Will-wastelander commented Oct 28, 2023 via email

@rastosk
Copy link
Author

rastosk commented Oct 28, 2023

When i issue ls /dev I get two devices one klipper and one adxl both are same looking as bellow

serial: /dev/serial/by-id/usb-Klipper_rp2040

@Will-wastelander
Copy link

Will-wastelander commented Oct 28, 2023 via email

@rastosk
Copy link
Author

rastosk commented Oct 28, 2023

Ok so just plug in hold the button and what do I look for?

@Will-wastelander
Copy link

Will-wastelander commented Oct 28, 2023 via email

@rastosk
Copy link
Author

rastosk commented Oct 28, 2023

So when I hold button down it will boot differently? When I type Ls/dev what should come out?

@xbst
Copy link
Owner

xbst commented Oct 31, 2023

Just follow these instructions:

https://github.com/xbst/KUSBA/blob/main/Docs/v2-Rampon-Firmware.md#1-flash-rampon-anchor-to-the-mcu

You can flash the firmware on a Windows PC, it's easier.

@rastosk
Copy link
Author

rastosk commented Oct 31, 2023

I remember doing that with adxl345 board. But looks like this kusba come flashed ! Do they come flashed from factory? If so that must be very old firmware on it surprised that this actually works. Gonna have to plug to PC and paste the new firmware

@xbst
Copy link
Owner

xbst commented Nov 7, 2023

There's no one "factory" for KUSBAs. I open sourced the files so there are many vendors, and each vendor orders from their preferred supplier. Some even make them themselves. Either way, they don't come with the firmware, it needs to be flashed. I flash all of mine before selling them. I know some other vendors do that too, but not all.
Rampon, unlike Klipper, doesn't need to be updated often. So if you bought from me or another vendor that pre-flashes rampon, it should be good to go. No update needed until there's a new rampon version.

@pellcorp
Copy link

pellcorp commented Nov 9, 2023

I actually had a problem getting mine to work, I have the 2.4 version

So I can only get this to work if I copy the firmware over every time I plug it in. So I need to hold the button down while plugging it in, then do these commands:

pi@klipper:~/klipper $ sudo mount /dev/sda1 /mnt
pi@klipper:~/klipper $ sudo cp out/klipper.uf2 /mnt
pi@klipper:~/klipper $ sudo umount /mnt

And the ls /dev/serial/by-id/ shows the device, but if then unplug the device and then plug it in again, the device does not appear.

Am I doing it wrong, or is the device defective.

This is the same issue for the Rampon as well

I bought the device from Unique Prints Shop in australia.

@rastosk
Copy link
Author

rastosk commented Nov 9, 2023

Hi pellcorp just follow this video and you will be golden. Supper easy and I don't use any command's only comment out # adxl when I'm done using
https://www.youtube.com/watch?v=W_VHbT_tsZw

@pellcorp
Copy link

pellcorp commented Nov 9, 2023

So it actually seems like have this exact issue #11

@rastosk I followed these steps to the letter, the issue is just like for issue #11, after I disconnect the device from the computer the flashed firmware gets reset. Just like issue #11 I can use the device just fine immediately after flashing, but it does not survive the device being removed from computer. So it seems like I have a faulty board (where the flash is reset / erased), I am chasing up a replacement from my vendor, fingers crossed they do the right thing.

@rastosk
Copy link
Author

rastosk commented Nov 9, 2023

That sucks man I gotine from aliexpress trianglelabs

@pellcorp
Copy link

pellcorp commented Nov 9, 2023

Seems like it just a random issue, and Unique Prints Shop will be sending a replacement tomorrow and they will test that the one they send me saves the flash image correctly. In the mean time I can use the faulty one, I just have do the mount cp, umount steps first.

@sreknob
Copy link

sreknob commented Nov 28, 2023

I just received one from Triangle Labs that has the exact same issue, will work after flashing but won't show up as a serial device after a power cycle. I presume there is probably an issue with pulling the chip into run mode.

@rastosk
Copy link
Author

rastosk commented Nov 28, 2023

I just received one from Triangle Labs that has the exact same issue, will work after flashing but won't show up as a serial device after a power cycle. I presume there is probably an issue with pulling the chip into run mode.

Interesting mine work fine after reboot. Try to reflash and follow steps thatbinposted above

@sreknob
Copy link

sreknob commented Nov 30, 2023

I just received one from Triangle Labs that has the exact same issue, will work after flashing but won't show up as a serial device after a power cycle. I presume there is probably an issue with pulling the chip into run mode.

Interesting mine work fine after reboot. Try to reflash and follow steps thatbinposted above

I have two from Triangle Labs, only one exhibits this behaviour. I have re-flashed several times, both from windows and linux with the same results. They came factory flashed with Rampon 0.2.0 and one didn't work immediately. Silkscreen says version 2.4. It was only after doing the reflash several times that I discovered this behaviour.

@xbst
Copy link
Owner

xbst commented Nov 30, 2023

I test all of my KUSBAs as this is a problem affecting a decent chunk of KUSBAs, depends on the batch but I see somewhere between 2-8% failure rate (usually closer to 2%). Here's a picture of all the KUSBAs I discarded and didn't sell in the past 6 months or so because of this issue:
IMG_3899
Obviously discarding this many units is a big business expense, so they don't bother. And because of this and because I don't trust them to make it right when customers get a bad unit, I don't list them or any other Aliexpress seller on the vendor list in this repo.

@sreknob
Copy link

sreknob commented Dec 1, 2023

Fair enough! Next time I will order from you!

While trying to figure out what was going on, I had watched your video about the issues with the earlier revisions and the process to get to 2.3/2.4 so I guess I was just surprised that the flash erase issue was still a problem.

Thanks for all you do Isik!

@xbst
Copy link
Owner

xbst commented Dec 2, 2023

Yeah I thought the problem was fixed with v2.3 as all the units I ordered for the prototype run were working fine. I wasn't selling these back then so I didn't have a huge number of units to test.

Months later a few reports started coming from other vendors of 1-2% of units failing like that, and that is when I knew the issue wasn't fully fixed. I was still relying on other vendors reporting failed units to me at the time. When I started selling these about 6 months ago, I realized the fail percantage is actually 2-8%, depending on the batch. This high variability between batches is weird but I don't know what's going on exactly, just some theories. All I know for sure is, this only seems to happen on RP2040 based PCBs I design, which is part of the reason why I'm now using STM32s on newer projects.

Another observation is Rampon sometimes works fine on units that fail with Klipper. It's also less buggy on RP2040 (no failed first query bug), and doesn't require updates as often, and easier to use. So that's the firmware I recommend and the firmware I use to pre-flash/test my units.

@rastosk
Copy link
Author

rastosk commented Dec 2, 2023

The error that you get every time you do a query is same as Nero has in his video loose wire. The moment he puts wire in place and do query all is fixed . I'm wondering if the kusba issue could be related to that somehow. This is way beyond my knowledge just guessing here.

@xbst
Copy link
Owner

xbst commented Dec 2, 2023

If it's happening EVERY TIME, then yes there's a hardware issue. The issue I was referring to is a known Klipper bug on RP2040 based USB accelerometers. This happens on KUSBAs, FYSETC PISs, and adxl345 with pi pico setups. If you use Klipper (instead of Rampon) on these setups, and use hardware SPI (software SPI is an option but not ideal), first accelerometer query will fail and the ones after that will work. This is a Klipper bug, not a hardware issue so there's nothing I can do to fix it. But as I said, Rampon firmware doesn't have this bug.

@rastosk
Copy link
Author

rastosk commented Dec 2, 2023

Oh cool how do I flash rampton? I don't mind the bug not a big deal but its a pain to reflash the klipper file after each upgrade

@xbst
Copy link
Owner

xbst commented Dec 2, 2023 via email

@austwhite
Copy link

I just received a KUSBA from local reseller DREMC . I have run into the issue of the firmware not sticking and erasing on a power cycle, like it is loaded into RAM but never makes it's way to flash or something.
Anyway, I wanted to ask here before I go back to DREMC to see if there was anyway to get the firmware to stick on one that has issues? DREMC are usually fantastic and easy to talk to, I just want to make sure I exhaust all options before I go back to them

@xbst
Copy link
Owner

xbst commented Feb 29, 2024

I just received a KUSBA from local reseller DREMC . I have run into the issue of the firmware not sticking and erasing on a power cycle, like it is loaded into RAM but never makes it's way to flash or something. Anyway, I wanted to ask here before I go back to DREMC to see if there was anyway to get the firmware to stick on one that has issues? DREMC are usually fantastic and easy to talk to, I just want to make sure I exhaust all options before I go back to them

Sometimes Rampon works fine on units that fail like that with Klipper, so if you're flashing Klipper, Rampon might help.

Other than this, not much can be done unfortunately. If it's bothering you, you need to contact DREMC for a replacement.

@austwhite
Copy link

@xbst More of a slight niggle than a bother. Just means I have to flash it from the Linux CLI as if I dump the file from windows, of course it is gone when I disconnect it from the Windows machine. I did try Rampon first to be honest. No luck with my one :).
Thanks for the advice. I appreciate it.

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

6 participants