bent55
Posts: 13
Joined: Mon Dec 07, 2015 7:21 pm

How can I transfer any image file with bluetooth using JAVA?

Thu Feb 11, 2016 2:53 pm

Hi,
I want to image transfer from Android phone to JAVA program. I use raspberry pi 2 and I have HC-05 bluetooth module. Specifically, I want to transfer image file in any raspberry directory such as /home/pi/images folder. How can I transfer any image file with bluetooth on raspberry pi 2 using JAVA program?

Thank you.

User avatar
Douglas6
Posts: 4874
Joined: Sat Mar 16, 2013 5:34 am
Location: Chicago, IL

Re: How can I transfer any image file with bluetooth using J

Thu Feb 11, 2016 3:02 pm

Using an HC-05, you are limited to serial communications. You could try installing PPP, you could use ancient serial protocols like xmodem, or you could simply read and write the file a few bytes at a time. Transfer speeds will vary from slow to really slow.

bent55
Posts: 13
Joined: Mon Dec 07, 2015 7:21 pm

Re: How can I transfer any image file with bluetooth using J

Thu Feb 11, 2016 3:31 pm

Thank you for your reply.

Actually, I was wrong. I use HC-06. Is it different? If it is very slow, how can I transfer image with WiFi direct?

scotty101
Posts: 3958
Joined: Fri Jun 08, 2012 6:03 pm

Re: How can I transfer any image file with bluetooth using J

Thu Feb 11, 2016 3:43 pm

Have you seen this?

http://www.instructables.com/id/Make-Ra ... th-Object/

You probably need a USB Bluetooth adapter rather than the one you have since it is limited to a serial protocol.

P.S. WiFi direct and Bluetooth are totally different things.....
Electronic and Computer Engineer
Pi Interests: Home Automation, IOT, Python and Tkinter

User avatar
Douglas6
Posts: 4874
Joined: Sat Mar 16, 2013 5:34 am
Location: Chicago, IL

Re: How can I transfer any image file with bluetooth using J

Thu Feb 11, 2016 3:52 pm

Yes, the HC-05 and HC-06 are essentially the same. With a USB Bluetooth dongle, you can use OBEX file exchange, but if WiFi is an option, that's the way to go.

Return to “Java”