Jump to content
  • 0

Read serial number of AD2 using a CLI script in Windows


xcellsior

Question

I'm looking for a way to read the serial number of an AD2 that is connected to a Windows PC.  Here's the why:  I have ~30 AD2 units that are interfacing custom electronics.  Each AD2-Custom Electronics setup has a unique calibration file.  We are moving to netboot for our PCs, so, I need a way to copy the calibration file that goes with the AD2 serial number to the PC that is booting off the network.  We are planning to add between 100 and 300 more AD2 units to this test array so I need to automate this.  So, if I can run a script at startup that can read the AD2's serial number, problem solved.  As a side note, this might move to a PI if we can find a way to interface a PI with the AD2.  That being said, I think we would still want an easy way to read the AD2's serial number from CLI.  For now, I'm looking for answers on how to do this with Windows.

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

Hi @xcellsior,

I haven't done anything like this specifically, but I did jump down the rabbit hole and found you can use this command in Windows PowerShell to list out the Device ID of an attached Analog Discovery 2 (presuming it is the only "USB Serial Converter" device attached to the PC):

Get-WMIObject Win32_PnPEntity | where {$_.Name -like "USB Serial Converter*"} | Format-Table PNPDeviceID

The 12 digit value after the last backslash (\) will be the serial number of the attached Analog Discovery 2. I did not determine the CLI equivalent of this command though.

If by chance when you say "PI" you happen to mean a Raspberry Pi, the Analog Discovery 2 and accompanying WaveForms software are compatible with the Raspberry Pi 4 Model B.

Let me know if you have any more questions.

Thanks,
JColvin

Link to comment
Share on other sites

14 hours ago, JColvin said:

Hi @xcellsior,

I haven't done anything like this specifically, but I did jump down the rabbit hole and found you can use this command in Windows PowerShell to list out the Device ID of an attached Analog Discovery 2 (presuming it is the only "USB Serial Converter" device attached to the PC):


Get-WMIObject Win32_PnPEntity | where {$_.Name -like "USB Serial Converter*"} | Format-Table PNPDeviceID

The 12 digit value after the last backslash (\) will be the serial number of the attached Analog Discovery 2. I did not determine the CLI equivalent of this command though.

If by chance when you say "PI" you happen to mean a Raspberry Pi, the Analog Discovery 2 and accompanying WaveForms software are compatible with the Raspberry Pi 4 Model B.

Let me know if you have any more questions.

Thanks,
JColvin

Thanks, I'll have to check this out too.  And yes, PI = Raspberry Pi.  I guess I need to start looking into WaveForms.  We are presently using LabView, but it sounds like there is a python lib based on another post, and honestly, I would like to convert the core work from LabView to python if they can accomplish the same task.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...