0

Here is what I have done: -

1. Clean install of Windows 10 (Running in Oracle VirtualBox)
    a. Version 20H2 (OS Build 19042.685)
2. Install MSYS2
    a. https://www.msys2.org/ (Main website)
    b. Download installer
        i. https://repo.msys2.org/distrib/x86_64/msys2-x86_64-20201109.exe
        ii. msys2-x86_64-20201109.exe
    c. Run installer
        i. Install location "C:\msys64"
3. Setup MSYS2 (Run in MSYS2 shell)
    a. Update the package database and core system packages
        i. pacman -Syu
    b. Close MSYS2 and re-run
        i. pacman -Su
    c. Install the required packages
        i. pacman -Sy git  autoconf automake libtool gcc binutils make pkg-config
4. Download libserialport source code (Run in MSYS2 shell)
    a. cd C:\Code
    b. git clone git://sigrok.org/libserialport
    c. cd libserialport
    d. ./autogen.sh
    e. ./configure
    f. make
    g. make install (Not "sudo make install" as "bash: sudo: command not found")
5. Compile examples
    a. cd examples/
    b. Make
6. Copy required DLLs
    a. Copy "msys-serialport-0.dll"
        i. From "C:\Code\libserialport\.libs"
        ii. To "C:\Code\libserialport\examples"
    b. Copy "msys-2.0.dll"
        i. From "C:\msys64\usr\bin"
        ii. To "C:\Code\libserialport\examples"
7. Run examples
    a. cd C:\Code\libserialport\examples
    b. dir
    c. list_ports

Error: -

C:\Code\libserialport\examples>list_ports
Getting port list.
sp_list_ports() failed!

I have an FTDI USB cable attached, USB Serial Port (COM3)

I am not sure how to proceed, I have tried the code on my main computer (not a virtual machine) and the same error...

SYM2020
  • 23
  • 3

1 Answers1

0

I have now tried on the same computer running Manjaro: -

sudo pacman -S git gcc make autoconf automake libtool
cd ~/Downloads
git clone git://sigrok.org/libserialport
cd libserialport/
./autogen.sh
./configure
make
sudo make install

Compile examples and run list-ports: -

cd examples/
echo $PKG_CONFIG_PATH
export PKG_CONFIG_PATH=/home/pauls/Downloads/libserialport/
echo $PKG_CONFIG_PATH
make
ls
./list_ports

Error:

./list_ports: error while loading shared libraries: libserialport.so.0: cannot open shared object file: No such file or directory

I am still using an FTDI serial cable...

Update: -

pamac install libserialport
pacman -S libserialport
cd ~/Downloads/libserialport/examples/
./list_ports

Output: -

Getting port list.
Found port: /dev/ttyUSB0
Found 1 ports.
Freeing port list.

Why did it not install after compiling the library??

SYM2020
  • 23
  • 3