Params Issue in Shell Command Extension

Hi, I am developing a kiosk interface and I developed a macro command in Mainsail. This command allows the WiFi configuration of the Raspberry Pi. I am using the shell-command plugin here. I managed to pass the SSID information to the command, but. I cannot pass the password information, which is the 2nd params. Does anyone have an idea?

My Macro Command:
[gcode_macro WIFI]
gcode:
{% set ssid = params.SSID %}
{% set password = params.Password %}
RUN_SHELL_COMMAND CMD=wifi_connection PARAMS={ssid}{password}

My .sh File:
nmcli device wifi list
SSID=“$1”
PASSWORD=“$2”
sudo nmcli device wifi connect “$SSID” password “$PASSWORD”

Please do not delete the template. Stick to it.

Please attach the klippy.log to your next post.

3 Likes

AFAIK, multiple params need to be passed quoted and separated by blanks, e.g.

 RUN_SHELL_COMMAND CMD=wifi_connection PARAMS="bla blubb"