Wireless ssid name mac

Hello everyone, I am trying to edit this script so that after I start my mk with the default configuration the ssid of wlan1 and wlan2 will be renamed with “IPCOMS_AA: AA: DD” with the last 6 digits being those of the mac adress. I was looking at the default script that my mk brings but I can not modify it, I appreciate if you can help me

                      /interface wireless {
                        set wlan1 mode=ap-bridge band=2ghz-b/g/n tx-chains=0,1 rx-chains=0,1 \
                          disabled=no wireless-protocol=802.11 distance=indoors
                        :local wlanMac  [/interface wireless get wlan1 mac-address];
                        :set ssid "MikroTik-$[:pick $wlanMac 9 11]$[:pick $wlanMac 12 14]$[:pick $wlanMac 15 17]"
                        set wlan1 ssid=$ssid
                        set wlan1 frequency=auto
                        set wlan1 channel-width=20/40mhz-Ce ;
                      }
                      /interface wireless {
                        set wlan2 mode=ap-bridge band=5ghz-a/n/ac tx-chains=0 rx-chains=0 \
                          disabled=no wireless-protocol=802.11 distance=indoors
                        :local wlanMac  [/interface wireless get wlan2 mac-address];
                        :set ssid "MikroTik-$[:pick $wlanMac 9 11]$[:pick $wlanMac 12 14]$[:pick $wlanMac 15 17]"
                        set wlan2 ssid=$ssid
                        set wlan2 frequency=auto
                        set wlan2 channel-width=20/40/80mhz-Ceee

This seem to do what you are asking for.

This line creates a SSID from the Wifi mac address:

:set ssid "MikroTik-$[:pick $wlanMac 9 11]$[:pick $wlanMac 12 14]$[:pick $wlanMac 15 17]"

If you like the “:” you could just do

:local ssid "IPCOMS_$([:pick $wlanMac 9 17])"

Just a test (copy this to terminal)

[
:local wlanMac "6C:3B:6B:88:34:3F"
:local ssid "IPCOMS_$([:pick $wlanMac 9 17])"
:put $ssid
]

Output:

IPCOMS_88:34:3F

This should set the SSID to what you need.

:local ssid "IPCOMS_$([:pick $wlanMac 9 17])"

Just a test (copy this to terminal)

[
:local wlanMac "6C:3B:6B:88:34:3F"
:local ssid "IPCOMS_$([:pick $wlanMac 9 17])"
:put $ssid
]

Output:

IPCOMS_88:34:3F