Navigation

    UBports Robot Logo

    UBports Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Unable to read SIM contacts

    Support
    3
    5
    570
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • F
      farkasdvd last edited by

      I'm running Ubuntu Touch 16.04/development (also tried 16.04/stable). When I try to import contacts from the SIM card (in the Contacts app), it says Fail to read SIM card. Calls work, so the SIM should be OK.
      Does anyone know a workaround for this, e.g. reading the SIM contacts from the Terminal?

      P.S.: previously I was running Android on the same phone with the same SIM card. The contacts were saved to the SIM card only.

      advocatux 1 Reply Last reply Reply Quote 0
      • advocatux
        advocatux @farkasdvd last edited by

        @farkasdvd I've asked in the QA group to see if anyone else is experiencing the same issue

        1 Reply Last reply Reply Quote 0
        • F
          farkasdvd last edited by

          I did a little bit of research. Contacts communicates with ofono (the modem interface) via D-bus.
          So, just started dbus-monitor and then tried to import the contacts. Contacts correctly sends the request (ofono documentation😞

          method call time=1537922880.561822 sender=:1.106 -> destination=org.ofono serial=2 path=/ril_0; interface=org.ofono.Phonebook; member=Import

          but there was no answer. When I tried to do the import for the second time, an answer came:

          method call time=1537922880.561822 sender=:1.106 -> destination=org.ofono serial=2 path=/ril_0; interface=org.ofono.Phonebook; member=Import
          error time=1537922880.561933 sender=:1.44 -> destination=:1.105 error_name=org.ofono.Error.InProgress reply_serial=2
          string "Operation already in progress"
          error time=1537922880.562014 sender=org.freedesktop.DBus -> destination=:1.44 error_name=org.freedesktop.DBus.Error.ServiceUnknown reply_serial=257
          string "The name :1.105 was not provided by any .service files"

          It was an error that the request is already in progress, however ofono for some reason sent it to a different destination. Therefore, D-bus didn't forward it to Contacts.
          I also tried to wait longer (maybe just the import takes longer), but even after 5 hours the answer was "already in progress" (with the wrong destination, as well).
          Then I found an old SIM in my drawer which was already blocked but it had some saved contacts. I tried the same procedure on it and the correct answer arrived almost instantly:

          method call time=1537944623.758662 sender=:1.106 -> destination=org.ofono serial=2 path=/ril_0; interface=org.ofono.Phonebook; member=Import
          method return time=1537944623.759495 sender=:1.43 -> destination=:1.106 serial=263 reply_serial=2
          string "BEGIN:VCARD VERSION:3.0 <OUTPUT OMITTED>"

          So, maybe my SIM is damaged after all. I will try to look into ofono why it gets stuck and why it sends the answer with wrong destination.

          1 Reply Last reply Reply Quote 3
          • truscellino
            truscellino last edited by

            Interesting investigations, thank you!
            I had issues with contacts on SIM cards as well but never bothered to look into it - beyond my skills I reckon. But it would be interesting to see if you can get to some conclusions...

            1 Reply Last reply Reply Quote 1
            • F
              farkasdvd last edited by

              Managed to find a workaround. If you restart ofono (sudo initctl restart ofono), the import suddenly starts working. The drawback is that your phone goes offline and you will have to restart to get it back online.
              The pattern seems to be, that if your SIM is offline, import works. My 2nd SIM is blocked, therefore it stood offline and the import worked on the first try.
              Unfortunately, switching to flight mode doesn't work, because it simulates a modem with no SIM card.

              1 Reply Last reply Reply Quote 2
              • First post
                Last post