Ticket #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: |
Description
AT-Command Interpreter ready at+COPS=3,0;+COPS?;+COPS=3,2;+COPS? at+COPS=3,0;+COPS?;+COPS=3,2;+COPS? +COPS: 0,0," " +COPS: 0,2,"26201" OK
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/mediator.py b/framework/subsystems/ogsmd/modems/abstract/mediator.py
index 573f2ab..a2c38ce 100644
--- a/framework/subsystems/ogsmd/modems/abstract/mediator.py
+++ b/framework/subsystems/ogsmd/modems/abstract/mediator.py
@@ -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
Note: See
TracTickets for help on using
tickets.

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