# Signal strenght to python

**URL:** <https://community.teltonika.lt/t/signal-strenght-to-python/18341>\
**Category:** Question\
**Created:** [March 16, 2026, 1:42pm UTC](https://community.teltonika.lt/t/signal-strenght-to-python/18341 "2026-03-16T13:42:00Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![SimonNec](https://community.teltonika.lt/letter_avatar_proxy/v4/letter/s/43a26b/32.png) [@SimonNec](https://community.teltonika.lt/u/SimonNec)\
**Post date:** [March 16, 2026, 1:42pm UTC](https://community.teltonika.lt/t/signal-strenght-to-python/18341/1 "2026-03-16T13:42:00Z")

</div>

I have tried with success to post the signal strength of a TRB140.

Now I need something similar with a TRB145, but the data to server - section does not come with the same options (actually there is only “modbus” instead of “GSM” and all the other stuff).

I would prefer to realize this with python anyway. But things like

ubus call gsm.modem0 get\_signal\_query (Not found, similar to a case in your forum)

Quality = os.system(“gsmctl --signal”) (Prints to Cli but returns nothing)

didn’t ghet me further.

Can you give me some advice?

 ![MQTT 140](https://community.teltonika.lt/uploads/default/original/3X/2/3/238c4eaadb17b438a94b1f4ee238ae595dd4a65c.png)

 ![TRB 145 data to server](https://community.teltonika.lt/uploads/default/original/3X/3/2/322abe131b39713c4bac1629ae4b0a5dcb80a1ba.png)

---

<div class="post-metadata">

**Author:** ![Justinas](https://community.teltonika.lt/user_avatar/community.teltonika.lt/justinas/32/17132_2.png) [@Justinas](https://community.teltonika.lt/u/Justinas)\
**Post date:** [March 25, 2026, 7:36pm UTC](https://community.teltonika.lt/t/signal-strenght-to-python/18341/3 "2026-03-25T19:36:04Z")

</div>

Greetings,

Could you please confirm which firmware version is currently running on the TRB145?

Also, can you clarify whether the first screenshot is from the TRB140 and the second from the TRB145? If that is the case, please update the TRB145 to the stable firmware version 07.20.3

You can find step by step instructions for updating the firmware here: [How to Download & Update Firmware | Teltonika Networking - YouTube](https://www.youtube.com/watch?v=6mS8HRnFubA)

Best Regards,  
Justinas

---

<div class="post-metadata">

**Author:** ![SimonNec](https://community.teltonika.lt/letter_avatar_proxy/v4/letter/s/43a26b/32.png) [@SimonNec](https://community.teltonika.lt/u/SimonNec)\
**Post date:** [April 3, 2026, 5:45am UTC](https://community.teltonika.lt/t/signal-strenght-to-python/18341/4 "2026-04-03T05:45:39Z")

</div>

It seems that my last response was not saved for some reason.

Anyway:

-The type of TRB is written in the names of the picture s

-I try not to update anymore because of problems we had with our scripts (see my last topic in the forum) respectively with the package manager s.

-The main question now is how these digital- or Analog (ex.TRB141) gpios can be read from pyt hon

---

<div class="post-metadata">

**Author:** ![SimonNec](https://community.teltonika.lt/letter_avatar_proxy/v4/letter/s/43a26b/32.png) [@SimonNec](https://community.teltonika.lt/u/SimonNec)\
**Post date:** [April 8, 2026, 6:01am UTC](https://community.teltonika.lt/t/signal-strenght-to-python/18341/5 "2026-04-08T06:01:10Z")

</div>

No answer?

---

<div class="post-metadata">

**Author:** ![Justinas](https://community.teltonika.lt/user_avatar/community.teltonika.lt/justinas/32/17132_2.png) [@Justinas](https://community.teltonika.lt/u/Justinas)\
**Post date:** [August 5, 2026, 12:31pm UTC](https://community.teltonika.lt/t/signal-strenght-to-python/18341/6 "2026-08-05T12:31:16Z")

</div>

Greetings,

Apologies for the delayed response.

Could you please clarify whether you still require assistance or if the issue has already been resolved?

Best Regards,  
Justinas

---

<div class="post-metadata">

**Author:** ![SimonNec](https://community.teltonika.lt/letter_avatar_proxy/v4/letter/s/43a26b/32.png) [@SimonNec](https://community.teltonika.lt/u/SimonNec)\
**Post date:** [August 17, 2026, 11:47am UTC](https://community.teltonika.lt/t/signal-strenght-to-python/18341/7 "2026-08-17T11:47:33Z")

</div>

Hello Justinas, that was some months ago but yes, I still woud like to read that GPIOs and GSMCTL and other parameters with python.

---

<div class="post-metadata">

**Author:** ![Justinas](https://community.teltonika.lt/user_avatar/community.teltonika.lt/justinas/32/17132_2.png) [@Justinas](https://community.teltonika.lt/u/Justinas)\
**Post date:** [September 23, 2026, 3:53pm UTC](https://community.teltonika.lt/t/signal-strenght-to-python/18341/8 "2026-09-23T15:53:37Z")

</div>

Greetings,

Apologies for the delayed response.

> [@SimonNec](#):
>
> Quality = os.system(“gsmctl --signal”) (Prints to Cli but returns nothing)

os.system() executes the command in a subshell, prints standard output directly to the terminal, and only returns the **exit status code** (0 for success). It cannot be assigned to a variable.

If you want to use the os library, you should use os.popen() instead, for example:

```auto
python3 -c 'import os; Quality = os.popen("gsmctl --signal").read().strip(); print("---"); print(f"Captured into variable:\n{Quality}")'

```

 ![image](https://community.teltonika.lt/uploads/default/original/3X/8/e/8e28d6f87cccf90f5c3222ab8526539eebb37a08.png)

Alternatively, you can use python’s `subprocess.check_output()` or `subprocess.run()` with `capture_output=True`, for example:

```auto
python3 -c "import subprocess; print('Full Signal:\n' + subprocess.check_output(['gsmctl', '--signal']).decode().strip())"

```

 ![image](https://community.teltonika.lt/uploads/default/original/3X/9/8/985b0976117dee2d3c4a1fd0911182eb57041d01.png)

For the input/output pins, you can use the command `ubus list ioman*`, you will get a list with their identifiers.

And using ubus in python with os.open you can read the values, for example to parse the status of DIN1:

```auto
python3 -c 'import os, json; data = json.loads(os.popen("ubus call ioman.gpio.din1 status").read()); print("DIN1 State:", data["value"])'

```

![image](https://community.teltonika.lt/uploads/default/original/3X/b/4/b488528f03345e79b0ec0657e5c5dc32c8da322b.png)

If you have any further questions, please let me know.

Best Regards,  
Justinas

---

<div class="post-metadata">

**Author:** ![SimonNec](https://community.teltonika.lt/letter_avatar_proxy/v4/letter/s/43a26b/32.png) [@SimonNec](https://community.teltonika.lt/u/SimonNec)\
**Post date:** [September 28, 2026, 12:57pm UTC](https://community.teltonika.lt/t/signal-strenght-to-python/18341/9 "2026-09-28T12:57:41Z")

</div>

Perfect, thanks Justinas, that’s what I was looking for!

---

<div class="post-metadata">

**Author:** ![Justinas](https://community.teltonika.lt/user_avatar/community.teltonika.lt/justinas/32/17132_2.png) [@Justinas](https://community.teltonika.lt/u/Justinas)\
**Post date:** [October 2, 2026, 12:35pm UTC](https://community.teltonika.lt/t/signal-strenght-to-python/18341/10 "2026-10-02T12:35:42Z")

</div>

Greetings,

Glad I could help, if you have any further questions, please don’t hesitate to reach out.

Best Regards,  
Justinas
