obdsim:无效选项 - ' b'

时间:2014-09-12 08:06:03

标签: bluetooth ubuntu-14.04 obd-ii

当我跑步时

user:~$ obdsim -b

我得到了

obdsim: invalid option -- 'b'

我已经这样做了:

sudo rfcomm bind 0 14:30:C6:50:12:16 1
sudo sdptool add SP

当我跑步时

user:~$ obdsim -h
Usage: obdsim [params]
   [-g|--generator=<name of generator>
       [-s|--seed=<generator-seed>]
       [-d|--customdelay=<ecu delay(ms)>]
     ]
   [-q|--logfile=<logfilename to write to>]
   [-V|--elm-version=<pretend to be this on ATZ>]
   [-D|--elm-device=<pretend to be this on AT@1>]
   [-L|--list-protocols]
   [-p|--protocol=<OBDII protocol>]
   [-o|--launch-logger]
   [-c|--launch-screen] ["EXIT" or C-a,k to exit]
   [-t|--tty-device=<real /dev/ entry to open>]
   [-e|--genhelp=<name of generator>]
   [-l|--list-generators]
   [-n|--benchmark=<seconds>]
   [-v|--version] [-h|--help]
The generators built into this sim:
 "Random"
 "Cycle" (default)
 "Logger"
 "dlopen"
 "Socket"
 "gui_fltk"
 "Error"

所以似乎-b不在那里,但它是here。那我怎么想连接蓝牙呢?

1 个答案:

答案 0 :(得分:1)

原始OBDSim开发人员。

这是没有编译蓝牙的典型特征。因此,CMakeLists.txt的相关部分是:

SET(OBD_SIM_DISABLE_BLUEZ false CACHE BOOL "Disable bluetooth support in obdsim")
IF(NOT OBD_SIM_DISABLE_BLUEZ)
    CHECK_SYMBOL_EXISTS(BTPROTO_RFCOMM
        bluetooth/bluetooth.h
            HAVE_BLUETOOTH)
    IF(HAVE_BLUETOOTH)
        MESSAGE(STATUS "Enabling bluetooth obdsim port")
        ADD_DEFINITIONS(-DHAVE_BLUETOOTH)
    ENDIF(HAVE_BLUETOOTH)
ENDIF(NOT OBD_SIM_DISABLE_BLUEZ)

所以......除非你在构建OBDSim时明确禁用了蓝牙,否则它只是意味着你需要包含你的发行版的蓝牙级别包。

[请注意,安装后,您需要重新运行cmake,删除缓存。我通常只是rm -rf构建并重新开始]