Hi all,

I'm trying to get my DSLogic LA to work under FreeBSD.
I downloaded libsigrok, libsigrok-decode and sigrok-cli from GitHub and
built them.
It is possible to scan for devices, but I cannot manage to get samples from
the device:

% sigrok-cli -d dreamsourcelab-dslogic --scan
The following devices were found:
dreamsourcelab-dslogic - DreamSourceLab DSLogic Pro with 16 channels: 0 1 2
3 4 5 6 7 8 9 10 11 12 13 14 15

% sigrok-cli -d dreamsourcelab-dslogic --samples 1k
sr: dreamsourcelab-dslogic: Device failed to renumerate.

The same error is when I try to use Saleae clone with sigrok built from
GitHub:
% sigrok-cli -d fx2lafw --samples 1k
sr: fx2lafw: Device failed to renumerate.

That device works with sigrok from FreeBSD ports:
% sigrok-cli --version
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).

% sigrok-cli -d fx2lafw --samples 1k
libsigrok 0.3.0
Acquisition with 8/8 channels at 20 kHz
0:11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111
1:11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111
2:11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111
3:11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111
4:00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
...

I need the newer version because older one doesn't support DSLogic.
The same behavior is observed with FreeBSD 11.1-RELEASE and -CURRENT.
Under Linux my DSLogic works as expected.

version:
sigrok-cli 0.8.0-git-7c765fc

Libraries and features:
- libsigrok 0.6.0-git-79100d4e/4:0:0 (rt: 0.6.0-git-79100d4e/4:0:0).
 - Libs:
  - glib 2.50.2 (rt: 2.50.2/5002:2)
  - libzip 1.3.0
  - libserialport 0.1.1/1:0:1 (rt: 0.1.1/1:0:1)
  - libusb-1.0
  - Host: amd64-unknown-freebsd11.1, little-endian.
  - SCPI backends: TCP, RPC, serial, USBTMC.
- libsigrokdecode 0.6.0-git-a2860c1/4:0:0 (rt: 0.6.0-git-a2860c1/4:0:0).
 - Libs:
  - glib 2.50.2 (rt: 2.50.2/5002:2)
  - Python 3.6.2 / 0x30602f0 (API 1013, ABI 3)
  - Host: amd64-unknown-freebsd11.1, little-endian.

These are the steps which I took to build sigrok:
export TGT=$HOME/.opt/la_sigrok
# pkg install libserialport
rm -rf $TGT/*

cd libserialport
make clean
./autogen.sh
./configure --prefix=$TGT
make -j4 install
cd ..

cd libsigrok
make clean
./autogen.sh
./configure --prefix=$TGT --enable-bindings=no --enable-cxx
# link with FreeBSD version of libusb
sed -i.bak 's/^LIBSIGROK_LIBS = /LIBSIGROK_LIBS = -lusb /' Makefile
make -j4 install
cd ..

cd libsigrokdecode
make clean
./autogen.sh
PKG_CONFIG_PATH=$TGT/lib/pkgconfig ./configure --prefix=$TGT
make -j4 install
cd ..

cd sigrok-cli
make clean
./autogen.sh
PKG_CONFIG_PATH=$TGT/lib/pkgconfig ./configure --prefix=$TGT
make -j4 install
cd ..

# run command:
SIGROK_FIRMWARE_DIR=$HOME/src/la_sigrok/old/share/sigrok-firmware
LD_LIBRARY_PATH=$HOME/.opt/la_sigrok/lib ~/.opt/la_sigrok/bin/sigrok-cli -d
dreamsourcelab-dslogic --scan

As far I can tell, the problem is that sdi->connection_id is an empty
string, so check "if (strcmp(sdi->connection_id, connection_id)" in
dslogic_dev_open() will always fail.
"connection_id" depends on USB ports on which LA is connected, but it is
something like "usb/0-1.2" on my PC and OS (that is when LA is connected as
/dev/ugen0.6).

But I don't know how to fix that. I presume that the problem is something
in my way of compiling the sigrok (because version from the ports works).

Any idea would be appreciated, thanks!
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
sigrok-devel mailing list
sigrok-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sigrok-devel

Reply via email to