Pagakged picoscope for NixOS, connected devices not found

Discussion forum for the Picoscope 6 Linux software
Post Reply
wirew0rm
Newbie
Posts: 0
Joined: Sat Oct 10, 2020 3:32 pm

Pagakged picoscope for NixOS, connected devices not found

Post by wirew0rm »

Hey there,

I'm in the process of packaging picoscope for NixOS and I'm getting along quite well but somehow it cannot find the connected digitizers. Instead I get the following error message on which I cannot find any information: `Error: IsMVFailed`. Then I can only use the Demo Device in the application.

Code: Select all

$lsusb
Bus 001 Device 051: ID 0ce9:1211 Pico Technology PicoScope 3000 series PC Oscilloscope
Bus 001 Device 050: ID 0ce9:1202 Pico Technology PicoScope 4000 series PC Oscilloscope

$resultPicoscope/share/doc/libps3000a/usbtest 

Pico USB device found: /dev/bus/usb/001/051
 - It belongs to root (which is not you) who has permissions rw-
 - The members of group users (which you are in) have permissions rw-
 - Everyone else has permissions r--
 - You can write to this device and so will be able to use it.
 
 $resultPicoscope/bin/picoscope
 Info: Trace opened 10.10.2020.
ApplicationInfo: Info: Application 'PicoScope 6 Beta' (version 6.14.17.544) starting.
ID: Info: 790DD537296ECB59804FBA44313FD43F
Environment: Info: User is not Guest
Environment: Info: No Administrator Privileges
Environment: Info: Failed to detect access rights
Environment: Info: Host Operating System - Linux
Environment: Info: OS Version - Unix 5.7.6.0
Environment: Info: .net Version - 4.0.30319.42000
Environment: Info: Running on Mono - True
Environment: Info: Mono Display Name - 5.20.1.27 (tarball Mon Sep  7 21:37:03 UTC 2020)
Environment: Info: Current Directory - /home/akrimm/nixpkgs
Info: Processor Count - 8
Environment: Info: 64Bit Operating System - True
Environment: Info: 64Bit Process - True
Environment: Info: Command Line - /nix/store/5g1fdkvsjx03sbasc0jr1jlwcqmh5b11-picoscope-6.14.17-4r544/lib/PicoScope.GTK.exe
ApplicationInfo: Info: Settings file version - 11.3.1
ApplicationInfo: Info: Preferences file version - 2.0.0
ApplicationInfo: Info: Probes file version - 1.0.0
ApplicationInfo: Info: Data file binary header version - 1
Info: Using default culture: English (United States).
InitalDeviceLoadSequence: Info: Begin
Scanning for USB devices: Info: Begin
Scanning for USB devices: Info: Complete
Device: Info: Attempting to load ps2000.dll
Error: IsMVFailed
Device: Info: Finished loading ps2000.dll
Device: Info: Attempting to load ps5000a.dll
Error: IsMVFailed
Device: Info: Finished loading ps5000a.dll
Device: Info: Attempting to load ps6000a.dll
Error: IsMVFailed
Device: Info: Finished loading ps6000a.dll
Device: Info: Attempting to load ps6000a.dll
Error: IsMVFailed
Device: Info: Finished loading ps6000a.dll
Device: Info: Attempting to load ps4000a.dll
Error: IsMVFailed
Device: Info: Finished loading ps4000a.dll
Device: Info: Attempting to load ps3000a.dll
Error: IsMVFailed
Device: Info: Finished loading ps3000a.dll
Device: Info: Attempting to load ps3000a.dll
Error: IsMVFailed
Device: Info: Finished loading ps3000a.dll
Device: Info: Attempting to load ps4000a.dll
Error: IsMVFailed
Device: Info: Finished loading ps4000a.dll
Device: Info: Attempting to load ps4000a.dll
Error: IsMVFailed
Device: Info: Finished loading ps4000a.dll
Device: Info: Attempting to load ps4000a.dll
Error: IsMVFailed
Device: Info: Finished loading ps4000a.dll
Device: Info: Attempting to load ps5000a.dll
Error: IsMVFailed
Device: Info: Finished loading ps5000a.dll
Device: Info: Attempting to load ps6000.dll
Error: IsMVFailed
Device: Info: Finished loading ps6000.dll
Device: Info: Attempting to load ps3000a.dll
Error: IsMVFailed
Device: Info: Finished loading ps3000a.dll
Device: Info: Attempting to load ps2000a.dll
Error: IsMVFailed
Device: Info: Finished loading ps2000a.dll
Device: Info: Attempting to load ps3000a.dll
Error: IsMVFailed
Device: Info: Finished loading ps3000a.dll
Device: Info: Attempting to load usbdrdaq.dll
Error: IsMVFailed
Device: Info: Finished loading usbdrdaq.dll
Device: Info: Attempting to load pl1000.dll
Device: Info: pl1000.dll System.DllNotFoundException: pl1000.dll
  at (wrapper managed-to-native) Pico.+.(int16,int16)
  at Pico.. () [0x0000c] in :0 
  at Pico.. () [0x00031] in :0 
Device: Info: Finished loading pl1000.dll
Device: Info: Attempting to load ps6000.dll
Error: IsMVFailed
Device: Info: Finished loading ps6000.dll
Device: Info: Attempting to load ps4000.dll
Error: IsMVFailed
Device: Info: Finished loading ps4000.dll
Device: Info: Attempting to load ps5000.dll
Error: IsMVFailed
Device: Info: Finished loading ps5000.dll
Device: Info: Attempting to load ps3000.dll
Error: IsMVFailed
Device: Info: Finished loading ps3000.dll
Device: Info: Attempting to load ps5000a.dll
Error: IsMVFailed
Device: Info: Finished loading ps5000a.dll
Device: Info: Attempting to load ps4000a.dll
Error: IsMVFailed
Device: Info: Finished loading ps4000a.dll
Device: Info: No of Devices Found: 0
InitalDeviceLoadSequence: Info: Complete
Info: GlobalDeviceManager.Close()
 
I'm mainly interested in the meaning of the error message or any other way to debug why the devices are not being found. The error seems to come from the device drivers, since it is emmited only after sucessfully loading the driver, if I remove the driver it only logs the DLLNotFound exception and I couldn't find any public reference to it.

PS: Please ignore the strange paths, nixos does not follow the LSB directory trees but puts all software in directories consisting of the hash of its input and build recipe(derrivation). In case you are interested, I'm working on it https://github.com/wirew0rm/nixpkgs/blo ... oscope.nix , but I don't expect you to dive into nixpkgs packaging.

I would be glad to get any pointers what could be going wrong here,

Alex

nlscope
Newbie
Posts: 0
Joined: Sun Nov 15, 2020 9:58 pm

Re: Pagakged picoscope for NixOS, connected devices not found

Post by nlscope »

Hi

the error "Error: IsMV Failed" is also discussed here: viewtopic.php?t=22681

nlscope
Newbie
Posts: 0
Joined: Sun Nov 15, 2020 9:58 pm

Re: Pagakged picoscope for NixOS, connected devices not found

Post by nlscope »

wirew0rm wrote:
Sat Oct 10, 2020 4:21 pm
Hey there,

I'm in the process of packaging picoscope for NixOS and I'm getting along quite well
Dear wirew0rm

Very interesting! Could you describe your work steps (kind of HOWTO) on https://discourse.nixos.org/ even if it is not finished yet?

I would be interested, and maybe others too, I love NixOS (I am not an expert) and have a picoscope too...

Thank you!

wirew0rm
Newbie
Posts: 0
Joined: Sat Oct 10, 2020 3:32 pm

Re: Pagakged picoscope for NixOS, connected devices not found

Post by wirew0rm »

Thanks for your reply, I think I missed this other thread when I looked for it last time.
Anyway, I tried with all mono versions available in nixpkgs (4.8.1.0, 5.20.1.27 and 6.12.0.90) without any difference.

@niscope: I also followed your suggestions and wrote a little bit about it over on nixos discourse, now that i know that there are other nix+picoscope users, feel free to comment there (didn't find your handle there to highlight you):
https://discourse.nixos.org/t/picoscope ... tion/10899

wirew0rm
Newbie
Posts: 0
Joined: Sat Oct 10, 2020 3:32 pm

Re: Pagakged picoscope for NixOS, connected devices not found

Post by wirew0rm »

Just a quick update, thanks to another NixOS user, there is a working version of the picoscope application for NixOS: https://github.com/NixOS/nixpkgs/pull/122160 and the nixos discourse thread linked from my last post.

There I also found a lead, that the IsMVFailed error message might be related to the picotech drivers being signed, which is incompatible with the default way of making binaries run on NixOS by using the patchelf tool to change the paths to the dependencies in the binary.

Post Reply