This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Byte[] transfer problems : (

 
Zac Styris
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All

I have a bluetooth phone application and a PC server appliction where i'm sending a picture taken from the phone to the server via bluetooth, i'm sending the image as an byte[] using dataoutput stream n receiving in an input stream, this method only excutes for small images like less than 40kb, and gets stuck for larger sizes, i'm really in need of sending images more like in the range of 600kb,someone please help me with this issue.

Thanks
 
saad sal
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am working on a similar project in which I have to send images from a PC to the phone. I've came across a similar problem. Check this article out. It may help.

http://java.sun.com/developer/technicalArticles/Programming/compression/

By the way. Are you using J2SE on the PC side? If so what type of connection are you using? RFCOMM?
 
Zac Styris
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply. Well i actually got it working by breaking the byte[] in to small 20kb chunks and sending one chunk n waiting for like 200 millisendons before sending the other one. now it works for me, if u dun wait for a while after each chunk again the channel gets stuck.

Yea i'm using J2SE with bluecove package in the PC side and a RFCOMM serial port connection.

Thanks
 
saad sal
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi again,
I was having some trouble with the BlueCove connection. I have setup the BlueCove on the PC and it is working fine and the server "waits for client connections."
Here is the J2ME code I am using for the client side.


There is no build or run error in the code, but when I run the application it is unable to find any server.
I am running this on a Nokia 6630 whereas the server runs on the PC.

I would appreciate any help i can get.
[ February 05, 2006: Message edited by: Jim Yingst ]
 
Joe Ess
Bartender
Pie
Posts: 9259
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Saad, please do not post the same question in multiple forums. I see you've already posted additional information in the J2ME forum which makes this topic out of date. Anyone posting a followup should refer to the J2ME post before posting here.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic