Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't connect to Brymen BM869s via BM-86X USB interface cable #51

Open
kjuh78 opened this issue Dec 3, 2022 · 7 comments
Open

can't connect to Brymen BM869s via BM-86X USB interface cable #51

kjuh78 opened this issue Dec 3, 2022 · 7 comments
Labels

Comments

@kjuh78
Copy link

kjuh78 commented Dec 3, 2022

Describe the bug
SmuView can't connect to either my DMM (Brymen BM869s, connected via BM-86X), nor my PSU (RND 320-KA3005P, connected via USB). Both are detected by sigrok-cli (0.8.0-git-525f481).

To Reproduce
Steps to reproduce the behavior:

  1. connect device (DMM: Brymen BM869s via BM-86X USB interface cable; PSU: RND 320-K3005P via USB cable)
  2. add device in smuview
  3. specify connection details
    DMM:
    driver: brymen-bm86x, interface: USB
    PSU:
    driver: korad-kaxxxxp; interface: serial; port: /dev/cu.usbmodem0029128002411 (USB Virtual COM)
  4. click "scan for devices using driver above"

Expected behavior
At least the DMM should be detected and listed, the PSU might not be recognized as compatible by the driver.

Screenshots or log

Enviroment (please complete the following information):

  • SmuView 0.0.5-git-3193851
  • nightly DMG
  • OS: MacOS 12.6.1 on MacBook Pro M1 2021

Additional context
% /Applications/sigrok-cli.app/Contents/MacOS/sigrok-cli --scan
The following devices were found:
demo - Demo device with 13 channels: D0 D1 D2 D3 D4 D5 D6 D7 A0 A1 A2 A3 A4
brymen-bm86x - Brymen BM86x with 2 channels: P1 P2

% /Applications/sigrok-cli.app/Contents/MacOS/sigrok-cli --driver=korad-kaxxxxp:conn=/dev/tty.usbmodem0029128002411 --scan
sr: korad-kaxxxxp: Unknown model ID 'RND 320-KA3005P V4.1' detected, aborting.

% /Applications/sigrok-cli.app/Contents/MacOS/sigrok-cli --version
sigrok-cli 0.8.0-git-525f481

Libraries and features:

  • libsigrok 0.6.0-git-6dc55e4/4:0:0 (rt: 0.6.0-git-6dc55e4/4:0:0).
  • Libs:
  • glib 2.64.2 (rt: 2.64.2/6402:2)
  • zlib 1.2.5
  • libzip 1.6.1
  • minilzo 2.10
  • libserialport 0.1.1/1:0:1 (rt: 0.1.1/1:0:1)
  • libusb-1.0 1.0.23.11397 API 0x01000107
  • hidapi 0.9.0
  • libftdi 1.4
  • Host: x86_64-apple-darwin15.6.0, little-endian.
  • SCPI backends: TCP, RPC, serial, USBTMC.
  • libsigrokdecode 0.6.0-git-24ba9e1/4:0:0 (rt: 0.6.0-git-24ba9e1/4:0:0).
  • Libs:
  • glib 2.64.2 (rt: 2.64.2/6402:2)
  • Python 3.7.7 / 0x30707f0 (API 1013, ABI 3)
  • Host: x86_64-apple-darwin15.6.0, little-endian.
@knarfS
Copy link
Owner

knarfS commented Dec 3, 2022

SmuView 0.0.5-git-3193851 is very old, please try the current continuous build, which also has a much newer libsigrok (0.6.0-git-8c08409).

You can also use the same sigrok-cli argument for connecting devices:

./smuview --driver=korad-kaxxxxp:conn=/dev/tty.usbmodem0029128002411
``

@knarfS
Copy link
Owner

knarfS commented Dec 3, 2022

It would be also helpful to start SmuView with the -l 5 argument and append the log output.

@kjuh78
Copy link
Author

kjuh78 commented Dec 3, 2022

Sorry. Didn't realize I'm using an old version, it's still listed as current stable on https://sigrok.org/wiki/SmuView#macOS .
The current nightly won't start with python 3.11 installed (INSTALL states >=3 as requirement), because it can't find python 3.10:

% /Applications/SmuView.app/Contents/MacOS/smuview -l 5
dyld[8666]: Library not loaded: '/usr/local/opt/python@3.10/Frameworks/Python.framework/Versions/3.10/Python'
  Referenced from: '/Applications/SmuView.app/Contents/MacOS/smuview.real'
  Reason: tried: '/usr/local/opt/python@3.10/Frameworks/Python.framework/Versions/3.10/Python' (no such file), '/Library/Frameworks/Python.framework/Versions/3.10/Python' (no such file), '/System/Library/Frameworks/Python.framework/Versions/3.10/Python' (no such file)
zsh: abort      /Applications/SmuView.app/Contents/MacOS/smuview -l 5

Creating a symlink from /Library/Frameworks/Python.framework/Versions/3.10 to /Library/Frameworks/Python.framework/Versions/3.11 seems to help for now.
Is this a typo in INSTALL or does the App request the wrong version?
Should I install python 3.10 or is INSTALL right?

EDIT: I just learned a bit about app bundles and frameworks in MacOS and opened issue #52 about the python thing...

Here's the requested log (created by SmuView 0.0.6-git-54cf16b):

% /Applications/SmuView.app/Contents/MacOS/smuview -l 5
Settings: "/Users/stefan/Library/Preferences/org.sigrok.SmuView.plist" format QSettings::NativeFormat
sr: [00:00.000001] log: libsigrok loglevel set to 5.
sr: [00:00.031944] hwdriver: Scan found 0 devices (agilent-dmm).
sr: [00:00.053453] hwdriver: Scan found 0 devices (appa-55ii).
sr: [00:00.198395] hwdriver: Scan found 0 devices (arachnid-labs-re-load-pro).
sr: [00:00.202522] hwdriver: Scan found 0 devices (atten-pps3203).
sr: [00:00.204167] hwdriver: Scan found 0 devices (bbcgm-2010).
sr: [00:00.205281] hwdriver: Scan found 0 devices (brymen-bm25x).
sr: [00:00.206753] serial: Opening serial port 'hid/bu86x' (flags 1).
sr: [00:00.209239] serial-hid: Unsupported HIDAPI path format: DevSrvsID:4294994192
sr: [00:00.209255] hwdriver: Scan found 0 devices (brymen-bm52x).
sr: [00:00.210274] serial: Opening serial port 'hid/bu86x' (flags 1).
sr: [00:00.211727] serial-hid: Unsupported HIDAPI path format: DevSrvsID:4294994192
sr: [00:00.211733] hwdriver: Scan found 0 devices (brymen-bm82x).
sr: [00:00.212458] hwdriver: Scan found 0 devices (brymen-bm85x).
sr: [00:00.213256] serial: Opening serial port 'hid/bu86x' (flags 1).
sr: [00:00.214584] serial-hid: Unsupported HIDAPI path format: DevSrvsID:4294994192
sr: [00:00.214590] hwdriver: Scan found 0 devices (brymen-bm86x).
sr: [00:00.215618] hwdriver: Scan found 0 devices (cem-dt-885x).
sr: [00:00.216477] hwdriver: Scan found 0 devices (center-309).
sr: [00:00.217274] hwdriver: Scan found 0 devices (colead-slm).
sr: [00:00.217992] hwdriver: Scan found 0 devices (conrad-digi-35-cpu).
sr: [00:00.218746] serial: No serial device specified.
sr: [00:00.220016] hwdriver: Scan found 0 devices (dcttech-usbrelay).
sr: [00:00.220727] demo: Generating square pattern.
sr: [00:00.220736] demo: Generating sine pattern.
sr: [00:00.220753] demo: Generating triangle pattern.
sr: [00:00.220792] demo: Generating sawtooth pattern.
sr: [00:00.220805] hwdriver: Scan found 1 devices (demo).
sr: [00:00.221868] hwdriver: Scan found 0 devices (deree-de5000).
sr: [00:00.222788] hwdriver: Scan found 0 devices (digitek-dt4000zc).
sr: [00:00.224230] hwdriver: Scan found 0 devices (eevblog-121gw).
sr: [00:00.225165] serial: No serial device specified.
sr: [00:00.236123] hwdriver: Scan found 0 devices (fluke-45).
sr: [00:00.237168] hwdriver: Scan found 0 devices (fluke-dmm).
sr: [00:00.237973] hwdriver: Scan found 0 devices (gmc-mh-1x-2x-rs232).
sr: [00:00.238808] hwdriver: Scan found 0 devices (gmc-mh-2x-bd232).
sr: [00:00.239833] hwdriver: Scan found 0 devices (gwinstek-gdm-397).
sr: [00:00.240986] serial: No serial device specified.
sr: [00:00.251933] hwdriver: Scan found 0 devices (gwinstek-gds-800).
sr: [00:00.252859] hwdriver: Scan found 0 devices (gwinstek-gpd).
sr: [00:00.253700] serial: No serial device specified.
sr: [00:00.264494] hwdriver: Scan found 0 devices (hameg-hmo).
sr: [00:00.266294] hwdriver: Scan found 0 devices (hantek-6xxx).
sr: [00:00.267472] hwdriver: Scan found 0 devices (hantek-dso).
sr: [00:00.268351] serial: No serial device specified.
sr: [00:00.268359] hwdriver: Scan found 0 devices (hp-3457a).
sr: [00:00.269087] serial: No serial device specified.
sr: [00:00.269091] hwdriver: Scan found 0 devices (hp-59306a).
sr: [00:00.270039] serial: No serial device specified.
sr: [00:00.270044] hwdriver: Scan found 0 devices (hpib-pps).
sr: [00:00.270739] hwdriver: Scan found 0 devices (iso-tech-idm103n).
sr: [00:00.271434] hwdriver: Scan found 0 devices (itech-it8500).
sr: [00:00.272744] hwdriver: Scan found 0 devices (kecheng-kc-330b).
sr: [00:00.273887] hwdriver: Scan found 0 devices (kern-ew-6200-2nm).
sr: [00:00.274958] hwdriver: Scan found 0 devices (kingst-la2016).
sr: [00:00.275725] hwdriver: Scan found 0 devices (korad-kaxxxxp).
sr: [00:00.276400] hwdriver: Scan found 0 devices (lascar-el-usb).
sr: [00:00.277083] serial: No serial device specified.
sr: [00:00.288157] hwdriver: Scan found 0 devices (lecroy-xstream).
sr: [00:00.289020] hwdriver: Scan found 0 devices (manson-hcs-3xxx).
sr: [00:00.289956] hwdriver: Scan found 0 devices (mastech-mas345).
sr: [00:00.290993] hwdriver: Scan found 0 devices (mastech-ms2115b).
sr: [00:00.291731] hwdriver: Scan found 0 devices (mastech-ms5308).
sr: [00:00.292695] hwdriver: Scan found 0 devices (mastech-ms6514).
sr: [00:00.293414] hwdriver: Scan found 0 devices (mastech-ms8250b).
sr: [00:00.294074] hwdriver: Scan found 0 devices (mastech-ms8250d).
sr: [00:00.294958] hwdriver: Scan found 0 devices (maynuo-m97).
sr: [00:00.295611] hwdriver: Scan found 0 devices (meterman-38xr).
sr: [00:00.296275] hwdriver: Scan found 0 devices (metex-m3640d).
sr: [00:00.296944] hwdriver: Scan found 0 devices (metex-m3860m).
sr: [00:00.297751] hwdriver: Scan found 0 devices (metex-m4650cr).
sr: [00:00.298444] hwdriver: Scan found 0 devices (metex-me21).
sr: [00:00.299083] hwdriver: Scan found 0 devices (metex-me31).
sr: [00:00.299729] hwdriver: Scan found 0 devices (metrix-mx56c).
sr: [00:00.300371] hwdriver: Scan found 0 devices (mic-98581).
sr: [00:00.301036] hwdriver: Scan found 0 devices (mic-98583).
sr: [00:00.301678] serial: No serial device specified.
sr: [00:00.301685] hwdriver: Scan found 0 devices (motech-lps-301).
sr: [00:00.302328] hwdriver: Scan found 0 devices (norma-dmm).
sr: [00:00.303143] hwdriver: Scan found 0 devices (pce-322a).
sr: [00:00.303777] hwdriver: Scan found 0 devices (pce-pce-dm32).
sr: [00:00.304411] hwdriver: Scan found 0 devices (peaktech-2025).
sr: [00:00.305053] hwdriver: Scan found 0 devices (peaktech-2165).
sr: [00:00.305719] hwdriver: Scan found 0 devices (peaktech-2170).
sr: [00:00.306652] hwdriver: Scan found 0 devices (peaktech-3330).
sr: [00:00.307646] hwdriver: Scan found 0 devices (peaktech-3410).
sr: [00:00.308403] hwdriver: Scan found 0 devices (peaktech-3415).
sr: [00:00.309092] hwdriver: Scan found 0 devices (peaktech-4370).
sr: [00:00.309791] hwdriver: Scan found 0 devices (peaktech-4390a).
sr: [00:00.310452] hwdriver: Scan found 0 devices (radioshack-22-168).
sr: [00:00.311105] hwdriver: Scan found 0 devices (radioshack-22-805).
sr: [00:00.311750] hwdriver: Scan found 0 devices (radioshack-22-812).
sr: [00:00.312404] hwdriver: Scan found 0 devices (rdtech-dps).
sr: [00:00.313044] hwdriver: Scan found 0 devices (rdtech-rd).
sr: [00:00.313710] hwdriver: Scan found 0 devices (rdtech-tc).
sr: [00:00.314540] hwdriver: Scan found 0 devices (rdtech-um).
sr: [00:00.315209] serial: No serial device specified.
sr: [00:00.326472] hwdriver: Scan found 0 devices (rigol-dg).
sr: [00:00.327746] serial: No serial device specified.
sr: [00:00.338659] hwdriver: Scan found 0 devices (rigol-ds).
sr: [00:00.339726] serial: No serial device specified.
sr: [00:00.350685] hwdriver: Scan found 0 devices (rohde-schwarz-sme-0x).
sr: [00:00.352081] serial: No serial device specified.
sr: [00:00.363385] hwdriver: Scan found 0 devices (scpi-dmm).
sr: [00:00.364688] serial: No serial device specified.
sr: [00:00.375776] hwdriver: Scan found 0 devices (scpi-pps).
sr: [00:00.377084] hwdriver: Scan found 0 devices (siemens-b102x).
sr: [00:00.379037] serial: No serial device specified.
sr: [00:00.390287] hwdriver: Scan found 0 devices (siglent-sds).
sr: [00:00.391755] hwdriver: Scan found 0 devices (sparkfun-70c).
sr: [00:00.392975] hwdriver: Scan found 0 devices (tecpel-dmm-8061).
sr: [00:00.393775] hwdriver: Scan found 0 devices (tecpel-dmm-8061-ser).
sr: [00:00.394586] hwdriver: Scan found 0 devices (tekpower-tp4000ZC).
sr: [00:00.395443] hwdriver: Scan found 0 devices (teleinfo).
sr: [00:00.396188] hwdriver: Scan found 0 devices (tenma-72-7730).
sr: [00:00.396931] hwdriver: Scan found 0 devices (tenma-72-7730-ser).
sr: [00:00.397848] hwdriver: Scan found 0 devices (tenma-72-7732).
sr: [00:00.398574] hwdriver: Scan found 0 devices (tenma-72-7732-ser).
sr: [00:00.399269] hwdriver: Scan found 0 devices (tenma-72-7745).
sr: [00:00.399965] hwdriver: Scan found 0 devices (tenma-72-7745-ser).
sr: [00:00.400644] hwdriver: Scan found 0 devices (tenma-72-7750).
sr: [00:00.401313] hwdriver: Scan found 0 devices (tenma-72-7750-ser).
sr: [00:00.401988] hwdriver: Scan found 0 devices (tenma-72-9380a).
sr: [00:00.402661] hwdriver: Scan found 0 devices (tenma-72-9380a-ser).
sr: [00:00.430420] hwdriver: Scan found 0 devices (testo).
sr: [00:00.431918] hwdriver: Scan found 0 devices (tondaj-sl-814).
sr: [00:00.432910] hwdriver: Scan found 0 devices (uni-t-ut181a).
sr: [00:00.433688] hwdriver: Scan found 0 devices (uni-t-ut32x).
sr: [00:00.434475] hwdriver: Scan found 0 devices (uni-t-ut372).
sr: [00:00.435214] hwdriver: Scan found 0 devices (uni-t-ut60a).
sr: [00:00.435951] hwdriver: Scan found 0 devices (uni-t-ut60a-ser).
sr: [00:00.436683] hwdriver: Scan found 0 devices (uni-t-ut60e).
sr: [00:00.437413] hwdriver: Scan found 0 devices (uni-t-ut60e-ser).
sr: [00:00.438170] hwdriver: Scan found 0 devices (uni-t-ut60g).
sr: [00:00.438895] hwdriver: Scan found 0 devices (uni-t-ut60g-ser).
sr: [00:00.439742] hwdriver: Scan found 0 devices (uni-t-ut612).
sr: [00:00.440825] hwdriver: Scan found 0 devices (uni-t-ut61b).
sr: [00:00.441653] hwdriver: Scan found 0 devices (uni-t-ut61b-ser).
sr: [00:00.442452] hwdriver: Scan found 0 devices (uni-t-ut61c).
sr: [00:00.443134] hwdriver: Scan found 0 devices (uni-t-ut61c-ser).
sr: [00:00.443812] hwdriver: Scan found 0 devices (uni-t-ut61d).
sr: [00:00.444487] hwdriver: Scan found 0 devices (uni-t-ut61d-ser).
sr: [00:00.445160] hwdriver: Scan found 0 devices (uni-t-ut61e).
sr: [00:00.445831] hwdriver: Scan found 0 devices (uni-t-ut61e-ser).
sr: [00:00.446508] hwdriver: Scan found 0 devices (uni-t-ut71a).
sr: [00:00.447185] hwdriver: Scan found 0 devices (uni-t-ut71a-ser).
sr: [00:00.448050] hwdriver: Scan found 0 devices (uni-t-ut71b).
sr: [00:00.448786] hwdriver: Scan found 0 devices (uni-t-ut71b-ser).
sr: [00:00.449462] hwdriver: Scan found 0 devices (uni-t-ut71c).
sr: [00:00.450110] hwdriver: Scan found 0 devices (uni-t-ut71c-ser).
sr: [00:00.450761] hwdriver: Scan found 0 devices (uni-t-ut71d).
sr: [00:00.451401] hwdriver: Scan found 0 devices (uni-t-ut71d-ser).
sr: [00:00.452050] hwdriver: Scan found 0 devices (uni-t-ut71e).
sr: [00:00.452693] hwdriver: Scan found 0 devices (uni-t-ut71e-ser).
sr: [00:00.453333] hwdriver: Scan found 0 devices (uni-t-ut804).
sr: [00:00.453981] hwdriver: Scan found 0 devices (uni-t-ut804-ser).
sr: [00:00.454623] hwdriver: Scan found 0 devices (va-va18b).
sr: [00:00.455262] hwdriver: Scan found 0 devices (va-va40b).
sr: [00:00.456091] hwdriver: Scan found 0 devices (velleman-dvm4100).
sr: [00:00.456844] serial: Opening serial port 'hid/victor' (flags 1).
sr: [00:00.458126] hwdriver: Scan found 0 devices (victor-dmm).
sr: [00:00.458881] hwdriver: Scan found 0 devices (voltcraft-4080).
sr: [00:00.459547] hwdriver: Scan found 0 devices (voltcraft-k204).
sr: [00:00.460193] hwdriver: Scan found 0 devices (voltcraft-m3650cr).
sr: [00:00.460832] hwdriver: Scan found 0 devices (voltcraft-m3650d).
sr: [00:00.461472] hwdriver: Scan found 0 devices (voltcraft-m4650cr).
sr: [00:00.462105] hwdriver: Scan found 0 devices (voltcraft-me42).
sr: [00:00.462732] hwdriver: Scan found 0 devices (voltcraft-vc820).
sr: [00:00.463362] hwdriver: Scan found 0 devices (voltcraft-vc820-ser).
sr: [00:00.463992] hwdriver: Scan found 0 devices (voltcraft-vc830).
sr: [00:00.464769] hwdriver: Scan found 0 devices (voltcraft-vc830-ser).
sr: [00:00.465479] hwdriver: Scan found 0 devices (voltcraft-vc840).
sr: [00:00.466146] hwdriver: Scan found 0 devices (voltcraft-vc840-ser).
sr: [00:00.466774] hwdriver: Scan found 0 devices (voltcraft-vc870).
sr: [00:00.467389] hwdriver: Scan found 0 devices (voltcraft-vc870-ser).
sr: [00:00.468001] hwdriver: Scan found 0 devices (voltcraft-vc920).
sr: [00:00.468617] hwdriver: Scan found 0 devices (voltcraft-vc920-ser).
sr: [00:00.469233] hwdriver: Scan found 0 devices (voltcraft-vc940).
sr: [00:00.469837] hwdriver: Scan found 0 devices (voltcraft-vc940-ser).
sr: [00:00.470447] hwdriver: Scan found 0 devices (voltcraft-vc96).
sr: [00:00.471053] hwdriver: Scan found 0 devices (voltcraft-vc960).
sr: [00:00.471667] hwdriver: Scan found 0 devices (voltcraft-vc960-ser).
sr: [00:00.472304] serial: No serial device specified.
sr: [00:00.483344] hwdriver: Scan found 0 devices (yokogawa-dlm).
sr: [00:00.485424] hwdriver: Scan found 0 devices (zketech-ebd-usb).
sr: [00:07.104967] serial-hid: Unsupported HIDAPI path format: DevSrvsID:4294994192
sr: [00:10.860065] serial-hid: Unsupported HIDAPI path format: DevSrvsID:4294994192
sr: [00:18.746261] serial: Opening serial port 'hid/bu86x' (flags 1).
sr: [00:18.749255] serial-hid: Unsupported HIDAPI path format: DevSrvsID:4294994192
sr: [00:18.749270] hwdriver: Scan found 0 devices (brymen-bm86x).
sr: [00:23.963010] serial: Opening serial port 'hid/bu86x' (flags 1).
sr: [00:23.965265] serial-hid: Unsupported HIDAPI path format: DevSrvsID:4294994192
sr: [00:23.965282] hwdriver: Scan found 0 devices (brymen-bm86x).

@kjuh78
Copy link
Author

kjuh78 commented Dec 3, 2022

BTW: connecting to my 2nd PSU of the same type (RND 320-KA3005P) works fine. Obviously this one has an older FW version and is thus correctly identified. I'll report the identification string to libsigrok.

@knarfS
Copy link
Owner

knarfS commented Dec 11, 2022

Your sigrok-cli version is also pretty old (from mid of March 2022). But unfortunately it looks like the nightly build for macOS isn't running at the moment.
A few month ago, there was a change in libsigrok and now more of the korad-kaxxxxp power supplies are recognized out of the box, without the need to specify every version for a new device in the source code.

So both of your korad-kaxxxxp supplies should be found by the continuous build of SmuView and should work out of the box:

./smuview -l 5 -d korad-kaxxxxp:conn=/dev/some.serial.connection.string

Of course you have to use your specific /dev/... string, the -l 5 option will give you (hopefully) a detailed log output when something goes wrong.

If you want to test it with a current sigrok-cli you can use homebrew and install the HEAD-version of sigrok-cli:

brew install --HEAD sigrok-cli

or

brew reinstall --HEAD sigrok-cli

Full disclosure: I don't have any clue about homebrew ;)

If your RND models aren't recognized for some reason, the korad-kaxxxxp driver has a special option, where you can force a specific model to be used. For example using the Korad KA3005P model:

./smuview -l 5 -d korad-kaxxxxp:conn=/dev/some.serial.connection.string:force_detect=KORADKA3005PV2.0

Regarding your Brymen BM86x cable, it is using HID to connect (if I'm not mistaken). You can see some error when trying to open the HID-device:

sr: [00:00.206753] serial: Opening serial port 'hid/bu86x' (flags 1).
sr: [00:00.209239] serial-hid: Unsupported HIDAPI path format: DevSrvsID:4294994192

Not sure what that means, but basically you should be able to connect exactly the same way like when using sigrok-cli. When this is working:

./sigrok-cli -l 5 -d brymen-bm86x --samples 2

then this should also work:

./smuview -l 5 -d brymen-bm86x

Maybe you can try adding the vendor.product to the connect string. Example, not sure if the vendor/product ids are right (lsusb -v to check):

./smuview -l 5 -d brymen-bm86x:conn=0820.0001

Hope that helps, if you still ran into errors, just post the log output with with some explanations what you've done.

Edit: Typo

@kjuh78
Copy link
Author

kjuh78 commented Dec 12, 2022

The PSUs work fine with the latest build.
Still no luck with the Brymen:

sigrok-cli seems to work:

% sigrok-cli -l 5 -d brymen-bm86x --samples 2
sr: [00:00.000002] log: libsigrok loglevel set to 5.
sr: [00:00.000037] backend: libsigrok 0.6.0-git-6dc55e4/4:0:0.
sr: [00:00.000079] backend: Libs: glib 2.64.2 (rt: 2.64.2/6402:2), zlib 1.2.5, libzip 1.6.1, minilzo 2.10, libserialport 0.1.1/1:0:1 (rt: 0.1.1/1:0:1), libusb-1.0 1.0.23.11397 API 0x01000107, hidapi 0.9.0, libftdi 1.4.
sr: [00:00.000085] backend: Host: x86_64-apple-darwin15.6.0, little-endian.
sr: [00:00.000090] backend: SCPI backends: TCP, RPC, serial, USBTMC.
sr: [00:00.000093] backend: Firmware search paths:
sr: [00:00.000175] backend:  - ../share/sigrok-firmware
sr: [00:00.000201] backend:  - /Users/stefan/.local/share/sigrok-firmware
sr: [00:00.000205] backend:  - /Users/jenkins_slave/sr_macosx/share/sigrok-firmware
sr: [00:00.000211] backend:  - /usr/local/share/sigrok-firmware
sr: [00:00.000214] backend:  - /usr/share/sigrok-firmware
sr: [00:00.000259] backend: Sanity-checking all drivers.
sr: [00:00.000270] backend: Sanity-checking all input modules.
sr: [00:00.000277] backend: Sanity-checking all output modules.
sr: [00:00.000282] backend: Sanity-checking all transform modules.
srd: libsigrokdecode loglevel set to 5.
sr: [00:00.010455] serial: Opening serial port 'hid/bu86x' (flags 1).
sr: [00:00.015977] serial: Flushing serial port hid/bu86x.
sr: [00:00.015989] serial-dmm: Probing serial port hid/bu86x.
sr: [00:00.017648] serial: Wrote 4/4 bytes.
sr: [00:00.017666] serial: Detecting packets on hid/bu86x (timeout = 3000ms).
sr: [00:01.034929] serial: Read 1/1 bytes.
...
sr: [00:01.036277] serial: Read 1/1 bytes.
sr: [00:01.036325] serial: Trying packet: len 24, bytes 00 00 02 be be a0 fe db 1e 40 40 40 40 40 00 00 86 86 86 86 00 00 00 00
sr: [00:01.036356] serial: Valid packet after 1018ms.
sr: [00:01.036374] serial: RX count 24, packet len 24.
sr: [00:01.036384] serial-dmm: Found device on port hid/bu86x.
sr: [00:01.036879] serial: Closing serial port hid/bu86x.
sr: [00:01.038758] hwdriver: Scan found 1 devices (brymen-bm86x).
sr: [00:01.039487] device: brymen-bm86x: Opening device instance.
sr: [00:01.039522] serial: Opening serial port 'hid/bu86x' (flags 1).
sr: [00:01.045857] serial: Flushing serial port hid/bu86x.
sr: [00:01.046279] hwdriver: sr_config_set(): key 50001 (limit_samples) sdi 0x600001b48000 cg NULL -> uint64 2
sr: [00:01.046372] session: Using thread-default main context.
sr: [00:01.046380] session: Starting.
sr: [00:01.046386] hwdriver: brymen-bm86x: Starting acquisition.
sr: [00:01.046439] session: bus: Received SR_DF_HEADER packet.
cli: Received SR_DF_HEADER.
sr: [00:01.057946] serial-dmm: Requesting next packet.
sr: [00:01.059677] serial: Wrote 4/4 bytes.
sr: [00:01.068929] serial-dmm: Not re-requesting yet, 489ms left.
...
sr: [00:01.448925] serial-dmm: Not re-requesting yet, 109ms left.
sr: [00:01.482413] serial: Read 24/256 bytes.
sr: [00:01.482548] serial-dmm: Checking: pos 0, len 24.
sr: [00:01.482563] serial-dmm: Valid packet, size 24, processing
sr: [00:01.482606] serial-dmm: DMM packet: 00 00 02 be be a0 fe db 1e 40 40 40 40 40 00 00 86 86 86 86 00 00 00 00
sr: [00:01.484063] session: bus: Received SR_DF_ANALOG packet (1 samples).
cli: Received SR_DF_ANALOG (1 samples).
P1: 18.2 °C
sr: [00:01.485209] brymen-bm86x: invalid float string: '----'
sr: [00:01.485228] session: bus: Received SR_DF_ANALOG packet (1 samples).
cli: Received SR_DF_ANALOG (1 samples).
P2: 18 °C
sr: [00:01.485387] serial-dmm: Not re-requesting yet, 100ms left.
...
sr: [00:01.584829] serial-dmm: Not re-requesting yet, 0ms left.
sr: [00:01.595950] serial-dmm: Requesting next packet.
sr: [00:01.597850] serial: Wrote 4/4 bytes.
sr: [00:01.606695] serial-dmm: Not re-requesting yet, 489ms left.
...
sr: [00:02.091037] serial-dmm: Not re-requesting yet, 4ms left.
sr: [00:02.104414] serial-dmm: Requesting next packet.
sr: [00:02.107375] serial: Wrote 4/4 bytes.
sr: [00:02.115251] serial-dmm: Not re-requesting yet, 489ms left.
...
sr: [00:02.439429] serial-dmm: Not re-requesting yet, 164ms left.
sr: [00:02.467111] serial: Read 24/256 bytes.
sr: [00:02.467221] serial-dmm: Checking: pos 0, len 24.
sr: [00:02.467230] serial-dmm: Valid packet, size 24, processing
sr: [00:02.467257] serial-dmm: DMM packet: 00 00 02 be be a0 fe db 1e 40 40 40 40 40 00 00 86 86 86 86 00 00 00 00
sr: [00:02.467345] session: bus: Received SR_DF_ANALOG packet (1 samples).
cli: Received SR_DF_ANALOG (1 samples).
P1: 18.2 °C
sr: [00:02.467524] brymen-bm86x: invalid float string: '----'
sr: [00:02.467532] session: bus: Received SR_DF_ANALOG packet (1 samples).
cli: Received SR_DF_ANALOG (1 samples).
P2: 18 °C
sr: [00:02.467566] serial-dmm: Not re-requesting yet, 100ms left.
sr: [00:02.467573] sw_limits: Requested number of samples (2) reached.
sr: [00:02.467580] hwdriver: brymen-bm86x: Stopping acquisition.
sr: [00:02.467792] session: bus: Received SR_DF_END packet.
cli: Received SR_DF_END.
sr: [00:02.468086] session: fd_source_finalize: key 0xffffffffffffffff
sr: [00:02.468197] session: Stopped.
sr: [00:02.468226] hwdriver: Cleaning up all drivers.
sr: [00:02.468240] serial: Closing serial port hid/bu86x.

SmuView doesn't:

% smuview -l 5 -d brymen-bm86x
Settings: "/Users/stefan/Library/Preferences/org.sigrok.SmuView.plist" format QSettings::NativeFormat
sr: [00:00.000001] log: libsigrok loglevel set to 5.
sr: [00:00.029411] hwdriver: Scan found 0 devices (agilent-dmm).
sr: [00:00.052682] hwdriver: Scan found 0 devices (appa-55ii).
sr: [00:00.153142] hwdriver: Scan found 0 devices (arachnid-labs-re-load-pro).
sr: [00:00.156913] hwdriver: Scan found 0 devices (atten-pps3203).
sr: [00:00.158288] hwdriver: Scan found 0 devices (bbcgm-2010).
sr: [00:00.159264] hwdriver: Scan found 0 devices (brymen-bm25x).
sr: [00:00.160031] serial: Opening serial port 'hid/bu86x' (flags 1).
sr: [00:00.162384] serial-hid: Unsupported HIDAPI path format: DevSrvsID:4295153566
sr: [00:00.162391] hwdriver: Scan found 0 devices (brymen-bm52x).
sr: [00:00.163183] serial: Opening serial port 'hid/bu86x' (flags 1).
sr: [00:00.164683] serial-hid: Unsupported HIDAPI path format: DevSrvsID:4295153566
sr: [00:00.164691] hwdriver: Scan found 0 devices (brymen-bm82x).
sr: [00:00.165856] hwdriver: Scan found 0 devices (brymen-bm85x).
...
**sr: [00:00.448138] serial: Opening serial port 'hid/bu86x' (flags 1).
sr: [00:00.449583] serial-hid: Unsupported HIDAPI path format: DevSrvsID:4295153566
sr: [00:00.449588] hwdriver: Scan found 0 devices (brymen-bm86x).**

specifying VID/PID (I checked, they are correct), doesn't make any difference:

% smuview -l 5 -d brymen-bm86x:conn=0820.0001
Settings: "/Users/stefan/Library/Preferences/org.sigrok.SmuView.plist" format QSettings::NativeFormat
sr: [00:00.000001] log: libsigrok loglevel set to 5.
sr: [00:00.029686] hwdriver: Scan found 0 devices (agilent-dmm).
sr: [00:00.048736] hwdriver: Scan found 0 devices (appa-55ii).
sr: [00:00.176694] hwdriver: Scan found 0 devices (arachnid-labs-re-load-pro).
sr: [00:00.180668] hwdriver: Scan found 0 devices (atten-pps3203).
sr: [00:00.181919] hwdriver: Scan found 0 devices (bbcgm-2010).
sr: [00:00.182881] hwdriver: Scan found 0 devices (brymen-bm25x).
sr: [00:00.183617] serial: Opening serial port 'hid/bu86x' (flags 1).
sr: [00:00.186014] serial-hid: Unsupported HIDAPI path format: DevSrvsID:4295153566
sr: [00:00.186022] hwdriver: Scan found 0 devices (brymen-bm52x).
sr: [00:00.189546] serial: Opening serial port 'hid/bu86x' (flags 1).
sr: [00:00.191044] serial-hid: Unsupported HIDAPI path format: DevSrvsID:4295153566
sr: [00:00.191050] hwdriver: Scan found 0 devices (brymen-bm82x).
sr: [00:00.191811] hwdriver: Scan found 0 devices (brymen-bm85x).
...
sr: [00:00.470103] hwdriver: sr_config_list(): key 2147418112 (NULL) sdi 0x0 cg NULL -> [uint32 20000, 20001]
sr: [00:00.471177] hwdriver: sr_config_list(): key 2147418112 (NULL) sdi 0x0 cg NULL -> [uint32 20000, 20001]
sr: [00:00.471193] serial: Opening serial port '0820.0001' (flags 1).
sr: [00:00.471349] serial-libsp: Error getting port from name 0820.0001: (2) No such file or directory.
sr: [00:00.471353] hwdriver: Scan found 0 devices (brymen-bm86x).

@knarfS
Copy link
Owner

knarfS commented Dec 13, 2022

Ok, here is my last idea:

./smuview -l 5 -d brymen-bm86x:conn=hid/bu86x

For reference : https://github.com/sigrokproject/libsigrok/blob/master/README.devices, chapter "Specifying serial ports"

Looks like that there is a platform specific problem. Here I found a similar bug related to hidapi and macOS: https://sigrok.org/bugzilla/show_bug.cgi?id=1586
Maybe sigrok-cli and SmuView are using different library version. Unfortunately SmuView doesn't print the used library versions at startup. I'll fix that, it is also important for the Python problem.

@kjuh78 kjuh78 changed the title can't connect to devices can't connect to Brymen BM869s via BM-86X USB interface cable Dec 13, 2022
@knarfS knarfS added the macOS label Dec 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants