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

Itech IT8511A+ segmentation fault #35

Open
spike77453 opened this issue Aug 1, 2021 · 8 comments
Open

Itech IT8511A+ segmentation fault #35

spike77453 opened this issue Aug 1, 2021 · 8 comments

Comments

@spike77453
Copy link

Describe the bug
Adding a new IT8511A+ device results in segmentation fault

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Add device'
  2. Pick ITECH IT8500 driver
  3. Select 'Serial port'
  4. Set baud rate to 115200
  5. Click on 'Scan for devices using driver above'
  6. Select 'ITECH 8511A with 3 channels'
  7. Click on 'OK'

Expected behavior
A new Itech 8511A+ device in the device tree

Screenshots or log
Screenshot_20210802_011124

Clicking 'OK' in the screenshot above crashes smuview

Enviroment (please complete the following information):

  • SmuView version: 7f2a9c7
  • self compiled, gcc version 11.2.1
  • OS: Fedora 34

Additional context

The libsigrok version 0.5.2-7.20210801gitb96051a in the backtrace below is compiled from git commit sigrokproject/libsigrok@b96051a (can be found here: https://copr.fedorainfracloud.org/coprs/spike/sigrok/build/2356228/).

Thread 12 "smuview" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffc53c1640 (LWP 202186)]
0x0000000000548814 in std::__shared_ptr<sv::data::BaseSignal, (__gnu_cxx::_Lock_policy)2>::operator= (this=0x1dbb958) at /usr/include/c++/11/bits/shared_ptr_base.h:1153
1153          __shared_ptr& operator=(const __shared_ptr&) noexcept = default;
Missing separate debuginfos, use: dnf debuginfo-install bzip2-libs-1.0.8-6.fc34.x86_64 dbus-libs-1.12.20-3.fc34.x86_64 dbusmenu-qt5-0.9.3-0.26.20160218.fc34.x86_64 fontconfig-2.13.94-2.fc34.x86_64 freetype-2.10.4-3.fc34.x86_64 glib2-2.68.2-1.fc34.x86_64 glibc-2.33-20.fc34.x86_64 glibmm24-2.66.1-1.fc34.x86_64 graphite2-1.3.14-7.fc34.x86_64 harfbuzz-2.7.4-3.fc34.x86_64 jasper-libs-2.0.32-1.fc34.x86_64 jbigkit-libs-2.1-21.fc34.x86_64 jpegxl-libs-0.3.7-3.fc34.x86_64 keyutils-libs-1.6.1-2.fc34.x86_64 kf5-karchive-5.83.0-1.fc34.x86_64 kf5-kbookmarks-5.83.0-1.fc34.x86_64 kf5-kcodecs-5.83.0-1.fc34.x86_64 kf5-kcompletion-5.83.0-1.fc34.x86_64 kf5-kconfig-core-5.83.0-1.fc34.x86_64 kf5-kconfig-gui-5.83.0-1.fc34.x86_64 kf5-kconfigwidgets-5.83.0-1.fc34.x86_64 kf5-kcrash-5.83.0-1.fc34.x86_64 kf5-kdbusaddons-5.83.0-1.fc34.x86_64 kf5-kglobalaccel-libs-5.83.0-1.fc34.x86_64 kf5-ki18n-5.83.0-1.fc34.x86_64 kf5-kiconthemes-5.83.0-1.fc34.x86_64 kf5-kimageformats-5.83.0-1.fc34.x86_64 kf5-kio-core-libs-5.83.0-2.fc34.x86_64 kf5-kio-file-widgets-5.83.0-2.fc34.x86_64 kf5-kio-gui-5.83.0-2.fc34.x86_64 kf5-kitemviews-5.83.0-1.fc34.x86_64 kf5-kjobwidgets-5.83.0-1.fc34.x86_64 kf5-knotifications-5.83.0-1.fc34.x86_64 kf5-kservice-5.83.0-1.fc34.x86_64 kf5-kwayland-5.83.0-1.fc34.x86_64 kf5-kwidgetsaddons-5.83.0-1.fc34.x86_64 kf5-kwindowsystem-5.83.0-1.fc34.x86_64 kf5-solid-5.83.0-1.fc34.x86_64 krb5-libs-1.19.1-14.fc34.x86_64 lcms2-2.12-1.fc34.x86_64 libICE-1.0.10-6.fc34.x86_64 libX11-1.7.0-3.fc34.x86_64 libX11-xcb-1.7.0-3.fc34.x86_64 libXau-1.0.9-6.fc34.x86_64 libXcursor-1.2.0-5.fc34.x86_64 libXext-1.3.4-6.fc34.x86_64 libXfixes-6.0.0-1.fc34.x86_64 libXtst-1.2.3-14.fc34.x86_64 libacl-2.3.1-1.fc34.x86_64 libaom-3.1.1-1.fc34.x86_64 libattr-2.5.1-1.fc34.x86_64 libbrotli-1.0.9-4.fc34.x86_64 libcanberra-0.30-24.fc34.x86_64 libcap-2.48-2.fc34.x86_64 libcom_err-1.45.6-5.fc34.x86_64 libdav1d-0.9.0-1.fc34.x86_64 libdrm-2.4.107-1.fc34.x86_64 libffi-3.1-28.fc34.x86_64 libftdi-1.4-7.fc34.x86_64 libgcc-11.2.1-1.fc34.x86_64 libgcrypt-1.9.3-3.fc34.x86_64 libglvnd-1.3.3-1.fc34.x86_64 libglvnd-glx-1.3.3-1.fc34.x86_64 libgpg-error-1.42-1.fc34.x86_64 libicu-67.1-6.fc34.x86_64 libieee1284-0.2.11-35.fc34.x86_64 libmng-2.0.3-13.fc34.x86_64 libmount-2.36.2-1.fc34.x86_64 libogg-1.3.4-4.fc34.x86_64 libpciaccess-0.16-4.fc34.x86_64 libpng-1.6.37-10.fc34.x86_64 libserialport-0.1.1-11.fc34.x86_64 libsigc++20-2.10.7-1.fc34.x86_64 libsigrok-0.5.2-7.20210801gitb96051a.fc34.x86_64 libsigrok-cxx-0.5.2-7.20210801gitb96051a.fc34.x86_64 libstdc++-11.2.1-1.fc34.x86_64 libtdb-1.4.3-6.fc34.x86_64 libtirpc-1.3.2-0.fc34.x86_64 libtool-ltdl-2.4.6-40.fc34.x86_64 libusbx-1.0.24-2.fc34.x86_64 libuuid-2.36.2-1.fc34.x86_64 libvorbis-1.3.7-3.fc34.x86_64 libwayland-client-1.19.0-1.fc34.x86_64 libwayland-cursor-1.19.0-1.fc34.x86_64 libwebp-1.2.0-1.fc34.x86_64 libxcb-1.13.1-7.fc34.x86_64 libxkbcommon-x11-1.3.0-1.fc34.x86_64 libxml2-2.9.12-4.fc34.x86_64 libxshmfence-1.3-8.fc34.x86_64 libzip-1.7.3-4.fc34.x86_64 libzstd-1.5.0-1.fc34.x86_64 lz4-libs-1.9.3-2.fc34.x86_64 mesa-libGL-21.1.5-1.fc34.x86_64 mesa-libglapi-21.1.5-1.fc34.x86_64 openssl-libs-1.1.1k-1.fc34.x86_64 pcre-8.44-3.fc34.1.x86_64 pcre2-10.36-4.fc34.x86_64 pcre2-utf16-10.36-4.fc34.x86_64 python3-libs-3.9.6-2.fc34.x86_64 qt5-qtbase-5.15.2-16.fc34.x86_64 qt5-qtbase-gui-5.15.2-16.fc34.x86_64 qt5-qtquickcontrols2-5.15.2-3.fc34.x86_64 qt5-qtsvg-5.15.2-4.fc34.x86_64 qt5-qtwayland-5.15.2-7.fc34.x86_64 qwt-qt5-6.1.5-4.fc34.x86_64 rav1e-libs-0.4.1-2.fc34.x86_64 sssd-client-2.5.2-1.fc34.x86_64 svt-av1-libs-0.8.6-4.fc34.x86_64 systemd-libs-248.6-1.fc34.x86_64
(gdb) backtrace
#0  0x0000000000548814 in std::__shared_ptr<sv::data::BaseSignal, (__gnu_cxx::_Lock_policy)2>::operator=(std::__shared_ptr<sv::data::BaseSignal, (__gnu_cxx::_Lock_policy)2> const&)
    (this=0x1dbb958) at /usr/include/c++/11/bits/shared_ptr_base.h:1153
#1  0x0000000000548863 in std::shared_ptr<sv::data::BaseSignal>::operator=(std::shared_ptr<sv::data::BaseSignal> const&) (this=0x1dbb958) at /usr/include/c++/11/bits/shared_ptr.h:359
#2  0x000000000055811f in sv::channels::HardwareChannel::push_interleaved_samples(float const*, unsigned long, unsigned long, double, unsigned long, std::shared_ptr<sigrok::Analog>)
    (this=
    0x1dbb8b0, data=0x7fffb40046d0, sample_count=1, stride=1, timestamp=1627857685.4949999, samplerate=10, sr_analog=std::shared_ptr<sigrok::Analog> (use count 3, weak count 1) = {...}) at /home/spike/workspace/smuview/smuview-7f2a9c7f5fe11c804c86a6f98d0b527095699efd/src/channels/hardwarechannel.cpp:100
#3  0x00000000006d7f7c in sv::devices::HardwareDevice::feed_in_analog(std::shared_ptr<sigrok::Analog>)
    (this=0x1b8b150, sr_analog=std::shared_ptr<sigrok::Analog> (use count 3, weak count 1) = {...})
    at /home/spike/workspace/smuview/smuview-7f2a9c7f5fe11c804c86a6f98d0b527095699efd/src/devices/hardwaredevice.cpp:296
#4  0x000000000068bd23 in sv::devices::BaseDevice::data_feed_in(std::shared_ptr<sigrok::Device>, std::shared_ptr<sigrok::Packet>)
    (this=0x1b8b150, sr_device=std::shared_ptr<sigrok::Device> (use count 10, weak count 1) = {...}, sr_packet=std::shared_ptr<sigrok::Packet> (use count 3, weak count 1) = {...})
    at /home/spike/workspace/smuview/smuview-7f2a9c7f5fe11c804c86a6f98d0b527095699efd/src/devices/basedevice.cpp:478
#5  0x000000000068b93d in operator()(std::shared_ptr<sigrok::Device>, std::shared_ptr<sigrok::Packet>) const
    (__closure=0x1dc9790, sr_device=std::shared_ptr<sigrok::Device> (use count 10, weak count 1) = {...}, sr_packet=std::shared_ptr<sigrok::Packet> (use count 3, weak count 1) = {...})
    at /home/spike/workspace/smuview/smuview-7f2a9c7f5fe11c804c86a6f98d0b527095699efd/src/devices/basedevice.cpp:418
#6  0x000000000068c641 in std::__invoke_impl<void, sv::devices::BaseDevice::init_acquisition()::<lambda(std::shared_ptr<sigrok::Device>, std::shared_ptr<sigrok::Packet>)>&, std::shared_ptr<sigrok::Device>, std::shared_ptr<sigrok::Packet> >(std::__invoke_other, struct {...} &) (__f=...) at /usr/include/c++/11/bits/invoke.h:61
#7  0x000000000068c4d8 in std::__invoke_r<void, sv::devices::BaseDevice::init_acquisition()::<lambda(std::shared_ptr<sigrok::Device>, std::shared_ptr<sigrok::Packet>)>&, std::shared_ptr<sigrok::Device>, std::shared_ptr<sigrok::Packet> >(struct {...} &) (__fn=...) at /usr/include/c++/11/bits/invoke.h:154
#8  0x000000000068c393 in std::_Function_handler<void(std::shared_ptr<sigrok::Device>, std::shared_ptr<sigrok::Packet>), sv::devices::BaseDevice::init_acquisition()::<lambda(std::shared_ptr<sigrok::Device>, std::shared_ptr<sigrok::Packet>)> >::_M_invoke(const std::_Any_data &, std::shared_ptr<sigrok::Device> &&, std::shared_ptr<sigrok::Packet> &&)
    (__functor=..., __args#0=..., __args#1=...) at /usr/include/c++/11/bits/std_function.h:291
#9  0x00007ffff7da5251 in sigrok::datafeed_callback(sr_dev_inst const*, sr_datafeed_packet const*, void*) () at /lib64/libsigrokcxx.so.4
#10 0x00007ffff7c63508 in sr_session_send () at /lib64/libsigrok.so.4
#11 0x00007ffff7d0384d in itech_it8500_channel_send_value.constprop () at /lib64/libsigrok.so.4
#12 0x00007ffff7cc0e3d in itech_it8500_receive_data () at /lib64/libsigrok.so.4
#13 0x00007ffff7c62c85 in fd_source_dispatch () at /lib64/libsigrok.so.4
#14 0x00007ffff7a524cf in g_main_context_dispatch () at /lib64/libglib-2.0.so.0
#15 0x00007ffff7aa64e8 in g_main_context_iterate.constprop () at /lib64/libglib-2.0.so.0
#16 0x00007ffff7a51a93 in g_main_loop_run () at /lib64/libglib-2.0.so.0
#17 0x00007ffff7c631d5 in sr_session_run () at /lib64/libsigrok.so.4
#18 0x00007ffff7da36d4 in sigrok::Session::run() () at /lib64/libsigrokcxx.so.4
#19 0x000000000068bfda in sv::devices::BaseDevice::aquisition_thread_proc() (this=0x1b8b150)
    at /home/spike/workspace/smuview/smuview-7f2a9c7f5fe11c804c86a6f98d0b527095699efd/src/devices/basedevice.cpp:535
#20 0x00000000006a4533 in std::__invoke_impl<void, void (sv::devices::BaseDevice::*)(), sv::devices::BaseDevice*>(std::__invoke_memfun_deref, void (sv::devices::BaseDevice::*&&)(), sv::devices::BaseDevice*&&)
    (__f=@0x1dc9b70: (void (sv::devices::BaseDevice::*)(sv::devices::BaseDevice * const)) 0x68be86 <sv::devices::BaseDevice::aquisition_thread_proc()>, __t=@0x1dc9b68: 0x1b8b150)
    at /usr/include/c++/11/bits/invoke.h:74
#21 0x00000000006a4491 in std::__invoke<void (sv::devices::BaseDevice::*)(), sv::devices::BaseDevice*>(void (sv::devices::BaseDevice::*&&)(), sv::devices::BaseDevice*&&)
    (__fn=@0x1dc9b70: (void (sv::devices::BaseDevice::*)(sv::devices::BaseDevice * const)) 0x68be86 <sv::devices::BaseDevice::aquisition_thread_proc()>)
    at /usr/include/c++/11/bits/invoke.h:96
#22 0x00000000006a4401 in std::thread::_Invoker<std::tuple<void (sv::devices::BaseDevice::*)(), sv::devices::BaseDevice*> >::_M_invoke<0ul, 1ul>(std::_Index_tuple<0ul, 1ul>) (this=0x1dc9b68) at /usr/include/c++/11/bits/std_thread.h:253
#23 0x00000000006a434a in std::thread::_Invoker<std::tuple<void (sv::devices::BaseDevice::*)(), sv::devices::BaseDevice*> >::operator()() (this=0x1dc9b68) at /usr/include/c++/11/bits/std_thread.h:260
#24 0x00000000006a42ae in std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (sv::devices::BaseDevice::*)(), sv::devices::BaseDevice*> > >::_M_run() (this=0x1dc9b60) at /usr/include/c++/11/bits/std_thread.h:211
#25 0x00007ffff6284c84 in execute_native_thread_routine () at /lib64/libstdc++.so.6
#26 0x00007ffff7dcc299 in start_thread () at /lib64/libpthread.so.0
#27 0x00007ffff5f7d353 in clone () at /lib64/libc.so.6
@spike77453
Copy link
Author

With the pre-built x86_64 AppImage from https://github.com/knarfS/smuview/releases/tag/continuous the trace looks a bit different:

Thread 12 "smuview" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffd2304640 (LWP 373898)]
0x000055555585f3a9 in sv::channels::HardwareChannel::push_interleaved_samples(float const*, unsigned long, unsigned long, double, unsigned long, std::shared_ptr<sigrok::Analog>) ()
Missing separate debuginfos, use: dnf debuginfo-install bzip2-libs-1.0.8-6.fc34.x86_64 expat-2.4.1-1.fc34.x86_64 fontconfig-2.13.94-2.fc34.x86_64 freetype-2.10.4-3.fc34.x86_64 glib2-2.68.2-1.fc34.x86_64 glibc-2.33-20.fc34.x86_64 graphite2-1.3.14-7.fc34.x86_64 harfbuzz-2.7.4-3.fc34.x86_64 libICE-1.0.10-6.fc34.x86_64 libX11-1.7.0-3.fc34.x86_64 libXau-1.0.9-6.fc34.x86_64 libXcursor-1.2.0-5.fc34.x86_64 libXext-1.3.4-6.fc34.x86_64 libXfixes-6.0.0-1.fc34.x86_64 libXxf86vm-1.1.4-16.fc34.x86_64 libbrotli-1.0.9-4.fc34.x86_64 libdrm-2.4.107-1.fc34.x86_64 libffi-3.1-28.fc34.x86_64 libgcc-11.2.1-1.fc34.x86_64 libglvnd-1.3.3-1.fc34.x86_64 libglvnd-glx-1.3.3-1.fc34.x86_64 libgpg-error-1.42-1.fc34.x86_64 libmount-2.36.2-1.fc34.x86_64 libstdc++-11.2.1-1.fc34.x86_64 libusbx-1.0.24-2.fc34.x86_64 libuuid-2.36.2-1.fc34.x86_64 libxcb-1.13.1-7.fc34.x86_64 libxml2-2.9.12-4.fc34.x86_64 libxshmfence-1.3-8.fc34.x86_64 mesa-dri-drivers-21.1.5-1.fc34.x86_64 mesa-libGL-21.1.5-1.fc34.x86_64 mesa-libglapi-21.1.5-1.fc34.x86_64 pcre-8.44-3.fc34.1.x86_64 pcre2-10.36-4.fc34.x86_64 sssd-client-2.5.2-1.fc34.x86_64 zlib-1.2.11-26.fc34.x86_64
(gdb) backtrace
#0  0x000055555585f3a9 in sv::channels::HardwareChannel::push_interleaved_samples(float const*, unsigned long, unsigned long, double, unsigned long, std::shared_ptr<sigrok::Analog>) ()
#1  0x0000555555882597 in sv::devices::HardwareDevice::feed_in_analog(std::shared_ptr<sigrok::Analog>) ()
#2  0x0000555555874e31 in sv::devices::BaseDevice::data_feed_in(std::shared_ptr<sigrok::Device>, std::shared_ptr<sigrok::Packet>) ()
#3  0x0000555555874fa7 in std::_Function_handler<void (std::shared_ptr<sigrok::Device>, std::shared_ptr<sigrok::Packet>), sv::devices::BaseDevice::init_acquisition()::{lambda(std::shared_ptr<sigrok::Device>, std::shared_ptr<sigrok::Packet>)#1}>::_M_invoke(std::_Any_data const&, std::shared_ptr<sigrok::Device>&&, std::shared_ptr<sigrok::Packet>&&) ()
#4  0x00007ffff7a01b95 in  () at /tmp/.mount_SmuVieXMxKEe/usr/bin/../lib/libsigrokcxx.so.4
#5  0x00007ffff76a764f in  () at /tmp/.mount_SmuVieXMxKEe/usr/bin/../lib/libsigrok.so.4
#6  0x00007ffff770fcf5 in  () at /tmp/.mount_SmuVieXMxKEe/usr/bin/../lib/libsigrok.so.4
#7  0x00007ffff770fe03 in  () at /tmp/.mount_SmuVieXMxKEe/usr/bin/../lib/libsigrok.so.4
#8  0x00007ffff76a69c0 in  () at /tmp/.mount_SmuVieXMxKEe/usr/bin/../lib/libsigrok.so.4
#9  0x00007ffff72eb4cf in g_main_context_dispatch () at /lib64/libglib-2.0.so.0
#10 0x00007ffff733f4e8 in g_main_context_iterate.constprop () at /lib64/libglib-2.0.so.0
#11 0x00007ffff72eaa93 in g_main_loop_run () at /lib64/libglib-2.0.so.0
#12 0x00007ffff76a7371 in sr_session_run () at /tmp/.mount_SmuVieXMxKEe/usr/bin/../lib/libsigrok.so.4
#13 0x00007ffff79f513d in sigrok::Session::run() () at /tmp/.mount_SmuVieXMxKEe/usr/bin/../lib/libsigrokcxx.so.4
#14 0x000055555587311b in sv::devices::BaseDevice::aquisition_thread_proc() ()
#15 0x00007ffff5b25c84 in execute_native_thread_routine () at /lib64/libstdc++.so.6
#16 0x00007ffff7c24299 in start_thread () at /lib64/libpthread.so.0
#17 0x00007ffff581c353 in clone () at /lib64/libc.so.6

@spike77453
Copy link
Author

Compiling with -Wp,-D_GLIBCXX_ASSERTIONS leads to:

HardwareChannel::push_sample_sr_analog():  "P1"  - No signal found:  "P1 [W]"
/usr/include/c++/11/bits/stl_vector.h:1045: std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](std::vector<_Tp, _Alloc>::size_type) [with _Tp = std::shared_ptr<sv::data::BaseSignal>; _Alloc = std::allocator<std::shared_ptr<sv::data::BaseSignal> >; std::vector<_Tp, _Alloc>::reference = std::shared_ptr<sv::data::BaseSignal>&; std::vector<_Tp, _Alloc>::size_type = long unsigned int]: Assertion '__n < this->size()' failed.

Thread 12 "smuview" received signal SIGABRT, Aborted.
[Switching to Thread 0x7fffcd22d640 (LWP 525438)]
0x00007ffff5f7d2a2 in raise () from /lib64/libc.so.6
(gdb) backtrace
#0  0x00007ffff5f7d2a2 in raise () at /lib64/libc.so.6
#1  0x00007ffff5f668a4 in abort () at /lib64/libc.so.6
#2  0x00005555559eaca8 in  ()
#3  0x0000555555a4df29 in sv::devices::HardwareDevice::feed_in_analog(std::shared_ptr<sigrok::Analog>) ()
#4  0x0000555555a400eb in std::_Function_handler<void (std::shared_ptr<sigrok::Device>, std::shared_ptr<sigrok::Packet>), sv::devices::BaseDevice::init_acquisition()::{lambda(std::shared_ptr<sigrok::Device>, std::shared_ptr<sigrok::Packet>)#1}>::_M_invoke(std::_Any_data const&, std::shared_ptr<sigrok::Device>&&, std::shared_ptr<sigrok::Packet>&&) ()
#5  0x00007ffff7e04251 in sigrok::datafeed_callback(sr_dev_inst const*, sr_datafeed_packet const*, void*) () at /lib64/libsigrokcxx.so.4
#6  0x00007ffff7cc2508 in sr_session_send () at /lib64/libsigrok.so.4
#7  0x00007ffff7d6294d in itech_it8500_channel_send_value.constprop () at /lib64/libsigrok.so.4
#8  0x00007ffff7d1ff3d in itech_it8500_receive_data () at /lib64/libsigrok.so.4
#9  0x00007ffff7cc1c85 in fd_source_dispatch () at /lib64/libsigrok.so.4
#10 0x00007ffff7b0e4cf in g_main_context_dispatch () at /lib64/libglib-2.0.so.0
#11 0x00007ffff7b624e8 in g_main_context_iterate.constprop () at /lib64/libglib-2.0.so.0
#12 0x00007ffff7b0da93 in g_main_loop_run () at /lib64/libglib-2.0.so.0
#13 0x00007ffff7cc21d5 in sr_session_run () at /lib64/libsigrok.so.4
#14 0x00007ffff7e026d4 in sigrok::Session::run() () at /lib64/libsigrokcxx.so.4
#15 0x0000555555a3fb4e in sv::devices::BaseDevice::aquisition_thread_proc() ()
#16 0x00007ffff6349c84 in execute_native_thread_routine () at /lib64/libstdc++.so.6
#17 0x00007ffff7e2b299 in start_thread () at /lib64/libpthread.so.0
#18 0x00007ffff6040353 in clone () at /lib64/libc.so.6

@knarfS
Copy link
Owner

knarfS commented Aug 20, 2021

Could you please start SmuView with full log output and attach the whole output here?

This is for connecting the load with the (factory) default serial settings (9600/8n1). Maybe you have to adapt the TTY:

./smuview -d itech-it8500:conn=/dev/ttyUSB0 -l 5

When looking into the sigrok device driver, 38400 should be the maximum baud rate (not sure, I don't own that device):

./smuview -d itech-it8500:conn=/dev/ttyUSB0:serialcomm=38400/8n1 -l 5

@spike77453
Copy link
Author

spike77453 commented Aug 21, 2021

Thanks for getting back to me, really appreciated.

Just for the record, factory default setting on my unit is 115200 8N1. I've set it to 38400 though. Output with the version that was compiled with -Wp,-D_GLIBCXX_ASSERTIONS:

$ smuview -d itech-it8500:conn=/dev/ttyUSB0:serialcomm=38400/8n1 -l 5
sr: [00:00.000000] log: libsigrok loglevel set to 5.
sr: [00:00.027333] hwdriver: Scan found 0 devices (agilent-dmm).
sr: [00:00.028219] hwdriver: Scan found 0 devices (appa-55ii).
sr: [00:00.048299] hwdriver: Scan found 0 devices (arachnid-labs-re-load-pro).
sr: [00:00.048493] hwdriver: Scan found 0 devices (atten-pps3203).
sr: [00:00.048799] hwdriver: Scan found 0 devices (baylibre-acme).
sr: [00:00.048915] hwdriver: Scan found 0 devices (bbcgm-2010).
sr: [00:00.049008] hwdriver: Scan found 0 devices (brymen-bm25x).
sr: [00:00.049084] serial: Opening serial port 'hid/bu86x' (flags 1).
sr: [00:00.049099] serial-libsp: Error getting port from name hid/bu86x: (2) No such file or directory.
sr: [00:00.049106] hwdriver: Scan found 0 devices (brymen-bm52x).
sr: [00:00.049263] serial: Opening serial port 'hid/bu86x' (flags 1).
sr: [00:00.049279] serial-libsp: Error getting port from name hid/bu86x: (2) No such file or directory.
sr: [00:00.049286] hwdriver: Scan found 0 devices (brymen-bm82x).
sr: [00:00.049388] hwdriver: Scan found 0 devices (brymen-bm85x).
sr: [00:00.049506] serial: Opening serial port 'hid/bu86x' (flags 1).
sr: [00:00.049524] serial-libsp: Error getting port from name hid/bu86x: (2) No such file or directory.
sr: [00:00.049534] hwdriver: Scan found 0 devices (brymen-bm86x).
sr: [00:00.049625] hwdriver: Scan found 0 devices (cem-dt-885x).
sr: [00:00.049732] hwdriver: Scan found 0 devices (center-309).
sr: [00:00.049841] hwdriver: Scan found 0 devices (colead-slm).
sr: [00:00.049972] hwdriver: Scan found 0 devices (conrad-digi-35-cpu).
sr: [00:00.050072] demo: Generating square pattern.
sr: [00:00.050090] demo: Generating sine pattern.
sr: [00:00.050135] demo: Generating triangle pattern.
sr: [00:00.050209] demo: Generating sawtooth pattern.
sr: [00:00.050238] hwdriver: Scan found 1 devices (demo).
sr: [00:00.050357] hwdriver: Scan found 0 devices (deree-de5000).
sr: [00:00.050510] hwdriver: Scan found 0 devices (digitek-dt4000zc).
sr: [00:00.053953] hwdriver: Scan found 0 devices (eevblog-121gw).
sr: [00:00.056340] serial: No serial device specified.
sr: [00:00.062737] hwdriver: Scan found 0 devices (fluke-45).
sr: [00:00.114929] hwdriver: Scan found 0 devices (fluke-dmm).
sr: [00:00.115643] hwdriver: Scan found 0 devices (gmc-mh-1x-2x-rs232).
sr: [00:00.116282] hwdriver: Scan found 0 devices (gmc-mh-2x-bd232).
sr: [00:00.117007] hwdriver: Scan found 0 devices (gwinstek-gdm-397).
sr: [00:00.117579] hwdriver: Scan found 0 devices (gwinstek-gpd).
sr: [00:00.118181] serial: No serial device specified.
sr: [00:00.118196] hwdriver: Scan found 0 devices (hp-3457a).
sr: [00:00.118688] serial: No serial device specified.
sr: [00:00.118708] hwdriver: Scan found 0 devices (hp-59306a).
sr: [00:00.119084] serial: No serial device specified.
sr: [00:00.119097] hwdriver: Scan found 0 devices (hpib-pps).
sr: [00:00.119448] hwdriver: Scan found 0 devices (iso-tech-idm103n).
sr: [00:00.120047] hwdriver: Scan found 0 devices (kecheng-kc-330b).
sr: [00:00.120472] hwdriver: Scan found 0 devices (kern-ew-6200-2nm).
sr: [00:00.120917] hwdriver: Scan found 0 devices (korad-kaxxxxp).
sr: [00:00.121279] hwdriver: Scan found 0 devices (lascar-el-usb).
sr: [00:00.121687] hwdriver: Scan found 0 devices (manson-hcs-3xxx).
sr: [00:00.122272] hwdriver: Scan found 0 devices (mastech-mas345).
sr: [00:00.122668] hwdriver: Scan found 0 devices (mastech-ms2115b).
sr: [00:00.123114] hwdriver: Scan found 0 devices (mastech-ms5308).
sr: [00:00.123757] hwdriver: Scan found 0 devices (mastech-ms6514).
sr: [00:00.124220] hwdriver: Scan found 0 devices (mastech-ms8250b).
sr: [00:00.124840] hwdriver: Scan found 0 devices (mastech-ms8250d).
sr: [00:00.125315] hwdriver: Scan found 0 devices (maynuo-m97).
sr: [00:00.126197] hwdriver: Scan found 0 devices (meterman-38xr).
sr: [00:00.126816] hwdriver: Scan found 0 devices (metex-m3640d).
sr: [00:00.127202] hwdriver: Scan found 0 devices (metex-m3860m).
sr: [00:00.127668] hwdriver: Scan found 0 devices (metex-m4650cr).
sr: [00:00.128109] hwdriver: Scan found 0 devices (metex-me21).
sr: [00:00.128447] hwdriver: Scan found 0 devices (metex-me31).
sr: [00:00.128837] hwdriver: Scan found 0 devices (metrix-mx56c).
sr: [00:00.129306] hwdriver: Scan found 0 devices (mic-98581).
sr: [00:00.129660] hwdriver: Scan found 0 devices (mic-98583).
sr: [00:00.129979] serial: No serial device specified.
sr: [00:00.129990] hwdriver: Scan found 0 devices (motech-lps-301).
sr: [00:00.130294] hwdriver: Scan found 0 devices (norma-dmm).
sr: [00:00.130693] hwdriver: Scan found 0 devices (pce-322a).
sr: [00:00.130975] hwdriver: Scan found 0 devices (pce-pce-dm32).
sr: [00:00.131238] hwdriver: Scan found 0 devices (peaktech-2025).
sr: [00:00.131512] hwdriver: Scan found 0 devices (peaktech-2165).
sr: [00:00.131773] hwdriver: Scan found 0 devices (peaktech-2170).
sr: [00:00.132297] hwdriver: Scan found 0 devices (peaktech-3330).
sr: [00:00.132749] hwdriver: Scan found 0 devices (peaktech-3410).
sr: [00:00.133189] hwdriver: Scan found 0 devices (peaktech-3415).
sr: [00:00.133547] hwdriver: Scan found 0 devices (peaktech-4370).
sr: [00:00.133845] hwdriver: Scan found 0 devices (peaktech-4390a).
sr: [00:00.134140] hwdriver: Scan found 0 devices (radioshack-22-168).
sr: [00:00.134438] hwdriver: Scan found 0 devices (radioshack-22-805).
sr: [00:00.134793] hwdriver: Scan found 0 devices (radioshack-22-812).
sr: [00:00.135088] hwdriver: Scan found 0 devices (rdtech-dps).
sr: [00:00.135362] hwdriver: Scan found 0 devices (rdtech-rd).
sr: [00:00.135695] hwdriver: Scan found 0 devices (rdtech-um).
sr: [00:00.135972] serial: No serial device specified.
sr: [00:00.140054] hwdriver: Scan found 0 devices (rigol-dg).
sr: [00:00.140572] serial: No serial device specified.
sr: [00:00.144983] hwdriver: Scan found 0 devices (rohde-schwarz-sme-0x).
sr: [00:00.145576] serial: No serial device specified.
sr: [00:00.150622] hwdriver: Scan found 0 devices (scpi-dmm).
sr: [00:00.151153] serial: No serial device specified.
sr: [00:00.156079] hwdriver: Scan found 0 devices (scpi-pps).
sr: [00:00.156860] hwdriver: Scan found 0 devices (siemens-b102x).
sr: [00:00.157695] hwdriver: Scan found 0 devices (sparkfun-70c).
sr: [00:00.160355] hwdriver: Scan found 0 devices (tecpel-dmm-8061).
sr: [00:00.160945] hwdriver: Scan found 0 devices (tecpel-dmm-8061-ser).
sr: [00:00.161432] hwdriver: Scan found 0 devices (tekpower-tp4000ZC).
sr: [00:00.161883] hwdriver: Scan found 0 devices (teleinfo).
sr: [00:00.162295] hwdriver: Scan found 0 devices (tenma-72-7730).
sr: [00:00.162793] hwdriver: Scan found 0 devices (tenma-72-7730-ser).
sr: [00:00.163221] hwdriver: Scan found 0 devices (tenma-72-7732).
sr: [00:00.163672] hwdriver: Scan found 0 devices (tenma-72-7732-ser).
sr: [00:00.164072] hwdriver: Scan found 0 devices (tenma-72-7745).
sr: [00:00.164536] hwdriver: Scan found 0 devices (tenma-72-7745-ser).
sr: [00:00.164965] hwdriver: Scan found 0 devices (tenma-72-7750).
sr: [00:00.165344] hwdriver: Scan found 0 devices (tenma-72-7750-ser).
sr: [00:00.165933] hwdriver: Scan found 0 devices (tenma-72-9380a).
sr: [00:00.166377] hwdriver: Scan found 0 devices (tenma-72-9380a-ser).
sr: [00:00.281729] hwdriver: Scan found 0 devices (testo).
sr: [00:00.282529] hwdriver: Scan found 0 devices (tondaj-sl-814).
sr: [00:00.282911] hwdriver: Scan found 0 devices (uni-t-ut181a).
sr: [00:00.283350] hwdriver: Scan found 0 devices (uni-t-ut32x).
sr: [00:00.283700] hwdriver: Scan found 0 devices (uni-t-ut372).
sr: [00:00.284015] hwdriver: Scan found 0 devices (uni-t-ut60a).
sr: [00:00.284323] hwdriver: Scan found 0 devices (uni-t-ut60a-ser).
sr: [00:00.284756] hwdriver: Scan found 0 devices (uni-t-ut60e).
sr: [00:00.285074] hwdriver: Scan found 0 devices (uni-t-ut60e-ser).
sr: [00:00.285372] hwdriver: Scan found 0 devices (uni-t-ut60g).
sr: [00:00.285687] hwdriver: Scan found 0 devices (uni-t-ut60g-ser).
sr: [00:00.286024] hwdriver: Scan found 0 devices (uni-t-ut612).
sr: [00:00.286458] hwdriver: Scan found 0 devices (uni-t-ut61b).
sr: [00:00.286779] hwdriver: Scan found 0 devices (uni-t-ut61b-ser).
sr: [00:00.287068] hwdriver: Scan found 0 devices (uni-t-ut61c).
sr: [00:00.287369] hwdriver: Scan found 0 devices (uni-t-ut61c-ser).
sr: [00:00.287743] hwdriver: Scan found 0 devices (uni-t-ut61d).
sr: [00:00.288125] hwdriver: Scan found 0 devices (uni-t-ut61d-ser).
sr: [00:00.288434] hwdriver: Scan found 0 devices (uni-t-ut61e).
sr: [00:00.288729] hwdriver: Scan found 0 devices (uni-t-ut61e-ser).
sr: [00:00.289109] hwdriver: Scan found 0 devices (uni-t-ut71a).
sr: [00:00.289467] hwdriver: Scan found 0 devices (uni-t-ut71a-ser).
sr: [00:00.289834] hwdriver: Scan found 0 devices (uni-t-ut71b).
sr: [00:00.290110] hwdriver: Scan found 0 devices (uni-t-ut71b-ser).
sr: [00:00.290454] hwdriver: Scan found 0 devices (uni-t-ut71c).
sr: [00:00.290860] hwdriver: Scan found 0 devices (uni-t-ut71c-ser).
sr: [00:00.291189] hwdriver: Scan found 0 devices (uni-t-ut71d).
sr: [00:00.291485] hwdriver: Scan found 0 devices (uni-t-ut71d-ser).
sr: [00:00.291813] hwdriver: Scan found 0 devices (uni-t-ut71e).
sr: [00:00.292138] hwdriver: Scan found 0 devices (uni-t-ut71e-ser).
sr: [00:00.292416] hwdriver: Scan found 0 devices (uni-t-ut804).
sr: [00:00.292960] hwdriver: Scan found 0 devices (uni-t-ut804-ser).
sr: [00:00.293335] hwdriver: Scan found 0 devices (va-va18b).
sr: [00:00.293722] hwdriver: Scan found 0 devices (va-va40b).
sr: [00:00.294004] hwdriver: Scan found 0 devices (velleman-dvm4100).
sr: [00:00.294291] serial: Opening serial port 'hid/victor' (flags 1).
sr: [00:00.294311] serial-libsp: Error getting port from name hid/victor: (13) Permission denied.
sr: [00:00.294318] hwdriver: Scan found 0 devices (victor-dmm).
sr: [00:00.294670] hwdriver: Scan found 0 devices (voltcraft-4080).
sr: [00:00.295143] hwdriver: Scan found 0 devices (voltcraft-k204).
sr: [00:00.295571] hwdriver: Scan found 0 devices (voltcraft-m3650cr).
sr: [00:00.295867] hwdriver: Scan found 0 devices (voltcraft-m3650d).
sr: [00:00.296256] hwdriver: Scan found 0 devices (voltcraft-m4650cr).
sr: [00:00.296572] hwdriver: Scan found 0 devices (voltcraft-me42).
sr: [00:00.296873] hwdriver: Scan found 0 devices (voltcraft-vc820).
sr: [00:00.297151] hwdriver: Scan found 0 devices (voltcraft-vc820-ser).
sr: [00:00.297435] hwdriver: Scan found 0 devices (voltcraft-vc830).
sr: [00:00.297811] hwdriver: Scan found 0 devices (voltcraft-vc830-ser).
sr: [00:00.298106] hwdriver: Scan found 0 devices (voltcraft-vc840).
sr: [00:00.298388] hwdriver: Scan found 0 devices (voltcraft-vc840-ser).
sr: [00:00.298694] hwdriver: Scan found 0 devices (voltcraft-vc870).
sr: [00:00.299037] hwdriver: Scan found 0 devices (voltcraft-vc870-ser).
sr: [00:00.299342] hwdriver: Scan found 0 devices (voltcraft-vc920).
sr: [00:00.299656] hwdriver: Scan found 0 devices (voltcraft-vc920-ser).
sr: [00:00.299942] hwdriver: Scan found 0 devices (voltcraft-vc940).
sr: [00:00.300239] hwdriver: Scan found 0 devices (voltcraft-vc940-ser).
sr: [00:00.300658] hwdriver: Scan found 0 devices (voltcraft-vc96).
sr: [00:00.300924] hwdriver: Scan found 0 devices (voltcraft-vc960).
sr: [00:00.301190] hwdriver: Scan found 0 devices (voltcraft-vc960-ser).
sr: [00:00.301459] hwdriver: Scan found 0 devices (zketech-ebd-usb).
sr: [00:00.301905] hwdriver: sr_config_list(): key 2147418112 (NULL) sdi (nil) cg NULL -> [uint32 20000, 20001]
sr: [00:00.301945] hwdriver: sr_config_list(): key 2147418112 (NULL) sdi (nil) cg NULL -> [uint32 20000, 20001]
sr: [00:00.301956] itech-it8500: Probing serial port: /dev/ttyUSB0
sr: [00:00.301964] serial: Opening serial port '/dev/ttyUSB0' (flags 1).
sr: [00:00.303023] serial: Parsing parameters from "38400/8n1".
sr: [00:00.303079] serial: Got params: rate 38400, frame 8/0/1, flow 0, rts -1, dtr -1.
sr: [00:00.303091] serial: Setting serial parameters on port /dev/ttyUSB0.
sr: [00:00.303191] serial: DBG: serial_set_params() rate 38400, 8n1
sr: [00:00.303203] serial: Flushing serial port /dev/ttyUSB0.
sr: [00:00.303213] serial: Flushing serial port /dev/ttyUSB0.
sr: [00:00.303221] itech-it8500: itech_it8500_send_cmd: Sending command: 6a
sr: [00:00.303349] serial: Wrote 26/26 bytes.
sr: [00:00.317812] serial: Read 26/26 bytes.
sr: [00:00.317842] itech-it8500: itech_it8500_send_cmd: Response packet received: cmd=6a
sr: [00:00.317850] itech-it8500: Model name: 8511A (v1.52)
sr: [00:00.317857] itech-it8500: Address: 0
sr: [00:00.317861] itech-it8500: Serial number: 4757510274
sr: [00:00.317870] itech-it8500: itech_it8500_send_cmd: Sending command: 6b
sr: [00:00.317993] serial: Wrote 26/26 bytes.
sr: [00:00.332460] serial: Read 26/26 bytes.
sr: [00:00.332478] itech-it8500: itech_it8500_send_cmd: Response packet received: cmd=6b
sr: [00:00.332486] itech-it8500: Barcode: 8802110024757510274
sr: [00:00.332494] itech-it8500: itech_it8500_send_cmd: Sending command: 01
sr: [00:00.332649] serial: Wrote 26/26 bytes.
sr: [00:00.347186] serial: Read 26/26 bytes.
sr: [00:00.347226] itech-it8500: itech_it8500_send_cmd: Response packet received: cmd=01
sr: [00:00.347237] itech-it8500: Max current: 30 A
sr: [00:00.347257] itech-it8500: Max power: 200 W
sr: [00:00.347267] itech-it8500: Voltage range: 0,1 - 150,0 V
sr: [00:00.347277] itech-it8500: Resistance range: 0,10 - 7500,00 Ohm
sr: [00:00.347288] itech-it8500: itech_it8500_send_cmd: Sending command: 5f
sr: [00:00.347424] serial: Wrote 26/26 bytes.
sr: [00:00.361986] serial: Read 26/26 bytes.
sr: [00:00.362011] itech-it8500: itech_it8500_send_cmd: Response packet received: cmd=5f
sr: [00:00.362019] itech-it8500: Load status: V=0,0000, I=0,0000, P=0,000, State=OFF, Mode=CC (op=0x15, demand=0x0040)
sr: [00:00.362034] itech-it8500: Mode: CC
sr: [00:00.362043] itech-it8500: State: OFF
sr: [00:00.362049] itech-it8500: Default sample rate: 10 Hz
sr: [00:00.362055] itech-it8500: Maximum sample rate: 60 Hz
sr: [00:00.362065] serial: Closing serial port /dev/ttyUSB0.
sr: [00:00.362647] hwdriver: Scan found 1 devices (itech-it8500).
sr: [00:00.388209] device: itech-it8500: Opening device instance.
sr: [00:00.388231] serial: Opening serial port '/dev/ttyUSB0' (flags 1).
sr: [00:00.389708] serial: Parsing parameters from "38400/8n1".
sr: [00:00.389750] serial: Got params: rate 38400, frame 8/0/1, flow 0, rts -1, dtr -1.
sr: [00:00.389759] serial: Setting serial parameters on port /dev/ttyUSB0.
sr: [00:00.389861] serial: DBG: serial_set_params() rate 38400, 8n1
sr: [00:00.389871] serial: Flushing serial port /dev/ttyUSB0.
sr: [00:00.389882] itech-it8500: itech_it8500_send_cmd: Sending command: 20
sr: [00:00.389998] serial: Wrote 26/26 bytes.
sr: [00:00.406343] serial: Read 26/26 bytes.
sr: [00:00.406383] itech-it8500: itech_it8500_send_cmd: Response packet received: cmd=12
Configurable::init(): Init  "1"  - key  "Under Voltage Condition Threshold"
Configurable::init(): Init  "1"  - key  "Under Voltage Condition Active"
Configurable::init(): Init  "1"  - key  "Under Voltage Condition Enabled"
Configurable::init(): Init  "1"  - key  "Over Temperature Protection Active"
Configurable::init(): Init  "1"  - key  "Over Temperature Protection Enabled"
Configurable::init(): Init  "1"  - key  "Regulation"
sr: [00:00.406816] hwdriver: sr_config_list(): key 30043 (regulation) sdi 0x55f1006ccc30 cg 1 -> ['CC', 'CV', 'CW', 'CR']
Configurable::init(): Init  "1"  - key  "Over Current Protection Threshold"
Configurable::init(): Init  "1"  - key  "Over Current Protection Active"
Configurable::init(): Init  "1"  - key  "Over Current Protection Enabled"
Configurable::init(): Init  "1"  - key  "Over Voltage Protection Threshold"
Configurable::init(): Init  "1"  - key  "Over Voltage Protection Active"
Configurable::init(): Init  "1"  - key  "Over Voltage Protection Enabled"
Configurable::init(): Init  "1"  - key  "Enabled"
Configurable::init(): Init  "1"  - key  "Current Limit"
sr: [00:00.407301] hwdriver: sr_config_list(): key 30032 (current_limit) sdi 0x55f1006ccc30 cg 1 -> [0.0, 30.0, 0.001]
Configurable::init(): Init  "1"  - key  "Current"
Configurable::init(): Init  "1"  - key  "Voltage Target"
sr: [00:00.407427] hwdriver: sr_config_list(): key 30030 (voltage_target) sdi 0x55f1006ccc30 cg 1 -> [0.10000000000000001, 150.0, 0.01]
Configurable::init(): Init  "1"  - key  "Voltage"
Configurable::init(): Init  "ITECH 8511A"  - key  "Samplerate"
Configurable::list_config(): Failed to list config key  "Samplerate" .  not applicable
sr: [00:00.407772] hwdriver: sr_config_get(): key 30000 (samplerate) sdi 0x55f1006ccc30 cg NULL -> uint64 10
Init channel  "V1" , channel_start_timestamp =  "2021.08.22 00:31:04.398"
Init channel  "I1" , channel_start_timestamp =  "2021.08.22 00:31:04.398"
Init channel  "P1" , channel_start_timestamp =  "2021.08.22 00:31:04.398"
Init analog base signal  "V1 [V DC]"
Init analog time signal  "V1 [V DC]" , signal_start_timestamp_ =  "2021.08.22 00:31:04.398"
Init analog base signal  "I1 [A DC]"
Init analog time signal  "I1 [A DC]" , signal_start_timestamp_ =  "2021.08.22 00:31:04.398"
Init analog base signal  "P1 [W]"
Init analog time signal  "P1 [W]" , signal_start_timestamp_ =  "2021.08.22 00:31:04.398"
Init channel  "" , channel_start_timestamp =  "2021.08.22 00:31:04.398"
Init analog base signal  "R1 [Ω]"
Init analog time signal  "R1 [Ω]" , signal_start_timestamp_ =  "2021.08.22 00:31:04.398"
Init channel  "" , channel_start_timestamp =  "2021.08.22 00:31:04.398"
Init analog base signal  "Wh1 [Wh]"
Init analog time signal  "Wh1 [Wh]" , signal_start_timestamp_ =  "2021.08.22 00:31:04.398"
Init channel  "" , channel_start_timestamp =  "2021.08.22 00:31:04.398"
Init analog base signal  "Ah1 [Ah]"
Init analog time signal  "Ah1 [Ah]" , signal_start_timestamp_ =  "2021.08.22 00:31:04.398"
sr: [00:00.408548] session: Creating our own main context.
sr: [00:00.408596] session: Starting.
sr: [00:00.408612] hwdriver: itech-it8500: Starting acquisition.
sr: [00:00.408640] session: bus: Received SR_DF_HEADER packet.
Start aquisition for  "ITECH 8511A" ,  aquisition_start_timestamp_ =  "2021.08.22 00:31:04.398"
sr: [00:00.449261] hwdriver: sr_config_get(): key 30000 (samplerate) sdi 0x55f1006ccc30 cg NULL -> uint64 10
sr: [00:00.450952] itech-it8500: itech_it8500_send_cmd: Sending command: 5f
sr: [00:00.451131] serial: Wrote 26/26 bytes.
sr: [00:00.465768] serial: Read 26/26 bytes.
sr: [00:00.465801] itech-it8500: itech_it8500_send_cmd: Response packet received: cmd=5f
sr: [00:00.465822] itech-it8500: Load status: V=0,0000, I=0,0000, P=0,000, State=OFF, Mode=CC (op=0x15, demand=0x0040)
sr: [00:00.465843] hwdriver: sr_config_get(): key 30033 (enabled) sdi 0x55f1006ccc30 cg 1 -> false
sr: [00:00.466062] itech-it8500: itech_it8500_send_cmd: Sending command: 5f
sr: [00:00.466239] serial: Wrote 26/26 bytes.
sr: [00:00.480775] serial: Read 26/26 bytes.
sr: [00:00.480806] itech-it8500: itech_it8500_send_cmd: Response packet received: cmd=5f
sr: [00:00.480823] itech-it8500: Load status: V=0,0000, I=0,0000, P=0,000, State=OFF, Mode=CC (op=0x15, demand=0x0040)
sr: [00:00.480833] itech-it8500: itech_it8500_send_cmd: Sending command: 5f
sr: [00:00.480853] hwdriver: sr_config_get(): key 30043 (regulation) sdi 0x55f1006ccc30 cg 1 -> 'CC'
sr: [00:00.481159] serial: Wrote 26/26 bytes.
sr: [00:00.495667] serial: Read 26/26 bytes.
sr: [00:00.495686] itech-it8500: itech_it8500_send_cmd: Response packet received: cmd=5f
sr: [00:00.495698] sr: [00:00.495702] itech-it8500: itech_it8500_send_cmd: Sending command: 5f
itech-it8500: Load status: V=0,0000, I=0,0000, P=0,000, State=OFF, Mode=CC (op=0x15, demand=0x0040)
sr: [00:00.495723] session: bus: Received SR_DF_FRAME_BEGIN packet.
sr: [00:00.495738] session: bus: Received SR_DF_ANALOG packet (1 samples).
sr: [00:00.495763] hwdriver: sr_config_get(): key 30000 (samplerate) sdi 0x55f1006ccc30 cg NULL -> uint64 10
sr: [00:00.495791] session: bus: Received SR_DF_ANALOG packet (1 samples).
sr: [00:00.495804] hwdriver: sr_config_get(): key 30000 (samplerate) sdi 0x55f1006ccc30 cg NULL -> uint64 10
sr: [00:00.495823] session: bus: Received SR_DF_ANALOG packet (1 samples).
sr: [00:00.495836] sr: [00:00.495840] hwdriver: sr_config_get(): key 30000 (samplerate) sdi 0x55f1006ccc30 cg NULL -> uint64 10
Init analog base signal  "P1 [W DC]"
Init analog time signal  "P1 [W DC]" , signal_start_timestamp_ =  "2021.08.22 00:31:04.398"
Warning: Adding new signal  "P1 [W DC]" to fixed channel  "P1"
BaseSignal::~BaseSignal():  "P1 [W DC]"
HardwareChannel::push_sample_sr_analog():  "P1"  - No signal found:  "P1 [W]"
/usr/include/c++/11/bits/stl_vector.h:1045: std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](std::vector<_Tp, _Alloc>::size_type) [with _Tp = std::shared_ptr<sv::data::BaseSignal>; _Alloc = std::allocator<std::shared_ptr<sv::data::BaseSignal> >; std::vector<_Tp, _Alloc>::reference = std::shared_ptr<sv::data::BaseSignal>&; std::vector<_Tp, _Alloc>::size_type = long unsigned int]: Assertion '__n < this->size()' failed.
Aborted (core dumped)

knarfS added a commit that referenced this issue Aug 22, 2021
The check when adding signals with other mq/mq_flags than specified in e.g.
SourceSinkDevice to a fixed channel was defused in BaseChannel::add_signal()
to prevent a subsequent segfault.
This happens when sigrok drivers send unexpected mq/mq_flags (can be fixed in
the sigrok driver), but also for AC power supplies and loads which is a design
issue in SmuView right now that requires an API enhancement in libsigrok!
With this fix, AC psu/loads will have two signals (DC and AC).

Also add a Python test for fixed channels.

Fixes issue #35.
@knarfS
Copy link
Owner

knarfS commented Aug 22, 2021

Fixed :)
The cause of this issue was, that SmuView couldn't handle the unexpected AC flag for the power channel.

Now signals can be added to "fixed" channels: ca7951b
And the AC flag was removed in the sigrok driver: sigrokproject/libsigrok@24be1e0

@spike77453
Copy link
Author

Thanks! Looks different now:

$ smuview -d itech-it8500:conn=/dev/ttyUSB0:serialcomm=38400/8n1 -l 5
sr: [00:00.000001] log: libsigrok loglevel set to 5.
sr: [00:00.026219] hwdriver: Scan found 0 devices (agilent-dmm).
sr: [00:00.027137] hwdriver: Scan found 0 devices (appa-55ii).
sr: [00:00.044971] hwdriver: Scan found 0 devices (arachnid-labs-re-load-pro).
sr: [00:00.045297] hwdriver: Scan found 0 devices (atten-pps3203).
sr: [00:00.045759] hwdriver: Scan found 0 devices (baylibre-acme).
sr: [00:00.045979] hwdriver: Scan found 0 devices (bbcgm-2010).
sr: [00:00.046208] hwdriver: Scan found 0 devices (brymen-bm25x).
sr: [00:00.046354] serial: Opening serial port 'hid/bu86x' (flags 1).
sr: [00:00.046390] serial-libsp: Error getting port from name hid/bu86x: (2) No such file or directory.
sr: [00:00.046410] hwdriver: Scan found 0 devices (brymen-bm52x).
sr: [00:00.046667] serial: Opening serial port 'hid/bu86x' (flags 1).
sr: [00:00.046686] serial-libsp: Error getting port from name hid/bu86x: (2) No such file or directory.
sr: [00:00.046694] hwdriver: Scan found 0 devices (brymen-bm82x).
sr: [00:00.046819] hwdriver: Scan found 0 devices (brymen-bm85x).
sr: [00:00.046988] serial: Opening serial port 'hid/bu86x' (flags 1).
sr: [00:00.047004] serial-libsp: Error getting port from name hid/bu86x: (2) No such file or directory.
sr: [00:00.047013] hwdriver: Scan found 0 devices (brymen-bm86x).
sr: [00:00.047200] hwdriver: Scan found 0 devices (cem-dt-885x).
sr: [00:00.047356] hwdriver: Scan found 0 devices (center-309).
sr: [00:00.047483] hwdriver: Scan found 0 devices (colead-slm).
sr: [00:00.047605] hwdriver: Scan found 0 devices (conrad-digi-35-cpu).
sr: [00:00.047713] demo: Generating square pattern.
sr: [00:00.047738] demo: Generating sine pattern.
sr: [00:00.047793] demo: Generating triangle pattern.
sr: [00:00.047866] demo: Generating sawtooth pattern.
sr: [00:00.047902] hwdriver: Scan found 1 devices (demo).
sr: [00:00.048030] hwdriver: Scan found 0 devices (deree-de5000).
sr: [00:00.048157] hwdriver: Scan found 0 devices (digitek-dt4000zc).
sr: [00:00.048300] hwdriver: Scan found 0 devices (eevblog-121gw).
sr: [00:00.087568] serial: No serial device specified.
sr: [00:00.092351] hwdriver: Scan found 0 devices (fluke-45).
sr: [00:00.095193] hwdriver: Scan found 0 devices (fluke-dmm).
sr: [00:00.096888] hwdriver: Scan found 0 devices (gmc-mh-1x-2x-rs232).
sr: [00:00.097610] hwdriver: Scan found 0 devices (gmc-mh-2x-bd232).
sr: [00:00.098018] hwdriver: Scan found 0 devices (gwinstek-gdm-397).
sr: [00:00.098468] hwdriver: Scan found 0 devices (gwinstek-gpd).
sr: [00:00.099002] serial: No serial device specified.
sr: [00:00.099016] hwdriver: Scan found 0 devices (hp-3457a).
sr: [00:00.099397] serial: No serial device specified.
sr: [00:00.099408] hwdriver: Scan found 0 devices (hp-59306a).
sr: [00:00.099757] serial: No serial device specified.
sr: [00:00.099769] hwdriver: Scan found 0 devices (hpib-pps).
sr: [00:00.100223] hwdriver: Scan found 0 devices (iso-tech-idm103n).
sr: [00:00.100701] hwdriver: Scan found 0 devices (kecheng-kc-330b).
sr: [00:00.101056] hwdriver: Scan found 0 devices (kern-ew-6200-2nm).
sr: [00:00.101627] hwdriver: Scan found 0 devices (korad-kaxxxxp).
sr: [00:00.102025] hwdriver: Scan found 0 devices (lascar-el-usb).
sr: [00:00.102374] hwdriver: Scan found 0 devices (manson-hcs-3xxx).
sr: [00:00.102755] hwdriver: Scan found 0 devices (mastech-mas345).
sr: [00:00.103144] hwdriver: Scan found 0 devices (mastech-ms2115b).
sr: [00:00.103548] hwdriver: Scan found 0 devices (mastech-ms5308).
sr: [00:00.104022] hwdriver: Scan found 0 devices (mastech-ms6514).
sr: [00:00.104529] hwdriver: Scan found 0 devices (mastech-ms8250b).
sr: [00:00.104856] hwdriver: Scan found 0 devices (mastech-ms8250d).
sr: [00:00.105289] hwdriver: Scan found 0 devices (maynuo-m97).
sr: [00:00.105764] hwdriver: Scan found 0 devices (meterman-38xr).
sr: [00:00.106086] hwdriver: Scan found 0 devices (metex-m3640d).
sr: [00:00.106424] hwdriver: Scan found 0 devices (metex-m3860m).
sr: [00:00.106746] hwdriver: Scan found 0 devices (metex-m4650cr).
sr: [00:00.107094] hwdriver: Scan found 0 devices (metex-me21).
sr: [00:00.107420] hwdriver: Scan found 0 devices (metex-me31).
sr: [00:00.107758] hwdriver: Scan found 0 devices (metrix-mx56c).
sr: [00:00.108064] hwdriver: Scan found 0 devices (mic-98581).
sr: [00:00.108372] hwdriver: Scan found 0 devices (mic-98583).
sr: [00:00.108785] serial: No serial device specified.
sr: [00:00.108798] hwdriver: Scan found 0 devices (motech-lps-301).
sr: [00:00.109113] hwdriver: Scan found 0 devices (norma-dmm).
sr: [00:00.109427] hwdriver: Scan found 0 devices (pce-322a).
sr: [00:00.109732] hwdriver: Scan found 0 devices (pce-pce-dm32).
sr: [00:00.110057] hwdriver: Scan found 0 devices (peaktech-2025).
sr: [00:00.110380] hwdriver: Scan found 0 devices (peaktech-2165).
sr: [00:00.110803] hwdriver: Scan found 0 devices (peaktech-2170).
sr: [00:00.111451] hwdriver: Scan found 0 devices (peaktech-3330).
sr: [00:00.111799] hwdriver: Scan found 0 devices (peaktech-3410).
sr: [00:00.112105] hwdriver: Scan found 0 devices (peaktech-3415).
sr: [00:00.112426] hwdriver: Scan found 0 devices (peaktech-4370).
sr: [00:00.112763] hwdriver: Scan found 0 devices (peaktech-4390a).
sr: [00:00.113071] hwdriver: Scan found 0 devices (radioshack-22-168).
sr: [00:00.113391] hwdriver: Scan found 0 devices (radioshack-22-805).
sr: [00:00.113746] hwdriver: Scan found 0 devices (radioshack-22-812).
sr: [00:00.114069] hwdriver: Scan found 0 devices (rdtech-dps).
sr: [00:00.114415] hwdriver: Scan found 0 devices (rdtech-rd).
sr: [00:00.114743] hwdriver: Scan found 0 devices (rdtech-um).
sr: [00:00.115048] serial: No serial device specified.
sr: [00:00.119264] hwdriver: Scan found 0 devices (rigol-dg).
sr: [00:00.119827] serial: No serial device specified.
sr: [00:00.124096] hwdriver: Scan found 0 devices (rohde-schwarz-sme-0x).
sr: [00:00.124742] serial: No serial device specified.
sr: [00:00.143405] hwdriver: Scan found 0 devices (scpi-dmm).
sr: [00:00.146532] serial: No serial device specified.
sr: [00:00.152831] hwdriver: Scan found 0 devices (scpi-pps).
sr: [00:00.153658] hwdriver: Scan found 0 devices (siemens-b102x).
sr: [00:00.154050] hwdriver: Scan found 0 devices (sparkfun-70c).
sr: [00:00.154870] hwdriver: Scan found 0 devices (tecpel-dmm-8061).
sr: [00:00.155362] hwdriver: Scan found 0 devices (tecpel-dmm-8061-ser).
sr: [00:00.155802] hwdriver: Scan found 0 devices (tekpower-tp4000ZC).
sr: [00:00.157899] hwdriver: Scan found 0 devices (teleinfo).
sr: [00:00.161008] hwdriver: Scan found 0 devices (tenma-72-7730).
sr: [00:00.161907] hwdriver: Scan found 0 devices (tenma-72-7730-ser).
sr: [00:00.162399] hwdriver: Scan found 0 devices (tenma-72-7732).
sr: [00:00.163718] hwdriver: Scan found 0 devices (tenma-72-7732-ser).
sr: [00:00.164338] hwdriver: Scan found 0 devices (tenma-72-7745).
sr: [00:00.164830] hwdriver: Scan found 0 devices (tenma-72-7745-ser).
sr: [00:00.165252] hwdriver: Scan found 0 devices (tenma-72-7750).
sr: [00:00.165921] hwdriver: Scan found 0 devices (tenma-72-7750-ser).
sr: [00:00.166356] hwdriver: Scan found 0 devices (tenma-72-9380a).
sr: [00:00.166775] hwdriver: Scan found 0 devices (tenma-72-9380a-ser).
sr: [00:00.282673] hwdriver: Scan found 0 devices (testo).
sr: [00:00.283417] hwdriver: Scan found 0 devices (tondaj-sl-814).
sr: [00:00.283944] hwdriver: Scan found 0 devices (uni-t-ut181a).
sr: [00:00.284448] hwdriver: Scan found 0 devices (uni-t-ut32x).
sr: [00:00.284856] hwdriver: Scan found 0 devices (uni-t-ut372).
sr: [00:00.285233] hwdriver: Scan found 0 devices (uni-t-ut60a).
sr: [00:00.285658] hwdriver: Scan found 0 devices (uni-t-ut60a-ser).
sr: [00:00.285978] hwdriver: Scan found 0 devices (uni-t-ut60e).
sr: [00:00.286290] hwdriver: Scan found 0 devices (uni-t-ut60e-ser).
sr: [00:00.286634] hwdriver: Scan found 0 devices (uni-t-ut60g).
sr: [00:00.286995] hwdriver: Scan found 0 devices (uni-t-ut60g-ser).
sr: [00:00.287339] hwdriver: Scan found 0 devices (uni-t-ut612).
sr: [00:00.287682] hwdriver: Scan found 0 devices (uni-t-ut61b).
sr: [00:00.288408] hwdriver: Scan found 0 devices (uni-t-ut61b-ser).
sr: [00:00.288811] hwdriver: Scan found 0 devices (uni-t-ut61c).
sr: [00:00.289112] hwdriver: Scan found 0 devices (uni-t-ut61c-ser).
sr: [00:00.289438] hwdriver: Scan found 0 devices (uni-t-ut61d).
sr: [00:00.289719] hwdriver: Scan found 0 devices (uni-t-ut61d-ser).
sr: [00:00.290059] hwdriver: Scan found 0 devices (uni-t-ut61e).
sr: [00:00.290367] hwdriver: Scan found 0 devices (uni-t-ut61e-ser).
sr: [00:00.290711] hwdriver: Scan found 0 devices (uni-t-ut71a).
sr: [00:00.291013] hwdriver: Scan found 0 devices (uni-t-ut71a-ser).
sr: [00:00.291399] hwdriver: Scan found 0 devices (uni-t-ut71b).
sr: [00:00.291702] hwdriver: Scan found 0 devices (uni-t-ut71b-ser).
sr: [00:00.292013] hwdriver: Scan found 0 devices (uni-t-ut71c).
sr: [00:00.292339] hwdriver: Scan found 0 devices (uni-t-ut71c-ser).
sr: [00:00.292688] hwdriver: Scan found 0 devices (uni-t-ut71d).
sr: [00:00.292990] hwdriver: Scan found 0 devices (uni-t-ut71d-ser).
sr: [00:00.293308] hwdriver: Scan found 0 devices (uni-t-ut71e).
sr: [00:00.293611] hwdriver: Scan found 0 devices (uni-t-ut71e-ser).
sr: [00:00.293941] hwdriver: Scan found 0 devices (uni-t-ut804).
sr: [00:00.294317] hwdriver: Scan found 0 devices (uni-t-ut804-ser).
sr: [00:00.294632] hwdriver: Scan found 0 devices (va-va18b).
sr: [00:00.294952] hwdriver: Scan found 0 devices (va-va40b).
sr: [00:00.295247] hwdriver: Scan found 0 devices (velleman-dvm4100).
sr: [00:00.295611] serial: Opening serial port 'hid/victor' (flags 1).
sr: [00:00.295637] serial-libsp: Error getting port from name hid/victor: (13) Permission denied.
sr: [00:00.295644] hwdriver: Scan found 0 devices (victor-dmm).
sr: [00:00.295931] hwdriver: Scan found 0 devices (voltcraft-4080).
sr: [00:00.296237] hwdriver: Scan found 0 devices (voltcraft-k204).
sr: [00:00.296553] hwdriver: Scan found 0 devices (voltcraft-m3650cr).
sr: [00:00.296862] hwdriver: Scan found 0 devices (voltcraft-m3650d).
sr: [00:00.297272] hwdriver: Scan found 0 devices (voltcraft-m4650cr).
sr: [00:00.297597] hwdriver: Scan found 0 devices (voltcraft-me42).
sr: [00:00.297911] hwdriver: Scan found 0 devices (voltcraft-vc820).
sr: [00:00.298223] hwdriver: Scan found 0 devices (voltcraft-vc820-ser).
sr: [00:00.298544] hwdriver: Scan found 0 devices (voltcraft-vc830).
sr: [00:00.298847] hwdriver: Scan found 0 devices (voltcraft-vc830-ser).
sr: [00:00.299136] hwdriver: Scan found 0 devices (voltcraft-vc840).
sr: [00:00.299434] hwdriver: Scan found 0 devices (voltcraft-vc840-ser).
sr: [00:00.299725] hwdriver: Scan found 0 devices (voltcraft-vc870).
sr: [00:00.300156] hwdriver: Scan found 0 devices (voltcraft-vc870-ser).
sr: [00:00.300457] hwdriver: Scan found 0 devices (voltcraft-vc920).
sr: [00:00.300764] hwdriver: Scan found 0 devices (voltcraft-vc920-ser).
sr: [00:00.301061] hwdriver: Scan found 0 devices (voltcraft-vc940).
sr: [00:00.301403] hwdriver: Scan found 0 devices (voltcraft-vc940-ser).
sr: [00:00.301685] hwdriver: Scan found 0 devices (voltcraft-vc96).
sr: [00:00.301955] hwdriver: Scan found 0 devices (voltcraft-vc960).
sr: [00:00.302230] hwdriver: Scan found 0 devices (voltcraft-vc960-ser).
sr: [00:00.302537] hwdriver: Scan found 0 devices (zketech-ebd-usb).
sr: [00:00.302907] hwdriver: sr_config_list(): key 2147418112 (NULL) sdi (nil) cg NULL -> [uint32 20000, 20001]
sr: [00:00.302952] hwdriver: sr_config_list(): key 2147418112 (NULL) sdi (nil) cg NULL -> [uint32 20000, 20001]
sr: [00:00.302966] itech-it8500: Probing serial port: /dev/ttyUSB0
sr: [00:00.302972] serial: Opening serial port '/dev/ttyUSB0' (flags 1).
sr: [00:00.304174] serial: Parsing parameters from "38400/8n1".
sr: [00:00.304224] serial: Got params: rate 38400, frame 8/0/1, flow 0, rts -1, dtr -1.
sr: [00:00.304233] serial: Setting serial parameters on port /dev/ttyUSB0.
sr: [00:00.304333] serial: DBG: serial_set_params() rate 38400, 8n1
sr: [00:00.304347] serial: Flushing serial port /dev/ttyUSB0.
sr: [00:00.304358] serial: Flushing serial port /dev/ttyUSB0.
sr: [00:00.304367] itech-it8500: itech_it8500_send_cmd: Sending command: 6a
sr: [00:00.304482] serial: Wrote 26/26 bytes.
sr: [00:00.319080] serial: Read 26/26 bytes.
sr: [00:00.319099] itech-it8500: itech_it8500_send_cmd: Response packet received: cmd=6a
sr: [00:00.319106] itech-it8500: Model name: 8511A (v1.52)
sr: [00:00.319111] itech-it8500: Address: 0
sr: [00:00.319115] itech-it8500: Serial number: 4757510274
sr: [00:00.319119] itech-it8500: itech_it8500_send_cmd: Sending command: 6b
sr: [00:00.319249] serial: Wrote 26/26 bytes.
sr: [00:00.333800] serial: Read 26/26 bytes.
sr: [00:00.333825] itech-it8500: itech_it8500_send_cmd: Response packet received: cmd=6b
sr: [00:00.333833] itech-it8500: Barcode: 8802110024757510274
sr: [00:00.333838] itech-it8500: itech_it8500_send_cmd: Sending command: 01
sr: [00:00.333960] serial: Wrote 26/26 bytes.
sr: [00:00.348618] serial: Read 26/26 bytes.
sr: [00:00.348639] itech-it8500: itech_it8500_send_cmd: Response packet received: cmd=01
sr: [00:00.348647] itech-it8500: Max current: 30 A
sr: [00:00.348657] itech-it8500: Max power: 200 W
sr: [00:00.348664] itech-it8500: Voltage range: 0,1 - 150,0 V
sr: [00:00.348672] itech-it8500: Resistance range: 0,10 - 7500,00 Ohm
sr: [00:00.348680] itech-it8500: itech_it8500_send_cmd: Sending command: 5f
sr: [00:00.348803] serial: Wrote 26/26 bytes.
sr: [00:00.363480] serial: Read 26/26 bytes.
sr: [00:00.363511] itech-it8500: itech_it8500_send_cmd: Response packet received: cmd=5f
sr: [00:00.363520] itech-it8500: Load status: V=3,8390, I=0,0000, P=0,000, State=OFF, Mode=CC (op=0x11, demand=0x2040)
sr: [00:00.363536] itech-it8500: Mode: CC
sr: [00:00.363542] itech-it8500: State: OFF
sr: [00:00.363549] itech-it8500: Default sample rate: 10 Hz
sr: [00:00.363554] itech-it8500: Maximum sample rate: 60 Hz
sr: [00:00.363566] serial: Closing serial port /dev/ttyUSB0.
sr: [00:00.364163] hwdriver: Scan found 1 devices (itech-it8500).
sr: [00:00.365907] device: itech-it8500: Opening device instance.
sr: [00:00.365934] serial: Opening serial port '/dev/ttyUSB0' (flags 1).
sr: [00:00.367201] serial: Parsing parameters from "38400/8n1".
sr: [00:00.367239] serial: Got params: rate 38400, frame 8/0/1, flow 0, rts -1, dtr -1.
sr: [00:00.367246] serial: Setting serial parameters on port /dev/ttyUSB0.
sr: [00:00.367354] serial: DBG: serial_set_params() rate 38400, 8n1
sr: [00:00.367363] serial: Flushing serial port /dev/ttyUSB0.
sr: [00:00.367371] itech-it8500: itech_it8500_send_cmd: Sending command: 20
sr: [00:00.367470] serial: Wrote 26/26 bytes.
sr: [00:00.382154] serial: Read 26/26 bytes.
sr: [00:00.382177] itech-it8500: itech_it8500_send_cmd: Response packet received: cmd=12
Configurable::init(): Init  "1"  - key  "Under Voltage Condition Threshold"
Configurable::init(): Init  "1"  - key  "Under Voltage Condition Active"
Configurable::init(): Init  "1"  - key  "Under Voltage Condition Enabled"
Configurable::init(): Init  "1"  - key  "Over Temperature Protection Active"
Configurable::init(): Init  "1"  - key  "Over Temperature Protection Enabled"
Configurable::init(): Init  "1"  - key  "Regulation"
sr: [00:00.382425] hwdriver: sr_config_list(): key 30043 (regulation) sdi 0x55df1cc7c820 cg 1 -> ['CC', 'CV', 'CW', 'CR']
Configurable::init(): Init  "1"  - key  "Over Current Protection Threshold"
Configurable::init(): Init  "1"  - key  "Over Current Protection Active"
Configurable::init(): Init  "1"  - key  "Over Current Protection Enabled"
Configurable::init(): Init  "1"  - key  "Over Voltage Protection Threshold"
Configurable::init(): Init  "1"  - key  "Over Voltage Protection Active"
Configurable::init(): Init  "1"  - key  "Over Voltage Protection Enabled"
Configurable::init(): Init  "1"  - key  "Enabled"
Configurable::init(): Init  "1"  - key  "Current Limit"
sr: [00:00.382563] hwdriver: sr_config_list(): key 30032 (current_limit) sdi 0x55df1cc7c820 cg 1 -> [0.0, 30.0, 0.001]
Configurable::init(): Init  "1"  - key  "Current"
Configurable::init(): Init  "1"  - key  "Voltage Target"
sr: [00:00.382621] hwdriver: sr_config_list(): key 30030 (voltage_target) sdi 0x55df1cc7c820 cg 1 -> [0.10000000000000001, 150.0, 0.01]
Configurable::init(): Init  "1"  - key  "Voltage"
Configurable::init(): Init  "ITECH 8511A"  - key  "Samplerate"
Configurable::list_config(): Failed to list config key  "Samplerate" .  not applicable
sr: [00:00.382876] hwdriver: sr_config_get(): key 30000 (samplerate) sdi 0x55df1cc7c820 cg NULL -> uint64 10
Init channel  "V1" , channel_start_timestamp =  "2021.08.23 02:02:47.820"
Init channel  "I1" , channel_start_timestamp =  "2021.08.23 02:02:47.820"
Init channel  "P1" , channel_start_timestamp =  "2021.08.23 02:02:47.820"
Init analog base signal  "V1 [V DC]"
Init analog time signal  "V1 [V DC]" , signal_start_timestamp_ =  "2021.08.23 02:02:47.820"
Init analog base signal  "I1 [A DC]"
Init analog time signal  "I1 [A DC]" , signal_start_timestamp_ =  "2021.08.23 02:02:47.820"
Init analog base signal  "P1 [W]"
Init analog time signal  "P1 [W]" , signal_start_timestamp_ =  "2021.08.23 02:02:47.820"
Init channel  "" , channel_start_timestamp =  "2021.08.23 02:02:47.820"
Init analog base signal  "R1 [Ω]"
Init analog time signal  "R1 [Ω]" , signal_start_timestamp_ =  "2021.08.23 02:02:47.820"
Init channel  "" , channel_start_timestamp =  "2021.08.23 02:02:47.820"
Init analog base signal  "Wh1 [Wh]"
Init analog time signal  "Wh1 [Wh]" , signal_start_timestamp_ =  "2021.08.23 02:02:47.820"
Init channel  "" , channel_start_timestamp =  "2021.08.23 02:02:47.820"
Init analog base signal  "Ah1 [Ah]"
Init analog time signal  "Ah1 [Ah]" , signal_start_timestamp_ =  "2021.08.23 02:02:47.820"
sr: [00:00.383545] session: Creating our own main context.
sr: [00:00.383577] session: Starting.
sr: [00:00.383582] hwdriver: itech-it8500: Starting acquisition.
sr: [00:00.383597] session: bus: Received SR_DF_HEADER packet.
Start aquisition for  "ITECH 8511A" ,  aquisition_start_timestamp_ =  "2021.08.23 02:02:47.820"
BaseDevice::close(): Trying to close device  "ITECH 8511A 1.52 4757510274 (/dev/ttyUSB0)"
sr: [00:00.440322] session: Stopping.
sr: [00:00.440346] hwdriver: itech-it8500: Stopping acquisition.
sr: [00:00.440354] session: bus: Received SR_DF_END packet.
sr: [00:00.440377] session: fd_source_finalize: key 0x55df1c9b8a00
sr: [00:00.440397] session: Stopped.
sr: [00:00.440457] device: itech-it8500: Closing device instance.
sr: [00:00.440470] itech-it8500: itech_it8500_send_cmd: Sending command: 20
sr: [00:00.440593] serial: Wrote 26/26 bytes.
sr: [00:00.455079] serial: Read 26/26 bytes.
sr: [00:00.455100] itech-it8500: itech_it8500_send_cmd: Response packet received: cmd=12
sr: [00:00.455109] serial: Closing serial port /dev/ttyUSB0.
BaseDevice::close(): Device closed  "ITECH 8511A 1.52 4757510274 (/dev/ttyUSB0)"
BaseDevice::~BaseDevice():  "Demo device"
BaseDevice::close(): Trying to close device  "Demo device"
main() failed:  invalid argument

New builds can be found here: https://copr.fedorainfracloud.org/coprs/spike/sigrok/builds/
Should I open a new issue?

@knarfS
Copy link
Owner

knarfS commented Aug 28, 2021

I've looked into this and I think the Itech driver (for whatever reason) returns a SR_ERR_ARG somewhere down the line from api.c, config_get(), which finally throws an exception in the libsigrok C++ bindings (from your log: main() failed: invalid argument).

I've done some experimental changes in SmuView to catch this exception and output some error messages, which will hopefully help us to figure out the root issue.

It would be great, if you would build my SmuView itechbranch (https://github.com/knarfS/smuview/tree/itech) and then attach another log.

@spike77453
Copy link
Author

Sorry, only now got around to doing this:

$ smuview -d itech-it8500:conn=/dev/ttyUSB0:serialcomm=9600/8n1 -l 5
sr: [00:00.000000] log: libsigrok loglevel set to 5.
sr: [00:00.024680] hwdriver: Scan found 0 devices (agilent-dmm).
sr: [00:00.025596] hwdriver: Scan found 0 devices (appa-55ii).
sr: [00:00.045420] hwdriver: Scan found 0 devices (arachnid-labs-re-load-pro).
sr: [00:00.045631] hwdriver: Scan found 0 devices (atten-pps3203).
sr: [00:00.046004] hwdriver: Scan found 0 devices (baylibre-acme).
sr: [00:00.046133] hwdriver: Scan found 0 devices (bbcgm-2010).
sr: [00:00.046246] hwdriver: Scan found 0 devices (brymen-bm25x).
sr: [00:00.046343] serial: Opening serial port 'hid/bu86x' (flags 1).
sr: [00:00.046357] serial-libsp: Error getting port from name hid/bu86x: (2) No such file or directory.
sr: [00:00.046365] hwdriver: Scan found 0 devices (brymen-bm52x).
sr: [00:00.046489] serial: Opening serial port 'hid/bu86x' (flags 1).
sr: [00:00.046502] serial-libsp: Error getting port from name hid/bu86x: (2) No such file or directory.
sr: [00:00.046506] hwdriver: Scan found 0 devices (brymen-bm82x).
sr: [00:00.046724] hwdriver: Scan found 0 devices (brymen-bm85x).
sr: [00:00.046927] serial: Opening serial port 'hid/bu86x' (flags 1).
sr: [00:00.046945] serial-libsp: Error getting port from name hid/bu86x: (2) No such file or directory.
sr: [00:00.046958] hwdriver: Scan found 0 devices (brymen-bm86x).
sr: [00:00.047067] hwdriver: Scan found 0 devices (cem-dt-885x).
sr: [00:00.050703] hwdriver: Scan found 0 devices (center-309).
sr: [00:00.052580] hwdriver: Scan found 0 devices (colead-slm).
sr: [00:00.053086] hwdriver: Scan found 0 devices (conrad-digi-35-cpu).
sr: [00:00.085462] demo: Generating square pattern.
sr: [00:00.085493] demo: Generating sine pattern.
sr: [00:00.085542] demo: Generating triangle pattern.
sr: [00:00.085606] demo: Generating sawtooth pattern.
sr: [00:00.085647] hwdriver: Scan found 1 devices (demo).
sr: [00:00.086587] hwdriver: Scan found 0 devices (deree-de5000).
sr: [00:00.088594] hwdriver: Scan found 0 devices (digitek-dt4000zc).
sr: [00:00.089060] hwdriver: Scan found 0 devices (eevblog-121gw).
sr: [00:00.089451] serial: No serial device specified.
sr: [00:00.101504] hwdriver: Scan found 0 devices (fluke-45).
sr: [00:00.102539] hwdriver: Scan found 0 devices (fluke-dmm).
sr: [00:00.103152] hwdriver: Scan found 0 devices (gmc-mh-1x-2x-rs232).
sr: [00:00.103591] hwdriver: Scan found 0 devices (gmc-mh-2x-bd232).
sr: [00:00.103981] hwdriver: Scan found 0 devices (gwinstek-gdm-397).
sr: [00:00.104356] hwdriver: Scan found 0 devices (gwinstek-gpd).
sr: [00:00.104820] serial: No serial device specified.
sr: [00:00.105008] hwdriver: Scan found 0 devices (hp-3457a).
sr: [00:00.105433] serial: No serial device specified.
sr: [00:00.105444] hwdriver: Scan found 0 devices (hp-59306a).
sr: [00:00.105892] serial: No serial device specified.
sr: [00:00.105905] hwdriver: Scan found 0 devices (hpib-pps).
sr: [00:00.106417] hwdriver: Scan found 0 devices (iso-tech-idm103n).
sr: [00:00.106969] hwdriver: Scan found 0 devices (kecheng-kc-330b).
sr: [00:00.107389] hwdriver: Scan found 0 devices (kern-ew-6200-2nm).
sr: [00:00.107995] hwdriver: Scan found 0 devices (korad-kaxxxxp).
sr: [00:00.108367] hwdriver: Scan found 0 devices (lascar-el-usb).
sr: [00:00.108739] hwdriver: Scan found 0 devices (manson-hcs-3xxx).
sr: [00:00.109148] hwdriver: Scan found 0 devices (mastech-mas345).
sr: [00:00.109454] hwdriver: Scan found 0 devices (mastech-ms2115b).
sr: [00:00.109796] hwdriver: Scan found 0 devices (mastech-ms5308).
sr: [00:00.110265] hwdriver: Scan found 0 devices (mastech-ms6514).
sr: [00:00.110579] hwdriver: Scan found 0 devices (mastech-ms8250b).
sr: [00:00.110895] hwdriver: Scan found 0 devices (mastech-ms8250d).
sr: [00:00.111191] hwdriver: Scan found 0 devices (maynuo-m97).
sr: [00:00.111533] hwdriver: Scan found 0 devices (meterman-38xr).
sr: [00:00.111902] hwdriver: Scan found 0 devices (metex-m3640d).
sr: [00:00.112221] hwdriver: Scan found 0 devices (metex-m3860m).
sr: [00:00.112573] hwdriver: Scan found 0 devices (metex-m4650cr).
sr: [00:00.112884] hwdriver: Scan found 0 devices (metex-me21).
sr: [00:00.113230] hwdriver: Scan found 0 devices (metex-me31).
sr: [00:00.113527] hwdriver: Scan found 0 devices (metrix-mx56c).
sr: [00:00.113896] hwdriver: Scan found 0 devices (mic-98581).
sr: [00:00.114324] hwdriver: Scan found 0 devices (mic-98583).
sr: [00:00.114829] serial: No serial device specified.
sr: [00:00.114851] hwdriver: Scan found 0 devices (motech-lps-301).
sr: [00:00.115239] hwdriver: Scan found 0 devices (norma-dmm).
sr: [00:00.115569] hwdriver: Scan found 0 devices (pce-322a).
sr: [00:00.115880] hwdriver: Scan found 0 devices (pce-pce-dm32).
sr: [00:00.116177] hwdriver: Scan found 0 devices (peaktech-2025).
sr: [00:00.116522] hwdriver: Scan found 0 devices (peaktech-2165).
sr: [00:00.117041] hwdriver: Scan found 0 devices (peaktech-2170).
sr: [00:00.117342] hwdriver: Scan found 0 devices (peaktech-3330).
sr: [00:00.117651] hwdriver: Scan found 0 devices (peaktech-3410).
sr: [00:00.118004] hwdriver: Scan found 0 devices (peaktech-3415).
sr: [00:00.118469] hwdriver: Scan found 0 devices (peaktech-4370).
sr: [00:00.118854] hwdriver: Scan found 0 devices (peaktech-4390a).
sr: [00:00.119214] hwdriver: Scan found 0 devices (radioshack-22-168).
sr: [00:00.119590] hwdriver: Scan found 0 devices (radioshack-22-805).
sr: [00:00.119996] hwdriver: Scan found 0 devices (radioshack-22-812).
sr: [00:00.120358] hwdriver: Scan found 0 devices (rdtech-dps).
sr: [00:00.120683] hwdriver: Scan found 0 devices (rdtech-rd).
sr: [00:00.121007] hwdriver: Scan found 0 devices (rdtech-um).
sr: [00:00.121575] serial: No serial device specified.
sr: [00:00.135775] hwdriver: Scan found 0 devices (rigol-dg).
sr: [00:00.143123] serial: No serial device specified.
sr: [00:00.161778] hwdriver: Scan found 0 devices (rohde-schwarz-sme-0x).
sr: [00:00.175520] serial: No serial device specified.
sr: [00:00.184766] hwdriver: Scan found 0 devices (scpi-dmm).
sr: [00:00.185344] serial: No serial device specified.
sr: [00:00.195354] hwdriver: Scan found 0 devices (scpi-pps).
sr: [00:00.196087] hwdriver: Scan found 0 devices (siemens-b102x).
sr: [00:00.196578] hwdriver: Scan found 0 devices (sparkfun-70c).
sr: [00:00.196922] hwdriver: Scan found 0 devices (tecpel-dmm-8061).
sr: [00:00.197248] hwdriver: Scan found 0 devices (tecpel-dmm-8061-ser).
sr: [00:00.197558] hwdriver: Scan found 0 devices (tekpower-tp4000ZC).
sr: [00:00.198032] hwdriver: Scan found 0 devices (teleinfo).
sr: [00:00.198388] hwdriver: Scan found 0 devices (tenma-72-7730).
sr: [00:00.198804] hwdriver: Scan found 0 devices (tenma-72-7730-ser).
sr: [00:00.199158] hwdriver: Scan found 0 devices (tenma-72-7732).
sr: [00:00.199520] hwdriver: Scan found 0 devices (tenma-72-7732-ser).
sr: [00:00.199858] hwdriver: Scan found 0 devices (tenma-72-7745).
sr: [00:00.200174] hwdriver: Scan found 0 devices (tenma-72-7745-ser).
sr: [00:00.200543] hwdriver: Scan found 0 devices (tenma-72-7750).
sr: [00:00.200845] hwdriver: Scan found 0 devices (tenma-72-7750-ser).
sr: [00:00.201132] hwdriver: Scan found 0 devices (tenma-72-9380a).
sr: [00:00.201424] hwdriver: Scan found 0 devices (tenma-72-9380a-ser).
sr: [00:00.205084] hwdriver: Scan found 0 devices (testo).
sr: [00:00.206007] hwdriver: Scan found 0 devices (tondaj-sl-814).
sr: [00:00.206581] hwdriver: Scan found 0 devices (uni-t-ut181a).
sr: [00:00.207101] hwdriver: Scan found 0 devices (uni-t-ut32x).
sr: [00:00.207662] hwdriver: Scan found 0 devices (uni-t-ut372).
sr: [00:00.208113] hwdriver: Scan found 0 devices (uni-t-ut60a).
sr: [00:00.208496] hwdriver: Scan found 0 devices (uni-t-ut60a-ser).
sr: [00:00.208905] hwdriver: Scan found 0 devices (uni-t-ut60e).
sr: [00:00.209318] hwdriver: Scan found 0 devices (uni-t-ut60e-ser).
sr: [00:00.209753] hwdriver: Scan found 0 devices (uni-t-ut60g).
sr: [00:00.210074] hwdriver: Scan found 0 devices (uni-t-ut60g-ser).
sr: [00:00.210451] hwdriver: Scan found 0 devices (uni-t-ut612).
sr: [00:00.210888] hwdriver: Scan found 0 devices (uni-t-ut61b).
sr: [00:00.211323] hwdriver: Scan found 0 devices (uni-t-ut61b-ser).
sr: [00:00.211796] hwdriver: Scan found 0 devices (uni-t-ut61c).
sr: [00:00.212096] hwdriver: Scan found 0 devices (uni-t-ut61c-ser).
sr: [00:00.212368] hwdriver: Scan found 0 devices (uni-t-ut61d).
sr: [00:00.212688] hwdriver: Scan found 0 devices (uni-t-ut61d-ser).
sr: [00:00.213013] hwdriver: Scan found 0 devices (uni-t-ut61e).
sr: [00:00.213286] hwdriver: Scan found 0 devices (uni-t-ut61e-ser).
sr: [00:00.213548] hwdriver: Scan found 0 devices (uni-t-ut71a).
sr: [00:00.213822] hwdriver: Scan found 0 devices (uni-t-ut71a-ser).
sr: [00:00.214089] hwdriver: Scan found 0 devices (uni-t-ut71b).
sr: [00:00.214343] hwdriver: Scan found 0 devices (uni-t-ut71b-ser).
sr: [00:00.214680] hwdriver: Scan found 0 devices (uni-t-ut71c).
sr: [00:00.214958] hwdriver: Scan found 0 devices (uni-t-ut71c-ser).
sr: [00:00.215214] hwdriver: Scan found 0 devices (uni-t-ut71d).
sr: [00:00.215515] hwdriver: Scan found 0 devices (uni-t-ut71d-ser).
sr: [00:00.215832] hwdriver: Scan found 0 devices (uni-t-ut71e).
sr: [00:00.216100] hwdriver: Scan found 0 devices (uni-t-ut71e-ser).
sr: [00:00.216358] hwdriver: Scan found 0 devices (uni-t-ut804).
sr: [00:00.216724] hwdriver: Scan found 0 devices (uni-t-ut804-ser).
sr: [00:00.217016] hwdriver: Scan found 0 devices (va-va18b).
sr: [00:00.217322] hwdriver: Scan found 0 devices (va-va40b).
sr: [00:00.217587] hwdriver: Scan found 0 devices (velleman-dvm4100).
sr: [00:00.218204] serial: Opening serial port 'hid/victor' (flags 1).
sr: [00:00.218282] serial-libsp: Error getting port from name hid/victor: (13) Permission denied.
sr: [00:00.218308] hwdriver: Scan found 0 devices (victor-dmm).
sr: [00:00.218918] hwdriver: Scan found 0 devices (voltcraft-4080).
sr: [00:00.219327] hwdriver: Scan found 0 devices (voltcraft-k204).
sr: [00:00.219781] hwdriver: Scan found 0 devices (voltcraft-m3650cr).
sr: [00:00.220164] hwdriver: Scan found 0 devices (voltcraft-m3650d).
sr: [00:00.220533] hwdriver: Scan found 0 devices (voltcraft-m4650cr).
sr: [00:00.221015] hwdriver: Scan found 0 devices (voltcraft-me42).
sr: [00:00.221400] hwdriver: Scan found 0 devices (voltcraft-vc820).
sr: [00:00.222198] hwdriver: Scan found 0 devices (voltcraft-vc820-ser).
sr: [00:00.222649] hwdriver: Scan found 0 devices (voltcraft-vc830).
sr: [00:00.223177] hwdriver: Scan found 0 devices (voltcraft-vc830-ser).
sr: [00:00.223605] hwdriver: Scan found 0 devices (voltcraft-vc840).
sr: [00:00.224039] hwdriver: Scan found 0 devices (voltcraft-vc840-ser).
sr: [00:00.224465] hwdriver: Scan found 0 devices (voltcraft-vc870).
sr: [00:00.228368] hwdriver: Scan found 0 devices (voltcraft-vc870-ser).
sr: [00:00.228866] hwdriver: Scan found 0 devices (voltcraft-vc920).
sr: [00:00.229220] hwdriver: Scan found 0 devices (voltcraft-vc920-ser).
sr: [00:00.229548] hwdriver: Scan found 0 devices (voltcraft-vc940).
sr: [00:00.229888] hwdriver: Scan found 0 devices (voltcraft-vc940-ser).
sr: [00:00.230195] hwdriver: Scan found 0 devices (voltcraft-vc96).
sr: [00:00.230504] hwdriver: Scan found 0 devices (voltcraft-vc960).
sr: [00:00.230859] hwdriver: Scan found 0 devices (voltcraft-vc960-ser).
sr: [00:00.231171] hwdriver: Scan found 0 devices (zketech-ebd-usb).
sr: [00:00.231521] hwdriver: sr_config_list(): key 2147418112 (NULL) sdi (nil) cg NULL -> [uint32 20000, 20001]
sr: [00:00.231613] hwdriver: sr_config_list(): key 2147418112 (NULL) sdi (nil) cg NULL -> [uint32 20000, 20001]
sr: [00:00.231630] itech-it8500: Probing serial port: /dev/ttyUSB0
sr: [00:00.231649] serial: Opening serial port '/dev/ttyUSB0' (flags 1).
sr: [00:00.232895] serial: Parsing parameters from "9600/8n1".
sr: [00:00.232946] serial: Got params: rate 9600, frame 8/0/1, flow 0, rts -1, dtr -1.
sr: [00:00.232957] serial: Setting serial parameters on port /dev/ttyUSB0.
sr: [00:00.233440] serial: DBG: serial_set_params() rate 9600, 8n1
sr: [00:00.233453] serial: Flushing serial port /dev/ttyUSB0.
sr: [00:00.233464] serial: Flushing serial port /dev/ttyUSB0.
sr: [00:00.233473] itech-it8500: itech_it8500_send_cmd: Sending command: 6a
sr: [00:00.233584] serial: Wrote 26/26 bytes.
sr: [00:00.289304] serial: Read 26/26 bytes.
sr: [00:00.289329] itech-it8500: itech_it8500_send_cmd: Response packet received: cmd=6a
sr: [00:00.289341] itech-it8500: Model name: 8511A (v1.52)
sr: [00:00.289352] itech-it8500: Address: 0
sr: [00:00.289360] itech-it8500: Serial number: 4757510274
sr: [00:00.289369] itech-it8500: itech_it8500_send_cmd: Sending command: 6b
sr: [00:00.289498] serial: Wrote 26/26 bytes.
sr: [00:00.345131] serial: Read 26/26 bytes.
sr: [00:00.345171] itech-it8500: itech_it8500_send_cmd: Response packet received: cmd=6b
sr: [00:00.345182] itech-it8500: Barcode: 8802110024757510274
sr: [00:00.345190] itech-it8500: itech_it8500_send_cmd: Sending command: 01
sr: [00:00.345339] serial: Wrote 26/26 bytes.
sr: [00:00.401039] serial: Read 26/26 bytes.
sr: [00:00.401068] itech-it8500: itech_it8500_send_cmd: Response packet received: cmd=01
sr: [00:00.401079] itech-it8500: Max current: 30 A
sr: [00:00.401090] itech-it8500: Max power: 200 W
sr: [00:00.401099] itech-it8500: Voltage range: 0,1 - 150,0 V
sr: [00:00.401110] itech-it8500: Resistance range: 0,10 - 7500,00 Ohm
sr: [00:00.401121] itech-it8500: itech_it8500_send_cmd: Sending command: 5f
sr: [00:00.401249] serial: Wrote 26/26 bytes.
sr: [00:00.456976] serial: Read 26/26 bytes.
sr: [00:00.456997] itech-it8500: itech_it8500_send_cmd: Response packet received: cmd=5f
sr: [00:00.457003] itech-it8500: Load status: V=0,0000, I=0,0000, P=0,000, State=OFF, Mode=CC (op=0x11, demand=0x0040)
sr: [00:00.457023] itech-it8500: Mode: CC
sr: [00:00.457028] itech-it8500: State: OFF
sr: [00:00.457032] itech-it8500: Default sample rate: 10 Hz
sr: [00:00.457037] itech-it8500: Maximum sample rate: 15 Hz
sr: [00:00.457046] serial: Closing serial port /dev/ttyUSB0.
sr: [00:00.457685] hwdriver: Scan found 1 devices (itech-it8500).
sr: [00:00.486719] device: itech-it8500: Opening device instance.
sr: [00:00.486750] serial: Opening serial port '/dev/ttyUSB0' (flags 1).
sr: [00:00.491219] serial: Parsing parameters from "9600/8n1".
sr: [00:00.491283] serial: Got params: rate 9600, frame 8/0/1, flow 0, rts -1, dtr -1.
sr: [00:00.491291] serial: Setting serial parameters on port /dev/ttyUSB0.
sr: [00:00.491494] serial: DBG: serial_set_params() rate 9600, 8n1
sr: [00:00.491516] serial: Flushing serial port /dev/ttyUSB0.
sr: [00:00.491536] itech-it8500: itech_it8500_send_cmd: Sending command: 20
sr: [00:00.491815] serial: Wrote 26/26 bytes.
sr: [00:00.547484] serial: Read 26/26 bytes.
sr: [00:00.547504] itech-it8500: itech_it8500_send_cmd: Response packet received: cmd=12
Configurable::init(): Init  "1"  - key  "Under Voltage Condition Threshold"
Configurable::init(): Init  "1"  - key  "Under Voltage Condition Active"
Configurable::init(): Init  "1"  - key  "Under Voltage Condition Enabled"
Configurable::init(): Init  "1"  - key  "Over Temperature Protection Active"
Configurable::init(): Init  "1"  - key  "Over Temperature Protection Enabled"
Configurable::init(): Init  "1"  - key  "Regulation"
sr: [00:00.547848] hwdriver: sr_config_list(): key 30043 (regulation) sdi 0x55a7b6184eb0 cg 1 -> ['CC', 'CV', 'CW', 'CR']
Configurable::init(): Init  "1"  - key  "Over Current Protection Threshold"
Configurable::init(): Init  "1"  - key  "Over Current Protection Active"
Configurable::init(): Init  "1"  - key  "Over Current Protection Enabled"
Configurable::init(): Init  "1"  - key  "Over Voltage Protection Threshold"
Configurable::init(): Init  "1"  - key  "Over Voltage Protection Active"
Configurable::init(): Init  "1"  - key  "Over Voltage Protection Enabled"
Configurable::init(): Init  "1"  - key  "Enabled"
Configurable::init(): Init  "1"  - key  "Current Limit"
sr: [00:00.547981] hwdriver: sr_config_list(): key 30032 (current_limit) sdi 0x55a7b6184eb0 cg 1 -> [0.0, 30.0, 0.001]
Configurable::init(): Init  "1"  - key  "Current"
Configurable::init(): Init  "1"  - key  "Voltage Target"
sr: [00:00.548053] hwdriver: sr_config_list(): key 30030 (voltage_target) sdi 0x55a7b6184eb0 cg 1 -> [0.10000000000000001, 150.0, 0.01]
Configurable::init(): Init  "1"  - key  "Voltage"
Configurable::init(): Init  "ITECH 8511A"  - key  "Samplerate"
Configurable::list_config(): Failed to list config key  "Samplerate" .  not applicable
sr: [00:00.548265] hwdriver: sr_config_get(): key 30000 (samplerate) sdi 0x55a7b6184eb0 cg NULL -> uint64 10
Init channel  "V1" , channel_start_timestamp =  "2021.09.10 17:02:40.388"
Init channel  "I1" , channel_start_timestamp =  "2021.09.10 17:02:40.388"
Init channel  "P1" , channel_start_timestamp =  "2021.09.10 17:02:40.388"
Init analog base signal  "V1 [V DC]"
Init analog time signal  "V1 [V DC]" , signal_start_timestamp_ =  "2021.09.10 17:02:40.388"
Init analog base signal  "I1 [A DC]"
Init analog time signal  "I1 [A DC]" , signal_start_timestamp_ =  "2021.09.10 17:02:40.388"
Init analog base signal  "P1 [W]"
Init analog time signal  "P1 [W]" , signal_start_timestamp_ =  "2021.09.10 17:02:40.388"
Init channel  "" , channel_start_timestamp =  "2021.09.10 17:02:40.388"
Init analog base signal  "R1 [Ω]"
Init analog time signal  "R1 [Ω]" , signal_start_timestamp_ =  "2021.09.10 17:02:40.388"
Init channel  "" , channel_start_timestamp =  "2021.09.10 17:02:40.388"
Init analog base signal  "Wh1 [Wh]"
Init analog time signal  "Wh1 [Wh]" , signal_start_timestamp_ =  "2021.09.10 17:02:40.388"
Init channel  "" , channel_start_timestamp =  "2021.09.10 17:02:40.388"
Init analog base signal  "Ah1 [Ah]"
Init analog time signal  "Ah1 [Ah]" , signal_start_timestamp_ =  "2021.09.10 17:02:40.388"
sr: [00:00.548791] session: Creating our own main context.
sr: [00:00.548824] session: Starting.
sr: [00:00.548831] hwdriver: itech-it8500: Starting acquisition.
sr: [00:00.548848] session: bus: Received SR_DF_HEADER packet.
Start aquisition for  "ITECH 8511A" ,  aquisition_start_timestamp_ =  "2021.09.10 17:02:40.388"
BaseDevice::close(): Trying to close device  "ITECH 8511A 1.52 4757510274 (/dev/ttyUSB0)"
sr: [00:00.608892] session: Stopping.
sr: [00:00.608909] hwdriver: itech-it8500: Stopping acquisition.
sr: [00:00.608915] session: bus: Received SR_DF_END packet.
sr: [00:00.608932] session: fd_source_finalize: key 0x55a7b5ec6d50
sr: [00:00.608948] session: Stopped.
sr: [00:00.608999] device: itech-it8500: Closing device instance.
sr: [00:00.609010] itech-it8500: itech_it8500_send_cmd: Sending command: 20
sr: [00:00.609188] serial: Wrote 26/26 bytes.
sr: [00:00.664799] serial: Read 26/26 bytes.
sr: [00:00.664820] itech-it8500: itech_it8500_send_cmd: Response packet received: cmd=12
sr: [00:00.664835] serial: Closing serial port /dev/ttyUSB0.
BaseDevice::close(): Device closed  "ITECH 8511A 1.52 4757510274 (/dev/ttyUSB0)"
BaseDevice::~BaseDevice():  "Demo device"
BaseDevice::close(): Trying to close device  "Demo device"
main() failed:  invalid argument

I've built the 871df34 commit (which is the current head of the itech branch): https://copr.fedorainfracloud.org/coprs/spike/sigrok/builds/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants