Multiple Micro Maestro 6 controllers via USB to Raspberry Pi

I have a project that utilizes two Pololu Micro Maestro 6
controllers connected via USB to a Raspberry Pi. I see their
virtual serial port device names in the /dev directory as
ttyACM0 & 1 for the Command and TTL Serial ports for the
first controller, and ttyACM2 & 3 for the second controller.

What I notice is that ttyACM0/1 is assigned to whichever
controller is plugged in first. So there’s a possibility
that my program could be addressing the wrong controller.
It would be ideal if there’s a way to identify which
controller is assigned to ttyACM0/1 vs. ttyACM2/3.

In the Status tab of the Maestro Control Center running in my
Windows system, there’s a “Connected to:” number that I
presume is some sort of a device ID number of a controller.
With the two controllers plugged into my Windows system,
I get #00100001 and #00100005 for controller “A” and "B"
respectively, regardless of which one is plugged in first.

So what is the command that is used to acquire this ID number
from the Micro Maestro 6 controller?

Thanks in advance for your help.

Hello.

Since you are using Linux, you might consider accessing the Maestro using the serial port entries found in the /dev/serial/by-id/ directory. The entries in that directory include the Maestro’s serial number. An entry that ends with if00 is a Command Port, and one that ends with if02 is a TTL Port.

There is no serial command to obtain a Maestro’s serial number.

–David

David,

I changed my program to use the entries in the /dev/serial/by-id/ directory as you suggested, and it works just as well as before. But now there’s no ambiguity as to which Micro Maestro controller the program is addressing. It’s strange that the entries weren’t mentioned in the Maestro documentation. Thanks so much!

And just for advanced curiosity, how does Linux get the controllers’ serial numbers in order to create the entries? That info might come in handy in my future projects.

The USB specification describes a standard way to store serial numbers on USB devices, and we implemented that on the Maestro. Your Linux system is reading the serial number from the USB device as a string in the standard way and then using that information to make those symbolic links.

–David

David,

Got it. I’ll be brushing up on USB spec then.
Thanks!