Bluetooth obdsim:无效选项--';b';
当我跑的时候Bluetooth obdsim:无效选项--';b';,bluetooth,ubuntu-14.04,obd-ii,Bluetooth,Ubuntu 14.04,Obd Ii,当我跑的时候 user:~$ obdsim -b 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
user:~$ obdsim -b
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"
我明白了
我已经这样做了:
sudo rfcomm bind 0 14:30:C6:50:12:16 1
sudo sdptool add SP
当我跑的时候
user:~$ obdsim -b
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"
用户:~$obdsim-h
用法:obdsim[params]
[-g |——发电机=
[-s |--seed=]
[-d |--customdelay=]
]
[-q |--logfile=]
[-V |--elm版本=]
[-D |--elm设备=]
[-L |--列出协议]
[-p |--protocol=]
[-o |--launch logger]
[-c |--启动屏幕][“退出”或c-a,k退出]
[-t |--tty设备=]
[-e |--genhelp=]
[-l |--列表生成器]
[-n |--benchmark=]
[-v |--版本][-h |--帮助]
此sim卡中内置的发电机:
“随机”
“循环”(默认值)
“记录器”
“dlopen”
“插座”
“gui_fltk”
“错误”
因此,似乎
-b
不存在,但它存在。那么我该如何连接蓝牙呢?这里是原始的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并重新启动即可]在哪里可以添加此代码?我的意思是我在你提到的文件中找不到这个代码。我使用的是最新版本,即587