UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Trying to revive 'ubtd' (Bluetooth file transfer)

    Scheduled Pinned Locked Moved Solved App Development
    108 Posts 9 Posters 16.7k Views 5 Watching
    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.
    • P Offline
      PhAndersson @gpatel-fr
      last edited by

      @gpatel-fr said:

      @PhAndersson

      I have just switched my phone back to 24.04-1.3 and obex is definitely started automatically.

      Not in my case (Volla Quintus upgraded to 24.04-1.3 from 20.04/OTA-12). obexd is not started by default, but Ratatoskr is still able to start it transparently, so the end result is the same.

      But the Quintus is currently unable to successfully connect over BT to my laptop (or another UT phone, for that matter) -- see Noble bluetooth issues -- so I'm a bit stuck in my plans to validate Ratatoskr on Noble at the moment.

      Daily driver: Google Pixel 3a (20.04 OTA-11/stable) [was: Nokia N900 (Maemo) from 2009].
      Volla Quintus (24.04-2.0 beta/RC) with 2 SIMs
      Xiaomi Mi A2 (16.04 OTA-25/stable) initially with 2 SIMs
      ๐Ÿ‡ซ๐Ÿ‡ท ๐Ÿ‡ฌ๐Ÿ‡ง ๐Ÿ‡ฎ๐Ÿ‡น

      G 1 Reply Last reply Reply Quote 0
      • G Offline
        gpatel-fr @PhAndersson
        last edited by

        @PhAndersson said:

        (Volla Quintus upgraded to 24.04-1.3 from 20.04/OTA-12). obexd is not started by default,

        that's strange.

        What's the output of

        systemctl --user cat obex

        and

        systemctl --user status obex

        (obviously do this after a phone restart)

        P 1 Reply Last reply Reply Quote 0
        • P Offline
          PhAndersson @gpatel-fr
          last edited by

          @gpatel-fr said:

          @PhAndersson said:

          (Volla Quintus upgraded to 24.04-1.3 from 20.04/OTA-12). obexd is not started by default,

          that's strange.

          What's the output of

          systemctl --user cat obex

          # /usr/lib/systemd/user/obex.service
          [Unit]
          Description=Bluetooth OBEX service
          
          [Service]
          Type=dbus
          BusName=org.bluez.obex
          ExecStart=/usr/libexec/bluetooth/obexd
          
          [Install]
          Alias=dbus-org.bluez.obex.service
          
          # /usr/lib/systemd/user/obex.service.d/ubuntu-touch-session.conf
          [Service]
          ExecStart=
          ExecStart=/usr/libexec/bluetooth/obexd -P ftp,irmc,mas,pcsuite -r $HOME
          

          and

          systemctl --user status obex

          รขย—ย‹ obex.service - Bluetooth OBEX service
               Loaded: loaded (/usr/lib/systemd/user/obex.service; enabled; preset: enabled)
              Drop-In: /usr/lib/systemd/user/obex.service.d
                       รขย”ย”รขย”ย€ubuntu-touch-session.conf
               Active: inactive (dead)
          

          I also checked 'journal' for any OBEX-related message, but there aren't any.

          Daily driver: Google Pixel 3a (20.04 OTA-11/stable) [was: Nokia N900 (Maemo) from 2009].
          Volla Quintus (24.04-2.0 beta/RC) with 2 SIMs
          Xiaomi Mi A2 (16.04 OTA-25/stable) initially with 2 SIMs
          ๐Ÿ‡ซ๐Ÿ‡ท ๐Ÿ‡ฌ๐Ÿ‡ง ๐Ÿ‡ฎ๐Ÿ‡น

          G 1 Reply Last reply Reply Quote 0
          • G Offline
            gpatel-fr @PhAndersson
            last edited by

            @PhAndersson

            you are correct, I missed that because I'm mostly on 26.02 these days. I switched back briefly to 24.04 stable and I could repro.
            It's probably a service order start problem since starting obex manually succeeds, I will have to investigate it.

            1 Reply Last reply Reply Quote 0
            • K Offline
              kristatos
              last edited by

              I'm having a problem with sending/receiving files and my Volla22. I opened the Gallery, selected a picture and tapped on sharing via Bluetooth-Plugin. In the next window I selected my Laptop and then the transmission dialog comes up. On my Laptop there comes up a notification that my Volla22 is now connected and 1-2 seconds later a notification that it's disconnected. At the same time the Bluetooth-Plugin on my phone says that the transmission has failed. In the output of
              systemctl --user status obex
              I found for this time
              Unable to find service record
              Sending/receiving between my Laptop and other devices is working like expected, only the Volla with BT-Plugin and 24.04.-1.x stable does not. Any idea?

              BQ Aquaris E4.5 (UT 16.04)
              Vollaphone (UT 24.04)
              Vollaphone 22 (UT 24.04)

              G 1 Reply Last reply Reply Quote 0
              • G Offline
                gpatel-fr @kristatos
                last edited by gpatel-fr

                @kristatos

                maybe doing some more tests.
                I tried it again with my phone (FP5) setup with 24.04-1.3 stable and succeeded with receiving and sending test files.

                However I have reproduced some of your problems.

                Not the obex service not known. This was not happening for me.

                I have seen the disconnection of Bluetooth happening though. Strangely the Bluetooth page for the device (an Android phone) was displaying the device as connected BUT with no signal, then disconnected very soon after (may seem logical given there was no signal).
                I removed each phone from the Bluetooth configuration of both phones, tried again and this time the signal was rated 'excellent'. It then stayed connected. Needless to say, for all these tests the phones were sitting on a table very near of each other. It looks as if the state of connection is rated with 'no signal', it's staying so even if the real connection is good. In this case the pairing had been done much before and the phones had both been off or way to distant of each other to talk with Bluetooth.

                After solving this connection problem, I think another trouble may be that if a transfer is not acknowledged by the receiving end, all following transfers fail. Not sure but it looks like that. This problem was happening with a transfer UT -> Android.
                If my impression is correct, it may be a problem with the app (the connection problem mentioned before is probably more caused by the system bluetooth stack).

                K P 2 Replies Last reply Reply Quote 0
                • K Offline
                  kristatos @gpatel-fr
                  last edited by

                  @gpatel-fr I tried some things again and now I can send files from my Laptop to my phone. The other way still doesn't work and almost instantly ends up in an error of failed transmission.
                  I deleted each of the devices in their list of paired devices. After that I paired them again. Now the connection doesn't get disconnected after the failed transmission, but the transmission from phone to laptop still fails. Is the BT-Plugin providing any Logs where I can look at?

                  BQ Aquaris E4.5 (UT 16.04)
                  Vollaphone (UT 24.04)
                  Vollaphone 22 (UT 24.04)

                  G 1 Reply Last reply Reply Quote 0
                  • G Offline
                    gpatel-fr @kristatos
                    last edited by

                    @kristatos

                    yes however logging happens at the generic journal level, there is no prefix to filter on. Entries are listed under 'aa-exec' and usually include the app name (ratatoskr) in the listed paths, you can try

                    journalctl -b | grep ratato

                    There is also logging done by obex that you can list using

                    systemctl --user -e -u obex

                    1 Reply Last reply Reply Quote 0
                    • P Offline
                      PhAndersson @gpatel-fr
                      last edited by PhAndersson

                      @gpatel-fr: Just performed the same test as you on the Quintus: "forgot" phone on laptop and laptop on phone, then re-paired. This time, the pairing was easier, the phone kept on showing the laptop as connected (same on the laptop side), but the Settings | Bluetooth page for the laptop shows signal strength as "none" (even though both devices are only 10 cm apart).

                      Another weird thing is that, although the laptop is still listed as connected, the Bluetooth indicator in the status bar at top shows "disconnected".

                      Still, I was able to push a file from the laptop to the phone.

                      (The phone in question is still on 24.04-2.0 beta/RC).

                      Daily driver: Google Pixel 3a (20.04 OTA-11/stable) [was: Nokia N900 (Maemo) from 2009].
                      Volla Quintus (24.04-2.0 beta/RC) with 2 SIMs
                      Xiaomi Mi A2 (16.04 OTA-25/stable) initially with 2 SIMs
                      ๐Ÿ‡ซ๐Ÿ‡ท ๐Ÿ‡ฌ๐Ÿ‡ง ๐Ÿ‡ฎ๐Ÿ‡น

                      P 1 Reply Last reply Reply Quote 0
                      • P Offline
                        PhAndersson @PhAndersson
                        last edited by

                        Just tried the other direction (phone to laptop). Successful as well.

                        Daily driver: Google Pixel 3a (20.04 OTA-11/stable) [was: Nokia N900 (Maemo) from 2009].
                        Volla Quintus (24.04-2.0 beta/RC) with 2 SIMs
                        Xiaomi Mi A2 (16.04 OTA-25/stable) initially with 2 SIMs
                        ๐Ÿ‡ซ๐Ÿ‡ท ๐Ÿ‡ฌ๐Ÿ‡ง ๐Ÿ‡ฎ๐Ÿ‡น

                        P 1 Reply Last reply Reply Quote 0
                        • P Offline
                          PhAndersson @PhAndersson
                          last edited by

                          Disconnected phone from laptop, then reconnected: connection still looks stable, still able to transfer (larger) file from phone to laptop (signal strength still reported as "none").

                          No idea what could have caused the problem or why it's suddenly fixed.

                          Could it somehow be related to the fact that the clock is now reasonably synched? I know that an out-of-synch clock can prevent SSL cert validation. Is there a comparable validation built in the BT protocol?

                          Daily driver: Google Pixel 3a (20.04 OTA-11/stable) [was: Nokia N900 (Maemo) from 2009].
                          Volla Quintus (24.04-2.0 beta/RC) with 2 SIMs
                          Xiaomi Mi A2 (16.04 OTA-25/stable) initially with 2 SIMs
                          ๐Ÿ‡ซ๐Ÿ‡ท ๐Ÿ‡ฌ๐Ÿ‡ง ๐Ÿ‡ฎ๐Ÿ‡น

                          G 1 Reply Last reply Reply Quote 0
                          • G Offline
                            gpatel-fr @PhAndersson
                            last edited by

                            @PhAndersson said:

                            Could it somehow be related to the fact that the clock is now reasonably synched?

                            I don't think so, for the following reasons:

                            • I did give you the hint about recreating the connection, and I don't have a mediatek device
                            • date problems for ssl come from the securing through a certificate infrastructure, that don't make much sense for Bluetooth, whose hacking radius is 10 meters vs 40000 km for standard internet networking
                            • updating certificates and certificates lists would be unfeasible for many Bluetooth devices that don't even have an Internet link

                            This said, if you want to try it out, it's easy: just re-enable the qualcomm time service and check again.

                            1 Reply Last reply Reply Quote 0

                            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                            With your input, this post could be even better ๐Ÿ’—

                            Register Login
                            • First post
                              Last post