<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/ModemManager.git/examples/network-scan-python, branch main</title>
<subtitle>gitlab.freedesktop.org: mobile-broadband/ModemManager.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/ModemManager.git/'/>
<entry>
<title>build: drop autotools</title>
<updated>2022-11-07T14:26:02+00:00</updated>
<author>
<name>Aleksander Morgado</name>
<email>aleksandermj@chromium.org</email>
</author>
<published>2022-10-27T20:41:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/ModemManager.git/commit/?id=f419f56628fdcbf4bd5865d0d61147066ba27b17'/>
<id>f419f56628fdcbf4bd5865d0d61147066ba27b17</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>examples: network-scan: get rid of global variables</title>
<updated>2021-02-24T13:59:48+00:00</updated>
<author>
<name>Yegor Yefremov</name>
<email>yegorslists@googlemail.com</email>
</author>
<published>2021-02-24T09:10:00+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/ModemManager.git/commit/?id=cc07d21410d707a3e3cf16c3fa187562dcdea58b'/>
<id>cc07d21410d707a3e3cf16c3fa187562dcdea58b</id>
<content type='text'>
Move the code into the main() routine.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Move the code into the main() routine.
</pre>
</div>
</content>
</entry>
<entry>
<title>examples: network-scan: enable modem before the network scan</title>
<updated>2021-02-14T22:35:54+00:00</updated>
<author>
<name>Yegor Yefremov</name>
<email>yegorslists@googlemail.com</email>
</author>
<published>2021-02-13T16:19:13+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/ModemManager.git/commit/?id=3a32409000ad584ec67b0ddd43b312a37ea5a369'/>
<id>3a32409000ad584ec67b0ddd43b312a37ea5a369</id>
<content type='text'>
Otherwise we get the following exception:

Traceback (most recent call last):
  File "/root/network-scan-python", line 57, in &lt;module&gt;
    networks = modem3gpp.scan_sync()
gi.repository.GLib.Error: mm_core_error_quark: GDBus.Error:org.freedesktop.ModemManager1.Error.Core.WrongState: Cannot scan networks: not enabled yet (8)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Otherwise we get the following exception:

Traceback (most recent call last):
  File "/root/network-scan-python", line 57, in &lt;module&gt;
    networks = modem3gpp.scan_sync()
gi.repository.GLib.Error: mm_core_error_quark: GDBus.Error:org.freedesktop.ModemManager1.Error.Core.WrongState: Cannot scan networks: not enabled yet (8)
</pre>
</div>
</content>
</entry>
<entry>
<title>examples: network-scan: resolve PEP8 issues</title>
<updated>2021-02-14T22:35:49+00:00</updated>
<author>
<name>Yegor Yefremov</name>
<email>yegorslists@googlemail.com</email>
</author>
<published>2021-02-13T16:19:12+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/ModemManager.git/commit/?id=c7d0defddeb03a372fb885eab3480cc56f10115b'/>
<id>c7d0defddeb03a372fb885eab3480cc56f10115b</id>
<content type='text'>
Use autopep8 utility to resolve issues like spaces before brackets
and wrong hanging indentation.

Also treat objects like boolean variables to check whether they are
None or not.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use autopep8 utility to resolve issues like spaces before brackets
and wrong hanging indentation.

Also treat objects like boolean variables to check whether they are
None or not.
</pre>
</div>
</content>
</entry>
<entry>
<title>examples,python: ignore scan operation in modems without 3GPP interface</title>
<updated>2021-02-13T10:24:24+00:00</updated>
<author>
<name>Aleksander Morgado</name>
<email>aleksander@aleksander.es</email>
</author>
<published>2021-02-13T10:24:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/ModemManager.git/commit/?id=12329ac7880b5a43eed8b7b2c4b932c544f43898'/>
<id>12329ac7880b5a43eed8b7b2c4b932c544f43898</id>
<content type='text'>
  Traceback (most recent call last):
    File "/home/aleksander/Development/foss/ModemManager/examples/network-scan-python/./network-scan-python", line 46, in &lt;module&gt;
      modem3gpp.set_default_timeout(300000)
  AttributeError: 'NoneType' object has no attribute 'set_default_timeout'
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
  Traceback (most recent call last):
    File "/home/aleksander/Development/foss/ModemManager/examples/network-scan-python/./network-scan-python", line 46, in &lt;module&gt;
      modem3gpp.set_default_timeout(300000)
  AttributeError: 'NoneType' object has no attribute 'set_default_timeout'
</pre>
</div>
</content>
</entry>
<entry>
<title>examples: rework imports</title>
<updated>2021-02-13T10:09:59+00:00</updated>
<author>
<name>Yegor Yefremov</name>
<email>yegorslists@googlemail.com</email>
</author>
<published>2021-02-13T08:40:05+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/ModemManager.git/commit/?id=16d1cf33183d376fa6cb8925e42c77b2e86be2d9'/>
<id>16d1cf33183d376fa6cb8925e42c77b2e86be2d9</id>
<content type='text'>
Remove unused imports and fix import sorting using isort utility.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove unused imports and fix import sorting using isort utility.
</pre>
</div>
</content>
</entry>
<entry>
<title>libmm-glib,3gpp: make MMModem3gppNetwork a boxed type</title>
<updated>2019-12-13T17:04:02+00:00</updated>
<author>
<name>Aleksander Morgado</name>
<email>aleksander@aleksander.es</email>
</author>
<published>2019-12-13T17:04:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/ModemManager.git/commit/?id=fcbffbd1231052fb3ea543382b59ad195cc45211'/>
<id>fcbffbd1231052fb3ea543382b59ad195cc45211</id>
<content type='text'>
So that bindings know how to free the list of structs.

This commit ends up triggering an API break in the bindings generated
via GObject introspection, because the methods to access the items of
a MMModem3gppNetwork are no longer treated as Modem3gpp class methods.

E.g. instead of:
  ModemManager.Modem3gpp.network_get_operator_code(network)
We should now do:
  network.get_operator_code()

There is no API break in libmm-glib.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
So that bindings know how to free the list of structs.

This commit ends up triggering an API break in the bindings generated
via GObject introspection, because the methods to access the items of
a MMModem3gppNetwork are no longer treated as Modem3gpp class methods.

E.g. instead of:
  ModemManager.Modem3gpp.network_get_operator_code(network)
We should now do:
  network.get_operator_code()

There is no API break in libmm-glib.
</pre>
</div>
</content>
</entry>
<entry>
<title>examples: new network-scan-python example</title>
<updated>2019-12-13T16:36:06+00:00</updated>
<author>
<name>Aleksander Morgado</name>
<email>aleksander@aleksander.es</email>
</author>
<published>2019-12-13T14:38:33+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/ModemManager.git/commit/?id=248cd55f0e5d2a125569f9e7974a43d6b895d6de'/>
<id>248cd55f0e5d2a125569f9e7974a43d6b895d6de</id>
<content type='text'>
This is currently not working completely ok because python doesn't
know how to free the GList of MMModem3gppNetwork elements.

  /org/freedesktop/ModemManager1/Modem/1: starting network scan...
  21403: Orange - Orange (unknown, forbidden)
  21401: vodafone ES - vodafone ES (unknown, forbidden)
  21403: Orange - Orange (unknown, forbidden)
  21403: Orange - Orange (unknown, forbidden)
  21401: vodafone ES - vodafone ES (unknown, forbidden)
  21404: Yoigo - Yoigo (unknown, forbidden)
  21401: vodafone ES - vodafone ES (unknown, forbidden)
  21404: Yoigo - Yoigo (unknown, forbidden)
  21407: Movistar - Movistar (unknown, available)
  21407: Movistar - Movistar (unknown, available)
  21407: Movistar - Movistar (unknown, current)
  free(): invalid pointer
  Aborted
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is currently not working completely ok because python doesn't
know how to free the GList of MMModem3gppNetwork elements.

  /org/freedesktop/ModemManager1/Modem/1: starting network scan...
  21403: Orange - Orange (unknown, forbidden)
  21401: vodafone ES - vodafone ES (unknown, forbidden)
  21403: Orange - Orange (unknown, forbidden)
  21403: Orange - Orange (unknown, forbidden)
  21401: vodafone ES - vodafone ES (unknown, forbidden)
  21404: Yoigo - Yoigo (unknown, forbidden)
  21401: vodafone ES - vodafone ES (unknown, forbidden)
  21404: Yoigo - Yoigo (unknown, forbidden)
  21407: Movistar - Movistar (unknown, available)
  21407: Movistar - Movistar (unknown, available)
  21407: Movistar - Movistar (unknown, current)
  free(): invalid pointer
  Aborted
</pre>
</div>
</content>
</entry>
</feed>
