Hi, Milosz, Through your instructions, I can already connect to the serial port. But I found that if I need to add " " to the command, then the command doesn't work. No matter whether I add \ before " . If you write these commands in a script, it will work. how to input the cm e.g echo "pre_os_command start" >> /tmp/minimal e.g my device: {# orin test short #} {% extends 'orinshort.jinja2' %}
{% set connection_list = ['uart0', 'uart1'] %} {% set connection_commands = {'uart0': 'telnet 10.19.206.234 19990', 'uart1': 'telnet 10.19.206.234 19991'} %} {% set connection_tags = {'uart0': ['primary', 'telnet'], 'uart1': ['telnet']} %}
{% set console_device = console_device | default('ttyUSB1') %} {% set baud_rate = baud_rate | default(115200) %}
{% set pre_power_command = 'echo "pre_power_command" >> /tmp/minimal' %} {% set pre_os_command = 'echo "pre_os_command" >> /tmp/minimal' %} {% set hard_reset_command = [ 'echo "hard_reset_command 0" >> /tmp/minimal', 'echo "hard_reset_command 1" >> /tmp/minimal', 'echo "hard_reset_command 2" >> /tmp/minimal'] %} {% set power_on_command = 'echo "power_on_command" >> /tmp/minimal' %} {% set power_off_command = ['echo "power_off_command 0" >> /tmp/minimal', 'echo "power_off_command 1" >> /tmp/minimal'] %}
{% set flasher_reset_commands = ['echo "1111111" > /tmp/123'] %}
{% block body %}
actions: deploy: methods: flasher: commands: {{ flasher_reset_commands }} boot: connections: serial: methods: minimal:
{% endblock body %}
log: start: 3 minimal-boot (timeout 00:01:00) [common] start: 3.1 connect-device (timeout 00:01:00) [common] [common] connect-device Connecting to device using 'telnet 10.19.206.234 19990' Setting prompt string to ['lava-test: # '] end: 3.1 connect-device (duration 00:00:00) [common] start: 3.2 reset-device (timeout 00:01:00) [common] start: 3.2.1 pdu-reboot (timeout 00:01:00) [common] Calling: 'echo' 'hard_reset_command 0' '>>' '/tmp/minimal'
hard_reset_command 0 >> /tmp/minimal
Returned 0 in 0 seconds Calling: 'echo' 'hard_reset_command 1' '>>' '/tmp/minimal'
hard_reset_command 1 >> /tmp/minimal
Returned 0 in 0 seconds Calling: 'echo' 'hard_reset_command 2' '>>' '/tmp/minimal'
hard_reset_command 2 >> /tmp/minimal
Returned 0 in 0 seconds end: 3.2.1 pdu-reboot (duration 00:00:00) [common] case: pdu-reboot definition: lava duration: 0.32 extra: ... level: 3.2.1 namespace: common result: pass end: 3.2 reset-device (duration 00:00:00) [common] end: 3 minimal-boot (duration 00:00:00) [common] start: 4 finalize (timeout 00:15:00) [common] start: 4.1 power-off (timeout 00:00:10) [common] Calling: 'echo' 'power_off_command 0' '>>' '/tmp/minimal'
power_off_command 0 >> /tmp/minimal
Returned 0 in 0 seconds Calling: 'echo' 'power_off_command 1' '>>' '/tmp/minimal'
power_off_command 1 >> /tmp/minimal
Returned 0 in 0 seconds end: 4.1 power-off (duration 00:00:00) [common] case: power-off definition: lava duration: 0.22 extra: ... level: 4.1 namespace: common result: pass start: 4.2 read-feedback (timeout 00:15:00) [common] Trying 10.19.206.234... Connected to 10.19.206.234. Escape character is '^]'. ser2net port 19990 device /dev/ttyUSB0 [115200 N81] (Debian GNU/Linux) Listened to connection for namespace 'common' for up to 1s Finalising connection for namespace 'common' Disconnecting from telnet: Finalise ] quit quit