开发者

Is there a way to send a file over bluetooth using j2me and ftp protocol from a mobile to a pc

开发者 https://www.devze.com 2022-12-25 05:21 出处:网络
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 ?If you use JSR-82, you can conn

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 ?


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


I don't know for FTP too, but I used OBEX and avetanaOBEX implementation for transferring files.


I found an excellent example of how to connect PC and J2ME Mobile phone in this blog.

mobile-programming-and-games_java-connect-pc-and-mobile-phone-over

and include code source for testing!...

Check this video

youtube_iiM0C5cx_H0


Probably not FTP, but you'll want to take a look at JSR-82, the Java Bluetooth APIs. Tutorials are available at that site.

0

精彩评论

暂无评论...
验证码 换一张
取 消