Attribute error when running network-scan-python example script
Hi,
I encountered an Attribute error when running network-scan-python script from the examples folder. I have a Merge request I can submit that fixes this. Class Network does not have an attribute of get_operator_code, get_operator_long and get_operator_short.
This is on Debian 9 and ModemManager 1.10
def hex2ascii(encoded_string):
bytes_obj = bytes.fromhex(encoded_string)
return bytes_obj.decode("ASCII")
... main()
if networks:
for network in networks:
print('%s: %s - %s (%s, %s)' % (
hex2ascii(modem3gpp.network_get_operator_code(network)),
hex2ascii(modem3gpp.network_get_operator_long(network)),
hex2ascii(modem3gpp.network_get_operator_short(network)),
ModemManager.modem_access_technology_build_string_from_mask(
modem3gpp.network_get_access_technology(network)),
ModemManager.Modem3gppNetworkAvailability.get_string(
modem3gpp.network_get_availability(network))))
else:
print('no networks found')