Jun 9, 2005

Java, Bluetooth and JSR082 troubles

I picked my final year project, decided to code it in Java. JSR82, a Java specification for Bluetooth makes everything sound so simple. It is simple, its just that not all the profiles and Bluetooth goodies are implemented. And for implementation, even the mobile phone makers are giving me trouble, only high-spec expensive phones are JSR82 compliant, and that's not even 100% compliant. Most doesn't support OBEX :/

My project is simple, a server to transfer files between a personal computer and a mobile phone. The trouble. Bluetooth stacks, Java Bluetooth stacks, Bluetooth sticks, yadaa yadda. Nothing is simple. Microsoft only fully supports Bluetooth after the release of SP2. And before that, the whole world is using WIDCOMM stacks. The USB stick that I bought, only suppports WIDCOMM stacks. And the worst thing, the Java stack I was using, only supports Ms Bluetooth stacks.

I got fed up, did what most people did, and turned to open source. Now I'm using Avetana as my Bluetooth stack. Its free for Linux atleast. This is because the c library is modified from a GPLed code. And it works with Bluez. Linux isn't so bad, with the help of Eclipse, the best IDE out there, for Java atleast. Java codes are easily made portable, so the server isn't really platform dependent.

Or so I thought. While coding, JSR82 specifications doesn't support file transfer, or even object transfers ! What I did, was I check some samples from Sun's WTK. There is an example for image transfer. If it works on image, it should work on other files. I studied the code. Well, it isn't so bad. If u can't transfer files as objects or files, what do you do ? Send them as byte arrays. Low-level APIs. Great. Now my documentation will look 1337.

I've done the server part now. Its 3am. I need to get some sleep. I'll do the client part tomoro. Yea, the part where you take the bytes and put them back into files >.<

That is not even the end of my troubles yet. I need to test it on a real working environment, and I have yet to borrow a JSR82 compliant phone.

Bahhhh, final year projects don't get worst than this, I hope.

P/S Bleach 35 is translated !!!!!!! Woohooo

No comments:

Post a Comment