mroczis / netmonster-core

Android Telephony SDK bridge with some additional features
Apache License 2.0
334 stars 71 forks source link

Dish/Boost Mobile (313 340) not detected #106

Closed cuba200611 closed 3 weeks ago

cuba200611 commented 1 month ago

Hello,

I have a Motorola Edge Plus 2023 that uses Dish's Project Genesis service.

It uses a dual SIM (physical + eSIM) setup - the phone uses the physical SIM uses AT&T's network for phone calls and texting, and it uses the eSIM for data on Dish's network (313 340), roaming on either AT&T or T-Mobile when there is no Dish coverage.

However, the NetMonster app does not detect the eSIM - only the physical SIM. When I force both SIMs to be NR only (by the ##4636## hidden menu), the app says there is no network detected at all even though the phone is connected to Dish's network (which uses NR SA).

Thank you.

cuba200611 commented 4 weeks ago

Here is a NetMonster bug report with the default settings:

report.txt

cuba200611 commented 4 weeks ago

While here's one with both SIMs set to NR only:

report (2).txt

handymenny commented 4 weeks ago

cuba200611 shared some logs with me, the issue is that the data-only esim has this service state:

mVoiceRegState=1(OUT_OF_SERVICE), mDataRegState=0(IN_SERVICE), mVideoRegState=1(OUT_OF_SERVICE), mChannelNumber=401050, duplexMode()=0, mCellBandwidths=[], mOperatorAlphaLong=DISH Wireless, mOperatorAlphaShort=DISH Wireless, isManualNetworkSelection=false(automatic), getRilVoiceRadioTechnology=0(Unknown), getRilDataRadioTechnology=20(NR_SA), mCssIndicator=unsupported, mNetworkId=-1, mSystemId=-1, mCdmaRoamingIndicator=-1, mCdmaDefaultRoamingIndicator=-1, mIsEmergencyOnly=false, isUsingCarrierAggregation=true, mArfcnRsrpBoost=0, mNetworkRegistrationInfos=[NetworkRegistrationInfo{ domain=PS transportType=WLAN registrationState=NOT_REG_OR_SEARCHING networkRegistrationState=NOT_REG_OR_SEARCHING roamingType=NOT_ROAMING accessNetworkTechnology=UNKNOWN rejectCause=0 emergencyEnabled=false availableServices=[] cellIdentity=null voiceSpecificInfo=null dataSpecificInfo=null nrState=**** rRplmn= isUsingCarrierAggregation=false}, NetworkRegistrationInfo{ domain=CS transportType=WWAN registrationState=NOT_REG_SEARCHING networkRegistrationState=NOT_REG_SEARCHING roamingType=NOT_ROAMING accessNetworkTechnology=UNKNOWN rejectCause=0 emergencyEnabled=false availableServices=[] cellIdentity=null voiceSpecificInfo=VoiceSpecificRegistrationInfo { mCssSupported=false mRoamingIndicator=0 mSystemIsInPrl=0 mDefaultRoamingIndicator=0} dataSpecificInfo=null nrState=**** rRplmn= isUsingCarrierAggregation=false}, NetworkRegistrationInfo{ domain=PS transportType=WWAN registrationState=HOME networkRegistrationState=HOME roamingType=NOT_ROAMING accessNetworkTechnology=NR rejectCause=0 emergencyEnabled=false availableServices=[DATA] cellIdentity=CellIdentityNr:{ mPci = *** mTac = *** mNrArfcn = 401050 mBands = [70] mMcc = 313 mMnc = 340 mNci = **** mAlphaLong = DISH Wireless mAlphaShort = DISH mAdditionalPlmns = {} mSnpnInfo = null mCagInfo = null } voiceSpecificInfo=null dataSpecificInfo=android.telephony.DataSpecificRegistrationInfo :{ maxDataCalls = 16 isDcNrRestricted = false isNrAvailable = false isEnDcAvailable = false mLteAttachResultType = 0 mLteAttachExtraInfo = 0 null } nrState=**** rRplmn=313340 isUsingCarrierAggregation=true}], mNrFrequencyRange=0, mOperatorAlphaLongRaw=DISH Wireless, mOperatorAlphaShortRaw=DISH, mIsDataRoamingFromRegistration=false, mIsIwlanPreferred=false, mIsOnCsgCell=false, mCsgId=-1, mCsgName=null, mIsLteFemtoCell=false

Netmonster core filters out SIMs with state equal to OUT_OF_SERVICE: https://github.com/mroczis/netmonster-core/blob/2938014b98a096f2deb3a30561c6f5ced4307c29/library/src/main/java/cz/mroczis/netmonster/core/subscription/SubscriptionManagerCompat22.kt#L38-L43

And ServiceState.state as per [spec](https://developer.android.com/reference/android/telephony/ServiceState#getState()) is:

Get current voice service state

One way to solve this issue is to also validate mDataRegState. It's quite trivial, you can find an example here: https://github.com/handymenny/netmonster-core/commit/238015a7d66a7da8af48e459858a26706caef0ed

mroczis commented 3 weeks ago

Thanks @handymenny for digging into the issue. I have adjusted the code in the lib!