# Quectel disconnect after action on relay and at boot

**URL:** <https://community.sixfab.com/t/quectel-disconnect-after-action-on-relay-and-at-boot/531>\
**Category:** Cellular IoT Application Shield\
**Tags:** qmi\
**Created:** [July 15, 2020, 3:07pm UTC](https://community.sixfab.com/t/quectel-disconnect-after-action-on-relay-and-at-boot/531 "2020-07-15T15:07:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![fred](https://community.sixfab.com/user_avatar/community.sixfab.com/fred/32/772_2.png) [@fred](https://community.sixfab.com/u/fred)\
**Post date:** [July 15, 2020, 3:07pm UTC](https://community.sixfab.com/t/quectel-disconnect-after-action-on-relay-and-at-boot/531/1 "2020-07-15T15:07:55Z")

</div>

Hello,

Problem of the day for me.

At each reboot, I needed to press button PWRKEY on board to activate wwan0 device.

And at each time I launched action on relay with this script:

```auto
#!/usr/bin/env python3

from cellulariot import cellulariot
import time

node = cellulariot.CellularIoTApp()
node.setupGPIO()

time.sleep(0.5)
node.turnOnRelay()

```

or

```auto
#!/usr/bin/env python3

from cellulariot import cellulariot
import time

node = cellulariot.CellularIoTApp()
node.setupGPIO()

time.sleep(0.5)
node.turnOffRelay()

```

Device wwan0 disapears. And I needed to press again manually button PWRKEY on board.

I installed qmi-reconnect, but at reboot, no more works.

What I can do?  
Thanks

---

<div class="post-metadata">

**Author:** ![ensar](https://community.sixfab.com/user_avatar/community.sixfab.com/ensar/32/8_2.png) [@ensar](https://community.sixfab.com/u/ensar)\
**Post date:** [July 15, 2020, 10:25pm UTC](https://community.sixfab.com/t/quectel-disconnect-after-action-on-relay-and-at-boot/531/2 "2020-07-15T22:25:31Z")

</div>

Hi @fred,

You can use `node.powerUp()` to power up the module instead of pressing the power key physically.

Thank you.

---

<div class="post-metadata">

**Author:** ![fred](https://community.sixfab.com/user_avatar/community.sixfab.com/fred/32/772_2.png) [@fred](https://community.sixfab.com/u/fred)\
**Post date:** [July 16, 2020, 5:48am UTC](https://community.sixfab.com/t/quectel-disconnect-after-action-on-relay-and-at-boot/531/3 "2020-07-16T05:48:13Z")

</div>

Hi @ensar

Thanks, I tried this python part:

```auto
#!/usr/bin/env python3

from cellulariot import cellulariot
import time

node = cellulariot.CellularIoTApp()
node.setupGPIO()

time.sleep(0.5)
node.powerUp()

```

I have this return:

```auto
Sixfab Raspberry Pi Cellular IoT Application Shield Class initialized!
BG96 module powered up!

```

But no more wwan0.

```auto
/sbin/ifconfig wwan0 | grep "inet " | awk '{ print $2 }'
wwan0: erreur lors de la recherche d'infos sur l'interface: P_riph_rique non trouv_

```

😢

---

<div class="post-metadata">

**Author:** ![fred](https://community.sixfab.com/user_avatar/community.sixfab.com/fred/32/772_2.png) [@fred](https://community.sixfab.com/u/fred)\
**Post date:** [July 18, 2020, 2:23pm UTC](https://community.sixfab.com/t/quectel-disconnect-after-action-on-relay-and-at-boot/531/4 "2020-07-18T14:23:24Z")

</div>

Finally I created a script like this:

```auto
#!/usr/bin/env python3

from cellulariot import cellulariot
import time

node = cellulariot.CellularIoTApp()
node.setupGPIO()

time.sleep(1)
node.enable()
node.powerUp()

```

And created a systemd wwan0.service to powerup at boot.

I don’t know if it’s correct practice, but it’s work.
