【问题标题】:obdsim: invalid option -- 'b'obdsim: 无效选项 -- 'b'
【发布时间】:2014-09-12 08:06:02
【问题描述】:

当我跑步时

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。那我想怎么连接蓝牙呢?

【问题讨论】:

    标签: bluetooth ubuntu-14.04 obd-ii


    【解决方案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 时明确禁用蓝牙,否则仅意味着您需要包含您的发行版的 bluetooth-devel 包。

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

    【讨论】:

    • 我们可以在哪里添加此代码?我的意思是我在您提到的文件中找不到此代码。我在最新版本,即 587
    猜你喜欢
    • 2013-05-13
    • 1970-01-01
    • 1970-01-01
    • 2020-02-04
    • 2013-11-07
    • 2013-04-19
    • 2011-09-27
    • 2016-12-06
    • 1970-01-01
    相关资源
    最近更新 更多