# Auto send config file for device

**URL:** <https://forum.genieacs.com/t/auto-send-config-file-for-device/4518>\
**Category:** Uncategorized\
**Created:** [September 21, 2023, 2:24pm UTC](https://forum.genieacs.com/t/auto-send-config-file-for-device/4518 "2023-09-21T14:24:56Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mikel](https://avatars.discourse-cdn.com/v4/letter/m/e480ec/32.png) [@Mikel](https://forum.genieacs.com/u/Mikel)\
**Post date:** [September 21, 2023, 2:24pm UTC](https://forum.genieacs.com/t/auto-send-config-file-for-device/4518/1 "2023-09-21T14:24:56Z")

</div>

Hi!  
I have GenieAcs server, one device with tr-069 and config for this device.  
I can manually send config file from server.  
How configurate server to auto send config file for all devices with one type device?

---

<div class="post-metadata">

**Author:** ![akcoder](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.genieacs.com/akcoder/32/11_2.png) [@akcoder](https://forum.genieacs.com/u/akcoder)\
**Post date:** [September 21, 2023, 6:47pm UTC](https://forum.genieacs.com/t/auto-send-config-file-for-device/4518/2 "2023-09-21T18:47:57Z")

</div>

See this question/answer for a solution.

> [@Massive Firmware Upgrade](https://forum.genieacs.com/t/massive-firmware-upgrade/797):
>
> We are testing firmware upgrade using Genie GUI and also via NBI through tool Postman, and it is working very well. However, there is a question about massive FW update , which I would like to have your help answering the questions below: Is there a way to make a massive FW upgrade campaing for an specific CPE device? Is there a way to upgrade the FW for a CPE located in an specific region, for instance? The activities listed above are very important for small ISPs.

---

<div class="post-metadata">

**Author:** ![Mikel](https://avatars.discourse-cdn.com/v4/letter/m/e480ec/32.png) [@Mikel](https://forum.genieacs.com/u/Mikel)\
**Post date:** [September 22, 2023, 11:18am UTC](https://forum.genieacs.com/t/auto-send-config-file-for-device/4518/4 "2023-09-22T11:18:00Z")

</div>

I create new preset  
 ![image](https://canada1.discourse-cdn.com/flex035/uploads/genieacs/original/2X/d/dd71056062cfd9e1731592117df61dcf445b4297.png)  
I tryed set events 1 BOOT and 0 BOOTSTRAP  
and in provisions write: log(“test log testLoadFile”)  
After I reboot device, but not get log.  
How need useng events? How get my test log?

---

<div class="post-metadata">

**Author:** ![Mikel](https://avatars.discourse-cdn.com/v4/letter/m/e480ec/32.png) [@Mikel](https://forum.genieacs.com/u/Mikel)\
**Post date:** [September 22, 2023, 12:55pm UTC](https://forum.genieacs.com/t/auto-send-config-file-for-device/4518/5 "2023-09-22T12:55:18Z")

</div>

Sorry, 1 BOOT is work, after I write work example if I can do this

---

<div class="post-metadata">

**Author:** ![Mikel](https://avatars.discourse-cdn.com/v4/letter/m/e480ec/32.png) [@Mikel](https://forum.genieacs.com/u/Mikel)\
**Post date:** [September 22, 2023, 2:10pm UTC](https://forum.genieacs.com/t/auto-send-config-file-for-device/4518/6 "2023-09-22T14:10:48Z")

</div>

I add in Provosion this code

```auto
log("test log testLoadFile1")
let configOrigin = getParameterValue('InternetGatewayDevice.DeviceInfo.X_CLEARACCESS_COM_Origin');
let username = getParameterValue('InternetGatewayDevice.ManagementServer.Username');
log("configOrigin: " + configOrigin)
log("username: " + username)
let file = upgradeFiles[0];
let basePath = "Downloads.[FileType:" + file.type + "]";
log("basePath: " + basePath)
log("file.filename: " + file.filename)
log("file.type: " + file.type)
log("now: " + now)
log("--------------------------------------------------------")

```

and get errors:

```auto
2023-09-22T14:04:45.205Z [WARN] ::ffff:28.1.30.13 000000-LNC%2D2101-65740300A2900003L: Channel has faulted; channel="default" retries=0 faultCode="script.ReferenceError" faultMessage="getParameterValue is not defined"
2023-09-22T14:04:45.205Z [WARN] ::ffff:28.1.30.13 000000-LNC%2D2101-65740300A2900003L: Channel has faulted; channel="inform" retries=0 faultCode="script.ReferenceError" faultMessage="getParameterValue is not defined"
2023-09-22T14:04:45.211Z [WARN] ::ffff:28.1.30.13 000000-LNC%2D2101-65740300A2900003L: Channel has faulted; channel="testLoadFile" retries=0 faultCode="script.ReferenceError" faultMessage="getParameterValue is not defined"

```

How fix this?

---

<div class="post-metadata">

**Author:** ![akcoder](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.genieacs.com/akcoder/32/11_2.png) [@akcoder](https://forum.genieacs.com/u/akcoder)\
**Post date:** [September 22, 2023, 8:13pm UTC](https://forum.genieacs.com/t/auto-send-config-file-for-device/4518/7 "2023-09-22T20:13:04Z")

</div>

> [@Mikel](#):
>
> How fix this?

You can fix this by taking the time to understand how GenieACS works instead of just blindly copying and pasting. You can also engage with a **paid** support contract by emailing [sales@genieacs.com](mailto:sales@genieacs.com).
