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
permissionslabel 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.