[C2] Mobile network unavailable, ofono crashes badly, continuously, dumps core

Aha! Solved it!

Tl;DR: it seems it was an unsent SMS sticking around in /var/lib/ofono


Background: That SIM is a prepaid one.

After buying it, you have to

  1. Register it/verify yourself on some website (legal requirement)
  2. Top up the prepaid amount (starts with 0)
  3. Select a data/voice plan (switching away from the default plan). Which can among other options can be done by sending SMS to some internal short number.

While 1. and/or 2. has not been done, one can receive SMS from the provider, and do some things like dial *#101# to check the prepaid balance.

Just for kicks I tried sending the “Select plan” SMS twice, and some to another phone number of mine.
These messages were either in “Failed”, or in “Sending” state when I rebooted, and this is the pointthe Ofono crashes began.

After I did the below and rebooted, ofono crashes are gone,
Not sure which one of the files was the reason, but it seems fixed now.
Probably it’s the tx_queue thing, and the other ones wouldn’t have been necessary, too late to check now.

root@PGJollaC2:/var/lib/ofono/2320xxxxxxxxxxxxxxx/tx_queue # ls
0-14-7107xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
1-14-3F38xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
2-14-1B0Dxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
root@PGJollaC2:/var/lib/ofono/2320xxxxxxxxxxxxxxx/tx_queue # rm -rf *

root@PGJollaC2:/var/lib/ofono/2320xxxxxxxxxxxxxxx # ls -la
total 40
drwx------    4 radio    radio         4096 Nov 12 21:21 .
drwx------    4 radio    radio         4096 Nov 12 21:18 ..
-rw-------    1 radio    radio           32 Nov 12 21:21 cbs
-rw-------    1 radio    radio          497 Nov 12 21:16 gprs
-rw-------    1 radio    radio            0 Nov 12 15:28 ims
-rw-------    1 radio    radio           21 Nov 12 15:28 netreg
-rw-------    1 radio    radio           55 Nov 12 21:16 radiosetting
-rw-------    1 radio    radio           72 Nov 12 21:16 sms
drwx------    6 radio    radio         4096 Nov 11 18:16 sms_assembly
drwx------    2 radio    radio         4096 Nov 12 21:29 tx_queue
-rw-------    1 radio    radio           24 Nov 12 21:16 voicecall

root@PGJollaC2:/var/lib/ofono/2320xxxxxxxxxxxxxxx # find sms_assembly/
sms_assembly/
sms_assembly/14D0xxxxxxxxxxxxxxxxxxxxxxxxxx-225-2
sms_assembly/14D0xxxxxxxxxxxxxxxxxxxxxxxxxx-225-2/002
sms_assembly/0ED0xxxxxxxxxxxxxxxxxxxx-197-2
sms_assembly/0ED0xxxxxxxxxxxxxxxxxxxx-197-2/002
sms_assembly/0ED0xxxxxxxxxxxxxxxxxxxx-62-2
sms_assembly/0ED0xxxxxxxxxxxxxxxxxxxx-62-2/002
sms_assembly/14D0xxxxxxxxxxxxxxxxxxxxxxxxxx-29-2
sms_assembly/14D0xxxxxxxxxxxxxxxxxxxxxxxxxx-29-2/002
root@PGJollaC2:/var/lib/ofono/2320xxxxxxxxxxxxxxx # rm -r sms_assembly/* -f

root@PGJollaC2:/var/lib/ofono # cd 2320xxxxxxxxxxxxxxx-3/
root@PGJollaC2:/var/lib/ofono/2320xxxxxxxxxxxxxxx-3 # ls
version
root@PGJollaC2:/var/lib/ofono/2320xxxxxxxxxxxxxxx-3 # cat version
root@PGJollaC2:/var/lib/ofono/2320xxxxxxxxxxxxxxx-3 # cd ..



root@PGJollaC2:/home/.system # cd var/lib/connman
root@PGJollaC2:/home/.system/var/lib/connman # ls
cellular_2320xxxxxxxxxxxxxxx_context1  iptables
global_proxy                       settings
root@PGJollaC2:/home/.system/var/lib/connman # ls -la
total 24
drwx------    5 root     root          4096 Nov 11 15:29 .
drwxr-xr-x    6 root     root          4096 Oct 19 19:32 ..
drwx------    2 root     root          4096 Nov 11 15:31 cellular_2320xxxxxxxxxxxxxxx_context1
drwx------    2 root     root          4096 Nov 12 21:23 global_proxy
drwx------    2 root     root          4096 Nov 12 21:23 iptables
-rw-------    1 root     root           165 Oct 30 21:35 settings
root@PGJollaC2:/home/.system/var/lib/connman # cd cellular_2320xxxxxxxxxxxxxxx_context1/
root@PGJollaC2:/home/.system/var/lib/connman/cellular_2320xxxxxxxxxxxxxxx_context1 # ls -la
total 12
drwx------    2 root     root          4096 Nov 11 15:31 .
drwx------    5 root     root          4096 Nov 11 15:29 ..
-rw-------    1 root     root           176 Nov 11 15:31 settings
root@PGJollaC2:/home/.system/var/lib/connman/cellular_2320xxxxxxxxxxxxxxx_context1 # cat settings
[cellular_2320xxxxxxxxxxxxxxx_context1]
Name=S-BUDGET MOBILE
Favorite=false
AutoConnect=false
Modified=1970-01-01T01:00:00Z
IPv4.method=dhcp
IPv6.method=auto
IPv6.privacy=disabled


root@PGJollaC2:/home/.system/var/lib/connman/cellular_2320xxxxxxxxxxxxxxx_context1 # rm settings
rm: remove 'settings'? y
root@PGJollaC2:/home/.system/var/lib/connman/cellular_2320xxxxxxxxxxxxxxx_context1 # cd ..
root@PGJollaC2:/home/.system/var/lib/connman # rmdir cellular_2320xxxxxxxxxxxxxxx_context1/
``
3 Likes