An interesting MacOSX feature discovered with TyQT on a Mac.
Normally, the serial number of the USB device winds up as the device name (e.g. /dev/cu.usb12345 corresponds to SNR=12345). However, I was testing this morning and found a case where this isn't what happens. I was running TyQt to see what the serial numbers and devices were, and noticed they were different. So I checked it a different way, using the pyserial module for python, which has a convenient list_ports() function.
['/dev/cu.usbmodem33521', 'USB Serial', 'USB VIDID=16c0:483 SNR=33522'],
['/dev/cu.usbmodem33471', 'USB Serial', 'USB VIDID=16c0:483 SNR=33476'],
['/dev/cu.usbmodem33481', 'USB Serial', 'USB VIDID=16c0:483 SNR=33483'],
['/dev/cu.usbmodem33661', 'USB Serial', 'USB VIDID=16c0:483 SNR=33663'],
['/dev/cu.usbmodem33461', 'USB Serial', 'USB VIDID=16c0:483 SNR=33464']]
This matches the output from TyQt (and what the Arduino IDE reports). The SNR reported by TyQt and python DOES match the MAC (e.g. 33464 corresponds to a MAC ending in 82:B8). It also matches what shows up if you dump the USB tree out.
USB Serial:
Product ID: 0x0483
Vendor ID: 0x16c0
Version: 1.00
Serial Number: 33464
Speed: Up to 12 Mb/sec
Manufacturer: Teensyduino
Location ID: 0x14255000 / 32
Current Available (mA): 500
Current Required (mA): 100
Take home message: you don't know, a priori, what the device name will be for a given serial number. Those of us working in Windows already had this issue with COM port numbers being capricious and arbitrary. This is why I was looking at device serial numbers in the first place: I go out and find all the COM ports, and test them to see which ones are connected to a Teensy (looking for the PID/VID) and then send a command to my code on the teensy to read back the MAC (which also tells me that the version of the software loaded is correct).
Normally, the serial number of the USB device winds up as the device name (e.g. /dev/cu.usb12345 corresponds to SNR=12345). However, I was testing this morning and found a case where this isn't what happens. I was running TyQt to see what the serial numbers and devices were, and noticed they were different. So I checked it a different way, using the pyserial module for python, which has a convenient list_ports() function.
['/dev/cu.usbmodem33521', 'USB Serial', 'USB VIDID=16c0:483 SNR=33522'],
['/dev/cu.usbmodem33471', 'USB Serial', 'USB VIDID=16c0:483 SNR=33476'],
['/dev/cu.usbmodem33481', 'USB Serial', 'USB VIDID=16c0:483 SNR=33483'],
['/dev/cu.usbmodem33661', 'USB Serial', 'USB VIDID=16c0:483 SNR=33663'],
['/dev/cu.usbmodem33461', 'USB Serial', 'USB VIDID=16c0:483 SNR=33464']]
This matches the output from TyQt (and what the Arduino IDE reports). The SNR reported by TyQt and python DOES match the MAC (e.g. 33464 corresponds to a MAC ending in 82:B8). It also matches what shows up if you dump the USB tree out.
USB Serial:
Product ID: 0x0483
Vendor ID: 0x16c0
Version: 1.00
Serial Number: 33464
Speed: Up to 12 Mb/sec
Manufacturer: Teensyduino
Location ID: 0x14255000 / 32
Current Available (mA): 500
Current Required (mA): 100
Take home message: you don't know, a priori, what the device name will be for a given serial number. Those of us working in Windows already had this issue with COM port numbers being capricious and arbitrary. This is why I was looking at device serial numbers in the first place: I go out and find all the COM ports, and test them to see which ones are connected to a Teensy (looking for the PID/VID) and then send a command to my code on the teensy to read back the MAC (which also tells me that the version of the software loaded is correct).