Using multiple serial drivers from yaml environment #1259
Replies: 4 comments 11 replies
-
This is unfortunately not very clear from the documentation, but each driver supports a targets:
resources:
RemotePlace:
name: remote1
drivers:
SerialDriver:
name: 's1'
bindings:
port: default
SerialDriver:
name: 's2'
bindings:
port: second Where the named My example already contains a recent change to labgrid, namely that if Futher information for binding and driver activation is available inside the docs here. |
Beta Was this translation helpful? Give feedback.
-
I think the real question we have is just this. If this is our exporter config:
And our place is:
And our test target yaml is:
The
How do we bind the ShellDriver to the ca55_uart_driver? |
Beta Was this translation helpful? Give feedback.
-
Maybe it is of help to someone here. I have created a sample self-contained labgrid setup based on docker compose that uses two serial ports. There is just one Repository: https://github.com/honeytreelabs/labgrid-compose-sample Note: the |
Beta Was this translation helpful? Give feedback.
-
I am also trying to configure different My attempt with only the serials looks like this: targets:
main:
resources:
RemotePlace:
name: 'ex1-dut1'
drivers:
SerialDriver:
name: 'dbg_console'
bindings:
port: 'dbg'
SerialDriver:
name: 'tty_console'
bindings:
port: 'tty'
DemoStrategy: {}
imports:
- demo-strategy.py demo_strategy.py:
I get the following error:
If I only use the following binding:
or
it works. As soon as I try to bind the HttpGpios, nothing works anymore. Can anyone help me with this? |
Beta Was this translation helpful? Give feedback.
-
For our labgrid configuration, we are running tests and hoping to use two serial connections on a remote lab host.
We would like to be able to run shell commands via the ShellDriver on each of these serial ports.
Our configuration is specified in our environment yaml file:
Reading through the documentation, it seems that labgrid supports multiple drivers with the same type, via the name parameter, and the
target.get_driver('SerialDriver', name=name)
method can be used to get them individually.However, it is not stated how the underlying resources should be configured. We currently export two USBSerialPort resources with different paths from our RemotePlace, but when our Target is initialized, the second SerialDriver overwrites the first. We could also initialize these drivers in our code, as opposed to our yaml file, but there doesn't seem to be a way to distinguish between the resources they are using.
What should the configuration be to access two serial drivers on different ports from the same project?
Beta Was this translation helpful? Give feedback.
All reactions