Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AP_HAL_Linux: support UNIX FIFO(named pipe) interface #24321

Closed
wants to merge 1 commit into from

Conversation

rsaxvc
Copy link
Contributor

@rsaxvc rsaxvc commented Jul 16, 2023

Create a new serial device backend that connects to a pair(RX/TX) of named pipes.

@rsaxvc rsaxvc force-pushed the linux_fifo_support branch from 4627aad to 3305be7 Compare July 24, 2023 02:18
@lucasdemarchi
Copy link
Contributor

Create a new serial device backend that connects to a pair(RX/TX) of named pipes.

I don't see the motivation anywhere. What's the use case here?

@lucasdemarchi
Copy link
Contributor

Overall looks good. I left some comments and would like to have a justification for this support.

@rsaxvc rsaxvc force-pushed the linux_fifo_support branch from 3305be7 to 88f6bb8 Compare July 25, 2023 04:14
@rsaxvc
Copy link
Contributor Author

rsaxvc commented Jul 25, 2023

I don't see the motivation anywhere. What's the use case here?

I use this to do simple I/O logging with tee. I also use it to provide a connection like a virtual serial port with flow control to connect to another program on the same device. I'm using OpenHD for forwarding MAVLink over raw(IP-less) 802.11 frames.

@rsaxvc rsaxvc force-pushed the linux_fifo_support branch from 88f6bb8 to bc644ed Compare July 26, 2023 03:14
Add a new serial port type backed by a pair of UNIX FIFOs,
one for each direction.

This can be used to externally monitor I/O between ArduPilot
and a device attached to a serial port.

This can also be used to communicate between two programs
running on the same device, similar to a virtual serial port.
@rsaxvc rsaxvc force-pushed the linux_fifo_support branch from bc644ed to 4a85d1d Compare July 28, 2023 00:51
@rsaxvc
Copy link
Contributor Author

rsaxvc commented Jul 28, 2023

I'm sorry about that, I accidentally pushed an old branch. I've addressed your comments and am rebuilding to test now.

@rsaxvc
Copy link
Contributor Author

rsaxvc commented Jul 28, 2023

This is the correct patch and works well. However, I think I've found something I'll need to address. If the pipe is closed, ardupilot will have one thread always busy failing to access them. This might take me a bit to get to. Let me know if you prefer I close this and reopen later.

@rsaxvc
Copy link
Contributor Author

rsaxvc commented Feb 7, 2024

OpenHD added more fully-featured MavLink networking, so this is no longer needed.

@rsaxvc rsaxvc closed this Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants