2

This question may have already been asked but I just can't find how to make it work.

So far this is what I have found (and failed):

  • Using obexpush (the command doesn't even exist, the closest match is obex_push)
  • Using obexftpd fails with 'register to SDP server failed.' Waiting for connection. and nothing else happens, I can't receive files.
  • obex_push also fails with sdptool add --channel=12 OPUSH (12 is the OPUSH channel on my cellphone, found using hcitool browse).

So far I can pair, connect and 'trust' my device using bluetoothctl and stream audio plus internet connection to my PC but that's about it. I can't seem to find a way to send a file from my cellphone to the PC. Is there any way to do this or at least a reference as to how all of this works?

0

Ok, so I've managed to get it working, it was just an issue with bluez 5 and its lack of backwards compatibility with bluez 4. As fair as I could understand you first have to add an sdp listener, service or whatever, using: sdptool add OPUSH in order to let the PC listen for incoming obex push messages, bus since sdptool expects the bluez 4 api, it fails to create the service. I noticed this because sdptool browse local failed too, and doing some research I learned about the bluez 4/5 thing. This is the reason why obex_push and obexftp failed too. In the end, the solution was to start the daemon in compatibility mode, by adding the --compat parameter to the executable, or rather, in the systemd file (in my case):

vi /usr/lib/systemd/system/bluetooth.service

and under [Service]:

ExecStart=/usr/libexec/bluetooth/bluetoothd -> ExecStart=/usr/libexec/bluetooth/bluetoothd --compat

I actually created two separate service files, bluetooth.service with the default config and bluetooth-compat.service with the compat flag and made it the default:

]# systemctl disable bluetooth.service
]# systemctl enable bluetooth-compat.service

I started the daemon again and now sdptool works just fine and I have just transfered a couple of medium sized files (5 MB). Great.

  • Not worked in fedora 25 – fikr4n Dec 17 '16 at 5:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.