Hi,

 

I’m looking into LAVA and I figured I’d give it a try by flashing a frdm-k64f MCU board and parse its output (the board behaves as a USB to UART adapter through /dev/ttyACM0 at 115200bps). I created the board instance as:

 

{% extends 'frdm-k64f.jinja2' %}

{% set board_id = '0240000048824e45004a700add89001a8761000097969900' %}

{% set usb_mass_device = '/dev/disk/by-id/usb-MBED_VFS_0240000048824e45004a700add89001a8761000097969900-0:0' %}

 

I’m able to launch a job (frdm-k64f.job) but LAVA complains and returns:

 

Invalid job data: ["Invalid device configuration - missing 'commands'"]

 

So I went looking for an example and found this which defines something called connection_commands as:

 

{% set connection_commands = {'usb0': 'telnet lab-slave-0 7115'} %}

 

Based on the documentation I’m under the impression that the slave/dispatcher is expected to momentarily open a telnet server on port 7115 and forward the output of the serial port through that server to be retrieved by a client implemented by the master.

 

If I match the example the dispatcher flashes the board, but a telnet server is never launched on the slave. It’s not surprising as at no point did I specify a tty or a baud rate for the dispatcher to connect to the board in order and launch something like:

 

socat TCP-LISTEN:7115,fork,reuseaddr FILE:/dev/ttyACM0,b115200,raw

 

When I sit on the slave and manually launch the command the master successfully connects to TCP port 7115. Problem is it does so after the board outputted its results (and obviously it’s not the right way to do it).

 

So I have 3 questions:

 

·         How should a UART connection be specified (/dev/ttyACM0, 115200bps) to LAVA?

·         Once the UART connection specified, will the dispatcher buffer the board’s output until it is retrieved by the master?

·         Why does LAVA rely on a telnet channel instead of the existing zmq channel to forward the output of the board from the slave to the master?

 

Thanks