I do not see a problem with your lsusb output. It lists the correct vendor/product id. Just because lsusb does not recognize the ID does not mean the USB device was not recognized. If you are not convinced, try comparing the lsusb -v output with the output posted here (https://sigrok.org/wiki/Brymen_BU-86X/Info).
Does it work if you try:
# sigrok-cli -d brymen-bm86x:conn=0820.0001 --scan
This might work because it apparently expects a conn parameter, and the vendor/product id is the only relevant parameter for a HID device. For an emulated RS-232 port it might be the tty device. See the sigrok-cli man page for some information about the conn= parameter.
alm, thanks for your comment.
I do not see a problem with your lsusb output. It lists the correct vendor/product id.
I was a bit confused by this comment at first, but I think I understand what you mean. The device is being shown on the first line of the output, but because there was no description it was not obvious and I missed it.
Just because lsusb does not recognize the ID does not mean the USB device was not recognized. If you are not convinced, try comparing the lsusb -v output with the output posted here (https://sigrok.org/wiki/Brymen_BU-86X/Info).
Ok, lsusb -v does indeed produce a device descriptor entry with the same ID - 0820:0001, but unlike the entry in the sigrok wiki, there is no iManufacturer and iProduct entry:
Bus 002 Device 019: ID 0820:0001
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 8
idVendor 0x0820
idProduct 0x0001
bcdDevice 86.03
iManufacturer 1
iProduct 2
iSerial 3
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 34
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xa0
(Bus Powered)
Remote Wakeup
MaxPower 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 0 No Subclass
bInterfaceProtocol 0 None
iInterface 0
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.10
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 44
Report Descriptors:
** UNAVAILABLE **
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0008 1x 8 bytes
bInterval 10
In all other respects the entry is similar.
Does it work if you try:
# sigrok-cli -d brymen-bm86x:conn=0820.0001 --scan
Well the --scan command does seem to work:
$ sigrok-cli -d brymen-bm86x:conn=0820.0001 --scan
The following devices were found:
brymen-bm86x - Brymen BM869 with 2 channels: P1 P2
Segmentation fault
Nothing else does. For example (as root):
# sigrok-cli -d brymen-bm86x:conn=0820.0001 --show
brymen-bm86x - Brymen BM869 with 2 channels: P1 P2
Supported driver options:
conn
Supported configuration options:
sr: brymen-bm86x: Failed to release interface 0: LIBUSB_ERROR_NOT_FOUND.
Segmentation fault
# sigrok-cli -d brymen-bm86x:conn=0820.0001 --samples=10
#
It was installed from the MINT repository using:
apt-get install sigrok
apt-get install pulseview
Version details as follows:
$ sigrok-cli -V |more
sigrok-cli 0.5.0
Using libsigrok 0.3.0 (lib version 2:0:0).
Using libsigrokdecode 0.3.0 (lib version 2:0:0).
Supported hardware drivers:
agilent-dmm Agilent U12xx series DMMs
appa-55ii APPA 55II
...
brymen-bm857 Brymen BM857[/color]
brymen-bm86x Brymen BM86X
...
Just in case it has any bearing, here are my system details:
System: Host: agabus Kernel: 4.4.0-53-generic x86_64 (64 bit gcc: 5.4.0)
Desktop: Cinnamon 3.2.6 (Gtk 3.18.9-1ubuntu3.1) dm: mdm Distro: Linux Mint 18.1 Serena
Machine: Mobo: ASUSTeK model: P8H61-M PRO v: Rev x.0x
Bios: American Megatrends v: 4802 date: 09/18/2013
CPU: Quad core Intel Core i7-2600 (-HT-MCP-) cache: 8192 KB
flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 27132
clock speeds: min/max: 1600/3800 MHz 1: 1737 MHz 2: 1915 MHz 3: 1854 MHz 4: 1900 MHz
5: 1728 MHz 6: 2436 MHz 7: 1897 MHz 8: 2202 MHz
Graphics: Card: NVIDIA GT218 [GeForce 210] bus-ID: 01:00.0 chip-ID: 10de:0a65
Display Server: X.Org 1.18.4 drivers: nouveau (unloaded: fbdev,vesa)
Resolution: 1920x1080@60.00hz
Yes that was the problem. Soon after I posted those version numbers I checked on the sigrok site and confirmed that these were out of date. The latest versions according to the sigrok website are:
libsigrok 0.5.0
libsigrokdecode 0.5.0
sigrok-cli 0.7.0
pulseview 0.4.0
So, I removed the old versions using apt-get remove and apt-get autoremove to remove unwanted dependencies, and set about compiling and installing the latest versions from source. It has taken me several hours to get through various issues including a problem with the gcc installation (needed to install gcc-multilib) and some missing libraries. I haven't got pulseview compiled yet, but I eventually got sigrok-cli and its supporting libraries (libsigrok, libsigrokdecode and libserialport) installed and compiled. I was able to use libusb from the repository. :phew:
Having done that, I ran sigrok-cli again and it now seems to work OK:
$ sigrok-cli -d brymen-bm86x:conn=0820.0001 --scan
The following devices were found:
brymen-bm86x - Brymen BM869 with 2 channels: P1 P2
$ sudo sigrok-cli -d brymen-bm86x:conn=0820.0001 --show
[sudo] password for johnc:
Driver functions:
Multimeter
Continuous sampling
Sample limit
Time limit
Scan options:
conn
brymen-bm86x - Brymen BM869 with 2 channels: P1 P2
Supported configuration options:
(null):
continuous: on, off
limit_samples: 0 (current)
limit_time: 0 (current)
$ sudo sigrok-cli -d brymen-bm86x:conn=0820.0001 --samples 10
P1: 1.6 mV DC AUTO
P1: 1.6 mV DC AUTO
P1: -1.6 mV DC AUTO
P1: -1.5 mV DC AUTO
P1: 1.4 mV DC AUTO
P1: 1.3 mV DC AUTO
P1: -1.2 mV DC AUTO
P1: -1.1 mV DC AUTO
P1: -1.0 mV DC AUTO
P1: 0.9 mV DC AUTO
That's much better! :-DMM Everything seems to work and no segmentation errors.
With this report I hope I will save some trouble to those who will try next, and reassure everybody that even on the latest firmware revision everything still works fine. Also I want to encourage more noobs like me to try sigrok, I think it's a great project.
I have just tried installing sigrok-cli and making it work with my BM869s. My system is a Ubuntu 20.04.2 LTS (Focal Fossa) running Kernel 5.8.0-43-generic, and straight from Ubuntu repositories with
$ sudo apt install sigrok-cli
I get this version
$ sigrok-cli -V
sigrok-cli 0.7.1
Libraries and features:
- libsigrok 0.5.1/5:0:1 (rt: 0.5.2/5:1:1).
- Libs:
- glib 2.63.5 (rt: 2.64.6/6406:6)
- libzip 1.5.1
- 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
- bluez 5.52
- libftdi 1.4
- Host: x86_64-pc-linux-gnu, little-endian.
- SCPI backends: TCP, RPC, serial, USBTMC.
- libsigrokdecode 0.5.2/6:0:2 (rt: 0.5.3/6:1:2).
- Libs:
- glib 2.63.3 (rt: 2.64.6/6406:6)
- Python 3.8.1 / 0x30801f0 (API 1013, ABI 3)
- Host: x86_64-pc-linux-gnu, little-endian.
My DMM is a BM869s with firmware 869-PA (the one after P9, it's hex) and this is the output from lsusb
$ lsusb -v
Bus 001 Device 005: ID 0820:0001
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 8
idVendor 0x0820
idProduct 0x0001
bcdDevice 86.05
iManufacturer 1 Brymen
iProduct 2 Superior DMM
iSerial 3 Ďᄂ
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x0029
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xc0
Self Powered
MaxPower 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 0
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.11
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 30
Report Descriptors:
** UNAVAILABLE **
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 1
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 1
can't get device qualifier: Resource temporarily unavailable
can't get debug descriptor: Resource temporarily unavailable
Device Status: 0x0001
Self Powered
finally, sigrok can find my DMM
$ 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
and upon closer inspection, everything looks fine
$ sigrok-cli --driver=brymen-bm86x --show
Driver functions:
Multimeter
Scan options:
conn
serialcomm
brymen-bm86x - Brymen BM86x with 2 channels: P1 P2
Supported configuration options:
continuous: on, off
limit_samples:
limit_time:
Beware, at first I thought the correct way to address my DMM was
$ sigrok-cli --driver=brymen-bm86x:conn=0820.0001 --show
which unfortunately results in
$ sigrok-cli --driver=brymen-bm86x:conn=0820.0001 --show
Driver functions:
Multimeter
Scan options:
conn
serialcomm
sr: serial-libsp: Attempt to open serial port with invalid parameters.
No devices found.
and also
$ sigrok-cli --driver=brymen-bm86x:conn=0820.0001 --samples=10
sr: serial-libsp: Attempt to open serial port with invalid parameters.
No devices found.
I suppose the reason is that it forces a wrong type of connection (serial). The man page states:
Drivers communicating with hardware via a serial port always need the port specified as the conn option. For example, to use the Openbench Logic Sniffer:
$ sigrok-cli --driver=ols:conn=/dev/ttyACM0 [...]
Some USB devices don't use a unique VendorID/ProductID combination, and thus need that specified as well. This also uses the conn option, using either VendorID.ProductID or bus.address:
USB VendorID.ProductID example:
$ sigrok-cli --driver=uni-t-ut61e:conn=1a86.e008 [...]
USB bus.address example:
$ sigrok-cli --driver=uni-t-ut61e:conn=4.6 [...]
This works correctly
$ sigrok-cli --driver=brymen-bm86x --samples=3
P1: 0.1 mV DC AUTO
P2: 172 mV AC
P1: 0.1 mV DC AUTO
P2: 172 mV AC
P1: 0.1 mV DC AUTO
P2: 172 mV AC
Compiling from source (stable) gives a similar installation, while using the nightly image provides a more up-to-date version:
$ ~/Downloads/sigrok/source/sigrok-cli-NIGHTLY-x86_64.AppImage -V
sigrok-cli 0.8.0-git-a23df11
Libraries and features:
- libsigrok 0.6.0-git-1c5d590/4:0:0 (rt: 0.6.0-git-1c5d590/4:0:0).
- Libs:
- glib 2.48.2 (rt: 2.64.6/6406:6)
- libzip 1.0.1
- libserialport 0.1.1/1:0:1 (rt: 0.1.1/1:0:1)
- libusb-1.0 1.0.23.11397 API 0x01000104
- hidapi 0.8.0-rc1
- bluez 5.37
- libftdi 1.2
- Host: x86_64-pc-linux-gnu, little-endian.
- SCPI backends: TCP, RPC, serial, USBTMC.
- libsigrokdecode 0.6.0-git-88b6260/4:0:0 (rt: 0.6.0-git-88b6260/4:0:0).
- Libs:
- glib 2.48.2 (rt: 2.64.6/6406:6)
- Python 3.5.2 / 0x30502f0 (API 1013, ABI 3)
- Host: x86_64-pc-linux-gnu, little-endian.
$ LD_LIBRARY_PATH=/opt/sigrok/lib /opt/sigrok/bin/sigrok-cli -V
sigrok-cli 0.7.1
Libraries and features:
- libsigrok 0.5.2/5:1:1 (rt: 0.5.2/5:1:1).
- Libs:
- glib 2.64.6 (rt: 2.64.6/6406:6)
- libzip 1.5.1
- 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
- librevisa 0.0.20130812
- Host: x86_64-pc-linux-gnu, little-endian.
- SCPI backends: TCP, RPC, serial, VISA, USBTMC.
- libsigrokdecode 0.5.3/6:1:2 (rt: 0.5.3/6:1:2).
- Libs:
- glib 2.64.6 (rt: 2.64.6/6406:6)
- Python 3.8.5 / 0x30805f0 (API 1013, ABI 3)
- Host: x86_64-pc-linux-gnu, little-endian.
On the other hand, the stable AppImage did not work for my DMM:
$ ~/Downloads/sigrok/source/sigrok-cli-0.7.1-x86_64.AppImage -V
sigrok-cli 0.7.1
Libraries and features:
- libsigrok 0.5.1/5:0:1 (rt: 0.5.1/5:0:1).
- Libs:
- glib 2.40.2 (rt: 2.64.6/6406:6)
- libzip 0.10.1
- libserialport 0.1.1/1:0:1 (rt: 0.1.1/1:0:1)
- libusb-1.0 1.0.23.11397 API 0x01000102
- libftdi 1.2
- Host: x86_64-unknown-linux-gnu, little-endian.
- SCPI backends: TCP, RPC, serial, USBTMC.
- libsigrokdecode 0.5.2/6:0:2 (rt: 0.5.2/6:0:2).
- Libs:
- glib 2.40.2 (rt: 2.64.6/6406:6)
- Python 3.4.3 / 0x30403f0 (API 1013, ABI 3)
- Host: x86_64-unknown-linux-gnu, little-endian.
$ ~/Downloads/sigrok/source/sigrok-cli-0.7.1-x86_64.AppImage --driver=brymen-bm86x --show
Driver functions:
Multimeter
Scan options:
conn
brymen-bm86x - Brymen BM869 with 2 channels: P1 P2
Supported configuration options:
continuous: on, off
limit_samples: 0 (current)
limit_time: 0 (current)
sr: brymen-bm86x: Failed to release interface 0: LIBUSB_ERROR_NOT_FOUND.
Segmentation fault (core dumped)
$ ~/Downloads/sigrok/source/sigrok-cli-0.7.1-x86_64.AppImage --driver=brymen-bm86x --samples=3
sr: brymen-bm86x: HID feature report error: LIBUSB_ERROR_PIPE.
Notes: it's important to set rules to access the hardware. Rules can be found here https://sigrok.org/gitweb/?p=libsigrok.git;a=tree;f=contrib (https://sigrok.org/gitweb/?p=libsigrok.git;a=tree;f=contrib) and can be loaded through
udevadm control --reload-rules && udevadm trigger
Building from source is well documented on the wiki, the only step I had trouble with is to make this little change before compiling
https://sigrok.org/bugzilla/attachment.cgi?id=580
this was a fixed bug which was still unfixed in the version I downloaded.