Failed to read serial_number using ASCII protocol

Hi,

I’ve been trying to identify 3 different odrives by checking their serial numbers. However, I have problem reading the serial numbers with ASCII protocol. I sent

"r serial_number\n" 

and received

"lu\r\n"

no matter which board it is.

1629089151(1)

I know it is quite simple in python by just

odrv0 = odrive.find_any(serial_number="XXX")

but I am working in c++. How should I do it?

Thanks!

lu is a formattting code (unsigned long). But you need %lu. Did someone forget a % somewhere in your code?

What version of the firmware are you using? Is this an ODrive purchased from the official shop, or one of the fake ones?

You can also try the i command to get the serial number.

Thanks towen! The i command returns me the correct serial number!