answered
2018-12-26 06:44:03 +0200
Hi community, hi jolla, sorry I'm not smart enough to find where I can get in touch with the jolla support ;-) and unfortunately I cannot create a bug report in the mer bugzilla without any account, but I will try to get an account in the next days :-). That's why I post my results here.
Since Feb 2018, I have a Xperia X and when I got it, I flashed Sailfish X on this device. I try to use the SIM card from sipgate, but it didn't connect to the network with the same issues that are described here. With a vodafone SIM card, all is fine. I fixed the issue for my sipgate SIM and it works now.
Why I post my result here in the "Roaming" issue when I using a german network provider in Germany?
Because sipgate is not a reseller like ALDI/TALK or BLau etc. Sipgate is a "own" network provider like O2, Telekome or Vodafone. This means, they have a SS7 connection to the mobile network but they didn't have any transmission towers/radio cell. They use the transmission towers/radio cell from O2/EPLUS and use the roaming technology for that.
What I found:
I install the ofono logger app and every "bad" connection looks like this:
...
2018-12-19 06:23:21.136 drivers/ril/ril_cell_info.c: ril_cell_info_radio_state_cb() ON
2018-12-19 06:23:21.136 RIL1< [00000161] GET_CELL_INFO_LIST
2018-12-19 06:23:21.137 RIL1< 0000: 6d 00 00 00 61 01 00 00 m...a...
...
2018-12-19 06:23:21.167 RIL1> [00000161] GENERIC_FAILURE
2018-12-19 06:23:21.167 RIL1> 0000: 00 00 00 00 61 01 00 00 02 00 00 00 ....a... ....
...
2018-12-19 06:23:21.275 drivers/ril/ril_sim_card.c: ril_sim_card_update_sim_io_active() SIM I/O for slot 0 is inactive
2018-12-19 06:23:23.098 drivers/ril/ril_network.c: ril_network_check_pref_mode() rat mode 1, expected 9
2018-12-19 06:23:23.098 drivers/ril/ril_network.c: ril_network_set_rat() setting rat mode 9
2018-12-19 06:23:23.098 RIL1< [0000016c] SET_PREFERRED_NETWORK_TYPE
2018-12-19 06:23:23.098 RIL1< 0000: 49 00 00 00 6c 01 00 00 01 00 00 00 09 00 00 00 I...l... ........
2018-12-19 06:23:23.107 RIL1> [0000016c] OK
2018-12-19 06:23:23.107 RIL1> 0000: 00 00 00 00 6c 01 00 00 00 00 00 00 ....l... ....
2018-12-19 06:23:23.107 RIL1< [0000016d] GET_PREFERRED_NETWORK_TYPE
2018-12-19 06:23:23.107 RIL1< 0000: 4a 00 00 00 6d 01 00 00 J...m...
2018-12-19 06:23:23.110 RIL1> [0000016d] OK
2018-12-19 06:23:23.110 RIL1> 0000: 00 00 00 00 6d 01 00 00 00 00 00 00 01 00 00 00 ....m... ........
2018-12-19 06:23:23.110 RIL1 0004: 09 00 00 00
2018-12-19 06:23:23.110 drivers/ril/ril_network.c: ril_network_query_pref_mode_cb() rat mode 9 (lte)
2018-12-19 06:23:23.168 RIL1< [0000016e] GET_CELL_INFO_LIST
2018-12-19 06:23:23.168 RIL1< 0000: 6d 00 00 00 6e 01 00 00 m...n...
2018-12-19 06:23:23.171 RIL1> [0000016e] GENERIC_FAILURE
2018-12-19 06:23:23.171 RIL1> 0000: 00 00 00 00 6e 01 00 00 02 00 00 00 ....n... ....
2018-12-19 06:23:25.173 RIL1< [0000016f] GET_CELL_INFO_LIST
2018-12-19 06:23:25.173 RIL1< 0000: 6d 00 00 00 6f 01 00 00 m...o...
2018-12-19 06:23:25.180 RIL1> [0000016f] GENERIC_FAILURE
2018-12-19 06:23:25.180 RIL1> 0000: 00 00 00 00 6f 01 00 00 02 00 00 00 ....o... ....
2018-12-19 06:23:27.183 RIL1< [00000170] GET_CELL_INFO_LIST
2018-12-19 06:23:27.183 RIL1< 0000: 6d 00 00 00 70 01 00 00 m...p...
2018-12-19 06:23:27.200 RIL1> [00000170] GENERIC_FAILURE
2018-12-19 06:23:27.200 RIL1> 0000: 00 00 00 00 70 01 00 00 02 00 00 00 ....p... ....
2018-12-19 06:23:29.203 RIL1< [00000171] GET_CELL_INFO_LIST
2018-12-19 06:23:29.203 RIL1< 0000: 6d 00 00 00 71 01 00 00 m...q...
2018-12-19 06:23:29.210 RIL1> [00000171] GENERIC_FAILURE
2018-12-19 06:23:29.210 RIL1> 0000: 00 00 00 00 71 01 00 00 02 00 00 00 ....q... ....
2018-12-19 06:23:31.212 RIL1< [00000172] GET_CELL_INFO_LIST
2018-12-19 06:23:31.212 RIL1< 0000: 6d 00 00 00 72 01 00 00 m...r...
2018-12-19 06:23:31.216 RIL1> [00000172] GENERIC_FAILURE
2018-12-19 06:23:31.216 RIL1> 0000: 00 00 00 00 72 01 00 00 02 00 00 00 ....r... ....
2018-12-19 06:23:31.216 drivers/ril/ril_cell_info.c: ril_cell_info_list_cb()
...
after that, it looks like my modem is "confused"/undefined behavior. It is searching for any network but didn't get any network.
I found this combination of GET_CELL_INFO_LIST -> GENERIC_FAILURE also in the ofono logs from the Mobile network issues post
It was possible to register one time with my sipgate SIM and the result looks exactly like with vodafone SIM:
...
2018-12-19 07:09:06.851 drivers/ril/ril_cell_info.c: ril_cell_info_radio_state_cb() ON
2018-12-19 07:09:06.851 RIL1< [00000160] GET_CELL_INFO_LIST
2018-12-19 07:09:06.852 RIL1< 0000: 6d 00 00 00 60 01 00 00
...
2018-12-19 07:09:06.892 RIL1> [00000160] GENERIC_FAILURE
2018-12-19 07:09:06.896 RIL1> 0000: 00 00 00 00 60 01 00 00 02 00 00 00
...
2018-12-19 07:09:07.005 drivers/ril/ril_sim_card.c: ril_sim_card_update_sim_io_active() SIM I/O for slot 0 is inactive
2018-12-19 07:09:08.900 RIL1< [0000016b] GET_CELL_INFO_LIST
2018-12-19 07:09:08.902 RIL1< 0000: 6d 00 00 00 6b 01 00 00 m...k...
2018-12-19 07:09:08.904 RIL1> [0000016b] GENERIC_FAILURE
2018-12-19 07:09:08.905 RIL1> 0000: 00 00 00 00 6b 01 00 00 02 00 00 00 ....k... ....
2018-12-19 07:09:09.093 drivers/ril/ril_network.c: ril_network_check_pref_mode() rat mode 1, expected 9
2018-12-19 07:09:09.093 drivers/ril/ril_network.c: ril_network_set_rat() setting rat mode 9
2018-12-19 07:09:09.094 RIL1< [0000016c] SET_PREFERRED_NETWORK_TYPE
2018-12-19 07:09:09.094 RIL1< 0000: 49 00 00 00 6c 01 00 00 01 00 00 00 09 00 00 00 I...l... ........
2018-12-19 07:09:09.104 RIL1> [0000016c] OK
2018-12-19 07:09:09.105 RIL1> 0000: 00 00 00 00 6c 01 00 00 00 00 00 00 ....l... ....
2018-12-19 07:09:09.105 RIL1< [0000016d] GET_PREFERRED_NETWORK_TYPE
2018-12-19 07:09:09.105 RIL1< 0000: 4a 00 00 00 6d 01 00 00 J...m...
2018-12-19 07:09:09.113 RIL1> [0000016d] OK
2018-12-19 07:09:09.113 RIL1> 0000: 00 00 00 00 6d 01 00 00 00 00 00 00 01 00 00 00 ....m... ........
2018-12-19 07:09:09.113 RIL1 0004: 09 00 00 00 ....
2018-12-19 07:09:09.113 drivers/ril/ril_network.c: ril_network_query_pref_mode_cb() rat mode 9 (lte)
2018-12-19 07:09:09.488 RIL1> RESPONSE_VOICE_NETWORK_STATE_CHANGED
2018-12-19 07:09:09.488 RIL1> 0000: 01 00 00 00 ea 03 00 00 ........
2018-12-19 07:09:09.488 drivers/ril/ril_network.c: ril_network_state_changed_cb()
2018-12-19 07:09:09.488 drivers/ril/ril_network.c: ril_network_poll_state()
2018-12-19 07:09:09.488 RIL1< [0000016e] OPERATOR
2018-12-19 07:09:09.488 RIL1< 0000: 16 00 00 00 6e 01 00 00 ....n...
2018-12-19 07:09:09.488 drivers/ril/ril_network.c: ril_network_query_registration_state()
...
I looked into the source code of ofono and I did following change:
diff --git a/ofono/drivers/ril/ril_cell_info.c b/ofono/drivers/ril/ril_cell_info.c
index 2d012534..b28849b8 100644
--- a/ofono/drivers/ril/ril_cell_info.c
+++ b/ofono/drivers/ril/ril_cell_info.c
@@ -401,7 +401,9 @@ static void ril_cell_info_radio_state_cb(struct ril_radio *radio, void *arg)
struct ril_cell_info *self = RIL_CELL_INFO(arg);
DBG_(self, "%s", ril_radio_state_to_string(radio->state));
- ril_cell_info_refresh(self);
+ if (self->radio->state != RADIO_STATE_ON) {
+ ril_cell_info_update_cells(self, NULL);
+ }
}
static void ril_cell_info_sim_status_cb(struct ril_sim_card *sim, void *arg)
With this change/patch it works and I can use now my sipgate SIM in Xperia X with Sailfish X :-)
So I did a quick look into the android source code, how is android doing the "GET_CELL_INFO_LIST" request, because it works on android.
I found following in src/java/com/android/internal/telephony/LocaleTracker.java function updateTrackingStatus() line 356:
...
mSimState == TelephonyManager.SIM_STATE_ABSENT
...
Also I found a comment in src/java/com/android/internal/telephony/LocaleTracker.java function onSimCardStateChanged() line 243:
...
Called when SIM card state changed. Only when we absolutely know the SIM is absent, we get cell info from the network. Other SIM states like NOT_READY might be just a transitioning state.
...
If I look into ofono code in ofono/drivers/ril/ril_cell_info.c function ril_cell_info_refresh() line 391:
I fonud this comment here
...
/* RIL_REQUEST_GET_CELL_INFO_LIST fails without SIM card */
if ( ...... && self->sim_card_ready) {
...
Hm, looks different ... unfortunately I didn't find any hints in the specs of the 3gpp.org about the cell info request.
Btw. on the Jolla 1 phone, they didn't execute any GET_CELL_INFO_LIST request.
I'm not sure yet if my change will help also the roaming issue after crossing the border, but I will try to test this, hopefully in the next month.
Maybe somebody else/Jolla can verify in the log if you see the same GET_CELL_INFO_LIST request failures and test if my change/patch will fix this.
At least my patch / change will be necessary for sipgate.
But my patch is more or less a hack. After I looked into the source code of android, I think the better fix is to test if the SIM card is absent. I try to implement these in ofono, but the self->sim_card_ready
state is not reflecting SIM CARD ABSENT state.
I will take more time for the fix when it is clear that SIM CARD ABSENT state is the correct solution.
UPDATE:
I digging more and more into the android RIL/Telephony stuff....
I found that this LocaleTracker.java
is used in Android 9.0.0 and not in Android 7 or 8. So it doesn't matter.
I debugging the RIL communictation on a Samsung S7 with Android 7 and I see that they call getCellLocation() on TelephonyManager from the system_server or com.google.android.gms.persistent process. So I think my fix is fine and correct. I will create in the next days a pull request/bug report.
Unfortunately it does not fully fix the roaming issue. I taked a sim card from my college from the netherland and after reboot my XPeria X with Sailfish wasn't connected into mobile network. But after I enable and disable the Flight mode it was connected.
What will I do next?
Create pull request for sipgate sim.
Create bug report into mer project on ofono.
Try to get in contact with Jolla support/developer.
Diggin more into the Android/RIL stuff.
Analyze debug RIL log files from Android. (try to find another Sony XPeria X with Android)
Trace SIM card communication with my Simtrace from osmocom.org
Try some changes/fixes on ofono with the SIM card from my college
So stay tuned for updates. It may be take a while because I can do this only in my spare time.
But I want to fix that issue (!) because I love my Jolla phone :-) and it is the only one that I have (no Android or iPhone) ;-).
Second Update:
I saw there is a roaming_issues commit in the ofono repo.
I currently test this and for my sipgate SIM, it is really an improvement! I can say, it works with/fixed my sipgate SIM. Create! Thanks.
For the roaming issue, hm ... unfortunately for me the first tests have not been reliable but maybe I did something wrong. Let me test more ....
I should change my priorit:
....
just came.from slovenia and croatia.
in slovenia all was working as expected.
in croatia i could not.get a.data connection. then i did remember that i had the same issue on jolla1 two years back.
i did download the docs from my provider and did adapt the conn settings. in my case from web to webaut
aftet that all was working.fine
pawel ( 2018-01-07 19:38:11 +0200 )editthis is kinda crap if we have to do that manually... Jolla should update these informations automatically on a regular basis.
Raymaen ( 2018-01-07 21:40:13 +0200 )editHad the same issue with not getting connected after beeing in basemant where no network was available. Sometimes setting flightmode once helped, but most times restart needed. I'm from Germany and also have T-Mobile.
SaimenSays ( 2018-01-07 23:44:34 +0200 )editI'm currently Czech Republic, having just bought a .cz sim card, as both the .au & .pl sim cards I have (I'm holidaying in Poland from Australia)
@pawel What I understand you're saying is endusers need to contact Jolla when they go overseas to get the network settings?
This from a European company, for software that's only available for purchase in Europe? If I was based here this would be a dealbreaker.
Does anyone know what settings I need for t-mobile.pl to work in .cz?
rfa ( 2018-01-09 20:20:45 +0200 )editLiving in Switzerland and crossing the border to France, got the same problem. I started a new thread : https://together.jolla.com/question/177574/mobile-network-issues/
pascalm ( 2018-01-10 17:29:13 +0200 )edit