File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

midp 2 i/o question

 
Jason Fox
Ranch Hand
Posts: 114
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK, I'm working on a Motorola i730, which implements midp 2.0. I need to open a serial connection (which i've done) ala

then I need to open both an input and an output stream, which is easy enough:

here's the tricky part:
I need to have both streams running simultaneously. This is for a custom device I'm building. The output stream is used to send voltage to a NAND gate, which when closed disallows all i/o, so the OutputStream must be sending data in order for the InputStream to work. I have tried as many configurations as I can think of, and I'm running out of ideas. Any help would be greatly appreciated. I've included my latest attempt (this is in a commandAction method, for testing) below:

Jason Fox
 
Michael Yuan
author
Ranch Hand
Posts: 1427
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the error message you got? I do not have that Moto handset though ...
 
Jason Fox
Ranch Hand
Posts: 114
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No error msg, just that I cannot do a simultaneous read/write. As soon as I do a read, the OutputStream shuts down, along with the InputStream, and the CommConnection, and even if I exit the loop (in order to test the receipt of data) any state changes I have (calling methods, appending to a form or repainting a canvas are what I've tried) never occur, even though the code is outside of any I/O loops.
Jason
 
Jason Fox
Ranch Hand
Posts: 114
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, I figured it out, finally. For some reason when the i730 is transmitting data OUT, the IN line no longer sees +3V As a '1', it sees '0' until around +4V. We're still trying to figure it out, make sure its not something we're doing. Any thoughts would be appreciated.
Jason
 
Michael Yuan
author
Ranch Hand
Posts: 1427
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thansk for sharing this, Jason, Have you tried to contact Motorola's support people?
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic