.MESH_INIT_COND: &MESH_INIT_COND test script: InitCondMesh restore post cmd set: - '' - - 'MSSC SSC[1-] mesh -F -o 4 -a 1' - ['P SSC[1-] C +MESHFLAG:OK'] - - 'MSSC SSC[1-] mesh -F -o 5 -a 1' - ['P SSC[1-] C +MESHFLAG:OK'] - - 'MSSC SSC[1-] mesh -Q -o 1' - ['P SSC[1-] C MESH_NETWORK'] - - 'MSSC SSC[1-] mesh -Q -o 3' - ['P SSC[1-] C +MESH_CONFIG:ALL'] - - 'MSSC SSC[1-] ram' - ['P SSC[1-] C +FREEHEAP:'] .mesh_get_device_mac: &mesh_get_device_mac LIST_MERGE: - - 'MSSC SSC[1-] mac' - ['R SSC[1-] A :\+STAMAC:(.+)\r\n'] .mesh_check_get_tree: &mesh_check_get_tree LIST_MERGE: - - 'MSSC SSC[1-] mac' - ['P SSC[1-] A :\+STAMAC:(.+)\r\n'] - - 'MSSC SSC[1-] mesh -Q -o 2' - ['P SSC[1-] T '] - - 'MESHTREE' - ['P PC_COM RE "MESHTREE:%%s%20nodes"%%()'] .mesh_check_tree_stable: &mesh_check_tree_stable LIST_MERGE: - - 'DELAY 10' - [''] - - 'SSC MNODE(0) mesh -Q -o 1 -t 10' - ['R MNODE(0) C MESH_STABLE_CHECK:PASS'] .reboot_all: &reboot_all LIST_MERGE: - - 'MSSC SSC[1-] reboot' - ['P SSC[1-] C !!!ready!!!'] .force_reboot: &force_reboot LIST_MERGE: - - 'FPOWERON SSC[1-]' - [''] - - 'DELAY 1' - [''] - - 'MSSC SSC[1-] restore' - ['P SSC[1-] C !!!ready!!!'] .all_nodes_mesh_config: &all_nodes_mesh_config LIST_MERGE: - - 'MSSC SSC[1-] mesh -I' - ['P SSC[1-] C +MESH:INITED'] - - 'MSSC SSC[1-] mesh -A -o 12 -t -c -l -f -b ' - ['P SSC[1-] C +MESH_SET_PARENT_SWITCH:OK'] - - 'MSSC SSC[1-] mesh -A -o 14 -t -c -l ' - ['P SSC[1-] C +MESH_RSSI_THRESHOLD:OK'] - - 'MSSC SSC[1-] mesh -A -o 9 -t -s ' - ['P SSC[1-] C +MESH_SET_AP_AUTH_MODE:OK'] - - 'MSSC SSC[1-] mesh -P -g -s -p -n -m -y ' - ['P SSC[1-] C +MESH:CONFIG,OK'] .root_do_connect: &root_do_connect LIST_MERGE: - - 'SOC SOC1 LISTEN ' - ['R SOC_COM L OK'] - - 'SSC MNODE(0) mesh -S -o 0 -i -t ' - ['P MNODE(0) C +CONNECT,OK'] - ['P SOC1 C +ACCEPT'] - - 'SOC SOC1 MACCEPT GSOC1' - ['R SOC_COM L OK'] initial condition: - tag: ENABLED_1 <<: *MESH_INIT_COND initial condition detail: if mesh tree not exist, start one node first, then start others, after mesh network established, root connect server check cmd set: - '' - *mesh_check_get_tree - *mesh_check_tree_stable - *root_do_connect restore cmd set: - '' - *reboot_all - *all_nodes_mesh_config - - SSC SSC1 mesh -T - - P SSC1 C +MESH:START,OK - - DELAY 10 - - P SSC1 C MESH_EVENT_CONNECTED - - SSC SSC[2-] mesh -T - - P SSC[2-] C +MESH:START,OK - - DELAY - - '' - *mesh_check_get_tree - *mesh_check_tree_stable - *root_do_connect force restore cmd set: - '' - *force_reboot - *all_nodes_mesh_config - - SSC SSC1 mesh -T - - P SSC1 C +MESH:START,OK - - DELAY 10 - - P SSC1 C MESH_EVENT_CONNECTED - - SSC SSC[2-] mesh -T - - P SSC[2-] C +MESH:START,OK - - DELAY - - '' - *mesh_check_get_tree - *mesh_check_tree_stable - *root_do_connect - tag: ENABLED_2 <<: *MESH_INIT_COND initial condition detail: if mesh tree not exist, start all nodes together check cmd set: - '' - *mesh_check_get_tree - *mesh_check_tree_stable restore cmd set: - '' - *reboot_all - *all_nodes_mesh_config - - MSSC SSC[1-] mesh -T - - P SSC[1-] C +MESH:START,OK - - DELAY - - '' - *mesh_check_get_tree - *mesh_check_tree_stable force restore cmd set: - '' - *force_reboot - *all_nodes_mesh_config - - MSSC SSC[1-] mesh -T - - P SSC[1-] C +MESH:START,OK - - DELAY - - '' - *mesh_check_get_tree - *mesh_check_tree_stable - tag: ENABLED_3 <<: *MESH_INIT_COND initial condition detail: all mesh nodes configed but not started check cmd set: - '' - - ASSERT - - '' restore cmd set: - '' - *reboot_all - *all_nodes_mesh_config - *mesh_get_device_mac force restore cmd set: - '' - *force_reboot - *all_nodes_mesh_config - *mesh_get_device_mac - tag: DISABLED_1 <<: *MESH_INIT_COND initial condition detail: all mesh node in softap+sta mode, disable all mesh node restore post cmd set: - '' check cmd set: - '' - - ASSERT - - '' restore cmd set: - '' - *reboot_all - - MSSC SSC[1-] op -S -o 3 - - P SSC[1-] C +MODE:OK - - MSSC SSC[1-] sta -D - - P SSC[1-] C +QAP:OK - *mesh_get_device_mac force restore cmd set: - '' - *force_reboot - - MSSC SSC[1-] op -S -o 3 - - P SSC[1-] C +MODE:OK - - MSSC SSC[1-] sta -D - - P SSC[1-] C +QAP:OK - *mesh_get_device_mac