Opened 5 years ago

Closed 5 years ago

#465 closed defect (fixed)

org.freesmartphone.GSM.Network.GetStatus lists no Provider

Reported by: michael Owned by: mickey
Priority: major Milestone:
Component: framework/ogsmd Version: milestone5.5
Keywords: Cc:


AT-Command Interpreter ready
+COPS: 0,0," "

+COPS: 0,2,"26201"


the modem return only a string with one withspace,
with this little change the Provider is shown.

diff --git a/framework/subsystems/ogsmd/modems/abstract/ b/framework/subsystems/ogsmd/modems/abstract/
index 573f2ab..a2c38ce 100644
--- a/framework/subsystems/ogsmd/modems/abstract/
+++ b/framework/subsystems/ogsmd/modems/abstract/
@@ -1251,7 +1251,7 @@ class NetworkGetStatus( NetworkMediator ):
                     result["code"] = mccmnc
                     # Some providers' name may be unknown to the modem hence not show up in +COPS=3,0;+COPS?
                     # In this case try to gather the name from our network database
-                    if not "provider" in result:
+                    if not result["provider"].strip():
                         network = const.NETWORKS.get( ( int( mccmnc[:3]), int( mccmnc[3:] ) ), {} )
                         if "brand" in network:
                             result["provider"] = network["brand"]

Change History (1)

comment:1 Changed 5 years ago by mickey

  • Resolution set to fixed
  • Status changed from new to closed

fixed (slightly differently to cover all cases) in [ff1242d731be7dab19a1d6781200803993d42c5d]. thanks!

Note: See TracTickets for help on using tickets.