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..
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!