I am making a j2me application to send an image (taken from a camera) to a PC for further processing. Can I send it over bluetooth using ftp to the pc ?
views:
323answers:
3Probably not FTP, but you'll want to take a look at JSR-82, the Java Bluetooth APIs. Tutorials are available at that site.
I don't know for FTP too, but I used OBEX and avetanaOBEX implementation for transferring files.
If you use JSR-82, you can connect a mobile and PC using Bluetooth and send/receive using input/output streams for the wireless transfer, and link those streams to reading and writing your files.
The J2ME GCF supports Bluetooth using URLs such as btspp:// and btl2cap:// URLs to open connections. There's a good introduction on Bluetooth programming here. Or even better, there's a tutorial on using OBEX for transferring images here.
Bear in mind, to do Bluetooth on a desktop PC (in Java SE), you will need a JSR-82 implementation for the desktop to interface with your Bluetooth chip - you can use something like Bluecove (free) or Avetana (non-free).