Skip to content

Commit 6b207c2

Browse files
authored
LTE power: add lte_modem_en_on_boot() (#388)
* LTE power: add lte_modem_en_on_boot()
1 parent 22927a3 commit 6b207c2

File tree

1 file changed

+21
-5
lines changed

1 file changed

+21
-5
lines changed

content/tutorials/networks/lte/power.md

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,28 @@ aliases:
66
- chapter/tutorials/power
77
---
88

9-
There are some trade offs one can do to reduce power consumption of the LTE modem. You can limit connectivity in exchange for saving power consumption.
9+
There are some trade offs one can do to reduce power consumption of the LTE modem. You trade connectivity in exchange for power consumption. The sections below show different options.
1010

11-
Let's start with the simplest choice: Turn off or not. It's not very sophisticated, but for completeness, let's start with this:
1211

1312

14-
## Turn LTE modem off
13+
## Don't enable on boot
14+
15+
If you don't need LTE connectivity at all, you can make sure the modem is not initialized at boot with the following command:
16+
17+
```python
18+
19+
import pycom
20+
pycom.lte_modem_en_on_boot(False)
21+
```
22+
23+
This setting is persisted across reboots.
24+
25+
26+
## Turn off after use
27+
28+
29+
If you do use LTE connectivity, but you want the modem to go into low power consumption after you are done with the communication, you can disable it with `deinit()` at the end.
30+
1531

1632
```python
1733

@@ -64,8 +80,8 @@ The example above is the simple case where we attach, connect, communicate and t
6480

6581
## Leave LTE modem on
6682

67-
Depending on your use case, you may want to save the time (and energy) for reattching that you get after [turning the modem off](#turn-lte-modem-off).
68-
If your device communicates a lot, then you can choose to not turn it off at all, save the time for the reattach. However, you then trade the higher power consumption during any idle time. For this, simply remove the deinit from the example:
83+
Depending on your use case, you may want to save the time (and energy) for reattaching that you get after [turning the modem off](#Turn-off-after-use).
84+
If your device communicates frequently, then you can choose to not turn the modem off at all and save the time for the reattach. Then you trade the higher power consumption during any idle time for the quicker response. For this, simply remove the deinit from the example:
6985

7086

7187
```python

0 commit comments

Comments
 (0)