> On Fri, 22 Feb 2019 at 17:17, Tim Jaacks <tim.jaacks at garz-fricke.com> wrote:

>

> > Hello,

> >

> > we are trying to add external interfaces on the worker to connect with the

> > DUTs, for example a 4-port USB-to-RS232 converter. Our DUTs have multiple

> > RS232 ports which shall be tested using this remote interface.

> > We have already figured out how to integrate this hardware into the LAVA

> > environment, so that it can be used within the LAVA LXC (using static_info

> > in the device dictionary, resulting in the four /dev/ttyUSB* devices being

> > visible there).

> >

> > First question: We need multiple of these converters attached to the

> > worker. How do we integrate these into LAVA? They all have the same

> > board_id, vendor_id and product_id. If I specify the board_id in the device

> > dictionary multiple times, the device is still added only once.

> >

>

> There must be a way to distinguish devices at a udev level or there is no

> way to identify which devices to add to the LXC. If the converters are not

> unique, then you can only have one per DUT. You will need to purchase new

> hardware from a vendor who has spent the extra few cents to register unique

> IDs.

>

> Think about how this would work without LXC - how would your scripts tell

> these devices apart? How does the kernel tell them apart? Do not rely on

> USB enumeration, that is known to be unreliable. What is ttyUSB7 today can

> be ttyUSB9 tomorrow (or more likely at some random time after N resets due

> to some unexpected change elsewhere or just because it could).

>

> Without solving this, all other questions are moot.

>

 

I get that point, thanks Neil. However, even if I have only one of these devices, it adds four /dev/ttyUSB* device nodes, so all of these are available in my LXC. The order here is deterministic, because it’s one single driver instance which registers them. How do I tell LAVA which of my DUTs is connected to which of these devices?

 

>

> >

> > Second question: We need a way to specify to which of the /dev/ttyUSB*

> > ports a certain RS232 port of the DUT is connected. The place where I would

> > assume to put such information is the device dictionary. But how can we

> > access this information within a LAVA test shell?

> >

>

> Solve the first issue first - without unique identifiers, there will only

> be one /dev/ttyUSB* device added to the LXC in the first place.

>

>

>

> >

> > The documentation specifies some similar mechanism for energy probes:

> >

> >

> > https://validation.linaro.org/static/docs/v2/admin-lxc-deploy.html?highlight=device_info.#other-related-devices

> >

> > It says "Devices which are not directly attached to the worker can also be

> > supported, for example energy probes which communicate over the network".

> >

>

> These are alternative energy probes which have dedicated values.

>

>

>

> > As far as I can tell from the code, though, this seems to be a hard-coded

> > feature without any possibility of adding other custom hardware. Is that

> > correct?

> >

> > If yes, why isn't there a generic mechanism to supply static_info from the

> > device dictionary in the LAVA test shell? Or is there?

> >

>

> Not currently.

>

>

>

> >

> > How can we implement our scenario described above using LAVA?

> >

> > Mit freundlichen Grüßen / Best regards

> > Tim Jaacks

> > DEVELOPMENT ENGINEER

> > Garz & Fricke GmbH

> > Tempowerkring 2

> > 21079 Hamburg

> > Direct: +49 40 791 899 - 55

> > Fax: +49 40 791899 - 39

> > tim.jaacks at garz-fricke.com

> > www.garz-fricke.com

> > WE MAKE IT YOURS!

> >

> > Sitz der Gesellschaft: D-21079 Hamburg

> > Registergericht: Amtsgericht Hamburg, HRB 60514

> > Geschäftsführer: Matthias Fricke, Manfred Garz, Marc-Michael Braun

> >

> >

> >

> >

> >

> > _______________________________________________

> > Lava-users mailing list

> > Lava-users at lists.lavasoftware.org

> > https://lists.lavasoftware.org/mailman/listinfo/lava-users

>

>

>

> --

>

> Neil Williams

> =============

> neil.williams at linaro.org

> http://www.linux.codehelp.co.uk/

> -------------- next part --------------

> An HTML attachment was scrubbed...

> URL: http://lists.lavasoftware.org/pipermail/lava-users/attachments/20190225/2b542809/attachment.html

 

 

Mit freundlichen Grüßen / Best regards

Tim Jaacks
DEVELOPMENT ENGINEER
Garz & Fricke GmbH

Tempowerkring 2
21079 Hamburg

Direct: +49 40 791 899 - 55
Fax: +49 40 791899 - 39
tim.jaacks@garz-fricke.com
www.garz-fricke.com

WE MAKE IT YOURS!
cid:image001.jpg@01D4CCFC.72863550
Sitz der Gesellschaft: D-21079 Hamburg
Registergericht: Amtsgericht Hamburg, HRB 60514
Geschäftsführer: Matthias Fricke, Manfred Garz, Marc-Michael Braun