如何使用gps接收器bu-353
嗨,我有一个gps接收器bu-353与USB接口我想知道如何在ubuntu下使用它我运行以下命令
gpsd -n -N -D 2 /dev/ttyUSB0
我的输出为:
gpsd: launching (Version 2.94) gpsd: listening on port gpsd gpsd: running with effective group ID 1000 gpsd: running with effective user ID 1000 gpsd: opening GPS data source type 3 at '/dev/ttyUSB0' gpsd: speed 38400, 8N1 gpsd: Garmin: garmin_gps Linux USB module not active. gpsd: speed 9600, 8O1 gpsd: speed 38400, 8N1 gpsd: gpsd_activate(): opened GPS (fd 6) gpsd: speed 4800, 8N1 gpsd: NTPD ntpd_link_activate: 0 gpsd: /dev/ttyUSB0 identified as type SiRF binary (2.687608 sec @ 4800bps) gpsd: detaching 127.0.0.1 (sub 1, fd 8) in detach_client gpsd: detaching 127.0.0.1 (sub 1, fd 8) in detach_client
在此之后我开始使用tangoGPS,其中没有发现gps而没有发现gpsd
已知bu-353可与gpsd配合使用。
1)尝试-b标志(例如, gpsd -b /dev/ttyUSB0
)
2)打开一个单独的终端窗口并运行gpsmon
(包含在’gpsd-clients’包中)以检查gpsd输出。 每次重新启动gpsd时重新启动gpsmon。
探戈能否过早开始? 加密狗需要几秒钟来整理信号,识别卫星并计算修复,udev需要几秒钟来启动gpsd,这反过来需要几秒钟来探测加密狗(可能尚未准备好)并开始在数据流最终开始时广播有用的信息。 gpsmon
也可以帮助诊断这个问题。
3)如果没有gpsd输出,则进行更详细的检查。 执行以下步骤以测试加密狗,内核模块,装载,设备节点和gpsd:
- 拔下USB加密狗并杀死gpsd(
sudo pkill gpsd
)。 等待10秒钟以释放/ dev / ttyUSB0。 - 将USB加密狗重新插入并等待10秒钟。
- 检查
dmesg | tail -n 5
dmesg | tail -n 5
validation加密狗是否真的挂载到/ dev / ttyUSB0。 如果它没有挂载,那么你就错过了一个内核模块(根据你的描述,这是不太可能的)。 如果0不是免费的,它有时会挂载到/ dev / ttyUSB1! - 看看udev是否识别了加密狗并启动了gpsd(
ps -e | grep gpsd
)。 如果没有,那么你有一个udev规则问题,你必须用gpsd /dev/ttyUSB0
手动启动gpsd -
gpsd运行后,检查加密狗输出(加密狗输出= gpsd输入)。 尝试
cat /dev/ttyUSB0
(用CTRL + c停止它)。 如果失败,请尝试将波特率重置为4800:pkill gpsd stty 4800 > /dev/ttyUSB0 gpsd -b /dev/ttyUSB0 cat /dev/ttyUSB0 # CTRL+c to stop
- 如果你有一个好的加密狗输出(= gpsd输入),打开第二个终端窗口并尝试
gpsmon
或cgps
来测试gpsd输出。 - 最后,既然你有好的加密狗输出和良好的gpsd输出,试试tangoGPS。
我遇到了类似的问题。 我在这里做了一切,仍然无法在openCPN中工作。 我偶然发现了另一个论坛,该论坛试图在[ / etc / default / gpsd ]尝试为gpsd设置默认设置。
# Default settings for the gpsd init script and the hotplug wrapper. # Start the gpsd daemon automatically at boot time START_DAEMON="false" # Use USB hotplugging to add new USB devices automatically to the daemon USBAUTO="true" # Devices gpsd should collect to at boot time. # They need to be read/writeable, either by user gpsd or the group dialout. DEVICES="/dev/ttyUSB0" # Other options you want to pass to gpsd GPSD_OPTIONS="-n -G -b" GPSD_SOCKET="/var/run/gpsd.sock" #end of file gpsd
令我惊讶的是它奏效了。
非常感谢,它适用于我使用BU 353。
只需使用以下文本更改/etc/default/gpsd
kill gpsd
kill gpsmon
(在单独的窗口中)
开始: gpsd -b /dev/ttyUSB0
start: gpsmon
(在单独的窗口中)
它对我有用
RNA