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

Distinguishing two KUSBA devices running Rampon #8

Open
ginkel opened this issue Feb 25, 2024 · 1 comment
Open

Distinguishing two KUSBA devices running Rampon #8

ginkel opened this issue Feb 25, 2024 · 1 comment

Comments

@ginkel
Copy link

ginkel commented Feb 25, 2024

Hi there,

I built two KUSBA USB accelerometers to measure the X axis and bed resonances of my Anycubic i3 Mega S printer without having to move the probe between axes. When I attach both devices to my Raspberry Pi, however, they both seem to get the same id, so they conflict and only one entry in /dev/serial/by-id/ "wins":

# ll /dev/serial/by-id/
total 0
lrwxrwxrwx 1 root root 13 Feb 25 20:53 usb-Anchor_Rampon-if00 -> ../../ttyACM1
lrwxrwxrwx 1 root root 13 Feb 25 16:01 usb-Silicon_Labs_CP2102N_USB_to_UART_Bridge_Controller_f2b72a345c64e911ade3dea733226a36-if00-port0 -> ../../ttyUSB0

The other unit is /dev/ttyACM0.

Any ideas?

Edit: The W25Q16JVSNIQ flash chip installed on the KUSBA PCB should expose a unique ID. Docs how to read it from the Pico SDK, are available at: https://www.raspberrypi.com/documentation/pico-sdk/high_level.html#pico_unique_id

That's probably different from Rust, though...

Edit 2: As a workaround, I compiled a custom version for the device attached to the print bed that uses a custom (but hard-coded) serial number, cf. 405031e.

@rogerlz
Copy link
Owner

rogerlz commented May 2, 2024

yeah the rp2040-hal doesn't have an easy way to read the unique id..
the rp2040-flash does have it, but has the rp2040-hal pinned to 0.9 :(
let me think what'd be easier

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

2 participants