MOP Channel Issues with M350 Drone and Jetson Orin Nano via E-Port
已完成Hello DJI Community,
I am currently integrating an M350 drone with a Jetson Orin Nano through the E-Port for a project. While I've had success with UART communication and serial over ACM0, I am encountering a persistent issue with the MOP channel specifically during its Accept phase. The process fails, and the following error is presented:
[103.295][channel]-[Error]-[DjiMopChannel_Accept:555) Operation is not supported in current state. Suggestion : Please try again later.
This error suggests that the operation can't proceed in the current state, but it's unclear what adjustments are needed to move forward. I have several questions that might help resolve this issue and any insight would be greatly appreciated:
- For successful MOP channel communication, does the Jetson Orin Nano USB port need to be configured to Device Mode is there a way to use OTG?
- Can I use l4tbr0 as a network device for the MOP channel connection, especially since the E-Port is connected to the top of the drone (the OSDK port)? Or am I stuck with uart + bulk to enable the sdk interconnect?
- The documentation mentions that for USB 2.0 (USB bulk transfer) or Rndis (TCP/IP over USB) functions, we should use the USB_DP pin (B6) and USB_DM pin (B7). Does this imply the need for a custom cable?
Lastly, could anyone share what a log looks like when the MOP channel is correctly set up and waiting for a connection? Understanding this could help me identify any discrepancies in my setup.
Thank you in advance for your assistance. Your expertise is invaluable to overcoming this hurdle.
-
after some initial research it seems a "Full Featured" usb cable might be needed.
Here is so more information on my problem, I continue update the thread with anything I think can help solve the issue.
When I connect the drone I do see usb0. I am trying to bridge it and I am able to ping the m350 at 192.168.44.3 from the command line and I do believe that would be the the drone's rndis host.
So maybe, I have the bulk usb set up incorrect?I do have the start up bulk script running and I have confirmed that the usb_gizmo settings have been setup
root 825 1 0 14:18 ? 00:00:00 /home/terry/startup_bulk/startup_bulk /dev/usb-ffs/bulk1
root 1478 1 0 14:18 ? 00:00:00 /home/terry/startup_bulk/startup_bulk /dev/usb-ffs/bulk2
terry 4794 3422 0 14:59 pts/0 00:00:00 grep --color=auto bulkmy bulk settings (I am on a jetson Orin Nano Dev kit)
#define LINUX_USB_BULK1_EP_OUT_FD "/dev/usb-ffs/bulk1/ep1"
#define LINUX_USB_BULK1_EP_IN_FD "/dev/usb-ffs/bulk1/ep2"
#define LINUX_USB_BULK1_INTERFACE_NUM (2)
#define LINUX_USB_BULK1_END_POINT_IN (0x83)
#define LINUX_USB_BULK1_END_POINT_OUT (2)
#define LINUX_USB_BULK2_EP_OUT_FD "/dev/usb-ffs/bulk2/ep1"
#define LINUX_USB_BULK2_EP_IN_FD "/dev/usb-ffs/bulk2/ep2"
#define LINUX_USB_BULK2_INTERFACE_NUM (3)
#define LINUX_USB_BULK2_END_POINT_IN (0x84)
#define LINUX_USB_BULK2_END_POINT_OUT (3)
#ifdef PLATFORM_ARCH_x86_64
#define LINUX_USB_VID (0x0B95)
#define LINUX_USB_PID (0x1790)
#else
#define LINUX_USB_VID (0x0955)
#define LINUX_USB_PID (0x7020)
#endifand of course in the config
/*!< Attention: Select your hardware connection mode here.
* */
#define CONFIG_HARDWARE_CONNECTION DJI_USE_UART_AND_USB_BULK_DEVICE
when I run the application I wait before I trigger the mop_init
and then after the mop_init I wait 45 secs
here's the typical log:
mop channel handle create for id:49152
mop handler created for id: 49152
starting Accepting Connections
mop channel Init
Pausing for 45 seconds...
Resuming execution.
mop channel set normal send task
mop channel set recv normal task
mop channel File Service task[144.464][channel]-[Error]-[DjiMopChannel_Accept:555) Operation is not supported in current state. Suggestion : Please try again later.
[144.464][user]-[Warn]-[DjiTest_MopChannelFileServiceAcceptTask:421) [File-Service] mop accept channel error :0x000000E4
mop accept channel error 228channel: 0xffff4c000b60
[144.464][channel]-[Error]-[DjiMopChannel_Accept:555) Operation is not supported in current state. Suggestion : Please try again later. -
My thoughts keep going back to this
"USB 2.0 (USB bulk transfer) or Rndis (TCP/IP over USB) functions, we should use the USB_DP pin (B6) and USB_DM pin (B7)."
does this mean I need to use a full featured c to c cable that connects to the usb-c port on the orion nano?
which leads to more questions, do I then need to change the configuration of the Orin Nano's usb-c port.
Because I when try to connect to it, nothing happens. I'll check my udev rules, but if anyone out there reading this has any inking about this, please just give a minute to confirm some real facts for me, it would help me lower my blood pressure. -
Dear Developer, Hello, thank you for contacting DJI. Thank you for your patience, we have just returned from the Spring Festival holiday. Your description may not be complete according to our system, so I went to the forum to check all the information you described. There may be the influence of translation software in this process. I'm sorry if I misunderstood your meaning or description. We would like to sort out your attempts and operations with you. Before that, we would like to explain to you that you can use l4tbr0 as a NETWORK link to connect, which also supports the MOP function and does not necessarily require a BULK link. In order to successfully conduct MOP communication, you need to connect your device to the M350 model as a slave device. (If you are not sure whether your device has been used as a slave device, you can connect it to your computer and use the device management option to check whether your device has been used as a slave device. Connect) M350 model as the master device. Do you have an E-Port development kit around you? The development kit we provide is to enable your device to switch between master and slave and connect to the aircraft smoothly. If there is no development kit, you need to design the hardware by yourself. I see that you have configured BULK1 and BULK2, which can be queried through the ps command. We recommend that you follow the test procedure at the end of this article to test whether there is any problem with the data sending and receiving of the corresponding port (that is, the port you configured in hal_usb_bulk.h) , since the article is written in Chinese, you may need to translate it yourself. https://sdk-forum.dji.net/hc/zh-cn/articles/10232604141465-M30%E5%BC%80%E5%8F%91-%E6%A0%91%E8%8E%93%E6 %B4%BE4B%E9%85%8D%E7%BD%AEUSB-device-RNDIS-%E5%92%8C-BULK Thank you for your support of DJI products. Best Regards, DJI Dajiang innovation SDK technical support -
Thank you for your response.
I have ordered a USB-C to USB-C OTG cable.
I did not understand the capabilites of the Jetson Orin USB bus and I did not have the correct usb cable for my device to become a SLAVE device. I am excitred to try the l4tbr0 link, thank you for the information! I fel like I am finally understanding. I am awaiting the delivery of my cable to proceed.
请先登录再写评论。
评论
8 条评论