Problem in mavlink_ulog_streaming

Hello all, I’m newbie with px4.

What I want to do is to plot the sensor data of on-board sensors in pixhawk4 with my notebook in real time.
I’ve been trying to stream the log data in real-time using with the pixhawk4 connected via usb port.

But every time I try, I come up with the error message of

[Errno 16] Could not open port /dev/serial/by-id/usb-3D_Robotics_PX4_FMUv5.x_0-if00:
[Errno 16] Device or resource busy: ‘/dev/serial/by-id/usb-3D_Robotics_PX4_FMUv5.x_0-if00’

can anyone help me with this problem?

Thanks a lot


Do you know that QGC already supports real-time plotting?

Thanks for your reply.

Actually, I knew that QGC supports real-time plotting, but what I’m looking for is how to stream log data in real-time to the notebook with no QGC via cable.

Is there any way to do this?

Ok, for real-time you’re better off using MAVLink, and you could use MAVSDK or pymavlink.
But yes, you could also use, and then parse the log (there’s no real-time parsing library).

To answer your original question: the error means that another process already opened the serial port. You can check with lsof /dev/serial/by-id/usb-3D_Robotics_PX4_FMUv5.x_0-if00

Thanks a lot, I think I was trying to use USB cable for both QGC connection and log streaming.

With QGC turned off, it worked well.

I really appreciate your answers!!