树莓派与倍福ADS通信

树莓派与倍福通信

首先检查是否是子网掩码的问题,将DELL笔记本的子网掩码改为255.255.255.0

运行link_test与倍福进行通信测试,能够通信成功,无1861错误


其次检查是否是没有在倍福控制器中添加上位机路由

进入倍福控制器Windows,Remove掉DELL_G3的Route

运行link_test与倍福进行通信测试,无法成功通信,报1861错误

因此可以确定错误原因为未添加上位机Route

尝试在DELL笔记本上进行添加路由的操作

redwall@redwall-G3-3500:~/3rd_party/ADS/build$ ./adstool 169.254.254.142 addroute --addr=169.254.254.66 --netid=169.254.254.66.1.1 --password=1 --routename=Raspberry_Pi

这里有一个问题,添加完后,RASPBERRY_PI的Address是168.254.254.88,而不是168.254.254.66

在这里插入图片描述

说明Address并不取决于adstool的设置,而是与目标源有关

因此直接在树莓派上git下官方ADS库,在树莓派中用adstool添加Route

ubuntu@ubuntu:~/ADS$ meson setup build
The Meson build system
Version: 0.45.1
Source dir: /home/ubuntu/ADS
Build dir: /home/ubuntu/ADS/build
Build type: native build
Project name: AdsLib
Native C++ compiler: c++ (gcc 7.5.0 "c++ (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04) 7.5.0")
Build machine cpu family: arm
Build machine cpu: armv7l
Library ws2_32 found: NO
Dependency threads found: YES
Build targets in project: 4
Found ninja-1.8.2 at /usr/bin/ninja
ubuntu@ubuntu:~/ADS$ ninja -C build
ninja: Entering directory `build'
[26/26] Linking target AdsLibTest.
ubuntu@ubuntu:~/ADS/build$ ./adstool 169.254.254.142 addroute --addr=169.254.254.66 --netid=169.254.254.66.1.1 --password=1 --routename=Raspberry_Pi

运行link_test与倍福进行通信测试,能够通信成功,无1861错误

ubuntu@ubuntu:~/ADS_test/bin$ ./link_test 
Default ADS NetID:169.254.254.142.1.1
Default ADS IPV4:169.254.254.142
Default ADS Port:851
Target ADS NetID:169.254.254.142.1.1
Target ADS IPV4:169.254.254.142
Target ADS Port:851

Motor enabled!
Drive motor accelerate:0
Drive motor accelerate:0
Drive motor accelerate:0

猜你喜欢

转载自blog.csdn.net/Solititude/article/details/129840334