首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >obdsim:无效选项--“b”

obdsim:无效选项--“b”
EN

Stack Overflow用户
提问于 2014-09-12 08:06:02
回答 1查看 509关注 0票数 1

当我跑的时候

代码语言:javascript
复制
user:~$ obdsim -b

我得到了

代码语言:javascript
复制
obdsim: invalid option -- 'b'

我已经做过了:

代码语言:javascript
复制
sudo rfcomm bind 0 14:30:C6:50:12:16 1
sudo sdptool add SP

当我跑的时候

代码语言:javascript
复制
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似乎不在那里,但是它是这里。那么,我该如何连接蓝牙呢?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2014-09-12 15:57:32

这里是原始的OBDSim开发人员。

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

代码语言:javascript
复制
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构建并重新开始

票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/25803595

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档