[Python API] Device Calibration

Its me again (:slight_smile:
Quick question about device calibration via Automation (using Python API),
is there a way for detecting whether the connected device is calibrated ?
and if not to calibrate it ?

@itay.work94 Thanks for bringing this up. This is unfortunately not possible via the Automation API, though I agree we should certainly get this added.
https://saleae.github.io/logic2-automation/automation.html

Similar to my comment on your other post for renaming channels, you’ll have to manually check if the particular device calibration file has been loaded on the particular PC it’s being used on (instructions in the link below for reference). Normally, this happens automatically (otherwise, an error pop up will appear, typically caused by network issues), and once the calibration file has been downloaded once on a PC for a particular device, it won’t need to be downloaded again.

I’ve just added this to our feedback list for the next automation update, thanks for asking about it!

In the meantime, one somewhat hacky solution would be to check the calibration folder for a calibration file that matches the device ID in use.

The location of the calibration folder is mentioned in the link Tim shared above.

The files The first part of the file name is the device ID, in base 10. You could check that folder for a file starting with the device ID before allowing a capture to take place.

If this is a new device, calibration download will start the moment the software detects the new device. You could poll the folder with a timeout until the file is detected.

Sorry for the trouble with this!

Hi Mark,
I’ve seen in the documentation (Errors — Saleae 1.0.6 documentation) as well as in the comment of the “connect” method of the python package “logic2_automation” that we should get an exception in case the SALEAE is not calibrated but I never managed to get such exception.
To do so I’ve used the latest version of the tools I could find:
Logic2 V2.4.22
Logic2_automation V1.0.7

Do you know if the feature mentioned in this ticket is already available?

If you need more details, I’ll be happy to answer you.
Kind regards, LoĂŻc

Thanks for checking in on this, and sorry we didn’t fix it sooner!

I’ve just made a change internally, the capture command will now fail with that error if the device’s calibration data is not available.

The automation API (and the Logic 2 software) already blocks captures until the calibration data has been loaded (or was not found). This change just covers the case where if you have a machine that is offline, and has always been offline while the Logic analyzer was in use, the calibration may never have been downloaded. This also happens when behind some company firewalls, if traffic to our servers is blocked.

This is not in 2.4.27, which shipped about an hour before I worked on this, but it will be in the next release.

Thanks!

  • Mark
1 Like

Hi Mark,
Thank you very much for your feed-back and fix coming. I think that I am exactly in the situation you describe as the computer I’m using is on an internal network that has no access to the external network.

With my kindest regards,
LoĂŻc

@loic.murith The update which should fix this is now available! (v2.4.29)