*
The moose likes Java Micro Edition and the fly likes midp 2 i/o question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "midp 2 i/o question" Watch "midp 2 i/o question" New topic
Author

midp 2 i/o question

Jason Fox
Ranch Hand

Joined: Jan 22, 2004
Posts: 114
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

Joined: Mar 07, 2002
Posts: 1427
What is the error message you got? I do not have that Moto handset though ...


Seam Framework: http://www.amazon.com/exec/obidos/ASIN/0137129394/mobileenterpr-20/
Ringful: http://www.ringful.com/
Jason Fox
Ranch Hand

Joined: Jan 22, 2004
Posts: 114
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

Joined: Jan 22, 2004
Posts: 114
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

Joined: Mar 07, 2002
Posts: 1427
Thansk for sharing this, Jason, Have you tried to contact Motorola's support people?
 
 
subject: midp 2 i/o question
 
Similar Threads
Problem in openning serial port
Regarding Serial Port Commuication.
Connecting to Serial Port on Motorola i85s
Serial communication possible on SPV C500?
Serial Port Profile baud rate problems