Multi container access and get data in same usb port - docker

Hi Im using Docker container for getting data from device via USB RTU 485 using modbus RTU.
At this moment, I can use single Docker container for getting from that. But when Im using multi container it have problem about getting that data because data not going right container.
Ex: Container 1 send request data to device id 1,2,3,4. At the same time container 2 send request to device id 5,6,7,8. But when data go back it go wrong, container 1 get data from device id 5,6,7,8 and container 2 get 1,2,3,4.
Is there anyway to fix that problem ?
Thanks.

This is a known issue with using Docker containers with USB devices. You can try using a different USB controller, or you can use a single container and mount the USB device into that container.

Related

Share data between two docker containers sharing same network

I have a requirement to build two applications (in Golang), first application just receives data via UART and send it to the second application for processing, second application should receive the data and process.
I have already completed receiving data via UART in first application, now I'm looking for better way to get data from first module to second module. They both are running as docker containers and sharing same docker network.
I was thinking of creating rest API in second application and first application will simply send data with http call, but is there a better way to do? Any other option that can take advantage of docker network?
In general, yes sockets are what you need. Plain TCP/UDP, HTTP server (RESTful API or not), gRPC, etc.
Or you start another container of a message queue (NATS, Kafka, RabbitMQ, etc), and write pub-sub logic. Or you can use a database.
Or you can mount a shared Docker volume between both containers and communicate via files.
None of these are necessarily unique to Golang and will work with any language.

Is there a way to have easily scalable clients in Jitsi?

I'm trying to measure the power consumption of Jitsi servers with varying numbers of clients.
current set-up:
several different devices
all connected locally with a switch to the server
Problem : it is inefficient and unfeasible for scaling up.
Is there a better way?
Is there a way to have docker clients running with a virtual camera/audio?
I've considered trying to have clients run in docker.
I'm also aware that you can connect with different instances on the same device, but I'm trying to avoid this as I don't know if this will affect the results (since the server may only receive one video stream to decode, changing the power consumption recorded).
Thanks
Maybe it could be a good idea to create :
a Dockerfile for each "type" of device.
a Dockerfile for your jitsi server
After that you can install minikube (a local standalone k8s cluster) to create :
a deployment for each device (using the created docker image just before) : you will be able to update the number of pods (instances of your devices) as you wish
a deployment for your jitsi server (using the created docker image just before)
i.e : you can set 100 pods of 'devices' if you want.

Setting up a XNAT server with a NAS

I'm setting up an XNAT server using their container service. But I want to archive my files in a separated server/NAS.
Has anyone done this before? Any tutorial on this?
Thanks.
From my search:
"The easiest way to do this would be to mount the location on your NAS where you want the data to be archived to the location of the archive folder on your XNAT server. You can probably configure your containers to run so that they write data directly to the NAS storage rather than to your XNAT server. That would reduce network traffic, since writing to the XNAT server directly would then require sending the data across the network connection to the NAS. That said, I have no idea how to do that part and will defer to Flavin et al as far as configuring how your containers interact with the archive space."

Data exchange through FIROS fails

On a computer, 2 ubuntu virtual machines are installed. On one of them there is another virtual machine with Fiware-orion Context broker. Both VMs have ROS.
I am trying to make a simple publisher-subscriber ROS program, that sends a message from one VM to another one through FIROS(firos is installed and configured). The problem is that the message from a publishing VM is being sent to FIROS(or it is better to say, the topic is shared through FIROS), but somehow it is not being achieved by the subscribing VM, and therefore I cannot see the message being sent.
We are using the local network so there shouldn't be an issue with port forwarding. Moreover, using rostopic list it is visible that it has fiwaretopics on both VMs running.
Can it be, that the issue lies in using Virtual Machines rather than 2 separate PCs?
Thank you in advance.
I solved this.
There were 2 problems - first, the IP address of the server in config.json must be of the machine where the FIROS is running, not where I wanted to send it.
2 problem, the FIROS has to be launched last, after all other nodes are being run. Therefore it is able to subscribe to those topics and send the data. I was running FIROS first and therefore failed to subscribe, because there were nothing to subscribe to at that particular moment.

Docker: get access to wifi interface

I am pretty new to docker. At the moment I want to maintain a network of different Rapsberry PIs. Each PI should have the same OS with exactly the same system running. To handle deployment and updates of Software, I want to handle these things by docker.
Currently I am using HypriotOS, which offers docker on their Images.
My Main goal is to run an applocation in the docker containers, which need to access the wifi interface directly. The pure network access won't be enough, there needs to be deeper access like changing the wifi mode (Monitor Mode).
Long Story short: is it possible to passthrough an USB WiFi card directly to the docker Container, that it appears as wlan0 interface? Or are there other ways that you can think of?
Thanks for your answers in advance!
Take a look at the privileged flag for your container, it will give you full access to the devices on the system. See the Docker Run Documention for more information.

Resources