KUSBA icon indicating copy to clipboard operation
KUSBA copied to clipboard

Kusba 2.4 instalation process

Open rastosk opened this issue 1 year ago • 27 comments

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!

rastosk avatar Oct 28 '23 19:10 rastosk

From the.looks, it's talking about the ls /dev/ command, so you can verify the device ID is in fact sda1.

On Sat, Oct 28, 2023, 12:33 rastosk @.***> wrote:

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? Thank you for your help!

— Reply to this email directly, view it on GitHub https://github.com/xbst/KUSBA/issues/27, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARBZ5NZ4LMRDMWAAZTT56CTYBVMX5AVCNFSM6AAAAAA6UJEXKOVHI2DSMVQWIX3LMV43ASLTON2WKOZRHE3DMNZRGUZTINA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

Will-wastelander avatar Oct 28 '23 21:10 Will-wastelander

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

rastosk avatar Oct 28 '23 21:10 rastosk

That would mean the device has already been flashed, and you will need to hold the button while plugging in the USB cable to get to the bootloader.

On Sat, Oct 28, 2023, 14:50 rastosk @.***> wrote:

This what I have at L's /dev

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

— Reply to this email directly, view it on GitHub https://github.com/xbst/KUSBA/issues/27#issuecomment-1783927861, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARBZ5N6YB5EWABMFXDBMK6DYBV42XAVCNFSM6AAAAAA6UJEXKOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBTHEZDOOBWGE . You are receiving this because you commented.Message ID: @.***>

Will-wastelander avatar Oct 28 '23 21:10 Will-wastelander

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

rastosk avatar Oct 28 '23 22:10 rastosk

Exactly what you posted.

On Sat, Oct 28, 2023, 15:01 rastosk @.***> wrote:

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

— Reply to this email directly, view it on GitHub https://github.com/xbst/KUSBA/issues/27#issuecomment-1783929529, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARBZ5N5MLKHAIT5LZUQBOADYBV6D3AVCNFSM6AAAAAA6UJEXKOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBTHEZDSNJSHE . You are receiving this because you commented.Message ID: @.***>

Will-wastelander avatar Oct 28 '23 22:10 Will-wastelander

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

rastosk avatar Oct 28 '23 22:10 rastosk

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.

xbst avatar Oct 31 '23 09:10 xbst

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

rastosk avatar Oct 31 '23 14:10 rastosk

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.

xbst avatar Nov 07 '23 17:11 xbst

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.

pellcorp avatar Nov 09 '23 03:11 pellcorp

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

rastosk avatar Nov 09 '23 04:11 rastosk

So it actually seems like have this exact issue https://github.com/xbst/KUSBA/issues/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.

pellcorp avatar Nov 09 '23 04:11 pellcorp

That sucks man I gotine from aliexpress trianglelabs

rastosk avatar Nov 09 '23 04:11 rastosk

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.

pellcorp avatar Nov 09 '23 04:11 pellcorp

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.

sreknob avatar Nov 28 '23 02:11 sreknob

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

rastosk avatar Nov 28 '23 03:11 rastosk

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.

sreknob avatar Nov 30 '23 16:11 sreknob

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.

xbst avatar Nov 30 '23 18:11 xbst

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!

sreknob avatar Dec 01 '23 02:12 sreknob

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.

xbst avatar Dec 02 '23 10:12 xbst

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.

rastosk avatar Dec 02 '23 16:12 rastosk

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.

xbst avatar Dec 02 '23 16:12 xbst

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

rastosk avatar Dec 02 '23 17:12 rastosk

https://github.com/xbst/KUSBA/blob/main/Docs/v2-Rampon-Firmware.md


From: rastosk @.> Sent: Saturday, December 2, 2023 11:04:19 AM To: xbst/KUSBA @.> Cc: Isik @.>; Comment @.> Subject: Re: [xbst/KUSBA] Kusba 2.4 instalation process (Issue #27)

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

— Reply to this email directly, view it on GitHubhttps://github.com/xbst/KUSBA/issues/27#issuecomment-1837203875, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AO2M47MOWYPEWRWHSUH37FTYHNNRHAVCNFSM6AAAAAA6UJEXKOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMZXGIYDGOBXGU. You are receiving this because you commented.Message ID: @.***>

xbst avatar Dec 02 '23 17:12 xbst

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

austwhite avatar Feb 29 '24 08:02 austwhite

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.

xbst avatar Feb 29 '24 09:02 xbst

@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.

austwhite avatar Feb 29 '24 09:02 austwhite