PSDK提供Jetson nano的 usb bulk 配置文件,开启 Jetson Nano 的 USB bulk 功能 失败
CompletedPayload SDK->快速入门->E-Port 到手即用->使用 Jetson Nano 开发套件->2. 开启 Jetson Nano 的 USB bulk 功能 这个步骤失败。
在jetson nano 或jetson nx设备中,按照PSDK提供Jetson nano的 usb bulk 配置文件,包括配置脚本(psdk-usb-configure.sh)和配置程序(startup_bulk),我做了下面操作:
1、修改psdk-usb-configure.sh和nv-l4t-usb-device-mode.sh脚本中的startup_bulk可执行文件路径为实际路径:”/home/dji/Desktop/startup_bulk/startup_bulk /dev/usb-ffs/ “改为 ”/home/sutpc/Downloads/UAV/usb-bulk-configuration-reference/“,修改如下:
```
enable_bulk=1
if [ ${enable_bulk} -eq 1 ]; then
mkdir -p /dev/usb-ffs
cfg_str="${cfg_str}+BULK1"
mkdir -p /dev/usb-ffs/bulk1
func=functions/ffs.bulk1
mkdir -p "${func}"
ln -sf "${func}" "${cfg}"
mount -o mode=0777 -o uid=2000 -o gid=2000 -t functionfs bulk1 /dev/usb-ffs/bulk1
#/home/dji/Desktop/startup_bulk/startup_bulk /dev/usb-ffs/bulk1 &
/home/sutpc/Downloads/UAV/usb-bulk-configuration-reference/startup_bulk /dev/usb-ffs/bulk1 &
sleep 3
cfg_str="${cfg_str}+BULK2"
mkdir -p /dev/usb-ffs/bulk2
func=functions/ffs.bulk2
mkdir -p "${func}"
ln -sf "${func}" "${cfg}"
mount -o mode=0777 -o uid=2000 -o gid=2000 -t functionfs bulk2 /dev/usb-ffs/bulk2
#/home/dji/Desktop/startup_bulk/startup_bulk /dev/usb-ffs/bulk2 &
/home/sutpc/Downloads/UAV/usb-bulk-configuration-reference/startup_bulk /dev/usb-ffs/bulk2 &
sleep 3
fi
```
2、复制脚本到/opt/nvidia/l4t-usb-device-mode/路径下
```
cp nv-l4t-usb-device-mode.sh /opt/nvidia/l4t-usb-device-mode/nv-l4t-usb-device-mode.sh
sudo cp startup_bulk/psdk-usb-configure.sh /opt/nvidia/l4t-usb-device-mode/l4t-usb-device-mode-start.sh
```
3、重启系统后,再查看是否有usb的bulk文件夹
```
ls -l /dev/usb-ffs/bulk/
```
发现还是没有这个目录,
4、于是停止nv-l4t-usb-device-mode服务:
```
systemctl stop nv-l4t-usb-device-mode
```
5、手动运行nv-l4t-usb-device-mode-start.sh这个脚本
```
cd /opt/nvidia/l4t-usb-device-mode/
./nv-l4t-usb-device-mode-start.sh
```
提示错误如下,缺少文件:
cp: cannot stat '/proc/device-tree/chosen/plugin-manager': No such file or directory
-
按照你的描述,修改之后也不行,于是我对比了jetson设备系统原始脚本”nv-l4t-usb-device-mode-start.sh“
和大疆提供的”psdk-usb-configure.sh“脚本,在nv-l4t-usb-device-mode-start.sh的基础上进行修改,问题得到了解决。系统原始脚本 nv-l4t-usb-device-mode-start.sh的基础上增加了下面这段:
```
enable_bulk=1
if [ ${enable_bulk} -eq 1 ]; then
mkdir -p /dev/usb-ffs
cfg_str="${cfg_str}+BULK1"
mkdir -p /dev/usb-ffs/bulk1
func=functions/ffs.bulk1
mkdir -p "${func}"
ln -sf "${func}" "${cfg}"
mount -o mode=0777 -o uid=2000 -o gid=2000 -t functionfs bulk1 /dev/usb-ffs/bulk1
#/home/dji/Desktop/startup_bulk/startup_bulk /dev/usb-ffs/bulk1 &
/home/sutpc/Downloads/UAV/usb-bulk-configuration-reference/startup_bulk /dev/usb-ffs/bulk1 &
sleep 3
cfg_str="${cfg_str}+BULK2"
mkdir -p /dev/usb-ffs/bulk2
func=functions/ffs.bulk2
mkdir -p "${func}"
ln -sf "${func}" "${cfg}"
mount -o mode=0777 -o uid=2000 -o gid=2000 -t functionfs bulk2 /dev/usb-ffs/bulk2
#/home/dji/Desktop/startup_bulk/startup_bulk /dev/usb-ffs/bulk2 &
/home/sutpc/Downloads/UAV/usb-bulk-configuration-reference/startup_bulk /dev/usb-ffs/bulk2 &
sleep 3
fi```
Please sign in to leave a comment.
Comments
4 comments