what should I do in order to view the contents of pendrive (which is mounted on pi)on mobile phone android, when connected with blue tooth (blue tooth module is connected on gpio). A new file should be created in file manager.. someone suggested me obexpushd to send the file in that usb port how does it works? i am using raspbian on pi.. need further help..

  • Welcome to raspberrypi stack exchange. In order to help you, a bit more information would be helpful. What operating system are you running on your pi and on your phone? What is a pendrive? Also, in order for this question to be helpful to others, proper capitalization, parenthetization and punctuation would be in order. Also include what you tried so far and how the results differed from the expected ones. Setting -1 for time being.
    – Bex
    Sep 17, 2014 at 6:34
  • Sorry, I think this got even more confusing. Do you want to mount it or browse it of manipulate the files on it? If you tell us what you want to achieve, it will be a lot easier to answer.
    – Bex
    Sep 17, 2014 at 15:05
  • @Bex my main goal is to view the contents of pendrive which is connected to the pi on mobile phone and i want to acheive this through bluetooth (as i am using bluetooth module with pi)
    – radhika
    Sep 17, 2014 at 16:41
  • Ok - so what do you want to do with it once you view it?
    – Bex
    Sep 17, 2014 at 17:35
  • @Bex I want to read the data of pendrive on mobile and also edit(delete, copy, paste)it's contents from mobile
    – radhika
    Sep 18, 2014 at 8:43

3 Answers 3


If I understand your question correctly, you have a USB mass storage device (pendrive) connected to your RPi, and you want to use the file manager on an Android mobile phone to connect to the RPi and read and write files on USB device.

The normal Bluetooth way of doing this would be using the OBEX File Transfer Profile (OBEX FTP). It ought to be possible, but is complicated. To make it work, you need to check the following:

  • Your pendrive is mounted read-write, with correct permissions to let your bluetooth software access it.
  • Your bluetooth software supports both your bluetooth hardware module and OBEX FTP.
  • Your bluetooth software is configured correctly to enable the OBEX FTP profile and to allow files to be read and written to the pendrive using the profile.
  • Your Android phone and RPi are properly paired and can connect over bluetooth.
  • Your Android file manager supports OBEX FTP.

Your HC-05 bluetooth module connects to the RPi's Broardcom UART and appears as serial port /dev/ttyAMA0. You can use this port to configure the bluetooth module, as per this blog

Once the module is configured, install bluez. You can install this with

sudo apt-get install bluetooth bluez-utils blueman

I think that you will need to use hciattach to allow bluez to recognize the bluetooth module connected to the UART, then set up the bluetooth connection as normal (google for a tutorial), then use obexd to provide the OBEX FTP service. All the software you need to make it work properly and let you transfer files is probably in the bluez bluetooth stack.

Unfortunately, I can't see much documentation for this online, and I haven't got the hardware to test it myself, so you will have to read the documentation and man pages for the bluez utilities quite carefully. Good luck!


Well just my theory....

If you can do IP-over-Bluetooth then create a FTP server on Pi which has your pendrive mounted on shared mount point,then you should be able to access your pendrive via FTP IP on your phone


@JRI our android system is based on linux so it will support OBEX FTP?? Is'nt that already installed in phones or will we have to download that package on phones? or any software from store?

  • @JRI i am using raspbian os on pi & using hc-05 bluetooth module ..do i have to use a seperate bluetooth s/w to control the bluetooth module as you said above??
    – radhika
    Sep 18, 2014 at 13:03
  • @shruti - I think all Bluetooth hardware will support OBEX FTP, but the software to make it work isn't normally installed on phones by default. There are lots of Android OBEX FTP apps in the Play Store though.
    – JRI
    Sep 25, 2014 at 21:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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