Can a BlueOS Extension expose a fixed UDP host

We are developing a BlueOS Extension in C# (.NET 10) for a 360° imaging sonar.

The communication works as follows:

  • Browser → HTTP → BlueOS Extension
  • Extension → TCP → Sonar (port 5007)
  • Sonar → UDP → Extension (port 5008)

The TCP part works perfectly:

  • Connect succeeds.
  • Commands are acknowledged.
  • The sonar starts rotating.

The problem is receiving the UDP stream.

Current setup

The extension runs in a Docker container created by the BlueOS Extension Manager.

Container network:


Bridge
Container IP: 172.18.0.4

The application listens on:


0.0.0.0:5008

Verified inside the container:


cat /proc/net/udp

00000000:1390

(1390 = UDP port 5008)

Dockerfile

We expose:


EXPOSE 8080/tcp
EXPOSE 5008/udp

Permissions label:


LABEL permissions="{\"ExposedPorts\":{\"8080/tcp\":{},\"5008/udp\":{}},\"HostConfig\":{\"PortBindings\":{\"8080/tcp\":[{\"HostPort\":\"\"}],\"5008/udp\":[{\"HostPort\":\"5008\"}]}}}"

docker ps


5008/udp
0.0.0.0:32770->8080/tcp

docker inspect


"5008/udp": null

while TCP shows a proper host mapping.

What works

  • Same application on Windows: receives UDP immediately.
  • Same sonar.
  • Same protocol.
  • Same UDP port.

Only the BlueOS Extension does not receive any UDP packets.

Question

Is incoming UDP on a fixed host port supported for BlueOS Extensions?

If so:

  • Is the permissions label the correct way to publish a UDP port?

  • Or is there another recommended approach for receiving UDP from external hardware?

    We are developing an imaging sonar integration, so the UDP stream is initiated by the sonar hardware and cannot be proxied over HTTP.

Any example of an extension receiving UDP from an external device would be greatly appreciated.

We have made significant progress and wanted to share our findings.

Our extension communicates with a 360° imaging sonar.

  • TCP communication works correctly.
  • The sonar receives all commands correctly.
  • The sonar is configured to send UDP data to the BlueOS IP address.
  • The application creates and listens on a UDP socket successfully.
  • The same application works perfectly outside Docker.

After extensive testing we discovered that the issue is related to Docker networking.

When the extension is started normally by the BlueOS Extension Manager (bridge networking), no UDP packets reach the application.

However, when we stop the extension and start exactly the same Docker image manually with:


docker run --rm --network host guidoste/sarvision-360:v0.9.3

the sonar immediately starts streaming UDP data and our application works perfectly without any code changes.

This suggests that our implementation is correct and the remaining issue is only the container networking mode.

Question:

Is there an officially supported way to run a BlueOS Extension using host networking, or another recommended method for receiving incoming UDP traffic from external Ethernet devices?

We would prefer to use the supported BlueOS approach instead of maintaining a custom startup procedure.

Thanks!

Hi @GuidoSte -

Simply change your extension permissions (and the Dockerfile) to include these lines at the bottom:

"NetworkMode": "host",

And that should resolve your issue!