# Mender-convert unsupported script state: Download

**URL:** <https://hub.mender.io/t/mender-convert-unsupported-script-state-download/5124>\
**Category:** General Discussions\
**Created:** [July 15, 2022, 9:41pm UTC](https://hub.mender.io/t/mender-convert-unsupported-script-state-download/5124 "2022-07-15T21:41:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![m10](https://avatars.discourse-cdn.com/v4/letter/m/ecae2f/32.png) [@m10](https://hub.mender.io/u/m10)\
**Post date:** [July 15, 2022, 9:41pm UTC](https://hub.mender.io/t/mender-convert-unsupported-script-state-download/5124/1 "2022-07-15T21:41:05Z")

</div>

I am trying add a state script that keeps our battery powered IOT devices powered up for an extended period while downloading the large A/B update image. I am trying to hook into the **Download\_Enter** state and I modified the config file adding the script line like this:

```auto
source configs/beaglebone_black_base_config
MENDER_STORAGE_TOTAL_SIZE_MB="3616"
MENDER_DATA_PART_SIZE_MB="256"
MENDER_BOOT_PART_SIZE_MB="16"
MENDER_DEVICE_TYPE="beaglebone-emmc"
MENDER_STORAGE_DEVICE_BASE="/dev/mmcblk1p"
IMAGE_OVERHEAD_FACTOR="1.2"
mender_create_artifact() {
    local -r device_types="${1}"
    local -r artifact_name="${2}"
    local -r image_name="${3}"
    local -r all_device_types="$(for device_type in $device_types; do echo " --device-type $device_type"; done)"

    mender_artifact=deploy/${image_name}.mender
    log_info "Writing Mender artifact to: ${mender_artifact}"
    log_info "This can take up to 20 minutes depending on which compression method is used"

    run_and_log_cmd "mender-artifact --compression ${MENDER_ARTIFACT_COMPRESSION} \
      write rootfs-image \
      --file work/rootfs.img \
      --output-path ${mender_artifact} \
      --artifact-name ${artifact_name} \
      --script Download_Enter_00_keepalive \
      ${all_device_types}"
}

```

I am getting an unsupported script state error like this:

```auto
	mender-artifact --compression gzip write rootfs-image --file work/rootfs.img --output-path deploy/IMG07-beaglebone-emmc-mender.mender --artifact-name release-16 --script Download_Enter_00_keepalive --device-type beaglebone-emmc
	Unsupported script state: Download

```

What could be the problem? Thank you

---

<div class="post-metadata">

**Author:** ![trini](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/trini/32/1007_2.png) [@trini](https://hub.mender.io/u/trini)\
**Post date:** [July 18, 2022, 2:12pm UTC](https://hub.mender.io/t/mender-convert-unsupported-script-state-download/5124/2 "2022-07-18T14:12:06Z")

</div>

As explained in the [root filesystem and artifact scripts](https://docs.mender.io/artifact-creation/state-scripts#root-file-system-and-artifact-scripts) section of the state-scripts documentation, scripts that have the _Artifact_ prefix can be managed via `mender-artifact` and others like _Download_ must be in the currently running image in order to be executed during the installation of the artifact you’re creating (and so must exist inside of the artifact you’re creating if you also want them to be available to the next update, and so on).
