无法连接到Linux中的USB设备(Emotiv neuroheadset)

时间:2014-09-30 22:44:35

标签: c linux usb driver hardware

我有一个情感耳机,我正在尝试使用它的开源驱动程序。该设备在usbls中列出,但不能与设备进行通信。在驱动程序的可执行文件上运行strace导致我怀疑某些库可能会丢失,但我不能谷歌找出哪些库。

我正在使用以下示例程序:

#include <stdio.h>
#include <string.h>
#include <signal.h>
#include "emokit/emokit.h"

int quit;
void cleanup(int i){
        fprintf(stdout,"Shutting down\n");
        quit=1; 
}

int main(int argc, char **argv)
{
        struct emokit_device* d;
        signal(SIGINT, cleanup); //trap cntrl c


        quit=0;

        d = emokit_create();
        int count=emokit_get_count(d, EMOKIT_VID, EMOKIT_PID);
        printf("Current epoc devices connected: %d\n", count );
        int r = emokit_open(d, EMOKIT_VID, EMOKIT_PID, 1);
        if(r != 0)
        {
                emokit_close(d);
                emokit_delete(d);
                d = emokit_create();
                r = emokit_open(d, EMOKIT_VID, EMOKIT_PID, 0);
                if (r!=0) {
                        printf("CANNOT CONNECT: %d\n", r);
                        return 1;
                }
        }
        printf("Connected to headset.\n");

        if (emokit_read_data(d)<=0) {
                printf("Error reading from headset\n");
                emokit_close(d);
                emokit_delete(d);
                return 1;
        }

        struct emokit_frame c;
        while (!quit) {
                if(emokit_read_data(d) > 0) {
                        c = emokit_get_next_frame(d);
                        fprintf(stdout,"\033[H\033[2JPress CTRL+C to exit\n\nContact quality:\nF3  %4d\nFC6 %4d\nP7  %4d\nT8  %4d\nF7  %4d\nF8  %4d\nT7  %4d\nP8  %4d\nAF4 %4d\nF4  %4d\nAF3 %4d\nO2  %4d\nO1  %4d\nFC5 %4d",c.cq.F3, c.cq.FC6, c.cq.P7, c.cq.T8,c.cq.F7, c.cq.F8, c.cq.T7, c.cq.P8, c.cq.AF4, c.cq.F4, c.cq.AF3, c.cq.O2, c.cq.O1, c.cq.FC5);
                        fflush(stdout);
                } 
        }
        emokit_close(d);
        emokit_delete(d);
        return 0;
}

尝试在

中运行结果
./contact 
Current epoc devices connected: 0
CANNOT CONNECT: -3
然而,usb加密狗是由我的Ubuntu mint 14.04正确识别并列于 lsusb as

Bus 002 Device 004: ID 1234:ed02 Brain Actuated Technologies Emotiv EPOC Developer Headset Wireless Dongle

下面的strace结果让我想到我的系统中必须缺少某些东西(根据strace中“没有这样的文件或目录”行数来判断)

sudo strace ./contact
[sudo] password for user: 
execve("./contact", ["./contact"], [/* 17 vars */]) = 0
brk(0)                                  = 0xe16000
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f7ebe8bc000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/usr/local/lib/tls/x86_64/libmcrypt.so.4", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/local/lib/tls/x86_64", 0x7fffd58225d0) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/tls/libmcrypt.so.4", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/local/lib/tls", 0x7fffd58225d0) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/x86_64/libmcrypt.so.4", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/local/lib/x86_64", 0x7fffd58225d0) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/libmcrypt.so.4", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/local/lib", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=155101, ...}) = 0
mmap(NULL, 155101, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f7ebe896000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/usr/lib/libmcrypt.so.4", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0@S\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=187824, ...}) = 0
mmap(NULL, 2306080, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f7ebe468000
mprotect(0x7f7ebe492000, 2097152, PROT_NONE) = 0
mmap(0x7f7ebe692000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2a000) = 0x7f7ebe692000
mmap(0x7f7ebe696000, 20512, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f7ebe696000
close(3)                                = 0
open("/usr/local/lib/libhidapi-hidraw.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64-linux-gnu/libhidapi-hidraw.so.0", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\27\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=14648, ...}) = 0
mmap(NULL, 2109856, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f7ebe264000
mprotect(0x7f7ebe267000, 2093056, PROT_NONE) = 0
mmap(0x7f7ebe466000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7f7ebe466000
close(3)                                = 0
open("/usr/local/lib/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\320\37\2\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1845024, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f7ebe895000
mmap(NULL, 3953344, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f7ebde9e000
mprotect(0x7f7ebe059000, 2097152, PROT_NONE) = 0
mmap(0x7f7ebe259000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1bb000) = 0x7f7ebe259000
mmap(0x7f7ebe25f000, 17088, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f7ebe25f000
close(3)                                = 0
open("/usr/local/lib/libudev.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libudev.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0200\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=67600, ...}) = 0
mmap(NULL, 2164816, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f7ebdc8d000
mprotect(0x7f7ebdc9d000, 2093056, PROT_NONE) = 0
mmap(0x7f7ebde9c000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xf000) = 0x7f7ebde9c000
close(3)                                = 0
open("/usr/local/lib/libcgmanager.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libcgmanager.so.0", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0206\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=108480, ...}) = 0
mmap(NULL, 2203688, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f7ebda72000
mprotect(0x7f7ebda8b000, 2093056, PROT_NONE) = 0
mmap(0x7f7ebdc8a000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x18000) = 0x7f7ebdc8a000
close(3)                                = 0
open("/usr/local/lib/libnih.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libnih.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0`G\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=96280, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f7ebe894000
mmap(NULL, 2191776, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f7ebd85a000
mprotect(0x7f7ebd871000, 2093056, PROT_NONE) = 0
mmap(0x7f7ebda70000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x16000) = 0x7f7ebda70000
close(3)                                = 0
open("/usr/local/lib/libnih-dbus.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libnih-dbus.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340,\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=38920, ...}) = 0
mmap(NULL, 2134040, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f7ebd650000
mprotect(0x7f7ebd658000, 2097152, PROT_NONE) = 0
mmap(0x7f7ebd858000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x8000) = 0x7f7ebd858000
close(3)                                = 0
open("/usr/local/lib/libdbus-1.so.3", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libdbus-1.so.3", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0@h\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=281552, ...}) = 0
mmap(NULL, 2377408, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f7ebd40b000
mprotect(0x7f7ebd44f000, 2093056, PROT_NONE) = 0
mmap(0x7f7ebd64e000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x43000) = 0x7f7ebd64e000
close(3)                                = 0
open("/usr/local/lib/librt.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/librt.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P#\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=31792, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f7ebe893000
mmap(NULL, 2129016, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f7ebd203000
mprotect(0x7f7ebd20a000, 2093056, PROT_NONE) = 0
mmap(0x7f7ebd409000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x6000) = 0x7f7ebd409000
close(3)                                = 0
open("/usr/local/lib/libpthread.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0po\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=141574, ...}) = 0
mmap(NULL, 2217264, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f7ebcfe5000
mprotect(0x7f7ebcffe000, 2093056, PROT_NONE) = 0
mmap(0x7f7ebd1fd000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x18000) = 0x7f7ebd1fd000
mmap(0x7f7ebd1ff000, 13616, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f7ebd1ff000
close(3)                                = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f7ebe892000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f7ebe890000
arch_prctl(ARCH_SET_FS, 0x7f7ebe890740) = 0
mprotect(0x7f7ebe259000, 16384, PROT_READ) = 0
mprotect(0x7f7ebd1fd000, 4096, PROT_READ) = 0
mprotect(0x7f7ebd409000, 4096, PROT_READ) = 0
mprotect(0x7f7ebd64e000, 4096, PROT_READ) = 0
mprotect(0x7f7ebda70000, 4096, PROT_READ) = 0
mprotect(0x7f7ebd858000, 4096, PROT_READ) = 0
mprotect(0x7f7ebdc8a000, 8192, PROT_READ) = 0
mprotect(0x7f7ebde9c000, 4096, PROT_READ) = 0
mprotect(0x7f7ebe466000, 4096, PROT_READ) = 0
mprotect(0x7f7ebe692000, 8192, PROT_READ) = 0
mprotect(0x603000, 4096, PROT_READ)     = 0
mprotect(0x7f7ebe8be000, 4096, PROT_READ) = 0
munmap(0x7f7ebe896000, 155101)          = 0
set_tid_address(0x7f7ebe890a10)         = 5344
set_robust_list(0x7f7ebe890a20, 24)     = 0
futex(0x7fffd5822e10, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 1, NULL, 7f7ebe890740) = -1 EAGAIN (Resource temporarily unavailable)
rt_sigaction(SIGRTMIN, {0x7f7ebcfeb9f0, [], SA_RESTORER|SA_SIGINFO, 0x7f7ebcff5340}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {0x7f7ebcfeba80, [], SA_RESTORER|SA_RESTART|SA_SIGINFO, 0x7f7ebcff5340}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
rt_sigaction(SIGINT, {0x4015ad, [INT], SA_RESTORER|SA_RESTART, 0x7f7ebded4c30}, {SIG_DFL, [], 0}, 8) = 0
brk(0)                                  = 0xe16000
brk(0xe37000)                           = 0xe37000
uname({sys="Linux", node="stribog", ...}) = 0
uname({sys="Linux", node="stribog", ...}) = 0
open("/etc/udev/udev.conf", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=148, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f7ebe8bb000
read(3, "# see udev(7) for details\n#\n# ud"..., 4096) = 148
read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0x7f7ebe8bb000, 4096)            = 0
stat("/sys/subsystem", 0x7fffd5822be0)  = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/sys/bus", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 3
getdents(3, /* 29 entries */, 32768)    = 800
getdents(3, /* 0 entries */, 32768)     = 0
close(3)                                = 0
openat(AT_FDCWD, "/sys/class", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 3
getdents(3, /* 54 entries */, 32768)    = 1600
openat(AT_FDCWD, "/sys/class/hidraw", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 4
getdents(4, /* 2 entries */, 32768)     = 48
getdents(4, /* 0 entries */, 32768)     = 0
close(4)                                = 0
getdents(3, /* 0 entries */, 32768)     = 0
close(3)                                = 0
fstat(1, {st_mode=S_IFCHR|0600, st_rdev=makedev(136, 4), ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f7ebe8bb000
write(1, "Current epoc devices connected: "..., 34Current epoc devices connected: 0
) = 34
uname({sys="Linux", node="stribog", ...}) = 0
open("/etc/udev/udev.conf", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=148, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f7ebe8ba000
read(3, "# see udev(7) for details\n#\n# ud"..., 4096) = 148
read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0x7f7ebe8ba000, 4096)            = 0
stat("/sys/subsystem", 0x7fffd5822bd0)  = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/sys/bus", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 3
getdents(3, /* 29 entries */, 32768)    = 800
getdents(3, /* 0 entries */, 32768)     = 0
close(3)                                = 0
openat(AT_FDCWD, "/sys/class", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 3
getdents(3, /* 54 entries */, 32768)    = 1600
openat(AT_FDCWD, "/sys/class/hidraw", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 4
getdents(4, /* 2 entries */, 32768)     = 48
getdents(4, /* 0 entries */, 32768)     = 0
close(4)                                = 0
getdents(3, /* 0 entries */, 32768)     = 0
close(3)                                = 0
uname({sys="Linux", node="stribog", ...}) = 0
uname({sys="Linux", node="stribog", ...}) = 0
open("/etc/udev/udev.conf", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=148, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f7ebe8ba000
read(3, "# see udev(7) for details\n#\n# ud"..., 4096) = 148
read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0x7f7ebe8ba000, 4096)            = 0
stat("/sys/subsystem", 0x7fffd5822bd0)  = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/sys/bus", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 3
getdents(3, /* 29 entries */, 32768)    = 800
getdents(3, /* 0 entries */, 32768)     = 0
close(3)                                = 0
openat(AT_FDCWD, "/sys/class", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 3
getdents(3, /* 54 entries */, 32768)    = 1600
openat(AT_FDCWD, "/sys/class/hidraw", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 4
getdents(4, /* 2 entries */, 32768)     = 48
getdents(4, /* 0 entries */, 32768)     = 0
close(4)                                = 0
getdents(3, /* 0 entries */, 32768)     = 0
close(3)                                = 0
write(1, "CANNOT CONNECT: -3\n", 19CANNOT CONNECT: -3
)    = 19
exit_group(1)                           = ?
+++ exited with 1 +++

1 个答案:

答案 0 :(得分:1)

我认为没有任何库缺失。如果任何库不可用,您的程序甚至都不会运行。我宁愿检查EMOKIT_VID和EMOKIT_PID是否有正确的值,因为正如你所说 - linux识别这个设备,但只有应用程序无法连接到这个设备。