Loading ...
Sorry, an error occurred while loading the content.

500Re: mailbox protocol using Mailbox.java on linux

Expand Messages
  • graniterose2003
    Jul 31, 2011
    • 0 Attachment
      Answering my own question:

      The "early close" problem results from the linux host sending a couple of messages and then calling mailbox.close(); The send's are queued, and the close() may happen before the send thread runs, so the sender needs to wait for confirimation (a message) from the robot, before doing a close.

      The linux host was hanging and not exiting because with the RXTX software one needs to seriaPort.close() to release the serial port.
      (also System.exit() would defeat the hang).

      all is well.
      --- In intellibrain@yahoogroups.com, "graniterose2003" <graniterose2003@...> wrote:
      > Anyone had any success using the Mailbox.java on a linux host using the serial cable?
      > On the robot, I run IBBHostInterface.java, and i built a linux host java program using Mailbox.java. The robot never completes its mailbox open (faultLED stays on). Watching what the linux host sends and receives over the seral port, I see the following:
      > if linux hosts starts first, it sends open (1) messages every second.
      > When the robot is started, it sends open (1), and then host sends ack-open (2), and robot sends back 0x81, but then host sends close(3) and hangs ... ??
      > if robot starts first, then when host is started, host send open(1) and receives open-ack(2) from robot,then host sends close(3) and hangs ....
      > thanks
    • Show all 2 messages in this topic